B4A Library MidiSystem

Michael Wenning

Member
Licensed User
Longtime User
Thank's Steve!

I have found a solution:

Class InstrumentList
Private mPno As Piano

Sub SendeProgramChange
Dim ProgrammChange As MidiEvent
Dim MMsg1 As MidiMessage

MMsg1.Initialize

' change to 5 ==> Electric Piano 2
MMsg1.setShortMessageWithStatus1(0xC0 , 0x05)

ProgrammChange.Initialize(MMsg1,0)
mPno.send(ProgrammChange)

End sub

class Piano:

Public Sub Send(MEvt As MidiEvent)
For Each MDi As MidiDeviceInfo In mMDI.Transmitter.Receivers
MDi.Receiver.Send(MEvt.Message.Message)
Next
If mSeqr.IsRecording Then MidiSequencerReceiver_Static.Send(MEvt.Message,-1)
End Sub

Best regards from Germany
Michael
 
Last edited:

stevel05

Expert
Licensed User
Longtime User
Updated in what way?
 

stevel05

Expert
Licensed User
Longtime User
I will put it on my list and take a look.
 

stevel05

Expert
Licensed User
Longtime User
Updated source code to latest version and added getShortMessageData3 To MidiMessage
 

stevel05

Expert
Licensed User
Longtime User
could you please let me know where I can finde the current version or "updated source code"?
Both are in the first post of this thread.
 

holgr

New Member
Hi Steve,

thank you very much! As a B4A newby, I wasn't Sure where to get the newest Version.

Cheers,
Holger
 

stari

Active Member
Licensed User
Longtime User
Hello stevel05.
I wish to try your Midi system, but i get error by compiling:
Linking resources Error
AndroidManifest.xml:33: error: resource xml/device_filter (aka com.stevel05.midilib:xml/device_filter) not found.
error: failed processing manifest.

I didn't change anything, but now I don't know what to do?

Greetings from Celje
 

stevel05

Expert
Licensed User
Longtime User
Have you downloaded the MidiDriver2 library linked in the first post?
 

GMan

Well-Known Member
Licensed User
Longtime User
And i got these errors in the IDE

[IDE message - 4:25:21]
Die folgenden Bibliotheken fehlen: (the following libs are missing)
nanotime
slbytearraybuffer
slstreams
threading
mididriver2
 

stevel05

Expert
Licensed User
Longtime User
And i got these errors in the IDE
These are libraries you would need to download to compile the source code to a library. Which you can if you want to. The source code was posted much later that the library for those interested, rather than to compile.

Download the library (midisystem2,zip) and the MidiDriver2 library linked in the first post. There are demos of it's use in other threads in the forum.
 

stari

Active Member
Licensed User
Longtime User
Have you downloaded the MidiDriver2 library linked in the first post?
Yes, i have downloaded all necessary libs. And i still get:
Linking resources Error
AndroidManifest.xml:33: error: resource xml/device_filter (aka com.stevel05.midilib:xml/device_filter) not found.
error: failed processing manifest.

Hm,......I can't solve it !!
 

stevel05

Expert
Licensed User
Longtime User
Have you downloaded the library or the project?
 

stevel05

Expert
Licensed User
Longtime User
But are you trying the library? See post#33
 

kimstudio

Active Member
Licensed User
Longtime User
Hi steve, I'd like to consult you on the update of Android midi system, does Android support play midi directly like Windows without using another midi to wav to play now? It seems it is a midi event dispatching system and to play the note we need another soundfont or synth module to play?
 

stevel05

Expert
Licensed User
Longtime User
Hi, yes it should play using the mididriver2 Lib unless something has changed in Android recently to stop it.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…