Page 1 of 1
sample and hold - blue equivalent
Posted: Fri Aug 23, 2013 11:36 am
by tester
Having little break from some areas of FS, I'm stuck with one thing. I need simple "sample and hold" module, but blue (stream based) equivalent, i.e. one that sends out a snapshot of incoming stream when "trigger" is received. As for triggering, I guess this latching should be reaction to simple boolean (i.e. between two values) switch (will this work for both - streamy and green switching?). Can someone help?
Re: sample and hold - blue equivalent
Posted: Fri Aug 23, 2013 11:40 am
by chackl
I think there is not such a module - and it is not possible because streams are not trigger-based.
What about using the stream-to-float or stream to array module - and then puting this float falue back to stream.
Regards
Re: sample and hold - blue equivalent
Posted: Fri Aug 23, 2013 11:53 am
by tester
I'm sure @chackl you are wrong. It's doable in code/ASM, but my head is empty for codework (I'm stuck with green data right now) and this one is beyond my skills I guess. But from what I can tell - there will be probably some sort of conversion from a->b switch into 1-sample impulse, and during that impulse (short "on" so to speak) - input value would be copied and latched on the output. I guess MyCo should know such sort of stuff.
I don't want to convert blue to green and back, because this will require green tick, and these things don't work too well when rendering in DAW (besides they would create too much unnecessary triggers wandering around, and this would interfere with other green parts).
Re: sample and hold - blue equivalent
Posted: Fri Aug 23, 2013 12:08 pm
by chackl
Well ok just tell

A Stream hase no trigger - you just are able to emulate a trigger by getting somethin from 0 to 1 or from ture to false or something other

(as you told)
But i also can write those codes

- well it is some time ago that i have done it bit here we are

i would do that like that:
Code: Select all
streamin in;
streamin check;
streamout out;
out = in & (check==1) + out & (check==0);
check = 0;
If the value "check" is 1 it will take the aktual sample from "in" to "out"
check will get resetet after getting the sample - so you do not need to set it back manual.
Regards

Re: sample and hold - blue equivalent
Posted: Fri Aug 23, 2013 12:10 pm
by MyCo
But you shouldn't use it on accurate streams, especially don't use it for rendering.
Edit: wasn't fast enough
Re: sample and hold - blue equivalent
Posted: Fri Aug 23, 2013 12:34 pm
by tester
Thanks for quick responses. You were faster than my dinner

Generally the concept here is not thought to be "sample accurate", but "just renderable" (plus live jamming on first place). From the past I remember, that DAWs don't render things if green triggers are involved in syncing, thus - a lot of modules (SM age) I had to convert into blue modes in order to make them work.
The old jamming module I used is attached below if someone needs it. You provide "offline" values (randomized or manual) and trigger the transition if needed. With blue S&H - it can be arranged in new ways.