First time here? Check out the FAQ!
x

What is the most reliable way to convert a changing value into a gate with voice stealing?

0 votes
448 views
I want to work with Capytalk generators for sequenceing but often run into the situation where a conditional or some other logical test should generate a gate which is then used to gate a sample or envelope. If i don't want to hear clicks when envelopes or samples are interrupted I would like to utilise voice stealing.

Does

` 1 gateWhen: (!value gt: 0) `  generate a gate with voice stealing or does that '1' need to be a gate itself?
asked Jul 11, 2015 in Capytalk & Smalltalk by cristian-vogel (Master) (8,410 points)

1 Answer

+2 votes
 
Best answer

gateWhen: won't voice-steal if the receiver is a constant (like the 1 in your example).

To convert your Boolean test into a voice-stealing gate, you could use:

((!value gt: 0) fullRamp: 10 ms) sign * (!value gt: 0)

That way, each time your test is true, the expression will become -1 for 5 ms before it jumps up to 1.

 

answered Jul 11, 2015 by ssc (Savant) (126,620 points)
selected Aug 17, 2016 by cristian-vogel
Cool, thanks SSC. Does it have to be 10 ms? Can it be shorter?   Also - it would be very convenient to have this expression in capytalk - something along the lines of   (!value gt: 0) asGate
I found this expression also works very click-free

   (!On ramp0: 10 ms reset: (!On eq: -1)) * 2 - 1
What is a Voice-Stealing Gate and why would you want one?
...