Env prim outputs a 5!
Posted: Mon Jun 17, 2019 5:16 pm
Ok, so here’s something I just found out today that probably every single one of you knew, and didn’t bother to tell me.
I’ve been working on Kevin’s synthi trapezoid generator and had mega probs with the stock linear ADSR module jumping briefly to 1 at the end of release time, with a delayed envelope signal for the release stage (4). Basically my DSP code makes it stay in the sustain stage (3) for a certain adjustable time, then allows the release value (4) to pass.
What I found is that the env prim briefly outputs 5 when the kill bool input goes to true at the end of release, when the envelope is “done”. The voice is killed when the 5 goes back to zero. I think it stays at 5 for about 20mS on my system, so it was tricky to see what was happening. My initial DSP code didn’t provide for a 5 so I got this horrible click as the voice was killed. Once I realised this, it was an easy fix.
The Component Guide doesn’t mention a stage 5, but it’s clear that the old stock ADSR code needed it. Now I can see why there is a >4 in the code!
Cheers
Spogg
I’ve been working on Kevin’s synthi trapezoid generator and had mega probs with the stock linear ADSR module jumping briefly to 1 at the end of release time, with a delayed envelope signal for the release stage (4). Basically my DSP code makes it stay in the sustain stage (3) for a certain adjustable time, then allows the release value (4) to pass.
What I found is that the env prim briefly outputs 5 when the kill bool input goes to true at the end of release, when the envelope is “done”. The voice is killed when the 5 goes back to zero. I think it stays at 5 for about 20mS on my system, so it was tricky to see what was happening. My initial DSP code didn’t provide for a 5 so I got this horrible click as the voice was killed. Once I realised this, it was an easy fix.
The Component Guide doesn’t mention a stage 5, but it’s clear that the old stock ADSR code needed it. Now I can see why there is a >4 in the code!
Cheers
Spogg