Send() публичный Метод

public Send ( MidiChannel mc ) : void
mc NScumm.Core.Audio.MidiChannel
Результат void
Пример #1
0
        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);
        }
Пример #2
0
        public void SetInstrument(uint b)
        {
            _bank = (byte)(b >> 8);
//            if (_bank != 0)
//                Console.Error.WriteLine("Non-zero instrument bank selection. Please report this");
            // HACK: Horrible hack to allow tracing of program change source.
            // The Mac m68k versions of MI2 and Indy4 use a different program "bank"
            // when it gets program change events through the iMuse SysEx handler.
            // We emulate this by introducing a special instrument, which sets
            // the instrument via sysEx_customInstrument. This seems to be
            // exclusively used for special sound effects like the "spit" sound.
            // TODO: part
//            if (ScummEngine.IsMacM68kIMuse())
//            {
//                Instrument.macSfx(b);
//            }
//            else
            {
                Instrument.Program((byte)b, Player.IsMT32);
            }
            if (ClearToTransmit())
            {
                Instrument.Send(MidiChannel);
            }
        }
Пример #3
0
 public void LoadGlobalInstrument(byte slot)
 {
     Player._se.CopyGlobalInstrument(slot, Instrument);
     if (ClearToTransmit())
     {
         Instrument.Send(MidiChannel);
     }
 }
Пример #4
0
 public void ProgramChange(byte value)
 {
     _bank = 0;
     Instrument.Program(value, Player.IsMT32);
     if (ClearToTransmit())
     {
         Instrument.Send(MidiChannel);
     }
 }
Пример #5
0
        public void SetInstrument(byte[] data)
        {
            if (Se.PcSpeaker)
            {
                Instrument.PcSpk(data);
            }
            else
            {
                Instrument.Adlib(data);
            }

            if (ClearToTransmit())
            {
                Instrument.Send(MidiChannel);
            }
        }