Page 1 of 2

EDP Clone - A Raspberry Pi Project

Posted: Sat Nov 24, 2018 12:01 am
by colinbrogan
Updated 3/24/2020: Finally updating this post after nearly a year. Been working on this project off and on, and it has come very far along!
kraken_proto_1.jpg (61.88 KiB) Viewed 7603 times
The Project:
The goal is to create a self-contained loop pedal, running Sooperlooper on a Raspbery Pi 3 Model B+. A pedal which requires no laptop or screen, where all controls are triggered by stomp switches, and all settings are communicated by LED's. It heavily draws upon the original Gibson/Oberheim Echoplex Digital Pro design, but seeks to implement Sooperlooper's additional features, and introduce other ideas for a next gen loop pedal. My hopes are to provide full instructions for anyone to build one theirselves for less than $150, after I have finished the prototype.

Prototype 1
prototype_1_side_view.jpg (103.17 KiB) Viewed 7603 times
Hoping to get a video up soon to show all the features. All the below is working:
-0 latency Mic and Guitar input direct to analog output, with digital loop mixed in with sl's latency adjustment
-Multi-channel looping and LED clock visualizations (I am still working on aspects of Insert and WaitStart animations to make them better)
-All quantize settings can be controlled with foot stomps through ("OPTION MODE")
-All major time signatures can be entered on the fly with foot stomps through ("OPTION MODE")
-The following loop functions are available on each stomp botton of bottom row:
--Special 1 (Undo All, Redo, Pause, Trigger, Oneshot, Reverse, Substitute, Replace. You choose which one you want in option mode)
--Special 2 (Undo All, Redo, Pause, Trigger, Oneshot, Reverse, Substitute, Replace. You choose which one you want in option mode)
-Pressing "Option" stomp switches all other stomps into some sort of "option" toggler, with corresponding LED's to represent which "Option" is on
-Holding "Option" button dumps the current session to the hard drive, and reloads a new, blank section.

Proto 1 Milestones:
1. Compile a custom Realtime kernel which loads the Audio Injector stereo sound card drivers, Jack, and Sooperlooper on boot...............Done[*(need to test Sooperlooper, only nominally running right now. Could also minimize the time it takes to boot with systemd optimizations, but stalling this project until the end )]
2. Wire Buttons, LED's, and other interface items into Raspberry Pi's GPIO pins, and control / recieve from Python...................Done
3. Start Python OSC ServerDone Updated 3/24/2020
4. Drill the Pedal Enclosure and install all Electronics......................Done Updated 12/14/2018
5. Build a Guitar Preamp to feed into Audio Injector's inputs...................DoneUpdated 3/24/2020: Prototype 1 now has both a guitar preamp and a balanced microphone XLR input
6. Setup "Option Mode", to convert foot switches to an option toggle...........Done
7. Refine LED animations and other aspects of software...........In Progress Updated 3/24/2020
8. Create Web interface to load previously saved loops............

Prototype 2
kraken_wood_proto_2_topdown_small.jpg (59.24 KiB) Viewed 7603 times
Prototype 2:
Working out a more radical design for iteration 2. I've contracted out an electrical engineer to design custom audio boards and power supplies. Prototype 2 will have 2 XLR inputs with optional phantom power, 2 1/4" inputs. These inputs will route seperately as outputs, with looping functions simultaneously performing their operation on all channels, while keeping the audio in a given channel isolated. I received the boards about a month ago, and will begin building soon.

I also just contracted out an industrial designer to build the above design in wood. We are discussing methods of low-cost manufacturing, and going to kickstarter after Prototype 3 is done.

Proto 2 Milestones:
1. Get the new enclosure built
2. Mount and wire new boards / LED's / Rpi
3. Use buildroot to create a rapid booting OS to run everything. In addition to rapid booting, this custom OS will have a few other design goals: A) Optimize GPIO ping and timing to synchronize with audio bitrate, effectively lowering audio jitter to hifi levels. B) Optimize jack latency. C) Designed to take "Over-the-Air" updates, triggered from a web app. D) automatic recognition of another pedal OS in wifi proximity, for the ability to "sync" wirelessly other pedals

Re: EDP Clone - A Raspberry Pi Project

Posted: Sat Nov 24, 2018 12:24 am
by colinbrogan
I got through a few stages. Finally got a stomp switch wired into the Raspberry Pi and triggering Python code. Also got the LED rings controllable in python.
led_ring_and_stomp_switch.jpg (95.86 KiB) Viewed 20939 times
Also, as promised, here is an image of my enclosure with my foot in the shot for size reference:
enclosure.jpeg (114.01 KiB) Viewed 20939 times
This is the 2 x 4 steel channel, cut to 20" length which I got from It was less than 10 dollars. No other standard pedal enclosures were wide enough for the amount of stomp buttons I wanted.

I am almost done with Milestone 2. All I really need to do is fiddle more with the LED ring through Python until I feel like I've got the hang of how to make it do what I want. Then I can try milestone 3 and writing the OSC program, which will be the bulk of this project.

Re: EDP Clone - A Raspberry Pi Project

Posted: Sat Nov 24, 2018 8:26 pm
by colinbrogan
I finished Milestone 2. I was able to get the LED rings to perform all sorts of tricks based on python code.

I am now stuck on something with Milestone 3. Jackd and Sooperlooper fire up fine as a background process, and sooperlooper gives me no errors. However, if I try to fire up a python script to connect to sooperlooper through OSC, all the sudden my console is flooded with "got xrun" messages. It looks like this is coming from sooperlooper. Here is my python code to connect through OSC to sooperlooper:

Code: Select all

#!/usr/bin/env python2

import time
from signal import pause
from OSC import *

client = OSCClient()
client.connect( ("", 9951) )
client.send( OSCMessage("/ping", ["localhost:5432","/ping_return" ] ) )

server = OSCServer( ("localhost", 5432) )
server.timeout = 0

def ping_callback(path, tags, args, source):
        print( path )
        print( tags )
        print( args )
        print( source )

server.addMsgHandler( "/ping_return", ping_callback )
I am pretty new to OSC, so I may be doing something wrong. But looking through the forums, it appears another guy is having periodic "got xrun" problems on a Raspberry Pi, though he doesn't mention anything about OSC causing it. I've replied to this thread also:

If anyone has any workarounds for this problem, or insight into what this error means / what's causing it, I would happily hear it.

Re: EDP Clone - A Raspberry Pi Project

Posted: Sat Nov 24, 2018 9:00 pm
by colinbrogan
Scowering the forums, a few posts came up where "got xrun" problems we're solved by correcting hostname issues. Here is one such post:

So the output of "hostname" on my machine is "sooperlooperpi". I changed out the following two lines of code in python, and the "got xrun" message is no longer appearing:

Code: Select all

client.send( OSCMessage("/ping", ["sooperlooperpi:5432","/ping_return" ] ) )
server = OSCServer( ("sooperlooperpi", 5432) )
The python code is not showing anything to signify that it has connected, but I will chalk that up to my inexperience with OSC and this python library for OSC I am using. Will keep researching on that front until I make it past that problem.

Re: EDP Clone - A Raspberry Pi Project

Posted: Thu Dec 13, 2018 12:46 pm
by jesse
Did you get any OSC response sent to your OSC server port in either case?

The got xrun messages occur when the jack audio thread reports buffer overruns... what is your JACK configuration (including buffer size, number of buffers, sample rate, etc)?

Re: EDP Clone - A Raspberry Pi Project

Posted: Fri Dec 14, 2018 7:49 pm
by colinbrogan
Yes I did. Haven't posted in a while but I've made massive strides on this project, may have a finished prototype in a week or two. I don't have any technical problems at the moment related to SooperLooper. Was able to connect through Python (I just didn't understand the library at the time, but quickly figured it out. Was not a Sooperlooper issue). Sending and recieving OSC messages. All the commands have been self-explanatory and work as expected. Absolutely love how you designed the OSC interface (I am assuming you are Jesse Chappell by your screen name and frequency of post). Brilliant work with sooperlooper. When I finish this will truly be an Uber pedal, and I can't think of a currently on the market looping pedal which will be able to compete with it.

Re: EDP Clone - A Raspberry Pi Project

Posted: Fri Dec 14, 2018 8:11 pm
by colinbrogan
Wanted to show you what I was able to pull off with your auto register events on loop position, and state changes. These are screenshots from a video, because it's harder to post a video than to do screenshots:

I have an LED ring which visually represents what is going on with the looper.
When I hit record, the whole thing lights up red like so:
record.jpg (32.47 KiB) Viewed 20640 times
When I stop record, it goes immediately to playback mode, which is signified by green. But a brighter band of green color spins like a clock representing the current loop position. Here it is around a quarter of the way through:
playback_quarter.jpg (58.5 KiB) Viewed 20640 times
And here it is around three quarters of the way through:
playback_three_quarters.jpg (57.72 KiB) Viewed 20640 times

Re: EDP Clone - A Raspberry Pi Project

Posted: Fri Dec 14, 2018 8:23 pm
by colinbrogan
Overdub is like playback, but the whole thing is orange instead of green. It gets more interesting as the states get more sophisticated.

When I hit multiply, the whole thing turns purple. Here it is near the end of the first loop (when it hasn't added another loop):
multiply_before_adding_2nd.jpg (55.67 KiB) Viewed 20640 times
After it makes it to the end, and multiply state is still going, the whole progress band scales back in half, as the loop length has just doubled (1 loop finished out of 2 loops puts us at 0.5 progress point). Also ofcourse, the speed of the progress band slows proportionally to the expanded loop length. Here it is about a quarter of the way through the added loop ( full loop + 0.25 of new loop is about 0.625 of total loop length):
multiply_after_2nd.jpg (56.84 KiB) Viewed 20640 times
Finally, insert also does some interesting things. I am recording the "start point" of the insert. So everything before the start point is green, but the progress band turns red indicating the start, and current progression point of the new added material as it is being recorded. See below:
insert_second_half.jpg (126.31 KiB) Viewed 20640 times
I am currently reworking the pedal housing, as the 2 x 4 steel channel is not ergonomic, and is annoyingly hard to strike the stomp switches with your foot. I am near finished with that. Once I finish the full pedal build, and wire everything together, I am going to finish and refine the code. Have high ambitions for visualizing WaitStart and WaitStop for RoundMode and QuantizeMode respectively. I think this LED ring thing will help clarify a lot about what's going on when using a Raspberry pi headless setup.

Re: EDP Clone - A Raspberry Pi Project

Posted: Sat Dec 15, 2018 12:08 pm
by jesse
That's great! Better visualization than in the SL GUI :)

Feel free to post any links to videos (that you may have uploaded to youtube, etc) of how this whole project is working out....

Re: EDP Clone - A Raspberry Pi Project

Posted: Sat Dec 29, 2018 7:16 pm
by Snake Eyez
Great project! Have you considered using Buildroot? This guy has an RPi booting into minimal Linux running JUCE in just a few seconds - click the picture to link to a video test;

Here's a guide for RPi audio Buildroot;

Lookin forward to see how this progresses.

Happy New Year :)

Re: EDP Clone - A Raspberry Pi Project

Posted: Sat Jan 19, 2019 12:59 am
by trafficjam
I love that this is such a recent post. I really do need this in my life.
I use SL headless on pi and I have some neopixels laying around just for this type of project.
I would love to see your code if anyway possible so I can start playing with it for :
" OSC server in Python which bridges the gap between hardware interface and Sooperlooper "
I would love to help out or contribute or test any way I can if possible.
Can't wait to hear an update.
And Jesse, thank you for all you have done here. SL is still alive and well

Re: EDP Clone - A Raspberry Pi Project

Posted: Sun Jan 20, 2019 5:07 pm
by colinbrogan
Happy to get some responses from everyone. I apologize for my delayed responses. I've been waiting to post again until I finish soldering and wiring everything in my new case. I cut and re-welded my steel channel, because the prior case design had terrible ergonomics. Here are some screenshots:
56745524335__68E1A2EB-5023-4660-A978-B0C463519327.JPG (124.17 KiB) Viewed 19583 times
56745521882__71AACE77-1A43-456B-A0DA-8EF01DFD8CB4.JPG (102.07 KiB) Viewed 19583 times
I pulled off some jacks off of my audio circuits to try and solder wires direct on the board, but in the process screwed up one of the connections. This has held me back from progressing with the code for a couple weeks. Trying to get it solved in the next few days.

In response to the last two replies:
Snake Eyez: Yes, buildroot sounds really promising! On the Audio Injector forum (the sound card I am using), there are some posts about doing buildroot in a way which maintains the device overlay for my sound card. Also reading 3 - 5 second boot times. I have messed a little bit with buildroot before, but it's more of a dive than I can handle right now. For simplicity's sake, I am trying to make it through my first prototype on the current Raspbian setup I have going (1.5 minute boot, but hey, it works right now). However, if I can make it through finishing my python script and first prototype, I very much would love to redo linux with buildroot.

trafficjam: I just posted the current state of my python OSC server that controls the neopixel rings on github, and routes the gpio buttons to various Supercollider OSC commands, though it is currently a private repo. If you want to look at it / hack with it, let me know your github account and I'll add you as a collaborator. I am not sure yet how I am going to release it to the world yet, so I am currently keeping it private.

Re: EDP Clone - A Raspberry Pi Project

Posted: Fri Jan 25, 2019 3:17 am
by alignwaivers
Okay I should have posted this far sooner but first of all NICE WORK!

I've been planning on making a pedalboard for SLGUI for awhile now. No offence to the ones already made, but didn't see one with lights. feedback is important!

You are using those circle lights which will be very aesthetically pleasing (I assume you will place around the buttons?)

But I opted to get cheaper pcb strips of 8 rgb leds (ws2812b) that are available on ebay for 99 cents each - my main rationale being that I might want to keep my foot on the pedals, and wanted the display to be visible even with a foot in ready-to-press position

I will post pictures later (i'll make a separate thread from yours) when I actually construct the board.

Currently, however, I have used a python script I wrote to control a Novation launchpad to be a sequencer, instrument and (sort of) sampler, and (primarily) a controller for sooperlooper

the launchpad (original version - i'm porting my code to use the mk2 version soon) is an 8x8 grid of led buttons (not full rgb, only 3 vals of red and green). The mk2 has full color range

(the sequencer depends on polling jack transport for relative position but i plan to make the code use sooperlooper solely rather than bothering with jacksync stuff - if SL controlled jack transport more fully I would prefer that, but no pressure. I appreciate it greatly for what it currently does - you must also be running the script as well in order to use the sequencer)

My code is relatively ugly, but I'm working on refactoring at the moment. The part of my code you may want to peek at is the slosc_handler, track_state, track_len, and track_pos functions. ...

Hope that is helpful, would love to see your code and the development of your project as it comes along. Best of luck and thanks for updating us all

Re: EDP Clone - A Raspberry Pi Project

Posted: Fri Jan 25, 2019 3:19 am
by alignwaivers
p.s. I would love to take a look at your code, please make me a contributer (my github handle is also alignwaivers :)

Re: EDP Clone - A Raspberry Pi Project

Posted: Wed Jan 30, 2019 12:54 pm
by colinbrogan

Coincidentally, I also have a Novation LaunchControl which I am using for SuperCollider, but not SuperLooper.

Furthermore, your ws2812b LED strips have the same chip as my LED Rings, so the code and library dependencies should be interoperable. I just added you as a collaborator on github, look for "Broganheimer EDP" (the name is a joke). There are a bunch of constants at the top of the file, which allow you to change the number of LED's on your strips, and change which GPIO pins control which buttons. I also have not been programming for elegance yet, though I hope to clean up and simplify the code once I get past a few roadblocks.

Ya, start your thread. I'd love to see what kind of design direction you take. Perhaps we can help share solutions, or collaborate on the Linux distro (I'd love to get a super lean buildroot + realtime kernel + SooperLooper image spun up for quick booting and super lean performance, perhaps sharing it to the outerworld as a kind of Guitar Pedal Distro). I didn't quite follow the bit about jack_transport, and SL controlling it. It sounds like you are doing more than I am with hydrogen and other stuff.

I am still stuck with some soldering issues. I ruined my guitar preamp on my first soldering. However, I have a real soldering station now with good tools, and I got a replacement preamp the other day. Been waiting for a free night to push through these hardware roadblocks (My freelance work has killed all my free-time in the past couple weeks). I am anxious to get back to the coding part, as I seem to be more adept at manipulating bits than atoms.

Re: EDP Clone - A Raspberry Pi Project

Posted: Sun Feb 10, 2019 1:09 am
by colinbrogan
Screwed up my second batch of GPIO port expanders. Still horrible at soldering.

Re: EDP Clone - A Raspberry Pi Project

Posted: Sat Feb 16, 2019 8:08 pm
by colinbrogan

1. New preamp soldered correctly, finally, and tested as working.
2. Also got in a new Audio Injector card, this time the $50 Octo (because I screwed up the first also by soldering). This card gives me 8 outputs and 6 inputs, so I can have an optional seperate output per loop (My guitarist thought it would be cool to have like 5 amps on stage, and be able to "choose" which one he is playing and looping on by the loop channel buttons). I've got it recognized and running on linux.
3. I am still waiting on my third set of MCP23017 GPIO expanders. If I can finally get this right and mounted in my box, I will finally be able to forward on the code. Will post videos as soon as this happens.

Re: EDP Clone - A Raspberry Pi Project

Posted: Wed Feb 20, 2019 11:38 pm
by alignwaivers
Hmm -

Agreed, excited to see how some degree of cross-fertilization manifests here - I only wish I could have given you some pointers with soldering... #1 rule you might not be aware of? Don't solder while anything is powered!!!!! and if you did solder connections you don't want, there are a number of techniques for 'un'soldering so to speak.

Other notes - INSPECT all the soldering you have done to make sure no shorts/crossings have occurred. can always take a knife to cut away smaller connections, or heat up your soldering gun and 'wipe' away the connection point you don't want. This is something you want to be very thorough about especially if you have a pi or something else spendy on the line! Quadruple check before you power on!

Yeah, I'll post it soon!

Ignore my mentions of hydrogen and jack-transport, it doesn't matter and will be deprecated shortly. would only have mattered for the few plugins that are jacksync compatible. All the best and looking forward to seeing how (both of our iterations) turn out!

Re: EDP Clone - A Raspberry Pi Project

Posted: Wed Feb 20, 2019 11:39 pm
by alignwaivers

I just acquired a launchcontrol mini and am gonna just port my code to work with the same led buttons on there ;)

p.p.s. why do you need a MCP23017? seems potentially overkill for the amount of buttons and outputs so I'm curious - safety buffer for rpi protection / more straightforward wiring?

Re: EDP Clone - A Raspberry Pi Project

Posted: Sat Mar 02, 2019 6:58 pm
by colinbrogan

The MCP23017 is for individual LED lights to toggle various Sooperlooper options. It might be overkill, however, I am fundamentally excited about the ability to change quantize settings on the pedal itself (possibly on the fly). This will make more sense once I finish the prototype. I am working on it this weekend, so hopefully I can post some videos. The most exciting feature in Sooperlooper to my guitarist and I is the idea of quantizing to a beat, and recording seperate loops with different time-signatures. So, for instance, imagine a 5/4 part on top of a 3/4 part, on top of a 4/4 part. This is a brilliant feature, with rich creative possibilities which we want to exploit. Also, I've noticed in sooperlooper that you can toggle quantizing on and off mid-loop. This creates a Reichian phase scenario, where a few milliseconds difference between loops can offset each part on every iteration, getting the beats out of sync in a phase. If you then switch the quantize back on with the same loops, it shaves off instantly those straggling milliseconds and forces the beats back in alignment. I've got some big musical ideas to employ this effect, where it can be toggled live and on the fly. Also, my current design has 14 stomp buttons, exceeding my available GPIO pins on the PI, so I need the MCP for a few of those stomps also.

If I can finish this little bastard, I think it will be far superior to every other self-contained looping pedal in the market, thanks to Jesse's fantastic software

Re: EDP Clone - A Raspberry Pi Project

Posted: Wed Mar 06, 2019 9:56 pm
by alignwaivers
I'll say, awesome software indeed!!

You're using individual lights? interesting

I'm planning to string together a bunch of individual ws2812b leds, which will mean less gpio usage since they can be strung along with the 8pc ones I'm already using - just a thought.

Good luck, can't wait to see how yours turns out and compare!

All the best, and interesting thought about quantizing in the middle of loops, etc.

Re: EDP Clone - A Raspberry Pi Project

Posted: Fri Mar 08, 2019 2:16 am
by alignwaivers
Hey here's a question for you... how's the audio quality with your setup? I'm experimenting with different audio inputs and I haven't tried the audio injector (or the preamp by flatmax).
Please let me know as descriptively as possible, or if you could post an clean audio sample to give me an idea I'd really appreciate it!

Re: EDP Clone - A Raspberry Pi Project

Posted: Tue Mar 12, 2019 10:38 pm
by colinbrogan
Been working on this thing every night for over a week. I won't go out with friends until it's done. Alignwaivers: I should be able to get you some audio samples, and describe things soon. So far, by initial tests, both seem very high quality. I had some noisy interference at first with the guitar preamp, but after I re-soldered with shielded audio cables, and separated the audio injector from the pi with an ide cable, the background noise seems to have disappeared. But I haven't done heavy testing with it yet, so don't quote me until after that happens.

Re: EDP Clone - A Raspberry Pi Project

Posted: Mon Mar 18, 2019 12:59 pm
by alignwaivers
no worries, keep it up when ya can!

Hope you at least make it out occasionally - can't forget to enjoy yourself if you expect to work yourself so hard (on a side project besides your actual job, especially.

I know the audio setup stuff can sometimes be frustrating, but I'm sure you'll get it soon. If you need help with something along those lines I suggest the linux audio users email list, lots of active people there

p.s. I'm headed to the linux audio conference next week so I'm hoping to get some extra knowledge there.

Re: EDP Clone - A Raspberry Pi Project

Posted: Sat Mar 30, 2019 7:36 pm
by colinbrogan
Big steps. All components are mounted in enclosure but 1 (which should be easy, just need to find a place). Also, I got a 3d printer, and created custom enclosures for my LED rings. Mounted all loop channels (decided on 5, I couldn't make room for the 6th, but 5 is plenty). Wired everything up and observe!
pedal_small.gif (229.79 KiB) Viewed 15458 times
The pixel animation is only a test python script, because I had to disconnect all my IDE cables to get in there. However, everything has been independently tested at some stage. The MCP chips were recognized and work. My sound card was recognized and controllable by jack audio. Down to a few more tasks:

1. Drill and tap bottom of my pedal so I can screw on bottom with rubber foot legs, to make it fully enclosed.

2. Paint the thing.

3. Glue in Option lights, and wire them to the MCP

4. Solder the other 7x outputs to individual loop channels (In addition to the all loop out on the right, I will have a 1/4" per each loop channel, so that someone can route each loop to a different amp. This was a feature suggestion by my guitarist, who wants to command a fleet of amps on stage)

5. Solder balanced XLR jack to the balanced input on the preamp (for looping vocals and other instruments)

6. Reconnect IDE cables (which connect all components to the GPIO)

7. Finish code to run everything!