Send differing Midi CC on alternate button press.

Good evening one and all.

I’ve recently built a Midi Controller for a guitar effects pedal. I’m looking to edit the code I’ve been gifted so that alternate presses on the same footswitch will perform different actions - if this is possible!

For example, instead of having 2 different buttons for “Play” and “Stop”, I want press 1 on a switch to Play, and press 2 to Stop.

How would one go about this?

Thanks in advance to anyone who can help :).

MyFS.ino (14.6 KB)

snippets of code are rarely helpful. Entire sketches are helpful

blh64: snippets of code are rarely helpful. Entire sketches are helpful

You are correct. Edited.

The basic principle is straightforward. When you send a particular message set a flag. If the flag is set send the alternate message (and reset the flag).

I have no idea how that fits in with your code because if you can't be bothered to post or attach it here I can't be bothered to download it from some other site.

Steve

slipstick: I have no idea how that fits in with your code because if you can't be bothered to post or attach it here I can't be bothered to download it from some other site.

I can't post my code. It exceeds the 9000 character post limit.

EDIT:

Nevermind, I found the massive "attachments" section....My bad.