Help with Arduino-based Programmable Bypass Switcher w/ FX Loops

Started by Andrew B. Campbell, April 19, 2017, 05:34:38 AM

Previous topic - Next topic

Andrew B. Campbell

I've been desperately looking for a proper way to understand the coding necessary to program an Arduino Mega for bypass switching capabilities, however I don't quite know where to begin in regards to information that specifically deals with this type of project in the manner that I need it to. The features I would like to implement are:

- 10 accessible loops: 9 standard/1 stereo loop (10 individual footswitches) with bi-color LED indicators for each.

- One input/Two outputs - Left and Right (single-stomp + hold a loop in Bypass Mode to change loop output)

- Two FX Loop Send/Return: "Send" will be accessed by the last pedal selected for this feature in the FX loop chain and the "Return" will have the first pedal accessing this feature selected within the FX Loop chain (double-stomp + hold a loop in Bypass Mode to place in FX Loop). There will be LED's in place to designate whether a loop is assigned to either the direct outputs or the FX Loop send. Single-stomp + hold while pedal is already selected for FX loop will transition between either first or second send/return.

- Two Modes (Preset/Bypass) controlled by their own footswitch to allow for a faster transition between the two. Whatever loops are selected in one mode will automatically persist over to the other until either the preset is changed in Preset Mode or a single loop is selected/deselected in Bypass Mode.
• Bypass Mode: This is the basic selection mode for turning on/off each loop independently. Also in this mode, you may assign the specific loop to be sent either to one of the two outputs
• Preset Mode: Hold footswitch for short duration. This will change the LED indicator color from green to red to indicate that the given loop has been selected to edit/save whatever combination of loops as a preset. Merely select each loop to save and then hold that footswitch again to save the new preset. If the loop that is controlling one of the saved presets happens to also be chosen during the edit phase, that LED will merely blink.

* Expression In & Tap-Tempo controls will be applied separately, so no need to consider those within the programming.

I don't need to include an LCD for loop and preset monitoring. The LED indications are definitely enough, so I was wondering if there might be anyone out there to help with this project. I've seen plenty of queries on the subject, but none that really entail an FX Loop and switching outputs in this manner that isn't a commercial model already. I'd love to have some guidance on the code I should be looking toward and how to generate these possibilities. I'm incredibly anxious to finish my set-up and have been for nearly 6 months. This is the only piece standing in the way to aid in avoiding my tap-dancing around the board to activate everything. I'd appreciate any input possible to make this finally happen!

Here's the general layout idea:



Thank you much.

- Andrew

It's rather late, so I should have moved this over to the DSP section of the forum.

potul

Some feedback from my end, as I have done similar (but smaller) projects in the past:

1-First of all, you need to decide how you plan to do the switching. Relay or CMOS?

2-Given the size of the project, I wonder if you will have enough I/O pins in a "regular" Arduino. What Arduino do you have in mind? Take into account that each button will use one pin, each loop will take also one pin (relay or CMOS), and each LED if two-colors, will need as well 2 pins. So, with your setup, you will need at least 10+10+20 pins,... plus whatever additional led or button you want to add. You can always do some charlieplexing to save pins, or use external expansion/shif registers though.

3-I don't see clear some of your desing requirements.
-First of all what are these FX Loops Send/Return? How are they different from a normal loop?
-Secondly, ... I don't see feasible that you can assign each loop to a different output. If they are connected in series, there is only one signal path and you can either have them in or out of the path. If you want to have 2 parallel signal paths, the project gets much more complicated, and probably should we implemented using a switch matrix.

Coding is not really an issue, but first you need to be clear on the routings needed. If they can be implemented by activating "manual" switches, you can do it as well with relays/CMOS.

Did you look at the Boss ES-8? It might be what you are looking for.

https://www.boss.info/us/promos/es-8_deep_dive/

ElectricDruid

Number of Input/Output pins would be an issue for me too.

My preferred way of dealing with that is to use 74HC165 and 74HC594 parallel-to-serial/serial-to-parallel chips. You can chain these together and then with 6 pins (3 for inputs, 3 for outputs) you can read as many inputs or outputs as you like.

It's fiddly the first time you do it, but once you've written the code, it's the obvious solution for the *next* project you do!! ;) Anyway, for Arduino, you'd be able to find code that does exactly this already written, I would expect.

Like that, you don't finish up buying some big over-powered Arduino board just because you need a few more pins. For anything "human interface" a simple Arduino will be enough. Humans are *ssooooo* slow compared to processor chips!

HTH,
Tom

Andrew B. Campbell

#3
I appreciate this immensely, guys. Thank you! I'm finishing up with graduation projects, so I should be at this once things settle a bit. Also, I'll clarify things very soon!