# Touch Sensitive Key input for Sonic Pi

**URL:** <https://in-thread.sonic-pi.net/t/touch-sensitive-key-input-for-sonic-pi/959>\
**Category:** Creations & Ideas\
**Created:** [April 11, 2018, 7:43pm UTC](https://in-thread.sonic-pi.net/t/touch-sensitive-key-input-for-sonic-pi/959 "2018-04-11T19:43:58Z")\
**Posts on this page:** 2\
**Page:** 1

<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:** [April 11, 2018, 7:43pm UTC](https://in-thread.sonic-pi.net/t/touch-sensitive-key-input-for-sonic-pi/959/1 "2018-04-11T19:43:58Z")

</div>

Something I’ve been meaning to do for a long time. I got hold of an Adafruit MPR121 12 channel capacitive input board and connected it to a Pizero. Using the Adafruit Library and starting from one of their example files, I first changed things to run on Python3 then added OSC support resulting in a simple input device which can be used to send signals to Sonic Pi, where they can be used to trigger anything you like. I’ll tidy it up a bit, and then publish the details. It gives a pretty cheap way of getting external input to Sonic Pi. The board was £8 from The PiHut and I utilised a [RasP.iO](http://RasP.iO) Prohat board to mount it on. It was fairly easy to add python OSC support and end up with a script which enables it to work with Sonic Pi on a local machine (you’ld use a Pi3 rather than a Pizero in that case) or to send OSC to an external Sonic Pi machine (which is what I did).

> <https://twitter.com/rbnman/status/984151076751527937/video/1>

Develpment finished. Writeup coming soon with sample code.

 ![overallview](https://europe1.discourse-cdn.com/flex017/uploads/sonic_pi/original/1X/1c517892141698687b814eab19b3b9f661ff29ea.JPG)

---

<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:** [April 16, 2018, 11:19am UTC](https://in-thread.sonic-pi.net/t/touch-sensitive-key-input-for-sonic-pi/959/2 "2018-04-16T11:19:34Z")

</div>

Article now published

> **[12 input touch keyboard for Sonic Pi](https://rbnrpi.wordpress.com/project-list/a-musical-12-tone-alarm-for-the-raspberry-pi-part-1/12-input-touch-keyboard-for-sonic-pi/)**
>
> This project is something I’ve been meaning to try for some time, but have at last got round to doing so. It is a culmination of many other things I have done with Sonic Pi, especially follow…

Video

[![](https://img.youtube.com/vi/i6B9tA3fTC4/hqdefault.jpg "A Touch Keyboard For Sonic Pi") ](https://www.youtube.com/watch?v=i6B9tA3fTC4)

Software

> <https://gist.github.com/rbnpi/a28f57765d6e2282e71e6062a0ecf221>
>
> There are more than three files. show original
