SynthMaker

Quantizer And Peak Follower?

Archive · 2005 11 old posts

From the original SynthMaker forum (2004–2014), with its members’ names and dates.

Tom7777 ·

Anyone know how i could make a Quantizer and Peak Follower? These are two things i used to use when i used to use SE and i havent been able to make them in SM so when it came to converting my old SE stuff to new SM synths i found myself with problems doing so. 🙂

unkargherth ·

A quantizer is trivial, Multiply your float by you int range and connect teh ouput to a Data::Int. Thats all

If you need it for poly's this code should work

poly in i; polyout o; o=rndint(i);

Is that what you asking for?

For a simple peak ( env) follower, i posted a very basic one somedays ago A more advanced version (with definable attack and release) is coming

Tom7777 ·

Unkargherth thanks for your reply, I had asked Malc about this and he says -

This is also possible already using Poly to Poly Int. Smoothing can be done using the code component – see the Smooth module in the example.

I should be able to do exactly what i want now thanks to both of you, that code was a lot simpler than i thought it might be and is sort of what i wanted so thanks im sure i can figure it out now 🙂

For a simple peak ( env) follower, i posted a very basic one somedays ago A more advanced version (with definable attack and release) is coming

Great i can't wait, Thanks Unkargherth 🙂

unkargherth ·

Then don't wait. Here it is. I'm bit tired to upload schematics to my provider so here is teh code

polyin in; polyin att; //attack in samples polyin dec; //decay in samples polyin tol; // tolerance polyout env;

// Peak/Envelope Follower with setable attack and release //(C) Unkargherth 2005, based on code from // Bram at musicdsp.org. Use ay your own risk

float coeff;coeff=0.135335; float tmp,tmp2,tmp3; float natt, ndec;

natt=coeff/att; ndec=coeff/dec;

// get absolute value tmp = (in>=0)&in + (in<0)&(-1*in); tmp2=natt*(tmp-env); tmp3=ndec*(tmp-env);

env = (tmp>(env+tol))&tmp2 + (tmp<=(env+tol))&tmp3 + env;

Tolerance is a value between 0 and 1 ( i sugest less than 0.1) that helps to avoid "jitter" when signal changes fats around current envelope level

Tom7777 ·

Amazing 🙂

Nu Audio Science ·

Tired tired, Im surprised you haven't dropped the amount of stuff you been doing 🙂

cbit ·

basic question:

i know this is an oldish thread and all ..

but i'd like to experiment with the envelope follower code, and i was wondering if there was a way of hooking up something to the code's output to give visual feedback of what the output was doing over time?

cbit ·

(anyone? 🙂 )

stefan ·

You could always draw it's output using an analyser or so? Or like in the "multitrack recorder" example jorge posted?

cbit ·

will look it up, thanks 🙂

platinumears ·

I often use a "Mono to Float" module clocked with "Ticker 25".. usually just displaying the value, but you could use a VU type display if you wanted.

Dan W 🙂

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.