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

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 . …

OK! Sorry! I changed the pin assignation. The right one is this:

  • pin 1 => GND
  • pin 2 => WiringPi GPIO 106
  • pin 3 => WiringPi GPIO 107
  • pin 4 => WiringPi GPIO 114
  • pin 5 => WiringPi GPIO 115

And the current hardcoded configuration is like that:

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

Switches are normally open, closing to pin 1 (GND).

Regards,

So … it works now?
We want to see your big red-pushroom :wink:

1 Like

Can’t see any point differentiating between two options in Webconfig. MCP23017_ENCODERS and MCP23017_EXTRA. If additional switches not installed, then all works on “old way”. Just add MCP23017_ENCODERS those new switch gpios (106, 107, 114 and 115) and everything works. As switches are NO (normally open) contacts, then without installed switches nothing changes on encoder input register bit 6 and 7, when new zynswitces are installed, then additional options just work (extra panic button and foot switch for now). Old way panic via CTRL_1 still works, right?

Of course you are right … but perhaps some code in the UI depends on the selected wiring layout … i’m not sure yet, so i prefer to maintain 2 separated wiring layouts by now …

Anyway, it’s not a major problem to change this :wink:

Regards,

Your wish is my command…

3 Likes

The Panic switch wants to:

  1. on short press
    (Press>Release within short press window)
    Send Notes off.

  2. Once you get passed the short press time and hit the long press
    (Press >>>> outside of short press window)
    Send Sounds (all notes all channels) off.

Otherwise you press and hold it and it’s waiting for the release . . . .and you kind of deadlock.

Currently switches in Zynthian UI works when the switch is released. Remember that in theory, every switch can have 3 functions: short, bold and long.

Anyway, you can be sure that i will think about it because it would improve the overall UX… it’s a good idea! :wink:

Thanks a lot, @wyleu!

Anyway, a bold click is quite easy to do. Simply click, hold a little bit (0.3 s > t > 2 s) and release.
I have configured long click also as “All Sounds Off”, so any click/hold/release action where hold time is more than 0.3 s will do the “All Sounds Off”. A short click (momentary), will cause the “All Notes Off”.

I’m thinking about it, but the real problem is the “long click” action. I could make that switches with no “long” action associated behaves as you say, but i’m afraid that this can be confusing. Some switches working different than others … uhmmmm … :thinking::thinking:

Regards,

Hi, good work.

I have got still an idea for “midi-learnable” pedal from normal sustain pedal? For example for mapping in MOD-UI pedals switches (1. click value 0-63, 2. click for 127 = ON/OFF)

ok, again, i know :slight_smile: