From the original SynthMaker forum (2004–2014), with its members’ names and dates.
aetmos ·
Hi all,
I'm working my way through tearing apart the 'Compressor' module to get a better understanding of how it works (prior to implementing an idea for a compressor plug that I've been contemplating). I'm new to SynthMaker, so forgive me if this question is stupid:
There's a lookahead parameter knob that sends its value to a module called "stream delay". The code in stream delay specifies a buffer size of 44100. I'm wondering why it's set at 44100? Obviously that's 1 second at 44,100Hz, but what about other sample rates? Shouldn't this be set to whatever the user's samplerate is? Which begs the quesion, how does one determine the samplerate of the host? Is there a constant defined, like "sampleRate" or something?
Thanks,
skOre ·
This is most likely due to most people not liking to feed code modules anything else but stream data (The sample rate feed would be a float of course). Apart from that, yes it would make sense to add other options for other samplerates. My suggestion would be to build a set of code components that are optimized for the popular sample rates. Unless of course feeding the static INT would be just as fast. Maybe stefan can tell you more about that.
aetmos ·
skOre wrote: This is most likely due to most people not liking to feed code modules anything else but stream data (The sample rate feed would be a float of course).
I'm not sure the sample rate would be a float...I don't think there are any standard samplerates defined in fractions of a sample, and if I remember correctly, the "sampleRate" constant in the VST SDK is a long int.
skOre ·
I'm sorry, its late. You're of course right, its an INT (as I said later on in my post 😉 )
stefan ·
In this particular case the main thing to worry about is that the delay buffer should be big _enough_ for all situations it might have to handle. Not that I actually really put any much consideration to the fact that some freak might run the compressor at 88/96/192kHz though, which I probably should've 🙂
skOre ·
You must understand, he's a lo-fi-phile 🙂
aetmos ·
But is there some way to get the host's sample rate in SynthMaker? I noticed theres a BPM thing that tells SynthMaker the host BPM...I guess I'm wondering if there's a similar doodad for sample rate. If not, there really should be.
Tom, who frequently works @ 96k, and never works below 48k...
rl ·
-> Timing Info module, upper output
aetmos ·
rl wrote: -> Timing Info module, upper output
Got it, thanks.
Wrote something here? To have a post removed or your name hidden, write to [email protected].