protected override AudioSample CalculateNextSample(ulong requestId) { if (_actualPitch.HasNewValue) { float newPitch = _actualPitch.GetNextSample(); _frequency = Synth.Core.Pitch.ToFreq(newPitch); } AudioSample sample = _waveHost.GetNextSample(_frequency); sample *= Level.Value; return(sample); }
private void HandleControlClockTick() { float newValue = _waveHost.GetNextSample(Frequency.Value).L; if (IsActive) { newValue *= Amount.Value; } else { newValue = 0; } Output = newValue; }