Beispiel #1
0
        static void Main(string[] args)
        {
            IEnumerable <string> task = MidiEngine.GetInputDevices();

            foreach (string s in task)
            {
                Console.WriteLine(s);
            }
        }
Beispiel #2
0
        /// <summary>
        /// Initializes a new instance of the MainViewModel class.
        /// </summary>
        public MainViewModel(IMidiDeviceService midiDeviceService)
        {
            samplerEngine = new MidiEngine();

            trackControls   = new ObservableCollection <TrackControl>();
            AddTrackCommand = new RelayCommand(AddTrack);

            this.midiDeviceService = midiDeviceService;
            this.midiDeviceService.GetDeviceNames(
                (names, error) =>
            {
                MidiDevices = names;
            });

            Messenger.Default.Register <TrackControl>(this, DeleteTrack);
        }