Development of a touch sensitive keyboard for use with Sonic Pi, using Adafruit’s MPR121 12 toiuch sensitive input board with OSC support added to the software.
Full article, with link to software is here.
Video of project in action is here.
The latest version of Sonic Pi, version 3.0 is aptly named the IO version. It adds comprehensive facilities to allow Sonic Pi to communicate with the outside world, by midi or OSC messages, and it also allows live audio feeds to be accepted by Sonic Pi, to be incorporated in the program it is playing. This article explains in detail how you can interact with LEDs and buttons connected to a Raspberry Pi GPIO pins, with Sonic Pi controlling the LEDs, and the notes that Sonic Pi plays being controlled by a push-button connected to a GPIO pin.
This is just one example. I have already connected Sonic Pi to Scratch, to TouchOSC running on an iPad and to external midi keyboards and synths, as well as a Microphone input, and you can also see some of these as video on my youtube channel here Hopefully I will find time to write up some of these in these future.
In the meantime on to the article to enable Sonic Pi 3 to say hello to Raspberry Pi GPIO CLICK HERE
Click images above for two videos
You should be aware that the latest version of Sonic Pi (2.7) does NOT work with the command line interface detailed below. I have advised the author of this fact, and hopefully it will be fixed in the future. For now you need to use version prior to 2.7 for it to work
Just after I had written the project detailing how you could control GPIO connected devices from a mobile phone using the telegram.app, a reader suggested that it would be nice to add an autoboot option to the project. At the same time, I found a new project creating a command line interface for Sonic Pi. I killed two birds with one stone, and developed not only an autoboot addition for the first project, but also a Sonic Pi Jukebox setup, which lets you use a headless Pi and control it from a mobile phone, tablet or desktop fitted with the free app Telegram. It works best with a Pi-2, but also is ok on a B+)
If you have not already done so, you should work through the first article initially which details how to install and set up telegram on the Raspberry Pi. I have added a QUICKSTART route which lets you skim past the GPIO bit if you only want to do the Jukebox.
The new second article details how to add the automatic boot and logon for both the GPIO and Sonic Pi Jukebox. and details how to install the sonic-pi-cli and the code to utilise it.