Possible to get Envelope value from...
-
@ulrik Should be... But what envelope are you talking about and what is 0ms?
Do you mean like an AHDSR when you play a note? Because in this case, 0ms is a 0 level...
Make a minimal snippet -
@ustk yes of course, it's 0 at 0ms, stupid me 🤪
yes I mean an AHDSR.But what about at 40ms, would it be possible to get that information from the AHDSR like
AHDSR.getLevelAt(40);
-
@ulrik Not I don't think so... Even using a timer as a workaround would only have the accuracy of the chosen timing...
-
@ustk ok, thanks!
-
@ulrik but it depends on the finality you need this value for. Because knowing an ahdsr is not changing regarding to time, you can set your own equations to find out the value based on the parameters (that is what the source code does to calculate the mod value)
It is a bit of math but doable if you absolutely needs it -
@ustk I'll consider it, math isn't my strongest side
-
@ulrik I'm trying something...
Although I detect something weird in the AHDSR Decay. When the A level is greater than the S, no issues.
But if it is set lower, then the D time makes a step to reach the S level without respecting the D curve.
In short, you go straight from A to S in the case A is lower.
Should it be progressive too? -
@ustk Yes I've noticed the thing with Attack Level lower than Sustain, yes progressive if it's not too complicated
-
@ulrik Something else is strange in the Decay
100% is a gentle curve and 0% is just a bit more pronounced but definitely not aggressive...
Wouldn't it be better to go from falling edge to linear with all curves in between instead?Also, I remember I've added a release curve knob one day that were doing exactly this, I might find the commit but not sure. Would be nice to get it too so I can work on this if I find some time. I might want to add all of the above at the same time, and why not a preDelay so we have a full DAHDSR that fits "nowadays requirements".
The fact is that I can't find where the
internalBuffer
for thecalculateBlock
is computed anymore, or maybe it is thestate
, this has certainly changed lately... @Christoph-Hart any hint on where I could find it? It got too complicated for my level now :)EDIT: alright I found where the computation is, but it seems a bit more complicated, headaches ahead...
-
@ustk said in Possible to get Envelope value from...:
Wouldn't it be better to go from falling edge to linear with all curves in between instead?
Yes it would.