First time here? Check out the FAQ!
x

Why is ... 1 gateWhen: ((1 bpm: !BPM) nextRandom abs gt: 0) ≠ 1 bpm: !BPM ...?

+1 vote
474 views

Really simple question.

Why does ...

1 gateWhen: ((1 bpm: !BPM) nextRandom abs gt: !Thres)

not produce the same result as ...

1 bpm: !BPM

when !Thres is set to zero ...?

 

asked Jan 19, 2018 in Capytalk & Smalltalk by mark-phillips (Practitioner) (990 points)

1 Answer

+1 vote

Because ((1 bpm: !BPM) nextRandom abs gt: !Thres) is always true (so it is always 1). In order to create a trigger or a gate, the value has to dip down to -1 or 0 first and then come back to 1.

answered Jan 19, 2018 by ssc (Savant) (126,620 points)
Ack ... I think I made that mistake in my logic on other occasions. OK ... back to the drawing board ... ;-)

What I'm looking for is simply a way to have a bpm trigger that starts out very sporadic and gradually becomes more and more steady until it is virtually indistinguishable from bpm.
Would this do the trick?
1 randomGate: !BPM bpm s deviation: !Deviation s dutyCycle: !DutyCycle
Starting with a large !Deviation and gradually reducing it to zero?
closer ... but too chaotic and very glitchy; Instead of clean blips, I get lots of "double-exposures" with more that one sound escaping ... sometimes so many at once and with the attacks so close together that they seem to generate their own audio pitch...? This affects a majority of the blips through nearly all settings for diviation. But when I get to a deviation of zero it's clean... so that part closer. :-)
How about this one:
(1 bpm: !BPM) gateWhen: ((1 bpm: !BPM) abs nextRandom abs gt: !Thres)
MUCH better... :-)
I had a feeling it would involve 1 bpm both before and after gateWhen.
...