Beispiel #1
0
 public void CreateVirtualEndPoint(string name)
 {
     endpoint = client.CreateVirtualSource (name);
     endpoint.ReceiveChannels = 1;
     endpoint.TransmitChannels = 1;
     outputPort.ConnectSource (endpoint);
     endpoint.MessageReceived += endpointMessageReceived;
 }
Beispiel #2
0
		public MidiError Send (MidiEndpoint endpoint, MidiPacket [] packets)
		{
			if (endpoint == null)
				throw new ArgumentNullException ("endpoint");
			if (packets == null)
				throw new ArgumentNullException ("packets");
			var p = Midi.EncodePackets (packets);
			var code = MIDISend (handle, endpoint.handle, p);
			Marshal.FreeHGlobal (p);
			return code;
		}
Beispiel #3
0
		public MidiError Disconnect (MidiEndpoint endpoint)
		{
			if (endpoint == null)
				throw new ArgumentNullException ("endpoint");
			return (MidiError) MIDIPortDisconnectSource (handle, endpoint.handle);
		}
Beispiel #4
0
		public MidiError ConnectSource (MidiEndpoint endpoint)
		{
			if (endpoint == null)
				throw new ArgumentNullException ("endpoint");
			return (MidiError) MIDIPortConnectSource (handle, endpoint.handle, GCHandle.ToIntPtr (gch));
		}
Beispiel #5
0
 public void TransmitMidiData(MidiEndpoint endpoint, MidiMessage msg)
 {
     var packages = new MidiPacket[] { msg.ToMidiPacket () };
     outputPort.Send (endpoint, packages);
 }