Jump to content
Why become a member? ×
  • advertisement_alt
  • advertisement_alt
  • advertisement_alt

Build your own MIDI controller. (I did!)


stoo

Recommended Posts

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

  • Like 13
  • Thanks 4
Link to comment
Share on other sites

A few people have asked for a bit more info in the other thread - I'm going to try and keep it all here so it's easier for me to find any bits I've already answered.

First up - before anyone else asks - I'd prefer to avoid getting into building them for other people if I can avoid it... I've deliberately built mine with the cheapest components I could find and while I'm not expecting any of it to fail, I wouldn't feel to great about sending one out to someone that wasn't able to replace a footswitch if one let go.....

The good news is though - if your soldering skills are up to resoldering wires to the tags on a footswitch.... that's about as hard as any of the soldering stuff needs to get... You can get a breakout board for the microcontroller with screw terminals on, and so the only soldering required is for the wires at the footswitch end, and the midi socket. Oh, and also one resistor inline on the power leg of the midi socket - but again that's no trickier than any of the rest of it....

Quote

So what's the functionality of the 8 switches then? Patches? Blocks? Everything?

It's fully programmable, so pretty much everything! I've not really settled on a config yet, but so far I've got it set up with 3 pages - 

Page 1 is

SW1 - snapshot 1

SW2 - snapshot 2

SW3 - snapshot 3

SW4 - tap tempo / long press for tuner

SW5 - Preset mode

SW6 - Stomp mode

SW7 - emulates FS4 (which I currently have set to Preset Down)

SW8 - emulates FS5 (set to Preset Up)

Page 2 has the same for SW1-4, and SW5-8 directly jump to my favourite 4 guitar presets

Page 3 has the same for SW1-4, and SW5-8 directly jump to my favourite 4 bass presets

SW1+SW2 at the same time cycles page down, SW2 + SW3 cycles page up, SW7+SW8 is a panic reset type thing which changes the controller back to Page 1 and sets the Stomp to Preset 1 and puts it back into stomp mode.

 

There's lots of options though - it can change anything which the HX allows control of over MIDI.... Preset and snapshot recall, block bypass, parameter control (possibly not that useful unless I add an expression pedal input). It can also expand the 1 switch looper so you get separate buttons for play / stop / overdub / record / play once / undo/redo / forward / reverse / full / half speed.... and anything else they add MIDI control for in future updates.

In fact I think I'm going to add an extra page of looper controls and have a play with that just now.... 

>>> I've now done this and i'm not totally happy with it - I'm not sure if it's just me not being coordinated enough to use a looper properly or whether there's some lag/inconsistency in there that you just don't notice when using it for patch / setting changes...

Quote

So what can you see on the screen?

In all honesty, not much.... I've attached a couple of pics of the sort of thing mine is showing at the moment, but the screen I used was a tiny 0.96 inch OLED... They're really cheap, and I had a spare one lying around. It was fine for testing functionality while I was building the prototype on my desk.......  But with the text size on there it's too small to be any real use while stood up. 

I'm going to play with using a bigger font to see if there's a better balance between quantity and readability of characters, but the obvious choice would be to just use a bigger screen. I reckon I'd be happy enough with just showing an indication of what page I'm on and then remembering what each button within each page does, but I'll see how I get on with it once I've had a chance to use it more.

The other type of screen I considered using was one like this - https://www.amazon.co.uk/SainSmart-Serial-Module-Shield-Arduino/dp/B007XRHBKA which is closer to what Morningstar use. They use a fixed character size, so you need to make sure you have enough columns and rows available to display all you need.... the only ones I have here are 16x2 and 20x4, and neither of those seemed ideal for an 8 footswitch configuration. The 20x4 would probably work well enough for a 6 switch setup though.

 

screen 2 med.jpg

screen 3 med.jpg

screen 1 med.jpg

Edited by stoo
Link to comment
Share on other sites

Quote

Does the stuff all have to be programmed whilst hooked up to a PC or Cam you just programme the modes on the fly in use?

At the moment all the button actions are hardcoded, so you'd need to use a PC to reprogram it.

It would be possible to make it programmable from the footswitches, but that's not something I had in mind when I coded it up originally so it wouldn't be a totally trivial addition. It would definitely be a nice addition, but realistically I don't see myself wanting to reprogram it that much once I've settled on something I like.

Bear in mind though, that with the HX stomp - and presumably other midi devices too - you could setup a page of switches to use some unused MIDI CC values, and then use the MIDI learn function on the stomp to program it to match the controller. I haven't looked into whether there are any limitations on what functionality you can control this way - the manual mentions it for Block Bypass and Parameter Control, but not for anything else that I can see at the moment.

Link to comment
Share on other sites

Quote

I know I'd be definitely interested if you would be so kind as to share the code + details of the micro board + screen that you've utilised. If you did want to do this, do you want people to contact you privately?

No, I'm more than happy to share this... might as well do a full build list

Microcontroller - Arduino nano clone - https://www.amazon.co.uk/gp/product/B00E87VWY4 (you don't need 5, but I'm copying and pasting the exact stuff I bought from my amazon order history to save time). Note that some of those don't come with the header pins pre-soldered in! If you want to minimise the amount of soldering you have to do, make sure to get one with pins, and then add a shield with screw terminals - maybe one like this - https://www.amazon.co.uk/gp/product/B01LOMZCSW

Screen - https://www.amazon.co.uk/gp/product/B076PL474K - Again these are available either with pins pre-soldered, in which case you might want to use some pre-terminated jumper wires to make life easier for you ( https://www.amazon.co.uk/gp/product/B01EV70C78 ) or just solder directly to or instead of the pins.

Footswitches - https://www.amazon.co.uk/gp/product/B073S49R71

MIDI socket - https://www.amazon.co.uk/gp/product/B00FX0DP22

Wire - https://www.amazon.co.uk/gp/product/B001IRVDV4

Vero stripboard - https://www.amazon.co.uk/gp/product/B07G2HFGS9 - This was probably a bit of overkill. I went this route because I wanted to test out how easy it is to solder up one of these... (I've got another more complicated project on the go which I've been struggling with using a through hole style stripboard which doesn't have the tracks - just holes and round solder pads) It works well enough, but the circuit for this thing is so simple it would make more sense just to use the screw terminal shield I mentioned earlier.

A 220 ohm resistor.  - https://www.amazon.co.uk/gp/product/B00X9HRKKY The ones in the link weren't the ones I used - mine came in an Arduino beginner kit.

<EDIT> I just realised I forgot to mention the connectors I used - https://www.amazon.co.uk/dp/product/B07MD7GD6T - If you use the screw terminal board then you definitely won't need them, and they're optional even if you use a stripboard.  One thing to note though - soldering the headers to the board is easy enough, but crimping the connectors to the wire has been a massive headache. For my early attempts I used a ratcheting crimper like this - https://www.amazon.co.uk/gp/product/B00HFQ7Z96 - and some random wire I had laying around which had quite thick insulation on it. I managed to get a decent crimp about one attempt in ten, and more often than not I ended up destroying the connector trying to pry it out of the crimper. Since switching to some manual crimpers - https://www.amazon.co.uk/gp/product/B002AVVO7U and the wire I linked above I get a much better success rate - probably 9 out of 10 work fine. 

I've attached the circuit diagram I used below. Bear in mind that if you do use a track style stripboard like I did, you'll need to cut the tracks which run underneath the Arduino so that the pins on each side aren't connected to each other

 

midiswitcher-stripboard.jpg

Edited by stoo
  • Like 2
  • Thanks 4
Link to comment
Share on other sites

I should give credit to this page which got me started - https://www.instructables.com/id/Send-and-Receive-MIDI-with-Arduino/?fbclid=IwAR12ACoLLPoNWdAcU10XtLe20754FsPWR3Ffv_nYVFiUoo-TNrgJib0AnT4 

 

If you want to understand more about how it all works, it's a good place to begin.

I also got a fair bit from various pages on the arduino forum ( http://forum.arduino.cc/index.php ) which I didn't think to save as I went..

  • Like 2
Link to comment
Share on other sites

Thanks very much for posting all of this. I've only had a quick look but the code (with comments! top stuff!) seems quite understandable to me and all the details provided makes it look like a relatively painless build; you've done all the research, hard work and development, plus have something that actually works. As someone who was (reluctantly) looking at buying the Morning Star controller, but also someone that has some DIY skills, this is a tremendous head-start. Kudos, and it's much appreciated.🤗

  • Like 1
Link to comment
Share on other sites

2 hours ago, OzMike said:

Thanks very much for posting all of this. I've only had a quick look but the code (with comments! top stuff!) seems quite understandable to me and all the details provided makes it look like a relatively painless build; you've done all the research, hard work and development, plus have something that actually works. As someone who was (reluctantly) looking at buying the Morning Star controller, but also someone that has some DIY skills, this is a tremendous head-start. Kudos, and it's much appreciated.🤗

No worries - it's nice to be able to contribute something that's hopefully of use to others for a change!

  • Like 1
Link to comment
Share on other sites

Just spotted another thread on here about another Arduino based MIDI foot controller by irvined. There's some interesting stuff in his code I want to take a closer look at when I'm not so tired, so I'm gonna stick the link here so I can find it again easily..

 

Link to comment
Share on other sites

Hey @stoo !

Good to see that there's other folk out there playing with this sort of stuff. Majority of stuff nowadays is programming via Pis - and the pure electronics side of things is defo becoming a dying skill.

In terms of screens, you may want to be look into Nextion screens. These will give you a much larger/cost effective real estate than OLED to play with and give you the option of nicer graphics /  animations and just receives pushes data to/from the arduino over serial. (You will lose your debugging capability to your IDE unless you have 2 serial busses available). The other cool thing is that if you do decide to add any programming functionality to your project, then you have a nice touch screen interface to play with.

Link to comment
Share on other sites

1 hour ago, EBS_freak said:

Hey @stoo !

Good to see that there's other folk out there playing with this sort of stuff. Majority of stuff nowadays is programming via Pis - and the pure electronics side of things is defo becoming a dying skill.

In terms of screens, you may want to be look into Nextion screens. These will give you a much larger/cost effective real estate than OLED to play with and give you the option of nicer graphics /  animations and just receives pushes data to/from the arduino over serial. (You will lose your debugging capability to your IDE unless you have 2 serial busses available). The other cool thing is that if you do decide to add any programming functionality to your project, then you have a nice touch screen interface to play with.

Those screens look quite nice, but I'm already using the serial bus on the Nano to send the MIDI out.... Might be just the thing for a very different project I have in mind though...

Link to comment
Share on other sites

1 minute ago, stoo said:

Those screens look quite nice, but I'm already using the serial bus on the Nano to send the MIDI out.... Might be just the thing for a very different project I have in mind though...

That's usually the problem when using smaller format boards - but there are other boards out there which will give you the multiple outs you'll need. Given the size of the box you are using, you should have some options for changing boards. You could also give this a whirl - https://www.arduino.cc/en/Tutorial/TwoPortReceive

Link to comment
Share on other sites

I’ll be having a nosey at this when I’m at work tomorrow! Really enjoyed my brief play time investigating the possibility of adding presets to a Darkglass Vintage Microtubes clone using a Nano, a quad digital pot chip, a rotary encoder, a few push switches, a toilet roll tube and some sticky backed plastic...

Link to comment
Share on other sites

2 hours ago, stoo said:

I've got a couple of Arduino Megas here which I think have got a triple serial bus....  😀 

 

I'm not in any rush to redo the hardware just yet though. It does what I need it to well enough for now...

 

They’ll do it!

When I got a spare night or two, I’ll get a Nextion out and make up some code and build in some coding ability for a MIDI controller. Should’nt be too difficult - the only thing is, will need to expand to save the preset somewhere so it’s not lost on powerdown. Shouldn’t be an issue though.

One of the things I’ve been meaning to do for ages is create a looper. Never got round to it. Not enough hours in the day!

Link to comment
Share on other sites

I do want to make a multi footswitch, but long and thin to go along the front of a pedal board. I have an Arduino that has bluetooth on it, as I also want the option of using it as a page turner as well for the iPad, don't know if it is feasible to go back the other way as well.

Link to comment
Share on other sites

2 hours ago, EBS_freak said:

They’ll do it!

When I got a spare night or two, I’ll get a Nextion out and make up some code and build in some coding ability for a MIDI controller. Should’nt be too difficult - the only thing is, will need to expand to save the preset somewhere so it’s not lost on powerdown. Shouldn’t be an issue though.

One of the things I’ve been meaning to do for ages is create a looper. Never got round to it. Not enough hours in the day!

Saving the data looks to be easy enough

https://www.arduino.cc/en/Tutorial/EEPROMWrite

I've got 3 different multi-fx boxes here with loopers on and I struggle to get anything useful out of any of them. The Zoom one on the B3 isn't too bad - You can get the drum machine going so you don't have to worry about getting the loop length right, but it seems I just don't have the foot coordination for doing it manually..... or maybe I just need to practice more!

 

1 hour ago, Woodinblack said:

I do want to make a multi footswitch, but long and thin to go along the front of a pedal board. I have an Arduino that has bluetooth on it, as I also want the option of using it as a page turner as well for the iPad, don't know if it is feasible to go back the other way as well.

I don't know much about bluetooth on arduino, but it looks like many of them will use the serial bus for the bluetooth side of things which could add an extra layer of complexity if you're trying to send or receive midi with the same arduino unless it has multiple serial buses available. Could always use a separate Nano for reading the footswitches, sending midi, and triggering the bluetooth arduino that you've already got?

Link to comment
Share on other sites

I have a couple of PICs around, but I think it has a separate serial as well. If not I can just connect the i2c to something and use that. 

Just a question of what to connect. I could actually just dispense with the footswitches and have it as a box which connected to the McMillen 12 step, 

Link to comment
Share on other sites

1 minute ago, geoham said:

This is all very interesting. If something similar could work with a Zoom B3n, it may tame my Helix GAS for a bit!

It can be done, but the solution is a little more complex as the Zoom stuff only does MIDI over USB, and Zoom don't document the MIDI functionality. 

Hardware-wise you'll need to be able to communicate with the Zoom as a USB MIDI host - I bought an Arduino UNO with a USB host shield after seeing this video : https://www.youtube.com/watch?v=enK6Y30dAYs (there are links to github pages for the code in the video description) and was able to get it working fine on my B3 for basic patch selection as shown in the video.

The fiddly bit is working out the MIDI messages you need. There's a a good thread on thegearpage - https://www.thegearpage.net/board/index.php?threads/midi-control-of-zoom-g3-video.1033719/page-3#post-19617949 - with a lot of useful information in. 

I spent a bit of time trying to map out the commands I'd need for my G3n to be able to switch each effect on and off regardless of whether they were visible on screen. Never quite got there before getting sidetracked by something else. I was intending to get back to it at some point, but then accidentally bought an HX Stomp instead :D

 

 

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

On 05/03/2019 at 17:49, stoo said:

Those screens look quite nice, but I'm already using the serial bus on the Nano to send the MIDI out.... Might be just the thing for a very different project I have in mind though...

There's a software serial library you can use to give yourself another serial interface on pins of your choice. 

Link to comment
Share on other sites

1 hour ago, Gottastopbuyinggear said:

There's a software serial library you can use to give yourself another serial interface on pins of your choice. 

Indeed there is - I thought I posted a link to it earlier... although it seems to have mysteriously vanished. Maybe it didn’t post - I was on the train at the time.

edit - yeah, it did post! Thought I was going mad.

https://www.arduino.cc/en/Tutorial/TwoPortReceive

Edited by EBS_freak
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...