public void SendAll() { if (!ClearToTransmit()) { return; } MidiChannel.PitchBendFactor(_pitchbend_factor); SendPitchBend(); MidiChannel.Volume((byte)_vol_eff); MidiChannel.Sustain(Pedal); MidiChannel.ModulationWheel(_modwheel); SendPanPosition(_pan_eff + 0x40); if (Instrument.IsValid) { Instrument.Send(MidiChannel); } // We need to send the effect level after setting up the instrument // otherwise the reverb setting for MT-32 will be overwritten. SendEffectLevel((byte)_effect_level); MidiChannel.ChorusLevel(_chorus); MidiChannel.Priority((byte)PriorityEffective); }
public void Sustain(bool value) { Pedal = value; if (MidiChannel != null) { MidiChannel.Sustain(value); } }