# Sonic Pi for interactive generative music installation

**URL:** <https://in-thread.sonic-pi.net/t/sonic-pi-for-interactive-generative-music-installation/3118>\
**Category:** Support, Help & Resources\
**Created:** [January 3, 2020, 7:44pm UTC](https://in-thread.sonic-pi.net/t/sonic-pi-for-interactive-generative-music-installation/3118 "2020-01-03T19:44:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![yogish](https://avatars.discourse-cdn.com/v4/letter/y/7ea924/32.png) [@yogish](https://in-thread.sonic-pi.net/u/yogish)\
**Post date:** [January 3, 2020, 7:44pm UTC](https://in-thread.sonic-pi.net/t/sonic-pi-for-interactive-generative-music-installation/3118/1 "2020-01-03T19:44:18Z")

</div>

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/](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

---

<div class="post-metadata">

**Author:** ![perpetual\_monday](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/perpetual_monday/32/955_2.png) [@perpetual\_monday](https://in-thread.sonic-pi.net/u/perpetual_monday)\
**Post date:** [January 4, 2020, 12:02am UTC](https://in-thread.sonic-pi.net/t/sonic-pi-for-interactive-generative-music-installation/3118/2 "2020-01-04T00:02:16Z")

</div>

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](https://github.com/RemyPorter/Mass)

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

---

<div class="post-metadata">

**Author:** ![robin.newman](https://avatars.discourse-cdn.com/v4/letter/r/76d3ee/32.png) [@robin.newman](https://in-thread.sonic-pi.net/u/robin.newman)\
**Post date:** [January 4, 2020, 8:47am UTC](https://in-thread.sonic-pi.net/t/sonic-pi-for-interactive-generative-music-installation/3118/3 "2020-01-04T08:47:57Z")

</div>

Hi Yogav  
I think [this project](http://in-thread.sonic-pi.net/t/touch-sensitive-key-input-for-sonic-pi/959) 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](http://in-thread.sonic-pi.net/t/building-sp3-2dev-from-source-on-a-pi4-edit-addendum-added/2645) on Raspbian Buster if you want to use a Pi4.

---

<div class="post-metadata">

**Author:** ![yogish](https://avatars.discourse-cdn.com/v4/letter/y/7ea924/32.png) [@yogish](https://in-thread.sonic-pi.net/u/yogish)\
**Post date:** [January 6, 2020, 1:55pm UTC](https://in-thread.sonic-pi.net/t/sonic-pi-for-interactive-generative-music-installation/3118/5 "2020-01-06T13:55:24Z")

</div>

HI. Thank you! This one is really helpful resource 🙂

---

<div class="post-metadata">

**Author:** ![yogish](https://avatars.discourse-cdn.com/v4/letter/y/7ea924/32.png) [@yogish](https://in-thread.sonic-pi.net/u/yogish)\
**Post date:** [January 6, 2020, 1:56pm UTC](https://in-thread.sonic-pi.net/t/sonic-pi-for-interactive-generative-music-installation/3118/6 "2020-01-06T13:56:26Z")

</div>

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