The former version had at least two severe disadvantages (besides the Spaghetti code):
it was device specific. I now did my best to provide a device independant logic and implementation; so in principle you should be able to use any Midi device (for full functionality you will need two toggles/pads and 3 rotary controllers (volume, lpf and hpf)). I did tests with the Beatstep and the Minilab (both Arturia). Strangely the rotary controllers of the later one show some anoying latencies. The Beatstep rotary controllers work as expected, in real time. I will also have to solve the problem of feedback going back to the controllers (such as a blinking pad while recording, which the Beatstep already does).
The second, really annoying flaw was, that I had a latency while using the live looper (playing live I found that the replay is slightly delayed). I found out that this had to do with my initial implementation, which involved running some of the code via the run_file command. As soon as I put all the code in one file/buffer (which has some other advantages) I got rid of any latency concerning the recording and playback. That is also the reason why all the configuration resides in one and the same file; I would have liked to have a separate configuration file for the device specific variables (to be able to switch devices with just one line of code) but I again got the latency issue; of course I can not exclude that it is my poor coding rather than due to the fact that Sonic Pi has to read a file from the harddrive.
I hope the script is well documented so that you can try it out - if you are interested at all.
I did manage to also rewrite the Live Looper version with TouchOSC-interface. I also uploaded a small demo video (please forgive the typos in the commentaries):
I used the following setup as seen on the thumbnail before starting the video:
my old Samsung S4 with TouchOSC, which is set to USB-tethering (see note 1)
I’d be grateful for any feedback if you want to try out the Live Looper. I especially appreciate any productive comments on the code as this would help to improve my coding skills.
I also tried my Nexus tablet, which works also; but I unfortunately I do not have the option USB-Tethering available; does anyone have an idea why? It is running on Android 8.1 resp. LineageOS 15.1. USB-tethering seems to be a good option because a) you have a faster cable connection and b) you are not dependant on a Wifi (e. g. on stage).
I checked out Open Stage Control because I ran into some limitations of TouchOSC and I am pretty impressed. There are a few nice things about it, one of them: You can run it on any device which runs Google Chrome or Chromium…