First time here? Check out the FAQ!
x

This should be easy ... but I suck at Capytalk

0 votes
91 views
I'm looking to trigger a series of AR envelopes where the attack and release vary randomly within a range of possibilties ... and where each new envelope trigger happens just after the end of the previous release.

Something like this.

A............R.......................A........................R..................................A............R...................... etc.
asked Jun 3 in Using Kyma by mark-phillips (Practitioner) (600 points)

1 Answer

+1 vote

Here's a Sound to generate a sequence of non-overlapping random duration AR envelopes.

The idea in the example Sound is to use a TransformEventValues to replace the AR !Gate with a random gate sequence, to make the AR's attack and decay a function of !RanDur and !DutyCycle, and then to use that same TransformEventValues to set the value of !RanDur:

 

| randomDuration ranGate  |
randomDuration := (!minDur s tick nextRandom abs * (!maxDur - !MinDur) s + !MinDur s) seededWith: 0.777.
ranGate := 1 gateTimeToNext: randomDuration dutyCycle: !DutyCycle.
(Array  with: ranGate
        with: (ranGate sampleAndHold: randomDuration))}

answered Jun 3 by ssc (Savant) (93,320 points)
This is terrific, thank you!
...