Sonic Pi for interactive generative music installation

Hi I want to use Sonic Pi for some installation i working on for some museum.

My goal is to use it with raspberry pi and use Bare Conductive Pi Cap to control the code with some external controller. https://www.bareconductive.com/shop/pi-cap/

The Pi cap allow me to send 12 different messages to sonic Pi using OSC i guess.

I want to play 2 melodies on A minor scale for example, and each time ill touch the sensor it will change the note in sonic PI (note loops, just play it with adsr function).
another 4 sensors will play different one shots(long or short samples but each one of them will play randomly from set of samples.

another 2 tracks is loops of pads, and each time ill touch another 2 sensors it will change the note or samples.

Is it possible?
I looking for specific resources or code examples for this project, and if anyone have experience using sonic pi and external sensors for the same purposes ? Especially with Bare conductive products.

Thanks
Yogev

2 Likes

Hi @yogish, welcome to the Sonic Pi community. I stumbled across this recently (and was just referencing it today for my own needs). It might be helpful for you: https://github.com/RemyPorter/Mass

(…the most relevant parts start here: https://github.com/RemyPorter/Mass#actual-playback)

Hi Yogav
I think this project I did some time ago might be relevant for you.
The other problem you may encounter depends on the Raspberry Pi you want to use.
Unfortunately, the version of Sonic Pi included in the latest Raspbian Buster (necessary of you are using a Pi4) does NOT support OSC or midi messages, despite saying that it is version 3.1
It was not produced by Sam Aaron, and it is missing the code resources (erlang and osmid) reqiuired for these protocols to work. You either have to use Sonic Pi 3.0.1 on Rasbian Stretch on a Pi3 or Pi2, or you have to build Sonic PI from source on Raspbian Buster if you want to use a Pi4.

1 Like

HI. Thank you! This one is really helpful resource :slight_smile:

Wow. amazing looks like it’s for the same needs. Thank you Robin!
Is there any way I can contact with you?