Interesting envelope

For general discussion related FlowStone
k brown
Posts: 1198
Joined: Tue Aug 16, 2016 7:10 pm
Location: San Francisco, CA USA
Contact:

Interesting envelope

Post by k brown »

Anyone have any Idea how to get an envelope to function like this?

This is from the Voyetra 8 manual.
Voyetra EG Sustain copy.png
Voyetra EG Sustain copy.png (110.2 KiB) Viewed 17627 times

I'm toying with doing an emulation of the V8 and would love to include this unique ADSR/ADR envelope.
Website for the plugins : http://kbrownsynthplugins.weebly.com/
User avatar
Spogg
Posts: 3368
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England
Contact:

Re: Interesting envelope

Post by Spogg »

Just as a first thought experiment (I haven’t tried this) you could maybe have a bit of DSP code between the Env prim and the envelope generator.
The Env prim outputs 3 when the note is held, to keep the envelope running, and changes to 4 when the note is released. You could maybe switch the envelope generator’s control input to 4 when the envelope level goes downwards below the sustain level.


Cheers

Spogg
k brown
Posts: 1198
Joined: Tue Aug 16, 2016 7:10 pm
Location: San Francisco, CA USA
Contact:

Re: Interesting envelope

Post by k brown »

I sort of follow what you're saying only in the broadest sense - not enough to implement it. Not sure what you mean by "...between the Env prim and the envelope generator" - I thought the env prims were envelope generators, no?
Website for the plugins : http://kbrownsynthplugins.weebly.com/
User avatar
Spogg
Posts: 3368
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England
Contact:

Re: Interesting envelope

Post by Spogg »

env prim .png
env prim .png (245.37 KiB) Viewed 17598 times


The Env prim is for envelope control (poly only).

Hopefully this will help clarify but it's explained more in the Component Reference.

Cheers

Spogg
Attachments
Envelope prim .fsm
(18.42 KiB) Downloaded 881 times
k brown
Posts: 1198
Joined: Tue Aug 16, 2016 7:10 pm
Location: San Francisco, CA USA
Contact:

Re: Interesting envelope

Post by k brown »

I see - I was thinking of the old SM ADSRs. Still haven't a clue how to do what you're suggesting; especially if it involves writing code, which I don't know. Appreciate your weighing in though. The ADR would be such an interesting envelope mode, especially for percussive sounds.
I sort of understand what needs to be done - just not how to do it. :oops:
Website for the plugins : http://kbrownsynthplugins.weebly.com/
tulamide
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: Interesting envelope

Post by tulamide »

k brown wrote:I sort of understand what needs to be done - just not how to do it. :oops:

It's actually pretty easy! As you might know by now, I'm the worst guy as soon as DSP/ASM is involved. Yet, it took me like 3 minutes to find out where to make changes and why.

Unfortunately I'm not on my music PC, where I have 3.0.6, so I can't share a fsm. But you should be able to do it on your own as well:
1) Drag the ADSR module from the toolbox. The one with the 5 knobs for ADSR and Amount.
2) Go inside that module. You will see another module labeled "ADSR".
3) Go inside that module. Now you see the DSP box with some code, and two modules (one labeled "Gate", which contains the env prim, Spogg was talking about. So we don't have to touch that, it's setup fine)
4) Now look over the code. You will find this line:

Code: Select all

stage = (env!=4.0)&stage + (env>=4)&4;

Without going into much detail, this is checking the stage from the env prim and prepares the current voices for either sustain (left part of the plus sign) or release (right part of the plus sign)
5) We don't need sustain, so we have to add a little math: "stage = (stage >= 2.0)&4;", so that the code now looks like so.

Code: Select all

stage = (env!=4.0)&stage + (env>=4)&4;
stage = (stage >= 2.0)&4;

This will get rid of sustaining.

That's basically it. There's just another line that won't hurt, but is redundant. It's this one

Code: Select all

val = (stage==2)&s + (stage!=2)&val;
Just remove it. Now you can safely remove the s input, and you have your very own ADR!

Have fun :)
"There lies the dog buried" (German saying translated literally)
k brown
Posts: 1198
Joined: Tue Aug 16, 2016 7:10 pm
Location: San Francisco, CA USA
Contact:

Re: Interesting envelope

Post by k brown »

Thanks tula for figuring all that out, however a crucial piece is missing. The Voyetra ADR envelope still has a Sustain control - it sets the level at which the Decay portion of the envelope switches to the Release stage; it doesn't just eliminate the Sustain. I guess a more accurate name for it would be AD(S)R. Read the text carefully and study the two diagrams. In other words there is still a Sustain level that's set, it's just that the env doesn't stay at that level as long as a note is held but proceeds immediately to the Release stage as soon as the Sustain level is reached.
It looks like your code changes would result in the Sustain control having no function.
Here are some images from the manual that show several ADR shapes that differ ONLY in their Sustain settings.

Voyetra EG 2.jpg
Voyetra EG 2.jpg (27.12 KiB) Viewed 17567 times
Website for the plugins : http://kbrownsynthplugins.weebly.com/
k brown
Posts: 1198
Joined: Tue Aug 16, 2016 7:10 pm
Location: San Francisco, CA USA
Contact:

Re: Interesting envelope

Post by k brown »

Spogg wrote:You could maybe switch the envelope generator’s control input to 4 when the envelope level goes downwards below the sustain level

I think Spogg is onto it here.
Website for the plugins : http://kbrownsynthplugins.weebly.com/
User avatar
Spogg
Posts: 3368
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England
Contact:

Re: Interesting envelope

Post by Spogg »

Turned out to be easier than I thought!

There are comments in the schematic to explain what I did. You could use the principle in any envelope generator written in DSP I think.

Good luck with your project.

Cheers

Spogg
Attachments
AD(S)R envelope v1.0 .fsm
(882.77 KiB) Downloaded 877 times
tulamide
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: Interesting envelope

Post by tulamide »

k brown wrote:Thanks tula for figuring all that out, however a crucial piece is missing. The Voyetra ADR envelope still has a Sustain control - it sets the level at which the Decay portion of the envelope switches to the Release stage; it doesn't just eliminate the Sustain. I guess a more accurate name for it would be AD(S)R. Read the text carefully and study the two diagrams. In other words there is still a Sustain level that's set, it's just that the env doesn't stay at that level as long as a note is held but proceeds immediately to the Release stage as soon as the Sustain level is reached.
It looks like your code changes would result in the Sustain control having no function.
Here are some images from the manual that show several ADR shapes that differ ONLY in their Sustain settings.

Voyetra EG 2.jpg

Did you even try it? If you follow it to where I wrote "This will get rid of sustaining", you will see that it works exactly that way! Decay of course goes to sustain level, then it immediately releases.

But hey, why bothering. Let's just ignore me and let Spogg do my work a second time :roll:
"There lies the dog buried" (German saying translated literally)
Post Reply