Jump to content
Why become a member? ×

Build your own MIDI controller. (I did!)


stoo

Recommended Posts

3 hours ago, DaveHx said:

@stoo hi there! first i want to say thank you for the arduino program, this project saved my wallet totally!!! 🤣

second thing, i have a question about, i wanted to put the fixed led only on the snapshots frame(we can say frame? lol) like i press snap 1 and boom fixed, cos i can see what snapshot i am using 😵. p.s. i have the first project with the oled. thanks maaaaaan 

 

Hiya - that shouldn't be too tricky to add.

 

The main problem with it is that there's no way for the arduino to read the current snapshot number from the stomp..... so if you change snapshot from the stomp, or change to a different preset (from either the stomp or the switcher) then the wrong LED could be lit. I guess you could have it so that if you changed preset from the switcher, it would turn off all the snapshot LEDs until you manually selected one..... but even then you'd have to either remember never to change preset or snapshot on the stomp itself.... or at least accept that if you do, the LED might not be accurate until you next change snapshot from the switcher....

Link to comment
Share on other sites

  • 3 weeks later...

This is my programmable midi pedalboard.

Sends program changes through the button combination 2+3 and 5+6.

Supports double-click and long press. Have just 6 buttons but supports 4 layouts (6x4=24 buttons) switching using the vertical combinations 1+4 and 3+6.

Keeping pressed the central combination 2+5 for two seconds shows the menu to store the button states, edit the button actions, set the channel and reset the pedalboard.

Is is not synchronized, stores the button state (on/off) for each patch and sends the whole state configuration at the patch change.

Here is the instructable: https://bit.ly/cm-s6

cm-s6.jpg

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

On 04/09/2021 at 20:45, stoo said:

 

Hiya - that shouldn't be too tricky to add.

 

The main problem with it is that there's no way for the arduino to read the current snapshot number from the stomp..... so if you change snapshot from the stomp, or change to a different preset (from either the stomp or the switcher) then the wrong LED could be lit. I guess you could have it so that if you changed preset from the switcher, it would turn off all the snapshot LEDs until you manually selected one..... but even then you'd have to either remember never to change preset or snapshot on the stomp itself.... or at least accept that if you do, the LED might not be accurate until you next change snapshot from the switcher....

But i change the preset and the snapshots only from My midi controller for this reason for me it’s better have the led on only for the snapshot Keep blinking or static on the snapshot i choose (even from the hxstomp i can’t se What snapshot i use lol ) by the way i don’t understand yet what string i need to change to do this little trick 🙄 i tried to put it on the void loop for Keep blinking but Nothing happen… i’m terrible for program 

Link to comment
Share on other sites

  • 3 weeks later...
9 minutes ago, SrPinya said:

Very nice!

I have loved the thread and I have decided to try to make my own controller but I see that I have failed with the screen and I have bought a 2.8" screen, is there a simple way to adapt it?

 

Depends on your definition of simple! :D More seriously - it's hard to say without knowing a bit more about which version you were trying to make (the original one or the touchscreen version) and exactly which screen you've got.

 

If you're going for the touchscreen one and have just bought a different size Nextion, then the only change would need to be the HMI file. I don't know if there are any utilities that will resize them for different screens, but if not you could probably just open mine in the Nextion editor, make notes of all the button IDs etc and create a new file to match but with the correct screen size. 

 

If you're looking at the non-touchscreen version, then it all depends on which library you need to use to drive your screen... If it uses the same one as mine did, just with different resolution then it would be easy enough. If you need a different library then there could be all sorts of different complications and changes to the code required..... Best avoided unless you've got a patient programmer friend willing to help you work through it!

 

 

 

 

Link to comment
Share on other sites

  • 2 months later...

With a couple of days off in the run up to Christmas I finally managed to get around to the 3D printed case I've been meaning to do for ages to house the latest version of my foot controller.  

 

IMG_0707.thumb.jpeg.65001ad4f3047c489184900937db5528.jpegIMG_0709.thumb.jpeg.00ef864dac837aed280ad12fdb1ad307.jpeg

 

The controller is based on a Teensy board to give both USB and standard MIDI, with a Raspberry Pi Zero to act as a USB MIDI host.  I also have a half built Teensy based MIDI controller for adjusting parameters, so I wanted a solution that can accommodate all three USB MIDI devices.  I've included hardware MIDI too so that I can still use the controller while the HX Stomp is connected to HX Edit via USB.  The Teensy is connected to the Pi outside the case so I can disconnect it to update the software and don't have to open up the case.

 

The mini OLED displays are connected to the Teensy via an I2C multiplexer.  I won't show a picture of the inside of the case - it's a mess!

 

I need to learn how to use a better 3D design solution - I used Tinkercad for this, but it's quite basic.  The case is slightly more robust than I was expecting for a 2mm thick 20% infill print - it'll do for me using it, but won't survive our singer jumping on it - fortunately it's usually our guitarist's pedals that get destroyed like that!

 

Software needs a huge amount of work - it's a monolithic mess at the moment.  At present three of the buttons are configured for a single press to toggle (Tuner, Compressor and Mid Boost), single press or single action on hold (Mode - switches between Stomp and Snapshot on single press, and boosts the output by 20dB for connecting directly to a power amp when held) and single press or multiple action on hold (Prog up and down by one on single press, or repeated up and down by three if held).  Next step is to make the button handling generic and call the relevant action based on what each switch is presently configured to do, so that I can implement different layouts across the switches.

 

Edited by Gottastopbuyinggear
  • Like 2
Link to comment
Share on other sites

  • 4 weeks later...

Hi everyone. I'm considering doing some variation of DIY MIDI controller based on all these brilliant efforts (pretty much copying everyone's homework).

 

Being the thrifty tinkerer I am can't help to ask: butchering an amp foot switch (one with 4 switches for example) would be a reasonable shortcut, right? I'd have the casing and the switches already. Would "only" need to mount the arduino board and wire the components.

 

There's also an upcycling element to this.

 

Thoughts?

Link to comment
Share on other sites

1 hour ago, hrnn1234 said:

Hi everyone. I'm considering doing some variation of DIY MIDI controller based on all these brilliant efforts (pretty much copying everyone's homework).

 

Being the thrifty tinkerer I am can't help to ask: butchering an amp foot switch (one with 4 switches for example) would be a reasonable shortcut, right? I'd have the casing and the switches already. Would "only" need to mount the arduino board and wire the components.

 

There's also an upcycling element to this.

 

Thoughts?

Allow for screen placement but yeah, a box is a box. Make sure sure you account for unlatched/latched switches.

Link to comment
Share on other sites

Exactly. I've seen a few DIY projects where they rely on LEDs blinking to know what's happening. You could even use different colours to indicate different things, and use the pedal's screen as guide.

 

Of course you are way more limited than with a proper screen, but might simplify some other aspects.

Link to comment
Share on other sites

On 31/05/2021 at 14:41, stoo said:

Well this is a bit embarrassing.... On Thursday I did have a quick look at this and thought I'd found the problem. I was going to suggest it to you to try, but then thought I may as well test the change on mine seeing as I'd already dug it out. I made the change, recompiled it, uploaded it and.... no difference.

Since then I've been dreading going back over 2 year old code to try and troubleshoot it. I finally decided to give it a look today. The code looked like it should work. Let's try and upload it again just in case..... BAM! Upload error due to not having the correct type of bootloader selected in the Arduino uploader. D'oh! Must have not noticed that pop up when I tried on Thursday. 

So anyway - the line you're looking for is......

static const byte pageCount =1; // how many pages we have configured

And it needs to be.

static const byte pageCount =2; // how many pages we have configured

Hope this works OK on yours too! :D

Thanks a lot for your help last time! Since then I´ve tweaked your code to suite my stuff. Everything's been working perfect. A while ago I bought a couple of Arduino Nano Every with no headers to save space and money. I thought it was the same thing as Nano. Seems it wasn't... Everything's working perfect with the screen but the problem is that nothings happening midi-wise. Is it possible to make the code work on the Nano Every? Included the code I´m using now.

hxsMidiSwitcher220113_v1.ino

Link to comment
Share on other sites

1 hour ago, marilo said:

Thanks a lot for your help last time! Since then I´ve tweaked your code to suite my stuff. Everything's been working perfect. A while ago I bought a couple of Arduino Nano Every with no headers to save space and money. I thought it was the same thing as Nano. Seems it wasn't... Everything's working perfect with the screen but the problem is that nothings happening midi-wise. Is it possible to make the code work on the Nano Every? Included the code I´m using now.

hxsMidiSwitcher220113_v1.ino 13.63 kB · 1 download

I'm not really sure how to help you - I don't have an "every" version to test, but the Arduino website suggests it should be compatible with code written for the regular Nano.....

Link to comment
Share on other sites

15 hours ago, stoo said:

I'm not really sure how to help you - I don't have an "every" version to test, but the Arduino website suggests it should be compatible with code written for the regular Nano.....

Read this somewhere: "Also note that the Rx and Tx pins on the Nano Every board are Serial1, not Serial."  I´m not sure what this means, but I guess I have to dig deeper! Thanks anyway!

Link to comment
Share on other sites

On 17/01/2022 at 04:43, marilo said:

Read this somewhere: "Also note that the Rx and Tx pins on the Nano Every board are Serial1, not Serial."  I´m not sure what this means, but I guess I have to dig deeper! Thanks anyway!

 

Aaaah OK - I think that the

MIDI_CREATE_DEFAULT_INSTANCE();

line is a macro equivalent to

MIDI_CREATE_INSTANCE(HardwareSerial, Serial, MIDI);

- where "HardwareSerial" is the type of connection, "Serial" is the port name, and "MIDI" is the name of the instance you create to then refer to with your code later.

 

So I think you would need to replace 

MIDI_CREATE_DEFAULT_INSTANCE();

with

MIDI_CREATE_INSTANCE(HardwareSerial, Serial1, MIDI);

to do the same thing, but point to "Serial1" rather than "Serial"

 

Can't be sure, but that's what I'd try next, anyway...

 

 

Link to comment
Share on other sites

19 hours ago, stoo said:

 

Aaaah OK - I think that the

MIDI_CREATE_DEFAULT_INSTANCE();

line is a macro equivalent to

MIDI_CREATE_INSTANCE(HardwareSerial, Serial, MIDI);

- where "HardwareSerial" is the type of connection, "Serial" is the port name, and "MIDI" is the name of the instance you create to then refer to with your code later.

 

So I think you would need to replace 

MIDI_CREATE_DEFAULT_INSTANCE();

with

MIDI_CREATE_INSTANCE(HardwareSerial, Serial1, MIDI);

to do the same thing, but point to "Serial1" rather than "Serial"

 

Can't be sure, but that's what I'd try next, anyway...

 

 

Yes!! It works! I owe you! :D 

 

  • Like 1
Link to comment
Share on other sites

  • 2 months later...
On 03/03/2019 at 01:46, stoo said:

I posted about this in the HX stomp thread, but in case it's of wider interest I thought I'd best make a separate one.

I wanted to add some more control options to my Stomp and was looking at controllers like the Morningstar MC6, but couldn't justify the £200 outlay.. so looked into making one myself - and it's turned out to be far easier and cheaper than I expected.

Total cost for all the electronics and switches is about £25 -30 depending on how confident you are at slightly fiddly soldering... the extra few quid gets you a pre-soldered microcontroller and an adaptor board with screw terminals, so the only soldering you'd need to do is for the wires to the tags on the footswitches and on the MIDI socket.

And then you'll need something to house it in. I made a 3d printed enclosure for mine, but any box you can buy/build/modify will do.

If anyone's interested in making something similar for themselves, I'd be happy to share wiring diagrams and the code I used. I'm no electronic engineer or programmer, so no doubt there's plenty of room for improvement, but I've got it to work well enough to do what I need it to, and maybe it'll work for you too? I'm happy to help with tweaking it for slightly different configurations if you'd want a different layout.

What it does:

You press a footswitch, and it sends a MIDI message. The way I have mine setup is that it either sends a MIDI PC (Program Change) message to change preset patch on my HX stomp, or a MIDI CC (Control Change) message to change any of a number of other settings or parameters. It could potentially send MIDI notes as well if you wanted to use it as a pedal keyboard to play a synth with, I suppose.

If you hold a footswitch down, it can send a different MIDI message (I only use this for activating the tuner by holding the tap tempo button so far, but it could be setup for any of the switches)

If you press more than one footswitch down at once, it can do something else again depending on which ones you press. Mine is set so that pressing 1+2 or 2+3 switches through different pages / banks of button configurations, and pressing 7 + 8 is a sort of panic mode which resets the HX stomp to preset 1, and resets the controller back to the first page.

What it can't do:

It's not programmable from the unit. To change the way the buttons are configured you need to tweak the code and then re-upload it. There's probably a more elegant way to deal with this, but it works well enough for me as is - I don't expect to need to reconfigure it very often once I've got it set up.

Right - I'm gonna stop there for now.... if no-one's interested then I'm just rambling into the void for nowt. If anyone is interested though, let us know and I can post more details. Or, if you know more than me and can spot where I've gone wrong or what I should have done better - lemme know and I'll try and improve it!

 

Cheers,

 

stoo

IMG_20190227_152329-med.jpg

IMG_20190301_202755-med.jpg

Hi can you give to me cord and diggram please [email protected]

 

Link to comment
Share on other sites

  • 1 month later...

Hello all, 

 

I was thinking about adding one buttons on the foot switch to control YouTube (play/pause using the keyboard shortcut k). 
For that I would need to emulate a Bluetooth keyboard in addition to the MIDI command send to the HX via cable. 
Has anyone attempted to do so? 
(I know I could achieve the same  with the Command Center on the HX but I would then lose one of the FS 1 to FS5. Also if it works I plan on also controlling GB ) 

can anyone recommend a way to code that with a nano 33 BLE ?

 

thank you 

 

P. 
 

Link to comment
Share on other sites

1 hour ago, Bklyn3 said:

Hello all, 

 

I was thinking about adding one buttons on the foot switch to control YouTube (play/pause using the keyboard shortcut k). 
For that I would need to emulate a Bluetooth keyboard in addition to the MIDI command send to the HX via cable. 
Has anyone attempted to do so? 
(I know I could achieve the same  with the Command Center on the HX but I would then lose one of the FS 1 to FS5. Also if it works I plan on also controlling GB ) 

can anyone recommend a way to code that with a nano 33 BLE ?

 

thank you 

 

P. 
 

I haven't used a nano 33 ble but there seems to be quite a few examples of people using them as Bluetooth keyboards - shouldn't be too tricky to find a page to borrow some code from.

Not sure how the midi output would work on a 3.3v board though.... Not sure if it needs to be 5v, or if it will just work as is. 

Link to comment
Share on other sites

20 hours ago, Bklyn3 said:

Hello all, 

 

I was thinking about adding one buttons on the foot switch to control YouTube (play/pause using the keyboard shortcut k). 
For that I would need to emulate a Bluetooth keyboard in addition to the MIDI command send to the HX via cable. 
Has anyone attempted to do so? 
(I know I could achieve the same  with the Command Center on the HX but I would then lose one of the FS 1 to FS5. Also if it works I plan on also controlling GB ) 

can anyone recommend a way to code that with a nano 33 BLE ?

 

thank you 

 

P. 
 

 

I built a Bluetooth page turner with an ESP32. 

 

 

This is the source:

 

ESP32_page_turner.ino

 

Link to comment
Share on other sites

Hey Stoo!

 

I was building the first midi switcher, since the touch screen is over my head... and I don't have the function to long press the tap tempo to access the tuner?

I dont have the display so im not sure if I am missing it there, but do you have the code that allows the long press to work?

I think you can access it by pushing multiple buttons but I would prefer to have it as the long press on the tuner?

 

Do you have the code for that and where to drop in?

 

Thank you!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...