示例#1
0
        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);
        }
示例#2
0
        private void HandleControlClockTick()
        {
            float newValue = _waveHost.GetNextSample(Frequency.Value).L;

            if (IsActive)
            {
                newValue *= Amount.Value;
            }
            else
            {
                newValue = 0;
            }

            Output = newValue;
        }