コード例 #1
0
ファイル: MidiMessage.cs プロジェクト: zouhunter/SAEA
 private static void ValidateNoteParameters(int note, int volume, int channel)
 {
     MidiMessage.ValidateChannel(channel);
     if (note < 0 || note > 127)
     {
         throw new ArgumentOutOfRangeException("note", "Note number must be in the range 0-127");
     }
     if (volume < 0 || volume > 127)
     {
         throw new ArgumentOutOfRangeException("volume", "Velocity must be in the range 0-127");
     }
 }
コード例 #2
0
ファイル: MidiMessage.cs プロジェクト: zouhunter/SAEA
 public static MidiMessage ChangeControl(int controller, int value, int channel)
 {
     MidiMessage.ValidateChannel(channel);
     return(new MidiMessage(176 + channel - 1, controller, value));
 }
コード例 #3
0
ファイル: MidiMessage.cs プロジェクト: zouhunter/SAEA
 public static MidiMessage ChangePatch(int patch, int channel)
 {
     MidiMessage.ValidateChannel(channel);
     return(new MidiMessage(192 + channel - 1, patch, 0));
 }