Exemple #1
0
        public void addActiveMIDIKey(int midiNote)
        {
            NoteProvider output = activeNotes[midiNote];

            if (output.Playing)
            {
                output.BeginPlay();
            }
            else
            {
                output.BeginPlay();
                AddMixerInput(output);
            }
        }
Exemple #2
0
        private void InitialiseActiveNotes(int activeNoteSize)
        {
            activeNotes = new NoteProvider[activeNoteSize];

            for (int i = 0; i < activeNoteSize; i++)
            {
                activeNotes[i] = new NoteProvider(midiTools.GetFrequencyFromMIDINote(i))
                {
                    SinVolume = 1.0f,
                    SawVolume = 0.0f
                };
                activeNotes[i].SetRampValues(0.2f, 0.2f, 0.2f, 0.18f, 0.2f);
            }
        }