Page 1 of 2
How to not release a stream?
Posted: Tue Jul 09, 2013 5:07 pm
by jacob
I'd like to know how I can hold a note/stream (for a specified time of ms) after the key on the midi keyboard is released.
As I want to add a short release envelope - like the already existing "R" (release) module does.
Re: How to not release a stream?
Posted: Tue Jul 09, 2013 7:59 pm
by MyCo
Why don't you use the Release module, when it does what you want?
Re: How to not release a stream?
Posted: Tue Jul 09, 2013 9:43 pm
by jacob
Because I want to manually manipulate/code the decay phase.
I tried trimming down the Release module to find the section which holds the note but could not find it.
Re: How to not release a stream?
Posted: Tue Jul 09, 2013 10:12 pm
by MyCo
The holding itself is done by the "Env" primitive (when "Hold" is set to true). You have to keep the bool input "End" true as long as you want your note to stay on after a release.
Basically you set "End" to false, when the voice is on (Envelope state 1) then you need a counter that starts when the envelope goes into release state (4)... when the counter reaches its goal you set "End" to true and the voices gets marked as done. A site note: the voice itself can still be running after you set "End" to true, in this case the "Env" primitive outputs the state 5 (which is undocumented).
Re: How to not release a stream?
Posted: Wed Jul 10, 2013 9:22 am
by jacob
I will try that thanks

Re: How to not release a stream?
Posted: Wed Jul 10, 2013 5:02 pm
by jacob
It seems to work so far

But now I need a trigger to my code module where it says whether the key is released - then I can start my envelope. Any ideas?
Re: How to not release a stream?
Posted: Wed Jul 10, 2013 6:03 pm
by jacob
Ok I read about the different states of the envelope now

State 4 is what I needed. I have it done. It works. Tough I guess I have to clean everything up now

Tough I don't know why my setup is much less modules and code than the R-module... And why should I need that retrigger thing...
thanks
Re: How to not release a stream?
Posted: Wed Jul 10, 2013 6:04 pm
by digitalwhitebyte
MyCo wrote: "Env" primitive outputs the state 5 (which is undocumented).
about this, I after various experiments,
seems to correspond to the state when it reaches the maximum voices can be activated.
es.
max = 4 voices
. first active voice
. second active voice
. third active voice
. fourth active voice
now if you activate another voice the "ENV" primitive give the stage 5.
I use it together with the output envFastRelease,
you can make a further rapid ramp to kill the voice softly,
this prevents many times the annoying clicks.
it must be said that the various settings made to the primitive "Voices Midi to" determine the different behavior.
if you have found other uses let me know.
Re: How to not release a stream?
Posted: Wed Jul 10, 2013 6:25 pm
by MyCo
digitalwhitebyte wrote:max = 4 voices
. first active voice
. second active voice
. third active voice
. fourth active voice
now if you activate another voice the "ENV" primitive give the stage 5.
No, what you read out is the the sum of all Env-States (5 * State1 = 5). State 5 is happening, when all voices are done, but the instance of the voice wasn't deleted. I think voice are managed in blocks, so when all voices are done when you are in a block, the voice still exists til a new audio buffer comes in.
Re: How to not release a stream?
Posted: Wed Jul 10, 2013 6:40 pm
by digitalwhitebyte
ok, but at the moment it is Stage5,
envFastRelease the output changes its state.
but as mentioned also depends on how the various parameters are set to "M to V"
primitive.
so its not like I think?