I am not going into detail about programming an Arduino (C++). There's tons of online material available and it's really easy (and fun) to get into this stuff. I will show the relevant sections of the code an show you what you can do with them. I am not referring to line numbers in the code (as these might change, once you start changing stuff), so you will have to search for the lines. Here we go:
String BankName[20] = {"Ekano", "Pre & Snap", "Stompbox", "HX Stomp FS Modes", "Looper", "Bank 6", "Bank 7", "Bank 8", "Bank 9", "Bank 10", "Bank 11", "Bank 12", "Bank 13", "Bank 14", "Bank 15", "Bank 16", "Bank 17", "Bank 18", "Bank 19", "Bank 20"};
--> You have twenty banks, this is the line, where you change the bank names.
int FavoriteSetup = 114;
--> My favorite Preset on the HX Stomp. If I press, hold and release button "E", this preset will be called on the HX Stomp. Change to your preferred Preset.
int FavoriteSnapshot = 1;
--> Of course, you can select your favorite Snapshot for that preset as well (1 to 3).
String FavoriteFSMode = "Stomp";
--> And of course, you can set your HX Stomp buttons in the right mode (Preset, Scroll, Snapshot or Stomp)
if (bank == 1 && BankHasChanged == true) {
FillBankDisplay("Pre-", "Pre+", "solo", "Snap 1", "Snap 2", "Snap 3");
StompFSMode(); //Set HX Stomp Footswitches to Stomp Mode
SetSnapshot(1); //Set Snapshot 1
BankHasChanged = false;}
--> There is 20 of these sections, each for one bank. When switching to a bank on the ekano, the display changes the labels of the buttons A-F. In this case button A is "Pre-", Button B is "Pre+" .... Button E is "Snap 2"...
--> Furthermore, when entering a bank the HX Stomp is set to a selectable Footswitch Mode. Options are:
PresetFSMode();
ScrollFSMode();
SnapshotFSMode();
StompFSMode();
--> If you are not using an HX Stomp or want to send whatever MIDI-Command when changing to a bank, you can replace the "StompFSMode();" from the example above with a MIDI command (see below).
Important: The following examples explains how MIDI is sent from the 5-Pin DIN-Port on the Ekano. Sending MIDI via the USB-C-Port is done differently, as explained further below.
You need to understand, how a MIDI command is put together - in the Ekano Code it's a sequence of three values (three bytes, to be precise). So, a MIDI command in the Ekano code could look like this:
Serial1.write(176);
Serial1.write(71);
Serial1.write(1);
The table below will help us understand, what this means (ignore the fourth byte "value high", the Ekano does not make use of that):
The first byte (176) means, that we will send a control change (CC) on Midi Channel 1 (177 would be Channel 2 and so on).
The second byte (71) means, that we will use CC number (CC#) 71.
The third byte (1) means, that we will send the CC value "1".
The Midi Command we just constructed will tell the HX Stomp to change it's footswitches into scroll mode. Here is a cool list of all the things you can do via MIDI on the HX Stomp. The command I just explained can be found here.
An excellent ressource for the MIDI commands of currently hundred of of brands and even more devices is the community Project "OpenMIDI". See the following picture, where I searched for the "Scroll Mode" Command (CC#71, CC Value 1) on my HX Stomp.
Another Example:
Serial1.write(192);
Serial1.write(1);
Serial1.write(65);
This will send a PC message on Midi Channel 1 (192) with the Value 65 - This MIDI message will call Preset #65 on the HX Stomp (or any other device, that listens on that channel (I cannot remember, if the value of the second byte (1) is relevant. Just leave it on 1, if you want to send PC messages).
This being explained, you should now be able to put your very specific MIDI commands in the code - eitern on bank changes (explained above) or when a button is pressed (or long pressed). You just need to find the right line in the code (explained below).
The Ekano can send MIDI via the USB-C-Port as well. Connected to your Computer, it will be powered via USB and will be recognized as a MIDI device (presumably it will appear as a "Leonardo").
The Code uses the MIDI Library MIDIUSB to send MIDI via the USB-Port. This being said, we don't have to use a sequence of "Serial1.write()" to send MIDI-Commands. MIDIUSB comes with some commands to make it even easier:
For CC (Control Change) Messages: controlChange(byte channel, byte control, byte value)
For PC (Proram Change) Messages: programChange(byte channel, byte program)
For Notes:
noteOn(byte channel, byte note, byte velocity)
noteOff(byte channel, byte note, byte velocity)
For controlling a DAW, the CC Messages are most likely sufficient (this being said, you could even turn the Ekano into a six-note MIDI pedal, e.g. for bass notes or sound effects using the note command).
Example: Let's have a look at button A, Event "Click", Bank 6:
if (bank == 6) {
controlChange(176, 51, 1); // CC Message on Midi Channel 1, CC#51, Value 1 (not relevant)
MidiUSB.flush(); // Send Midi Signal straight away
}
This sends a CC Message on Midi Channel 1 (176, see table above), CC#51, CC value 1 via USB-C. The "MidiUSB.flush();" makes sure, that the MIDI event is sent straight away.
The default program's Bank 6 is called "DAW Control" and sends the following CC Messages on MIDI Channel 1:
Button A: CC#51
Button B: CC#52
Button C: CC#53
Button D: CC#54
Button E: CC#55
Button F: CC#56
You can use this Bank straight away for your DAW-Control (e.g. transport functions like play, record, stop etc.). I tested it with Reaper, but it will work with all the others as well ;-).
Search the code for the line
//****** AAAA ************ AAAA ************ AAAA ************ AAAA ************...
Below this line, you will find all the functions for Button A (for all 20 Banks). The hierarchy is the following:
Button (in this case A)
Event (SwitchAclick() or SwitchAlongPress() or SwitchAlongPressStop())
Bank (1-20)
So under SwitchAclick() you will find
if (bank == 2) {
SetPreset(1);}
--> This means, that if button A is shortly pressed (SwitchAclick()) and we are in Bank 2 on the Ekano, it will recall the Preset #1 on the adressed target device (e.g. the HX Stomp).
Of course, you coud replace SetPreset(1); with a MIDI command (or a sequence of multiple midi commands) of your choice (see above).
Do not change the following sections:
Switch D longpress will scroll down through the Ekano banks.
SwitchDlongPress()
SwitchDlongPressStop()
Switch F longpress will scroll up through the Ekano banks.
SwitchFlongPress()
SwitchFlongPressStop()
Switch E longpress will always bring you back to your favorite preset/snapshot/stomp mode on the HX Stomp.
SwitchELongPress()
SwitchElongPressStop()
You will see, that there is no placeholder for all banks and button functions in the code. So, under section //****** EEEE you will find entries for the first 5 banks for a short press. If you fill up more banks, just copy, paste and modify the code parts, e.g.
if (bank == 17) {
//Overdub Looper
Serial1.write(176);
Serial1.write(60);
Serial1.write(63);
}
Will set the looper to overdub mode on the Ekano Bank 17...
Play around with it, it's really not that complicated, once you understand the logic behind it.
Let's have a look at the commands for the six buttons (A-F) on bank 3:.
Toggle(0, 4, 0, 127, "A", "dist", "DIST");
Toggle(1, 5, 0, 127, "B", "delay", "DELAY");
Toggle(2, 6, 0, 127, "C", "reverb", "REVERB");
Toggle(3, 7, 0, 127, "D", "filter", "FILTER");
Toggle(4, 8, 0, 127, "E", "modul", "MODUL");
Toggle(5, 9, 0, 127, "F", "eq", "EQ");
The command "Toggle" changes between two values for a specific Ekano-internal variable. The variable is the first value in the bracket, there is a total of 9 variables to choose from - enough for 6 switches ;-). Just make sure, you are using a variable, you are not using for something else in the Ekano bank. So, in this example, variable "0" is associated with the distortion, variable "1" with delay and so on.
The second number is the CC number, we will send the toggle command out - make your device parameter / effect block listen to that! In other words, make sure that your chorus ("modul") will react on CC# 8. The last two values are the values, the Ekano will toggle between - so it will toggle between "0" and 127 - Perfect for switching effect blocks on an off.
Than there are these three words:
"C", "reverb", "REVERB"
That means, that in the display below button "C" the word "reverb" will toggle to "REVERB" when button C is pressed (and than again back to "reverb", when it is pressed again).
On bank 1, Button C, we are using the Toggle command
Toggle(0, 11, 0, 127, "C", "solo", "SOLO")
Other than in the example above, that will not switch effect blocks on or of, but raise the HX Stomp output block from 0dB (value 0) to +6dB (value 127). Of course, the HX Stomp needs to be configured to do this.
Go to the output block and choose "Controller Assign"
Make the level control listen to midi continuous controller 11 (CC11).
Set min value to 0 dB and max value to +6dB (you might want to adjust this to your liking) and activate "learn". Hit the solo button (button C) on the Ekano and you're done.
There is nothing, you need to change below this line:
//*********** General Functions *************************