Extra Switches (sw1): Sustain Pedal, Panic Button, etc

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 Likes

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

Regards,

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

1 Like

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

Kind Regards

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.

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,

1 Like

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.

1 Like

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,

1 Like

I love you!!!

After this, Zynthian will be the best piece of hw in the universe!!!

Thanks.

Sustain would be an obvious one but I would suggest a rather than considering the traditional foot pedal alone, we also give consideration to a hold button on the panels, so we can use another i/o to output to drive a LED.
Three I/O in all . . .

MIDI Panic ?? ? ? ?

We would then use webconf settings to choose between a momentary sustain function or a flip flop style (one press on, one press off) and polarity.

The initial Akai MPK-2 did have a front panel switch but replaced it with a sustain switch and I found that a bit of a loss…

Other than that unless you want to implement a subset of the transport control buttons ( Motor 61 has them).

I think we will add to too many configuration and building complications if we over spec this interface and if we do anything else (MIDI PC shot boxes , multiple encoder panels, transport control boxes, latest xmas wiz bang ), we do them as standardized i/o components on the bus exactly like the existing AIO (All In One)

More than sustain pedal i need something for fast switching settings (midi channel for example).

My Yamaha cannot switch midi settings by using bank.

I have no idea how to quickly on/off Zynthian output to Yamaha input :thinking:

Hi @zynthianers!

I’ve a initial implementation AllInOne of MIDI switches. Currently, extra zynswitches config is hardcoded like this:

  • 5th zynswitch => Sustain Pedal
  • 6th & 7th zynswitches => PANIC buttons (CC120 & CC123)

and the UI active layer’s MIDI channel will be used.

So, the only thing you have to do is:

  • update your zynthian

  • solder a 5 row-pin connector to your AllInOne circuit

  • connect some kind of switch between pin1-4 and pin5 (GND)

  • from the webconf tool, configure your wiring layout accordingly to the used pins:

    ZYNTHIAN_WIRING_SWITCHES’: “100,103,108,111,106,107,114”

i.e. with this configuration you should have:

  • Sustain Pedal (5th zynswitch) => pin 1 (106)
  • All Notes Off (6th zynswitch) => pin 2 (107)
  • All Sounds Off (7th zynswitch) => pin 3 (114)
  • Unused (8th zynswitch) => pin 4 (115)

Next step is to allow to configure the associated MIDI events from webconf tool :wink:

Until then, you can test the current hardcoded configuration by simply updating your software and following the above steps.

Enjoy,

1 Like

Great!! :heart_eyes:

I really have to make some pcb to freeing some GPIO pins :yum:

  • All Notes Off (6th zynswitch) => pin 2 (107)
  • All Sounds Off (7th zynswitch) => pin 3 (114)

Just an suggestion - one button as PANIC? Short push = All notes off, Bold = All sounds off? Panic is just … panic!!! and in live situation no one start thinking which button press is now required. As bonus this leaves one expander input free for future use (i have dream that one button can be user “programmable” for his/her needs via midirouter commands).

4 Likes

Yes … of course :wink:

OK! It’s implemented like this now.

I also added a new Wiring Layout scheme to webconf tool, MCP23017_EXTRA, that will setup the 4 extra AllInOne zynswitches.

So … this is the current hardcoded configuration:

  • PANIC switch (short => All Notes Off, bold => All Sounds Off) (6th zynswitch) => pin 1 (106)
  • Unused (6th zynswitch) => pin 2 (107)
  • Unused (7th zynswitch) => pin 3 (114)
  • MIDI CC64 (Sustain Pedal) (8th zynswitch) => pin 4 (115)

I’m thinking about the best way of configuring all that …

Enjoy!

2 Likes

You better use the new wiring layout un webconf. Anyway It should work. Have you updated to the last?

It seems that you haven’t update …

Ok that’s got it . …