I uploaded two demo patchers to iLocker. (day03a.maxpat and day03b.maxpat)
day03a just adds ctlin/ctlout and pgmout to the basic note pass through patcher from day 1.
day03b adds two ways to control the toggle of the random arpeggiator patcher. The first way uses a midi key to turn the toggle on and off (user control). You do this by connecting the velocity outlet of a notein object to the toggle. (My patcher connects the velocity outlet to an int number box, which connects to the toggle. It’s the same thing.) Non-zero values turn the toggle on, and pass through. The metro object starts with any non-zero value. (The toggle being on is just visual confirmation.) Releasing a midi key sends out a velocity of 0, which turns the toggle off and passes through the metro, turning the metro off.
The other way the toggle is controlled is by setting up a decision point in the patcher (computer control). In other words, the computer tracks events, and when some goal has been reached, turns the toggle off. In the patcher I look for the value 1 from the random object. “1” plays the third of the Dom9 chord stored in the table. A select object looks for the value 1 and sends out a bang each time it gets one. A counter object counts the bangs. At the maximum count (5), the counter object sends out a 1 from its third outlet. Another select object looks for the value 1 and sends out a bang to the toggle. Bang causes the toggle to reverse states, turning it from On to Off.
Leave a Reply