Sonic Pi controls Spirograph – version 2

I have made some changes to version 1 which makes the program more flexible. The main change is that it is now possible to re-run the Sonic Pi program (now named spiroAuto.rb) which will abort the drawing currently in progress and start drawing a new design. This make it possible to change to a new drawing without having to wait for ` drawing to finish.
Also, instead of just having a few pre-chosen drawing parameters in the program, I now generate the parameters at random (with certain constraints), which means that you can continuously call up new designs. Thirdly I have added an option which changes the plot colour of a drawing to a random value at periodic intervals while it is drawing. This is set to a fairly low probability by line 34 in the spiroAuto.rb program

 p+=[["purple","red","yellow","green","blue"].choose,["saw","tri","piano"].choose,
      ["true","false","false","false"].choose]

To adjust the probability simply change the section

["true","false","false","false"].choose

to give change the ratio of “true” to “false”. e.g. changing the overall line to

 p+=[["purple","red","yellow","green","blue"].choose,["saw","tri","piano"].choose,
      ["true","false"].choose]

would give equal probability to random colour changes or fixed colour drawing.(random when true, fixed when false). Similarly you could give a larger selection of fixed colours in the first part of the list if you wish.

To make the program easier to install, I have put the code into a repository in github at
https://github.com/rbnpi/SpirographWithSonicPi/
From there you can download the repository to your computer, and set it up ready to go following the instructions in the READMEforSonicPi.md file

A video of the new program in action can be found here

Advertisements

Sonic Pi controls Spirograph

I have just completed a project which uses Sonic Pi 3.1 to control a python drawn spirograph, based on a python project by marktini on github.

You can read an article about the project, which contains full details of the code employed and links to a video of the project in action here.

Sonic Pi Glockenspiel MkII

I have just completed and published a second version of my Sonic Pi driven Glockenspiel

This version uses overhead hammers, and is more adaptable to work with a wider range of Glockenspiels. I set it up with a Plus Percussion PP1130 13 note Glockenspiel, which also has the facility to change certain notes so that it can play in C major, F major or G major. The article I have written contains constructional photos full circuit and software details and a link to a video of the working system.

Article is here

A Sonic Pi controlled Glockenspiel

I have created a Sonic Pi controlled Glockenspiel which runs on a Raspberry Pi3. It is controlled by means of a series of solenoids with Lego hammers, and interfaces to the Raspberry Pi GPIO pins.

Full constructional details, plus software are contained in an article which can be found here.

New mark II version with overhead hammers is here

Listen to a specimen piece played by the Glockenspiel here