Sonic Pi 3 Record/Player using TouchOSC

  • A new instrument interface for Sonc Pi using a TouchOSC interface.

  • An 8×8 matrix of push buttons which provide note input.

  • Keyboard layout similar to Ableton Push2, which makes it easier to input tunes. (More detail later)

  • The ability to choose keys C,D,E,F,G,A and B major and minor.

  • A choice of two percussive synths (piano and pluck)

  • The ability to record in real time the note input, the key input and the synth selection, which can then all be replaced.

  • When playing back a choice of three tempo settings is available. Slow Medium and Fast. Paying back at Slow plays back at the same rate as the recording was made.

  • The inclusion of a metronome, which can be switched on or off and set to two different rates. This aids the accurate placement of notes when entering them in real time during a recording.

  • Using a second “page” of TouchOSC the ability to save and retrieve up to 20 different recordings.The screen gives an indication of which slots are filled, and which slot is currently loaded.

  • A further feature is that you can play back a recording AND play a second part at the same time. Thus you could play a two part round, or add a harmony part to a tune. Although the program itself cannot record the result, because it is all played by Sonic Pi, you can use the built in audio recorder to record the resultant audio.

  • During playback you can switch off the LEDs from illuminating the keys as the notes play. This gives both a decreased load on the program, and is less confusing if you are trying to play a second part at the same time.

Full article is at

Link to video

Link to the code

7 Likes

Just checked it out on a Pi3 with a PiSound board. Works well, although with version 3.0.1 on teh Pi I had to amend line 144 on teh spRecordPlayer.rb program changing the it from
use_synth ["piano","pluck"][(get(:synptr)).to_i-1]
to
use_synth [:piano,:pluck][(get(:synptr)).to_i-1]

OK (and better) for the mac version too.

Hi Robin,

havn’t checked out your new instrument live but had a look at the video. Seems like an awesome piece of work! I will have a look at it as soon as I have the time. Thanks for making this public.

Martin

Hi Robin,

Certainly looks awesome… I’m slowly catching up on the midi/osc front now
there’s a windows 3.1, but I dont think I’m quite ready for this yet :slight_smile:

One thought that came to mind, was note duration and amplitude… I’m assuming
these are fixed values… was wondering if there was space for a couple of sliders
underneath the grid, such that when you select a grid (3,2 for example), it sets the
current amp/dur as 0, and you slide them to the values you want, which is saved
when you select a different grid location.

This is not criticism matey, its an honest query, Thats if it can even be done.

Eli…

HI Eli
It’s worth experimenting with. In fact there are lots of possible additions that could be looked at. There are however some constraints. First you would probably have to abandon the iPhone size restriction and move to a tablet size only to allow further controls to be added. Secondly there may be a code size restriction. It is very near the limit on buffer size for the first program, although you could add further code to the second program, and there is no reason why this can’t control features associated with the first program with care.

I was trying to get real time input, and I think your idea of adjusting the volume and duration for each note would be more suitable for a step time input. Also the more parameters that have to be recorded and played back the more demand there is on the program, and I think you may hit limits on response time. You will see that the leds on playback already can have some difficulty in responding at fast tempos.

I’ll certainly have a play and see what comes up!

1 Like

No iPhone here… Nexus 7 tablets… and I dare say I’d up that to a Nexus 9 or
some other 10" tab for that kind of capability.

You make solid points in your reply that I can’t argue with. I’ll see what you come up with,
and if it’s feasible to extend beyond that.

Again, nice work. :slight_smile:

Eli…

I’ve had a play with this Eli and it is possible to record both changes in volume and duration (I"ve also added more synths). I’ve had to go to a larger screen layout to do so. want to play around with it a bit further testing resilience etc, but looking good so far…

EDIT…
Going well. Now added volume and duration change features together with further synths and all teh changes can be added into the reocrding and replayed. In fact I’ve completely rewritten the recording structure to make it simpler.he only drawback is that the extra controls mean that you need a tablet sized screen to use it, as the iPhone template was too small.

Hope to release the new version once I’ve done further testing.

1 Like

This is truly marvellous, thank-you so much for making and sharing this with us :sunny:

From a personal perspective, it’s a wonderful watch for me because it concretely highlights and explores many aspects of Sonic Pi that I’ve been thinking about abstractly for a number of years now. This therefore has provided lots more info to throw into the thought-pot :slight_smile:

Thank-you!

It was fun developing it. Version 2 promises even more features. I’m currently trying to get the timing for a repeat function working, That way you can record a riff and then get it repeating in time.

1 Like

This is strange and awesome !!!
I 've created a more complex UI for SonicPI 2.5 and 3 and I’m going to publish soon on Kickstarter. Mine version can manage Samples and custom instruments and it is not limited to an APP like this(but it is a real hardware instrument).
Using the touchOsc inside an APP in ANDROID (or a Browser) limit the Real-time feedback
With no real-time this cannot be a good instrument.
Soon I will publish my project
Soon I will post here the homepage link
and soon…hoping you will like it and support it :wink: