Try decreasing CPU load by running LFOs and envelopes at the output sample rate even when oversampling is enabled, with the idea being that little would be gained by having modulator waveforms at the higher rate. In fact, in Voice:processSample(), break out everything that does not take place at the audio rate to a separate function, using method variables to communicate the values to processSample().
In effect, we will be introducing a 'k-rate', although the k-rate will not be some low rate like 3 kHz, but rather the same as the output sample rate.
This mostly affects Voice.h and the set-oversampling functions, which in some cases need communicate both the sample rate and the oversampling factor to lower level modules.
Try decreasing CPU load by running LFOs and envelopes at the output sample rate even when oversampling is enabled, with the idea being that little would be gained by having modulator waveforms at the higher rate. In fact, in Voice:processSample(), break out everything that does not take place at the audio rate to a separate function, using method variables to communicate the values to processSample().
In effect, we will be introducing a 'k-rate', although the k-rate will not be some low rate like 3 kHz, but rather the same as the output sample rate.
This mostly affects Voice.h and the set-oversampling functions, which in some cases need communicate both the sample rate and the oversampling factor to lower level modules.