Thursday, 14 July 2016

Experiment 9: Max Patch

After much trial, error and great frustration, I finally designed a Random Algorithm, which I hope will work with the Arduino card. In theory this simple patch should be able to simply link with the card, and will randomly send power to the individual parts of the orchestra. Once the Algorithm is activated (by the main switch) it continuously sends out bang messages via the loadbang object, whilst, the number of bang messages sent are controlled by the random object. The random object with an argument (number) of 600 sends out a random number between 0 and 599 to the integer (whole number) box below. This random number is then fed into the right inlet of the metro object. This argument populates the metro, which then dictates how frequent a bang is sent to the button object below. The bang message travels through the button and reaches the random object below. This random object has an argument of 6. This means a number between 0 and 5 is then produced and sent to the integer box below. However, you will notice that there is an object between the random object and the integer object. This +1 objects adds a 1 to the outputted number. Thus changing the random outputted number range from 0 to 5, to 1 – 6, in order to replicate the function of a die.      


Initially, I will work with 6 outputs, which I intend to gradually increase as the project and my programming skills move forward. In this image example, you will see that the number 5 appears in the final integer object box. The box is then connected to 6 sel objects, which will be attached to the Arduino input/outputs. Each time a number is (rolled) generated a bang message is sent to the sel object and the selected outlet should be powered. The frequency of the outputted numbers can be increased or decreased by adjusting the 1st random objects argument. The higher the number the more often the outputted number will be produced.

No comments:

Post a Comment