Sending Expression Pedal Into Max?
Hi Team!
I want to use max to do some live signal processing. I'd like to control it with some foot pedal devices. I don't currently have a lot of experience with footswitches and expression pedals.
I thought I'd be able to find a MIDI Expression pedal on Sweetweater easily, but it looks like all the expression pedals have a TRS cable. There is a USB one that is much more expensive.
I was wondering, what could Max do with a TRS Expression Pedal? Could I plug it into my audio interface and have Max read it as a signal from -1 to 1?
Even the footswitches have TRS out. What will the output of these devices look like as a signal in Max?
Basically I'm looking for a foot button I can use to trigger taps for a tap delay. And an expression pedal I can use to control volume.
Since I have max skills, I'd rather build a max patch than buy a dedicated delay pedal. I just need the appropriate hardware so I can control max with my feet on stage.
Thanks for any input!
Nectar is probably the best all in one currently though i never owned it. I had the behringer and i don't recommend it.
make arduino based controller for few bucks.
then you can connect quite few pedals or switches to it.
In case you want to follow that path I'll be glad to help out
with schematics, code etc
Ah sorry, just saw the Nektar is a only a midi footswitch board with 2 expression pedal inputs, I was somehow remembering it build in pedal. expression to usb converter do exist but building your own is a good idea, too. It may be possible by using an audio output and input channel and measure attenuation of an ac signal passing the resistor of the expr pedal.
Ready to use, without housing:
Doepfer Pocket Electronic
"… connect up to 16 controlling elements (e.g. rotary potentiometers, fader/slider potentiometer, touch switches, toggle switches, foot switches, foot controllers)"
Arduino 32u4 based board costs 5-10 $
Doepfer Pocket Electronic at least 100
and needs same amount of work
to solder pots or switches and in addition
5pol midi unit to connect to
Thanks for all the input!
Can you help me understand from the arduino side of things... how would this actually work?
How does Max see the arduino? Is it an HI device that would a number of channels and return values between 0 and 127? I suppose, I would code this behavior in the Arduino, is that right?
For input to the arduino,
If I had a standard expression pedal with TSR output, how do I connect it to the Arduino? The 32u4 doesen't have a 1/4" input as far as I can see. Is there another component to accept the input cable and connect it to the board? Or is it about splitting the TSR wire and tying it up the board directly?
Sounds like a fascinating project! Would like to better understand what's involved and what the outcome will be.
@JOE KAPLAN
These Arduino devices are not boxes with holes where you plug in your pedals. They are electronic circuits on small boards with a bunch of connection points. You programme them for your needs, I think C is the language. You can solder your pedals directly or make an enclosure with TRS jacks and connect them to the board internally. Yes, electromechanical work is included and a little electronic knowledge is necessary. For your needs I think you want a board that can do MIDI over USB on it’s own, without any hardware addition.
—
I am in a similar situation, about to integrate 4 expression pedals into my MIDI system. I've already spent $60 for a ready-made Chinese interface for 4 pedals and that ended up in the bin after a few days.
Next idea was the Doepfer Pocket Electronics which I know for a long time. It would work without any programming and cost me €72 incl. shipping, plus material and labour for the housing. DIN MIDI only, external power supply and no way to "hardware"-calibrate 4 pedals. At least not without Windows, I'm on a Mac.
The pedals will finally control Max patches and/or hardware devices via a BomeBox.
The logical solution nowadays would be something like Arduino, but is that really the best solution if you only need such a small solution and have no idea about all the Arduino and similar stuff? You might end up with an unfavourable effort/lifetime ratio ...
I couldn't find any coherent information on the web. Just technical details or tutorials from self-proclaimed geniuses or excited kids. Eventually I talked to ChatGPT for a while and now I know roughly what it's all about. I spent more time in websites made for experts, confusing me with incomprehensible stuff and names like Leonardo, 32u4, original, compatible, headers, shields, Teensy, Tinky-Winky, Dipsy, Laa-Laa and Po.
Two glasses of whiskey later, I decided to go the more modern route with an Arduino Leonardo or Micro instead of Doepfer. I'm not sure if that was a good decision.
Arduino is definitely better option, because it is cheaper and more flexible.
You can make USB HID or serial with high resolution, or midi USB or 5pol din.
My recomendation is not to use this micro USB
connectors when used on stage.
On my devices I use some robust connectors that survive
stomping over it on stage.
Could be D-Sub, DIN , whatever
and on the other side USB connector.
Construction depends on needs,
one can place little arduino in pedal itself, and use pedal jack connectors to
plug another pedal or switch.
Or make a pedalboard, screw pedals and switches on it,
wire all together etc etc.
But essential is to have good hardware, trust me
cheap plastic pedals for 20 $ that can be bought from china,
and are repacked and sold by many music shops won't last long
before failing mechanically, pots will start having dropouts etc.
Next topic are switches, heavy duty ones are too loud and can not serve as
anything that needs precise timing.
That is the real challenge, not to write few lines of code for Arduino.
Now when it comes to arduino code, it is simple at first glance,
you define inputs to listen to,
scale it to 7 bit in case of midi, and define
what midi channel and cc to send.
But then you realise that analog input might have jitter and so
oscilate few values up/down.
So one needs to smooth it and send only when values changed.,
which is in boards like doepfer allready done...
Here is one code example that reads 4 analog inputs,
can fix potentiometer differences and compensate if
they do not reach full scale, smooth output and send only when values change.
uses this library :
code is written for pre 2. 0 Arduino IDE.
board micro or leonardo, any 32u4 based , acts as USB midi compliant device
sends CC#1-4 on channel 1
Thank you for your thoughts and for the code.
My 4 pedals are Yamaha FC7 mounted on a plate. Pretty solid, but quirky with the resistance range, as I have already noticed. Mechanical mounting is no problem. Software adjustments, smoothing etc. are what I expect. They are why I wanted to avoid opening a can of worms over such a supposedly simple function.
Your code doesn't look complicated, but I couldn't write it from scratch and I find the little #include ‘MIDIUSB.h’ at the beginning suspicious. I didn't really want to have anything more to do with something like that :-)
I'll give it a try, it's not a big financial investment, promises a little adventure and, if successful, a useful device.
Doepfer can not help you to tame pots.
I guess you are totally new to arduino, reading this :
"I find the little #include ‘MIDIUSB.h’ at the beginning suspicious"
What is suspicious about refering to standard arduino library,
which enables USB midi function on 32u4 boards ?
Well, I've used the Doepfer Pocket Electronics repeatedly and it works very well. But it can occasionally wobble between two values, it's not perfect. The extra power supply and DIN MIDI don't suit me for this pedal application either.
As far as the Arduino is concerned, you guessed right, I have no idea about these things. But the comment about the ‘suspicious include’ was meant ironically. I know what it is, I programmed databases 200 years ago and web applications 100 years ago. I don't really like doing that kind of thing today. But I'll give it a try anyway, programming 4 pedals will not lead me into misery.
I don't think doepfer is the cause of jittery pedal readings, but pedal pots.
and maybe wiring ...
In arduino you have enough range to tame that from
0 ~1023 down to reliable 0 ~127 for midi.
I would measure pedals raw range first using serial
mode, then use captured values for midi version adjustment.
int Pedals[4] = {A0,A1,A2,A3};
void setup(){Serial.begin(57600);}
void loop(){for (int i = 0; i < 4; i++) {Pedals[i] = analogRead(i);
Serial.print(i); Serial.print(" "); Serial.println(Pedals[i]);}
delay(100); }

I have modified for other people foot pedals using small alnico magnets and
hall (magnet) sensors instead of pots.
Thanks for your suggestion. I have just ordered my first Arduino.
As I only use the pedals to control moving sound effects, I won't need great precision. I don't know yet whether I need to calibrate the pedals. A little hysteresis should take care of the jitter. I will want motion control, I mean automatic sweep when a pedal is moved quickly. Something like what the [line] object does in Max. That should be relatively easy to do in C, I imagine.
Instead of customising arduino send code,
I would rather make pedals/arduino send 4 controllers properly,
then you can do whatever you need in max with received values.
Switches, mapped function, whatever.
which board did you order ?
The 4 pedals are currently used as dedicated expression pedals on 4 Eventide Factory boxes. The purpose of the Arduino is to be able to use the pedals everywhere in the setup via MIDI. They will be connected to a BomeBox, which does all the MIDI routing in my setup. Modifying the Arduino send code makes sense in this case, because otherwise I would have to make this modification in the BomeBox.
But you're right, the Arduino should send the bare sanitised data by default. Because I very often want to have a certain behavior, I hope to generate this with additional code in the Arduino and send these data either in parallel or use a switch to select which mode I want.
I have ordered an Arduino Leonardo board, plus some small parts to connect the pedals. In the end, it will probably be a housing with 4 or more TRS sockets and the USB connection.
After decades of messing around with this problem I am finally happy with the MIDI Mongoose from Tech 21
-A
@STRINGTAPPER
Thanks for mentioning the MIDI Expression box. It seems to do everything I want. It's a bit expensive, but the hours I'd have to spend learning programming, building a case etc put the cost into perspective. I will consider the box if I don't fall in love with the Arduino straight away.
@ANDREW PASK
No, Mongoose is not the thing we talk about. I am looking for an interface for 4 (probably more) expression pedals. No shifting, switching, routing etc.
Just a short feedback:
SOURCE AUDIO was right, as usual.
I got my Arduino Leonardo board today and from unpacking to watching MIDI events in Midi Monitor via USB it took about 30 minutes. Including downloading the IDE Software and a little soldering for the first pedal. I got a short test code and then a working code for one pedal from ChatGPT. Smooth operation, no jitter so far. For me, this is the way to go.
Hi Peter! This is really fascinating. Would you be willing to send a pic of your find setup? I'm very curious what this looks like once it's all put together.
A picture? Four pedals in a row and a metal box with an USB cable and four TRS jacks. Not very exciting :-)