SynthMaker

Compressor Lookahead...sample rate

Archive · 2006 9 old posts

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].

Before your first post

A few rules keep this a friendly place. You agree to them once.

Shown next to what you post, here and in the app. It doesn’t have to be your real name: 3–24 lower-case letters, digits or _ (capitals become lower case, spaces become _).

    Then your post goes up straight away.

    Delete this reply?

    Open it in SynthMaker?

    It goes on the track you’re editing there, in place of that track’s sound, and into My sounds. Your other tracks stay as they are.

    Want to keep that track’s sound? Start a new song in SynthMaker first (Song › New song), then open this.

    Report this reply?

    Only the developer reads reports. The person isn’t told who reported them.

    What’s wrong with it?

    Block this person?

    You won’t see their posts and replies here any more. They aren’t told, and you can unblock them at any time.

    People you’ve blocked

    Their posts and replies are hidden from you. Unblock someone to see them again.

    The community rules

    A few rules keep this a friendly place. Everyone agrees to them once, before their first post.