
- #Max msp gswitch for signals generator#
- #Max msp gswitch for signals code#
- #Max msp gswitch for signals series#
Later on we will add to this part of the code to allow it to cycle through the key signatures on its own, so we selected Major, Minor, Major 7ths, and Minor 7ths to help preserve tonality as the program cycles through chords. The key signatures you use are up to you, however you can also follow along with the 4 key signatures we selected. Fortunately, the numbers are sequential, so by applying some music theory, we can generate the correct intervals that correspond to various key signatures. In MIDI, every note on the keyboard corresponds to a number, with middle C being 60.
then close the gate with a 0 - routing coll's output back to it's normal placeĪny time you need the length updated (like after adding or deleting an entry) you just send that trigger module a bang.Before we can put an arpeggiator together, we need to be able to generate the chords for it to sequence through. then send the coll the length prompt - it'll pass out the second output of the switch.
first send the switch a 1 to route the coll output to the place you need it to go. 0 and 1 go to the left input of the switch, and 'length' goes to the coll. However in the case you want to capture the length output from the coll, use: The default setting for the switch would be to route the output of coll to a multislider, or message box or where ever. So I've taken a screen shot, and hopefully that helps.Įssentially you can have loads of different messages (adding entries, selecting entries, deleting, renumbering.) go into coll, and just the ones coming out of coll go through the 1-in-2-out switch. I posted a reply with a solution I knocked up for you but a moderator deleted it.
Therefore the routes of the coll's length and its data must be different, although they are all integers and they are all coming out of the same outlet. The problem with the above process is that it stumbles on the functionality of the coll object: a coll outputs both its length and any stored data from the same outlet (why, I wonder?), but in processes like the above, the length of the coll must be output only once (in the beginning of the session) and it should only feed the ‘ between’ object (it should never reach the iteration mechanism, since it is irrelevant).
When the last atom of the current list is output, a new bang will be sent to the ‘ between’ object so that a new list will be picked and the process will be repeated (stages #3 – 6). The output list will be sent to an iteration mechanism that will read and output its atoms one by one. The integer will go back into the coll and make it output the corresponding stored list. A bang in the left input of the ‘ between’ object will generate a random integer. This length number must get into the right inlet of a ‘ between’ (RND gen.) object to set its maximum. A loadbang-ed message ‘ length’ must enter the coll object to make it output its length. So, I guess we have a circuit like the following: #Max msp gswitch for signals generator#
This means that the RND generator has to take into account any changed length of the coll before generating the integer. Obviously, this number must be between 1 and the varying length of the coll. With each bang the generated integer will decide which list will go out of the coll.
#Max msp gswitch for signals series#
Then a series of bangs is provided to a random integer generator. A varying number of lists are stored in a coll object.