Ejemplo n.º 1
0
        public WebMidiPlayer(Uri uri, SmfMusic music)
            : base(music)
        {
            client = ChannelFactory<IMidiDeviceClient>.CreateChannel (new BasicHttpBinding (), new EndpointAddress (uri));
            client.Open ();

            MessageReceived += delegate (SmfMessage msg) {
                switch (msg.StatusByte) {
                case 0xF0:
                case 0xF7:
                    client.ProcessSysExMessage (msg.Data);
                    break;
                case 0xFF:
                    // do nothing
                    break;
                default:
                    client.ProcessMessage (msg.Value);
                    break;
                }
            };
        }
Ejemplo n.º 2
0
 public RtMidiPlayer(RtMidiOutputDevice output, SmfMusic music)
     : base(music)
 {
     this.output    = output;
     EventReceived += delegate(SmfEvent e) { SendMidiEvent(e); };
 }
Ejemplo n.º 3
0
 public PortMidiPlayer(MidiOutput output, SmfMusic music)
     : base(music)
 {
     this.output    = output;
     EventReceived += delegate(SmfEvent m) { SendMidiMessage(m); };
 }
Ejemplo n.º 4
0
 public PortMidiPlayer(MidiOutput output, SmfMusic music)
     : base(music)
 {
     this.output = output;
     EventReceived += delegate (SmfEvent m) { SendMidiMessage (m); };
 }