Bonk~ to ADSR/Function Not Working Properly
I've read through every ADSR, Function and Bonk thread on here and I still cannot for the life of me figure this out.
I have transient detection working well in Bonk~ and I'm trying to use it to essentially detect a drum hit, and then apply an ADSR to the signal and effect it with ADSR in real time. I only need to use it reduce the decay time, for example on a Kick drum and just tighten the decay of it, but no matter what I do, whether it's with ADSR~ or Function, it fades out the attack, leaves a little decay, and then fades the rest out. I'm sure it's a simple thing in the code that I'm missing, but I can't figure it out whatsoever.
I thought it work just like a normal sampler ADSR, but its just not fading the signal properly at all. I'm simply wanting to trim the sample live, leaving the attack entirely unaffected, and solely adjusting/reduce the decay.
I'm hoping someone can help! Here's the code:
havent looked into it, but i assume that you did not yet take into account that bonk requires some time to do its analysis.
so you have to delay the input you want to modify with your envelope for the same amount of time, or the modulation happens too late.
Adding a lookahead still causes the same problem. Even at 0 the attack gets cut off still. At a 0 attack, shouldn't the attack of the sample be unaffected?