예제 #1
0
        public MidiGenerator(MasterStatus aMasterStatus)
        {
            instrument  = 0;
            bank        = 0;
            bankData    = 0;
            rpnMsb      = 0;
            rpnLsb      = 0;
            nrpnMsb     = 0;
            nrpnLsb     = 0;
            mode        = 3;
            isOnChannel = true;

            midiVolume.Init();
            midiPitch.Init();

            noteOnList     = new List <int>();
            oscillatorList = new List <MidiOscillator>();

            masterStatus = aMasterStatus;

            reverbFilter.Init();
            chorusFilter.Init();

            sampleValue    = new double[2];
            sampleValueSum = new double[2];
        }
예제 #2
0
        public MidiSynthesizer()
        {
            masterStatus       = new MasterStatus();
            midiGeneratorArray = new MidiGenerator[CHANNELS];

            for (int i = 0; i < CHANNELS; i++)
            {
                midiGeneratorArray[i] = new MidiGenerator(masterStatus);
            }

            midiGeneratorArray[9].Bank  = 0x7F00;
            midiGeneratorArray[10].Bank = 0x7F00;
        }