B4A Library MidiSystem

Michael Wenning

Member
Licensed 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:
Top