1. *** New version of B4J is available ***
    B4J v7.8
    Dismiss Notice

B4A Library MidiSystem

Discussion in 'Additional libraries, classes and official updates' started by stevel05, Feb 1, 2015.

  1. Michael Wenning

    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: Mar 17, 2017
    stevel05 likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice