コード例 #1
0
        public int SendInt(IMidiOut output, M_CHANNEL channel, int value)
        {
            byte adjusted = (byte)adjustValue(value);

            output.ControlChange(channel, (byte)SelectedController, adjusted);

            return(adjusted);
        }
コード例 #2
0
        public int SendInt(IMidiOut output, M_CHANNEL channel, int value)
        {
            switch (ProgramOptions)
            {
            default:
                output.ProgramChange(channel, (byte)value);
                return(value);

            case ProgramOptions.FIXED:
                output.ProgramChange(channel, (byte)FixedValue);
                return(FixedValue);
            }
        }
コード例 #3
0
ファイル: Orchestra.cs プロジェクト: joha4270/AAU-P2
 //TODO:List of instruments
 public Orchestra (IMidiOut output)
 {
     throw new NotImplementedException();
 }
コード例 #4
0
 public void Dispose()
 {
     _device.Dispose();
     _device = null;
 }
コード例 #5
0
 public MidiPlayer(int deviceIndex)
 {
     _device = CreateDevice(deviceIndex);
 }
コード例 #6
0
 /// <summary>
 /// Creates a new instance of the orchestra class.
 /// Needs a reference to an output class, which you can get by creating a new WinmmOut instance.
 /// </summary>
 /// <param name="output"> The output class to send all played music to. </param>
 public Orchestra(IMidiOut output)
 {
     _output        = output;
     _beatScheduler = new BeatScheduler(this, _output);
     _output.SetSource(_beatScheduler);
 }
コード例 #7
0
 internal BeatScheduler(Orchestra orchestra, IMidiOut output)
 {
     this._orchestra = orchestra;
     _output         = output;
 }