public override void NoteOn(byte note, byte velocity) { note = (byte)(note + Transpose); phase = 0; feedback = 0; double freq; if (FixedFrequency > 0) { freq = FixedFrequency; } else { freq = SynthTable.Note2Freq[note] * FrequencyRatio *Math.Pow(OCTAVE_1024, Detune); } // DebugConsole.WriteLine(FrequencyRatio); phaseStep = Pi2 * freq * SampleRateRecip; // outputGain = Dx7Envelope.ScaledLevel2Gain[(Dx7Envelope.Level2ScaledLevel[(int)(OutputLevel + VelocityAdjustTable[velocity] * VelocitySens)] << 5) - 240]; outputGain = OutputLevel * (1 + ((double)velocity / 99 - 1) * ((double)VelocitySens / 7)); Envelope.NoteOn(note, velocity); Lfo.NoteOn(note, velocity); }
public sealed override void NoteOn(byte note, byte velocity) { IsOn = true; onCounter = offCounter = 0; Source.NoteOn(note, velocity); }
public override void NoteOn(byte note, byte velocity) { IsOn = true; releaseCounter = releaseSample; Source.NoteOn(note, velocity); }
public override void NoteOn(byte note, byte velocity) { IsOn = true; Note = note; Velocity = velocity; Active = true; Finished = false; Component.NoteOn(note, velocity); if (IsStereo) { RightComponent.NoteOn(note, velocity); } }