示例#1
0
 static void CleanUp()
 {
     MidiOut.AllPedalsOff();
     MidiOut.AllSoundOff();
     MidiOut.ResetAllControllers();
     MidiINPlugin.DisconnectDevices();
     MidiOUTPlugin.DisconnectDevices();
     Synth.Stop();
 }
示例#2
0
        static void InitMIDIUnfied()
        {
            Debug.Log("Initializing MIDIUnified");
            MidiOut.channelMask = channelMask;
            MidiOut.channelMask = PlayerPrefs.GetInt("MIDIOUT_MIDI_MASK", settings.channelMask);
            Debug.Log("Channel Mask : " + MidiOut.channelMask);

            MidiOut.synthChannelMask = synthChannelMask;
            MidiOut.synthChannelMask = PlayerPrefs.GetInt("SYNTH_MIDI_MASK", settings.synthChannelMask);
            Debug.Log("SynthChannel Mask : " + MidiOut.synthChannelMask);

            for (int i = 0; i < settings.instruments.Length; i++)
            {
                if (settings.instruments[i] != ProgramEnum.None)
                {
                    MidiOut.SetInstrument(settings.instruments[i], (ChannelEnum)i);
                }
            }

            MidiOut.ignoreProgramMessages = settings.ignoreProgramMessages;
        }
示例#3
0
 void OnApplicationPause()
 {
     MidiOut.AllSoundOff();
 }