SynthMaker

Non-Linear ADSRs

Archive · 2011 3 old posts

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

Demick ·

I am currently creating a project (I am a bit of a newb) that is essentially a clone of OPL3 with added bells and whistles. I am aware that the ADSRs are all linear in SM. I use FL's version of SM, but am considering a purchase of this SM in the near future because I have so much fun using it - but I digress.

Is there a way to create a logorithmic (non-linear) fade to the whole ADSR or would you have to alter some code? I kind of wish I understood how the whole logorithmic scaling worked better so I could apply it properly.

For an added bonus: Progress so far

- routing mechanism (6 standard OPL2/OPL3 routings, one OPL4 routing planned in the future) - All OPL3 waves incorporated, each 256 samples long - modulation and volume LFOs applied - Feedback - All oscillators fed through phase ports - Multipliers applied to Freq ports (as well as the standard incoming streams) - ADSRs applied

Things that need to happen

- key scaling - key scaling rate - non-linear ADSRs (proper math added to change from linear to non-linear (1-0 to dB maybe?)...) - multistage filter with ADSR for added collness. 😀 - distortion (easy to implement)

I hope I am not reiterating any posts here, as this is my first dedicated topic here.

trogluddite ·

Hi Demick,

You can't make a true logarithmic (or exponential) envelope by modifying the output of a linear ADSR. That's because the curve 'bends' in the opposite direction if the envelope is going up (attack) than when it is coming back down (decay, release). So the curve has to be calculated for each envelope stage independently.

Some others here have been working on this problem - you may find these links useful... Selfmade Exponential Envelope and Multistage Envelope. I'm not familiar with the FL version of SM - but the envelope in the screenshot has been in my SM toolkit a long time, you may be able to download it from the forum to have a play with.

Demick ·

Yeah, I have a multistage envelope as well. To tell you the truth, the FL version of SM is unable to save as VST, but I can definitely save the schematics to a file. That's actually pretty handy for testing out things with live music or sequence in real time.

I will check the other link out, though. That looks promising to me. Thank you very much for that tidbit of information.

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.