Sustain Pedal or foot switch


#1

Hello, my zynthian still is on its way to me, but i already wonder if it would be possible to attach a Sustail Pedal (Foot switch, on/off) to one of the GPIO pins of the Raspberry Pi and have this coupled via software to the Midi sustain Signal?
It might be useful for keyboards which do not provide this option.
Regards, hal


#2

Of course it’s possible!! Although it’s not currently implemented … you should work a little bit, but please, do it :wink:

Regards,


#3

Hi, that motivates me in trying figuring out how to implement it :slight_smile:
Regards, hal


#4

Not specially difficult. The simplest way should be extending the zyncoder library.

Kind Regards


#5

Wouldn’t it be best if we had a phone connector jack where we can plug in sustain or volume pedals? Depending on the webconf setting we have to translate the signal differently.


#6

The next All-In-One circuit will include an extra connector with the 4 unused GPIO ports from the MCP23017, so we can use it for this kind of things (switch/sustain pedals). And we have the standard RBPi GPIO ports too …

Regarding the volume/expression pedals, we would need an ADC. It could be used for CV inputs and many other interesting things … there are so many cheap & crazy sensors …

Of course, a simple arduino-like module connected as a USB-MIDI controller could be a nice solution …

Regards,


#7

I like the Teensycontrollers (but havn’t used one for a couple of years)
They are programmable as an Arduino, also the low cost version Teensy LC has 13 analog inputs and a DAC (all 12-bit), and SPI and I2C ports so you don’t need a USB port to talk to the Zynthian. Mind the 3.3V ports, they are not 5V compatible.


#8

The All-In-One circuit can be tweaked for having 4 extra switches that can be used for a sustain pedal, MIDI switches (very useful for SooperLooper!), or for sending some specific MIDI message (program change, etc.). The software part have to be implemented yet … but we should start doing the hardware part :wink:

It’s really simple. The unused pins in the MCP23017 are:

  • pin 27 (GPA6)
  • pin 28 (GPA7)
  • pin 7 (GPB6)
  • pin 8 (GPB7)

The first 2 are binded to INTA and the other 2 to INTB.

You can check the schematic:

http://wiki.zynthian.org/images/4/44/Zynthian_allinone.sch.svg

I’ve to add some code to zyncoder for easing the integration with the zynthian core and UI.

Kind Regards,