예제 #1
0
 // Constructor using a combobox for full device watch:
 public MIDI(Integra7Random_Xamarin.MainPage mainPage, MainPage mainPage_UWP, Picker OutputDeviceSelector, Picker InputDeviceSelector, byte MidiOutPortChannel, byte MidiInPortChannel)
 {
     this.mainPage           = mainPage;
     this.MainPage_UWP       = mainPage_UWP;
     midiOutputDeviceWatcher = new MidiDeviceWatcher(MidiOutPort.GetDeviceSelector(), OutputDeviceSelector, mainPage_UWP.Dispatcher_UWP);
     midiInputDeviceWatcher  = new MidiDeviceWatcher(MidiInPort.GetDeviceSelector(), InputDeviceSelector, mainPage_UWP.Dispatcher_UWP);
     midiOutputDeviceWatcher.StartWatcher();
     midiInputDeviceWatcher.StartWatcher();
     this.MidiOutPortChannel = MidiOutPortChannel;
     this.MidiInPortChannel  = MidiInPortChannel;
 }
예제 #2
0
 public void Init(Integra7Random_Xamarin.MainPage mainPage, String deviceName, Picker OutputDeviceSelector, Picker InputDeviceSelector, object Dispatcher, byte MidiOutPortChannel, byte MidiInPortChannel)
 {
     this.mainPage           = mainPage;
     midiOutputDeviceWatcher = new MidiDeviceWatcher(MidiOutPort.GetDeviceSelector(), OutputDeviceSelector, (CoreDispatcher)Dispatcher);
     midiInputDeviceWatcher  = new MidiDeviceWatcher(MidiInPort.GetDeviceSelector(), InputDeviceSelector, (CoreDispatcher)Dispatcher);
     midiOutputDeviceWatcher.StartWatcher();
     midiInputDeviceWatcher.StartWatcher();
     this.MidiOutPortChannel = MidiOutPortChannel;
     this.MidiInPortChannel  = MidiInPortChannel;
     Init(deviceName);
 }