First time here? Check out the FAQ!
x

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

0 votes
382 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, 2019 in Using Kyma by mark-phillips (Adept) (1,010 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, 2019 by ssc (Savant) (127,080 points)
This is terrific, thank you!
...