Betaversion of Live Looper with touchosc interface


after having had some issues, I finally completed the first beta of my live looper app for Sonic Pi and touchosc.

All files you need are at Gist:

  • Controller script: Setup for defaults (such as connection params for OSC, library path, track length etc.); this file has to be loaded into Sonic Pi and evaluated.
  • Library: This file should reside on your harddrive and will be evaluated each time you press the big red Go-button (see below)
  • TouchOSC-layout: Of course this has to be setup first. The layout has been made for use on an Android smartphone (layout size 580x320 pixels). Do not edit this file manually but with touchosc editor available at: Easiest way to load this into touchosc: 1. Save this file as 'index.xml. 2. Create zip-archive containing only this file named e. g. ‘live-looper.touchosc’. 3. Open the archive in touchosc editor. 4. Use sync function to transfer to your smartphone (see:

To set the live looper up you will have at least to do the following:

Insta* ll the touchosc layout on your smartphone

  • Configure touchosc (IP of your machine, outgoing port 4559 to reach Sonic Pi and incomming port so that Sonic Pi can communicate back to touchosc).
  • Load the controller script into a Sonic Pi buffer, adjust the settings for IP and the incomming port number of your smartphone or other device.
  • Put the library somewhere on your machine and set the path in the controller script (set :libpath, ...).
  • Run the controller script in Sonic Pi and press the Go-button on touchosc.
  • And - of course - you will need some sound input to record (accordingly you will have to configure your sound system which I do with Jack under Linux)

This is, what the interface looks like so far:


  1. Go-Button: Starts the application (runs the library script).
  2. Arm track buttons 1 to 4: (exclusively; Sonic Pi will just record one track at a time); the recording will start if you press the Go-button at the next beginning of what you have defined e. g. in the track_len-setting (e. g. set :track1_len, 8). Any time Sonic Pi actually records you will see a green LED on the left upper corner of the arm-track-button. After that the track will automatically disarmed.
  3. Metronome: You need to have an audio feedback, when the recording periods start. The metronome marks the 1 and the subsequent beats (depending on your track length setting for each individual track); you can set the volume of the metronome and also switch it off completely (orange button below the orange slider)
  4. Playback volume of track 1 to 4. Set to 0 you can also completely mute a track

Initially the metronome is disabled; also the playback volume sliders are set to 0.

I’d be grateful for some feedback if you like to play around with it. There are for sure some issues I have not thought of; also I am unsure about the recording volume (which can be adusted with :rec_level) under different circumstances.



Hi Martin
Had a go with this. A great start. Found it a little tricky to get the metronome going but once I’d worked out the sequence OK. Might look at the logic of this.

I changed the recording section slightly allocating a different name to each one and killing them after each record. eg,

# Record track 1
if get(:track1) == 1.0
  in_thread sync: :metro do
    with_fx :record, buffer: t1 do
      osc "/looper/track1_rec", 1
      live_audio :audio_in1, stereo: true
    sleep get(:track1_len)
    live_audio :audio_in1,:stop
    osc "/looper/track_arm/2/1", 0
    osc "/looper/track1_rec", 0
    set :track1, 0

And similar for tracks 2-4 using audio_in2…audio_in4

It’s hard at bpm 120 to get the tracks sycnchronised, but I guess that’s a matter of practice. Might try slower for a bit.
LIke the recording live green lights. Very cool.

Hi Robin,

thanks for the improvements!

Yeah… the timing.

Image the following scenario, in which I mainly plan to use the live looper: I am jaming with some other musician, build some live loops (drums, bass aso.), which are all synchronized by :metro. The metronome in this scenario only serves to synchronise all other live loops. I can then record bits of what is coming in (the live looper now comes into play), loop and build on it. Nice to use input of the recorded loops to change with everything what is available to transform samples…

And by the way: although I lost it during the long years I haven’t been playing actively I am very eager to regain a good sense of timing as a former Jazz player.