コード例 #1
0
 internal static void PlayPedalStatic(bool down)
 {
     if (clsPlay.PlayExists())
     {
         Sustain.PlayPedal(down);
     }
     else
     {
         int data = (down) ? 127 : 0;
         if (MidiPlay.OutMRec != null)
         {
             MidiPlay.OutMRec.SendShortMsg((byte)(0xb0 | MidiPlay.KBOutChanRec), 0x40, data);
         }
         if (MidiPlay.OutMStream != null)
         {
             for (int ch = 0; ch < 16; ch++)
             {
                 //MidiPlay.OutMStream.SendShortMsg((byte)(0xb0 | ch), 121, 0);  //reset all ctlrs
                 MidiPlay.OutMStream.SendShortMsg((byte)(0xb0 | ch), 0x40, data); //sustain off
             }
         }
     }
 }