ADSR
Started by soumello




3 posts in this topic
soumello

 
27-05-25, 21:44 -
#1
[font=-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"]Hi again Hansehv! I installed your samplerbox and i loved it! Really amazing! I was just wondering if there is a easy way to control attack release decay and sustain with it. I saw in the code that you added a linear function to do it however im trying here to add a exponencial function like normally is. Im still a beginner at coding for music stuff so im trying to figure it out how to do it, do you have any ideias since you now this code better than me? I was thinking about maybe trying with csound but i would have to change the sound engine or try to change the pyx code to use some exponential function for this adsr envelopes. Thanks for your attention![/font]
noek

46 posts 0 threads Joined: Jan 2021
28-05-25, 21:25 -
#2
Hi Soumello,

Interesting question.
Attack, Decay and Sustain envelope characteristics are taken from the sample(s), so I assume you talk about the Release.

As far as I can see in samplerbox_audio.pyx, the time=length of the release is calculated linear, but the fadeout volume it self isn't.
I can't really explain what the line pairs 176-177 and 195-196 do with the volume, but it certainly doesn't look linear.
And it all sounds pretty natural.
But perhaps I missed your point.

Regards, Noek.
soumello

 
29-05-25, 20:50 -
#3
(28-05-25, 21:25)noek Wrote: hi noek!

So, yes, release is the most important ADSR parameter for sure because, as you said, the other parameters are "inside" the note on note off. But lets say that you have a saw pad with fast attack. Sometimes a like to use a Saw with slow attack and sometimes i like with fast attack. So instead of using 2 presets(one with slow and other with high attack) i was thinking about using just one (with fast attack) and add an attack knob that could make this volume automation for me. The same thing for a decay. Lets say i want the sound decaying 2sec while i play or the sustain: lets say i want 2sec of a sustained note and then it decays for 3sec. The thing is: yes, we could achieve it in the sampling process but it would be super cool do have this type of envelope control usig knobs real time. I was thing about using a .cpp enevelope generator that someone already made an trying to integrate. Thanks again for your answer!
hansehv

189 posts 17 threads Joined: Dec 2020
13-06-25, 00:31 -
#4
Hi Soumello,
I see possibilities in e.g. this CPP code and using that on special samples like the SynthWaveforms in the download samples area.
For me to create a future nice to have, but contributions are always welcome.
Hans
This post was last modified: 14-06-25, 20:46 by hansehv.



MyBB SQL Error

MyBB has experienced an internal SQL error and cannot continue.

If you're a visitor of this website, please wait a few minutes and try again. If this problem persists, please contact the site owner.

If you are the site owner, please check the MyBB Documentation for help resolving common issues, or get technical help on the MyBB Community Forums.