public void Portament(int aNoteDestination, double aPitch, ref MidiPitch aMidiPitch) { if (/*aMidiStatus.GetBank() != 0x7F00 &&*/ aMidiPitch.GetPortamentFlag() == true) { portamentTime = aMidiPitch.GetPortamentTime(); noteFrequencyDestination = 440.0d * Math.Pow(2.0d, (aNoteDestination - 69.0d) / 12.0f) * Math.Pow(2.0d, aPitch / 1200.0d); noteFrequencyDiff = noteFrequencyDestination - noteFrequency; } }
public void NoteOn(byte aNote, byte aVelocity, double aSecondLength = 0.0d) { if (isOnChannel == false) { return; } //note = aNote; //velocity = aVelocity; if (mode == 4) { AllNoteOff(); } if (midiPitch.GetPortamentFlag() == true) { Portament(bank, instrument, aNote, aVelocity, aSecondLength); } else { NoteOn(bank, instrument, aNote, aVelocity, aSecondLength); } }