Page 1 of 1
Stream Sample and Hold Problem.
Posted: Sat May 23, 2015 9:02 am
by Perfect Human Interface
I'm having trouble getting anything out of this stream Sample and Hold module. If anyone could tell me what I'm doing wrong that would be appreciated!
Re: Stream Sample and Hold Problem.
Posted: Sat May 23, 2015 9:36 am
by nix
Heya!
Glad I can help.
The 0 crossing s&h need to rise from minus to plus to sample->
Enjoy the linkage
Re: Stream Sample and Hold Problem.
Posted: Sat May 23, 2015 11:19 pm
by Perfect Human Interface
Thanks so much Nix!
Looks like whomever wrote this left out an equals sign.

- Oops.PNG (7.54 KiB) Viewed 10789 times
Now it works in the 0 -> 1 case.
Re: Stream Sample and Hold Problem.
Posted: Sun May 24, 2015 12:10 am
by Youlean
If you need, here is immediate sample and hold...
Re: Stream Sample and Hold Problem.
Posted: Sun May 24, 2015 12:24 am
by Perfect Human Interface
That's an interesting method Youtlean. You could add a line to make it hold when > 0 rather than just either 0 or 1.

- Hold2.PNG (3.76 KiB) Viewed 10784 times
Perhaps this is slightly faster than the above?
Re: Stream Sample and Hold Problem.
Posted: Sun May 24, 2015 12:52 am
by Perfect Human Interface
Here, I took Youlean's code and tweaked it so it accepts stream bool or zero cross. Stream bool is probably the best method overall since you can use them with the stream compare prims.
Edit: Ok so just so it's clear to everyone (now that I realize it myself) this kind of "sample&hold" only holds so long as the bool is true and passes the signal otherwise, while the above module I was originally working with samples when the control value goes from <0 to >0 and holds until the next time it samples. Useful for different things.