Touchosc live looper

Hi,

I finally had some time to go over my ‘Live Looper’ application for ‘touchosc’. You can find the project at Github:

https://github.com/mbutz/sonic-pi-live-looper

I am happy for any input and feedback on that.

Martin

2 Likes

Hi Martin…

You and Robin really need to join forces and converge your ‘touchosc’ apps.

Just an opinion.

Eli…

Hi @Eli,

well, sort of we do :wink: : I do learn a lot from @robin.newman and he saw the first draft and made some improvements. But he is much more an expert on these issues than me.

However, I think it’s great that people start to explore the possiblities of extending Sonic Pi and use it in different directions.

One more technical remark:

I am not sure about how an average machine will cope with these applications. I do plan to use this for live coding - so there will be going on more than just the ‘Live Looper’. Right now it is not yet bulletproof or ‘production ready’, see my ‘known issues’ section:

  • I had some difficulties to synchronise the recording and the playback. It sometimes happens, that e. g. you have a 4-beat- and a 8-beat-loop. After playing around with the Live Looper some time the 8-bar-loop recording will start playing 4 beats too early. I have no idea why this is happening. Any hints are highly appreciated.
  • As Sonic Pi records faithfully you will have to have a good timing while playing live sound to achieve the wanted results. Nevertheless I think there are some latency issues involved. This might be due to hardware limitations; I would highly appreciate if I could simplify the code as much as possible to reduce hardware load. Also here any tips are highly appreciated. Maybe it is a bug …

I do hope that someone (maybe Robin) who has a better grasp of coding than me takes a closer look, because right now I am at my wits’ end about these issues.

Thanks for your comment!

1 Like

Hi,

just in case someone is interested in my progress :wink: .

I found out, that looping sounds is a quite tricky thing if you have loops of different lengths such as a 4-bar-loop and an 8-bar-loop. Depending on when you start the recording it could be, that suddenly your 8-bar-loop it out of synchronisation in that way, that the play started 4 bars to early. This was due to the fact, that the playback loops kept on running while the recording loop of the 8-bar-loop started 4 beats to early. A bit complicated to explain (easier to show) but in the end totally logical.

So I changed the implementation: Now the playback loops sync the recording loops and the metronome is triggered by the playback. This has two consequences:

  1. The individual loops are always in sync with themselves (the 8-bar-loop always records and plays back after 8 bars aso.)
  2. The metronome will start once you select a track and gives an audible hint. It can thus be, that you just recorded a 4-bar-loop, switch to the next 8-bar-track and will have to wait until the next cycle of these 8 bars have started until you hear the metronome. This is somehow not intuive at fist sight but consistant with the musical or rather timing logic.

I pushed these changes to the repository. I will also update the documentation.

Anyhow, feedback welcome if you happen to be interested to try it out.

It is not an easy to use tool due to the fact, that you have no time corrections and will have to play in time to achieve satisfying results. Should not be problem for an experienced musician (as I lack the exercise my timing is pretty bad). Nevertheless I made the tool for myself mainly to play together with other musicians.

Just to give you an impression: Here is an outtake of a session I did with a friend who was playing the Digeridoo while I was operating Sonic Pi. This is very early stage stuff but we had some fun and it illustrates how to work with the live looper:

1 Like

Hi,

I did a short demo to give an idea what you can do with the Live Looper:

I also fixed (well, I hope I did) an isssue with it: It is somehow quite tricky to synchronise recording, playback and metronome if you are dealing with loops of different length and want the metronome which reflects these differences (i. e. mark the first beat of your 4-, 8-beat or however long track). If you have e. g. a loop of 8 beats length to record, you want to have it played back just after the recording. So far so good. The trouble was, that if you then switch to a track with 4 beats length and go back you could be out of sync with the 8-beat track. I think, now it is running okay and consistant.

I also still have issues with the latency. There seems to be no latency issue with my setup so far as the keyboard and the softsynth is concerned. But while recording a loop I get the feeling that I have a noticable latency. It might be my poor playing but as I have always this feeling I doubt that…

Nice performance. I enjoyed that.

Hi,

I updated my Live Looper. It now works quite well and seems to have no major bugs :wink: I also have included a Midi version for my Arturia MiniLab mkII (which can of course be adapted for any other midi controller):

By the way: I made some very positive experiences in connecting my mobile phone to the laptop via cable and USB tethering. OSC then seems to work very reliable and fast (which was not entirely the case while working with a Wifi connection).

So if anyone is interested in trying out the Live Looper - I am looking forward to comments or suggestions.

(I am especially interested in finding out about the - well, how to call it ? - ‘latency issue’ I think I am experiencing, which I have not been able to track down… It might still be the fact, that you will have to play in time very precisely to get the wanted results. But my feeling is, that in addition to that somehow the replay is very slightly delayed… )