internal static MidiEventCollection <MidiInEvent> GetMidiBuffer(this MidiInPort port, uint nframes) { MidiEventCollection <MidiInEvent> eventCollection = new MidiEventCollection <MidiInEvent> (port); foreach (MidiInEvent midiEvent in port.GetMidiEvents(nframes)) { eventCollection.AddEvent(midiEvent); } return(eventCollection); }
unsafe void CreatePorts() { for (int i = 0; i < _audioInPorts.Length; i++) { _audioInPorts [i] = new AudioInPort (JackClient, i, PortNameFormat); } for (int i = 0; i < _audioOutPorts.Length; i++) { _audioOutPorts [i] = new AudioOutPort (JackClient, i, PortNameFormat); } for (int i = 0; i < _midiInPorts.Length; i++) { _midiInPorts [i] = new MidiInPort (JackClient, i, PortNameFormat); } for (int i = 0; i < _midiOutPorts.Length; i++) { _midiOutPorts [i] = new MidiOutPort (JackClient, i, PortNameFormat); } }