I am working with an application in delphi. I need to use MIDIYOKE to send output from my application to another application. The second application is a virtual piano keyboard.
I installed all the packages and got the MIDI components in delphi.
I tried using the MidiOutputPort1 and MidiInput1 components. I tried to play one MIDI. The code is as follows:
procedure TForm3.Button1Click(Sender: TObject); var outputPort : TMidiOutputPort; begin outputPort := TMidiOutputPort.Create (Nil); try outputPort.PortId := -1; outputPort.Active := True; outputPort.PatchChange(0, 127, 0); // Gunshot outputPort.NoteOn (1, 20, 127); // Play note at full volume Sleep (1000); outputPort.NoteOff (0, 60, 0); finally outputPort.Free end end;
I wanted to project the connection between my application and the piano virtual keyboard. How to use MidiOutputPort1 and MidiInput1 to connect between them.
source share