-
Notifications
You must be signed in to change notification settings - Fork 24
Description
In future, there might be need to support sample rates other than 44.1 kHz. For example, some people might want to playback at 48 kHz, or if Sointu was made to target lower power platforms, they might want to drop the samplerate to 30 kHz, or even 22 kHz.
The sample rate could be user definable, defaulting to 44.1 kHz if it's undefined. It really must be chosen before starting to compose a song, as the sample rate affects how all filters and delays function.
The samplerate cannot come from the DAW, as that could lead the user to accidentally compose a song for 48 kHz, and then everything would be off when playing it back at 44.1 kHz. So for the VST, internally Sointu should always render at the samplerate defined for the song, and then upscale / downscale if the DAW samplerate is different from it.
All functions that need the samplerate (e.g., the DisplayFuncs that convert filter parameter values to displayed frequency values) that used to assume 44.1 kHz now have to get the samplerate as a parameter somehow. Another question is if the reverb delaytimes should also change, when changing the samplerate; those delay taps are not really especially designed for 44.1 kHz but will still sound different on other samplerates.