Exemplo n.º 1
0
        public static void playThread(MidiDevice Device, string note, int trmbre, int channel)
        {
            MutilVariable bus = new MutilVariable();

            bus.setdevice(Device);
            bus.setnote(note);
            bus.setchannel(channel);
            bus.settrmbre(trmbre);
            Thread t = new Thread(new ThreadStart(bus.run));

            //t.IsBackground = false;
            t.Start();
        }
Exemplo n.º 2
0
        /// <summary>
        /// 和弦播放的多线程启动方法
        /// </summary>
        /// <param name="MIDI设备"></param>
        /// <param name="乐谱"></param>
        /// <param name="音色"></param>
        /// <param name="MIDI频道"></param>
        /// <param name="音量"></param>
        public static void playThread_left(MidiDevice Device, string note, int trmbre, int channel, int playvolume)
        {
            MutilVariable bus = new MutilVariable();

            bus.setdevice(Device);
            bus.setnote(note);
            bus.setchannel(channel);
            bus.settrmbre(trmbre);
            Thread t = new Thread(new ThreadStart(bus.run_left));

            bus.setplayvolume(playvolume);
            t.IsBackground = true;
            t.Start();
        }