Jump to content
Why become a member? ×

Build your own MIDI controller. (I did!)


stoo

Recommended Posts

I just want to say thank you very much to @stoo, I have just build my own midi controller for my HX Stomp based on your code and wanted to show the result. I used different board, layout and libraries but it all started with your post.

20190405_103220.gif.4aa68f8083ff41e96c6055d2ef65513f.gif

I have attached my code but I would try to keep it update on github: https://github.com/yeraym/vulcano_controller

 

vulcano_controller.ino

  • Like 5
Link to comment
Share on other sites

On 05/04/2019 at 14:55, Yeray said:

I just want to say thank you very much to @stoo, I have just build my own midi controller for my HX Stomp based on your code and wanted to show the result. I used different board, layout and libraries but it all started with your post.

20190405_103220.gif.4aa68f8083ff41e96c6055d2ef65513f.gif

I have attached my code but I would try to keep it update on github: https://github.com/yeraym/vulcano_controller

 

vulcano_controller.ino

Sweet! 

It's really great to hear that this has been of use to someone.

 

How are you finding the looper controls? I've never had much luck with mine and I'm not sure whether it's down to my lack of foot coordination, or the cheap footswitches I used, or lag in the code. I keep meaning to adapt the code to use pin change interrupts for button press detection, but I've got another project I want to get out of the way first before coming back to this one....

Link to comment
Share on other sites

35 minutes ago, stoo said:

Sweet! 

It's really great to hear that this has been of use to someone.

 

How are you finding the looper controls? I've never had much luck with mine and I'm not sure whether it's down to my lack of foot coordination, or the cheap footswitches I used, or lag in the code. I keep meaning to adapt the code to use pin change interrupts for button press detection, but I've got another project I want to get out of the way first before coming back to this one....

The looper controls work fine, I'm using de Bouncer2 library to detect button press with very short interval and BOUNCE_WITH_PROMPT_DETECTION  option to detect it immediately, it would be faster using the press event  but I'm using the release event to avoid firing a message when long press or double press is used although I may change it to press just to test. One recommendation is to not use the sleep function, this is important to make it more responsive.

Link to comment
Share on other sites

8 hours ago, Yeray said:

The looper controls work fine, I'm using de Bouncer2 library to detect button press with very short interval and BOUNCE_WITH_PROMPT_DETECTION  option to detect it immediately, it would be faster using the press event  but I'm using the release event to avoid firing a message when long press or double press is used although I may change it to press just to test. One recommendation is to not use the sleep function, this is important to make it more responsive.

Thanks - that's good to know. I've had a quick look at the Bounce2 library and I *think* the way I've done it should be pretty similar speed-wise... I know there's a couple of delay() calls in the setup phase, but once it hits the main loop everything should be done referencing millis() instead of using delay()

It's probably just my clumsy feet then.... :D

Link to comment
Share on other sites

  • 4 months later...
6 hours ago, TheRockinRoadie said:

Really interested in making one of these...

Sorry to ask ask a dumb question, but am I right in thinking it’s powered via the USB? In which case, what’s the best way of powering the unit at a gig, via a USB phone charger?

 

Cheers, Lorry :)

The way I did it is USB power only, but you could always add a battery holder to the enclosure and hook that up to the VIN & GND pins on the Arduino.

I use a mains USB phone charger with mine

Link to comment
Share on other sites

4 hours ago, stoo said:

The way I did it is USB power only, but you could always add a battery holder to the enclosure and hook that up to the VIN & GND pins on the Arduino.

I use a mains USB phone charger with mine

Awesome thanks Stoo!

I’m just about to download the software to have a look at your magic programming (no idea what I’m doing there). Id like to allocate two of the switches to be preset up/down, so I can leave Helix footswitch 4/5 as expression pedals.

Have all the parts in my amazon basket so getting excited!

Link to comment
Share on other sites

I've spent all day trying to get my Laptop to speak to my nano board with absolutely no luck at all :(

I've googled everything to the nth degree, and have watched countless Youtube videos, but i just continually get the 'not in sync/programmer not responding' error.

'L' LED blinks three times when i push reset, so i don't think the chip/bootloader is dead.  Driver seems okay, just cannot get the program to sync up with the board.

Any ideas anyone?

Link to comment
Share on other sites

13 hours ago, TheRockinRoadie said:

I've spent all day trying to get my Laptop to speak to my nano board with absolutely no luck at all :(

I've googled everything to the nth degree, and have watched countless Youtube videos, but i just continually get the 'not in sync/programmer not responding' error.

'L' LED blinks three times when i push reset, so i don't think the chip/bootloader is dead.  Driver seems okay, just cannot get the program to sync up with the board.

Any ideas anyone?

Are you on Mac or Windows?

And is it a genuine Arduino or knock off?

Have you set the baud rate appropriately?

Link to comment
Share on other sites

11 hours ago, EBS_freak said:

Are you on Mac or Windows?

And is it a genuine Arduino or knock off?

Have you set the baud rate appropriately?

Hey,

its Windows 7 64-bit.

Its a copy chip from the link that Stoo provided on the first page of the thread (but I just got one).

I honestly have no idea what Baud rate is, haha!

Complete newb to programming (but not electronics)!

Cheers, L

Link to comment
Share on other sites

The knock off boards use a different serial chip - if you haven’t already done so you’ll need to download a CH340G driver. 

I don’t think the baud rate should matter too much - I’d try either 9,600 or 38,400.  It’s one of the preferences you can set in the arduino development environment software - I can’t recall exactly where at the moment but a quick google search would probably yield the info.

Link to comment
Share on other sites

On 28/08/2019 at 06:54, Gottastopbuyinggear said:

The knock off boards use a different serial chip - if you haven’t already done so you’ll need to download a CH340G driver. 

I don’t think the baud rate should matter too much - I’d try either 9,600 or 38,400.  It’s one of the preferences you can set in the arduino development environment software - I can’t recall exactly where at the moment but a quick google search would probably yield the info.

I don't think I had to download an alternate driver to get mine working.... Not 100% certain as it was a while ago, but I've set it up on two different PCs and I *think* it'd have rung a bell if I'd have had to do that...

Are you able to select the board, processor and port OK in the Arduino IDE? (under the Tools menu)

Link to comment
Share on other sites

  • 2 weeks later...

Thanks everyone for your replies :)

I've had a busy few weeks but will now re-visit the MIDI controller.

I have since rebuilt my Windows 8 PC with Windows 10, so will try downloading the (seemingly endless) CH340G drivers and try again.  I've also obtained another lead to check in case the lead is duff.

I've just set the enclosure up in the milling machine to drill the holes, and i'll start wiring the switches this afternoon.

Turns out my neighbour has a genuine Arduino Nano, so he's offer to loan me his if all else fails, and i'll then order a genuine one for myself.

I'll keep you all posted :)

 

 

Link to comment
Share on other sites

6 hours ago, GarethFlatlands said:

I'll have to have a proper read when I'm feeling a bit more clever, I've been wondering how easy it would be to make a footswitch operated MIDI keyboard to scratch that Rush itch and trigger synth sounds while playing bass but didn't know where to start!

Shouldn't be too tricky to adapt it to send MIDI notes instead of Program Change / Control Change messages, but there's bound to be loads of guides showing you how to build a DIY Arduino MIDI keyboard with code that you could steal more easily.....

Link to comment
Share on other sites

  • 2 months later...

Looks like a v2 update is in the works... It's still a fair way off being done but the basic functionality is getting there.

The main differences from the last one are most obviously the Nextion touchscreen (as recommended by @EBS_freak ) and expression pedal input.

Currently all you can do on the touchscreen is scroll between a few different pages of predefined footswitch configs, but I'm planning to make it programmable from the touchscreen and able to save changes to onboard EEPROM too.

The "expression pedal" is an old crybaby wah with an adaptor harness connected between the existing circuit board and the pot & toeswitch connector, so I can just use a TRS plug into the existing Input jack. It's not ideal - the wah doesn't use a linear pot like an expression pedal would - but with a bit of software compensation it's plenty good enough for testing. I could stick a linear pot and a momentary switch in it - (or pay Mission Engineering £150 for one already done :o ) but I'd rather keep an eye out for a cheap broken wah or empty chassis than sacrifice a working one for the cause. This'll do for now though.

I was thinking I'd need an output from this into the expression jack input on the HX stomp, but it seems that EXP over MIDI works well enough that I can't see the point. As an added bonus, I've got it set so that the pedal transmits on both EXP1 and EXP2... so if I were to add a volume and a wah block to the Stomp, their default configs mean the toe switch flips between wah and volume without having to set any controller assigns on the Stomp.

The other main difference between this and V1 is also down to the expression pedal.... The default controller for block bypass on wah/volume blocks on the Stomp is FS5... and I was previously using FS4 & FS5 for Preset Up & Down as there is no MIDI CC to do this. You could use a PC if you knew which preset you were in beforehand - but I don't have a way do get that info from the Stomp to the Arduino. So now I've had to add the ability to do command chains - if I send Footswitch mode ->Scroll / FS1 or FS2 / Footswitch mode -> Stomp then I can get Preset up/down functionality without needing to dedicate FS4/5 to it. More control options! Yay! :D

I've also ended up using a bigger Arduino board for this one.... I think it might be possible to squeeze it onto the Nano, but I'd have to rework the code to use SoftwareSerial for either the MIDI out or the touchscreen, as well as lots of memory optimisation - I'm already using nearly 3kb and the nano only has 2kb available. I suspect this would be easy enough if I move all the fixed text strings into progmem, but I'm not going to worry about it for now. I've got a spare Mega available, there's going to plenty of space for it in the controller housing, and it makes the development process a bit easier.

 

 

HXStompSwitcher.jpg

  • Like 2
Link to comment
Share on other sites

  • 2 weeks later...
On 24/11/2019 at 15:31, stoo said:

Looks like a v2 update is in the works... It's still a fair way off being done but the basic functionality is getting there.

The main differences from the last one are most obviously the Nextion touchscreen (as recommended by @EBS_freak ) and expression pedal input.

Currently all you can do on the touchscreen is scroll between a few different pages of predefined footswitch configs, but I'm planning to make it programmable from the touchscreen and able to save changes to onboard EEPROM too.

The "expression pedal" is an old crybaby wah with an adaptor harness connected between the existing circuit board and the pot & toeswitch connector, so I can just use a TRS plug into the existing Input jack. It's not ideal - the wah doesn't use a linear pot like an expression pedal would - but with a bit of software compensation it's plenty good enough for testing. I could stick a linear pot and a momentary switch in it - (or pay Mission Engineering £150 for one already done :o ) but I'd rather keep an eye out for a cheap broken wah or empty chassis than sacrifice a working one for the cause. This'll do for now though.

I was thinking I'd need an output from this into the expression jack input on the HX stomp, but it seems that EXP over MIDI works well enough that I can't see the point. As an added bonus, I've got it set so that the pedal transmits on both EXP1 and EXP2... so if I were to add a volume and a wah block to the Stomp, their default configs mean the toe switch flips between wah and volume without having to set any controller assigns on the Stomp.

The other main difference between this and V1 is also down to the expression pedal.... The default controller for block bypass on wah/volume blocks on the Stomp is FS5... and I was previously using FS4 & FS5 for Preset Up & Down as there is no MIDI CC to do this. You could use a PC if you knew which preset you were in beforehand - but I don't have a way do get that info from the Stomp to the Arduino. So now I've had to add the ability to do command chains - if I send Footswitch mode ->Scroll / FS1 or FS2 / Footswitch mode -> Stomp then I can get Preset up/down functionality without needing to dedicate FS4/5 to it. More control options! Yay! :D

I've also ended up using a bigger Arduino board for this one.... I think it might be possible to squeeze it onto the Nano, but I'd have to rework the code to use SoftwareSerial for either the MIDI out or the touchscreen, as well as lots of memory optimisation - I'm already using nearly 3kb and the nano only has 2kb available. I suspect this would be easy enough if I move all the fixed text strings into progmem, but I'm not going to worry about it for now. I've got a spare Mega available, there's going to plenty of space for it in the controller housing, and it makes the development process a bit easier.

 

 

HXStompSwitcher.jpg

Hey @stoo, and everyone else, this is all really interesting stuff. I've been thinking about building a very simple program change up and down box and Arduino seems to be the way to go. The only problem is that I have very little experience with the relevant skills I'll need. I'm confident that I'll be able to get my head around the programming, but I'm absolutely horrible at soldering.

So, do you think it's possible to build a 2-footswitch controller, to send program change messages (hold current program number in a variable and use one switch to decrease that variable by one and send it as a program change value, and the other switch to increase it), without doing any soldering? And is it possible to power an Arduino circuit from a standard pedalboard power supply rather than USB?

My other option of course is to buy something like the Tech 21 Midi Mouse, but I really don't need a display on it as I'll be using it to control a Future Impact which has its own display on it, and it seems silly spending a lot of money on something that I think might be possible to build myself.

Any thoughts gratefully received!

Link to comment
Share on other sites

23 minutes ago, reesource said:

Hey @stoo, and everyone else, this is all really interesting stuff. I've been thinking about building a very simple program change up and down box and Arduino seems to be the way to go. The only problem is that I have very little experience with the relevant skills I'll need. I'm confident that I'll be able to get my head around the programming, but I'm absolutely horrible at soldering.

So, do you think it's possible to build a 2-footswitch controller, to send program change messages (hold current program number in a variable and use one switch to decrease that variable by one and send it as a program change value, and the other switch to increase it), without doing any soldering? And is it possible to power an Arduino circuit from a standard pedalboard power supply rather than USB?

My other option of course is to buy something like the Tech 21 Midi Mouse, but I really don't need a display on it as I'll be using it to control a Future Impact which has its own display on it, and it seems silly spending a lot of money on something that I think might be possible to build myself.

Any thoughts gratefully received!

You could get away with very little soldering, but I don't think you could avoid it totally...

For what you're describing, you wouldn't need to make a circuit board - you could just get a screw terminal IO shield for the Arduino - something like this one - https://www.amazon.co.uk/gp/product/B01LOMZCSW

That said, the footswitches and MIDI socket are very unlikely to come with wires already attached, and you'll also need to find a way to get the resistor connected between your Arduino 5V output and the MIDI socket 5V input...

Soldering wires to the tags on the footswitches and MIDI socket is about as easy as it gets for soldering - poke the wire through the hole, bend the wire at the tag so it holds itself in place,  rest the solder on the bare wire and then melt it with the iron. 

The resistor is a little more tricky as you end up needing 4 hands to hold the wire, the resistor, the solder and the iron. You can get a gadget to make that easier  - the one I've got is this one -

https://www.amazon.co.uk/Silverline-633830-Helping-Magnifying-Workpiece/dp/B000O3RJFC/ref=sr_1_5?crid=AO13L9JCRYXD&keywords=helping+hand&qid=1575844763&sprefix=helping+ha%2Caps%2C152&sr=8-5 

It's not great, but not much point spending more if this is likely to be a one off project.

 

One possible alternative to the soldering iron might be solder seal heatshrink connectors... I've not used them personally, but saw them used in a youtube vid a while back. You'd still need a hot air gun or mini gas torch though.... (I presume you wouldn't be able to just use a fag lighter like you can with normal heatshrink?)

https://www.amazon.co.uk/Connectors-Waterproof-Connector-Electrical-Retardant/dp/B07QZZM4GQ/ref=sr_1_3_sspa?keywords=solder+heat+shrink&qid=1575844168&sr=8-3-spons&psc=1&spLa=ZW5jcnlwdGVkUXVhbGlmaWVyPUEzNVRRRlBSSU5JUjRDJmVuY3J5cHRlZElkPUEwMjMyNTc1RUM3SVNQMUxKTTJSJmVuY3J5cHRlZEFkSWQ9QTAyNjk5OTYxNUxITkwzM1M2Wk01JndpZGdldE5hbWU9c3BfYXRmJmFjdGlvbj1jbGlja1JlZGlyZWN0JmRvTm90TG9nQ2xpY2s9dHJ1ZQ==

I think they'd be fine for the resistor, but might not work for the footswitch / midi socket tags. You could trim one end of the heatshrink down a bit so the solder is near the end and then slide that over the tag (assuming it'd fit) but whether it would shrink enough to seal a flat tag well.... I just don't know.

 

You can definitely use a normal 9V pedal power supply instead of USB if you prefer.... Just add a suitable socket to the VIN and GND pins on the Arduino and it'll run off anything between 7 and 12V DC. I've been using these - https://www.amazon.co.uk/gp/product/B00O9YT6MG/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1 and they seem to work OK.... Again, needs soldering though.

 

One possible alternative I've just thought of would be to use a larger format arduino like a Uno which can accept shield adaptors... 

Something like this - https://www.amazon.co.uk/Ocamo-Musical-Breakout-Instrument-Interface/dp/B07Z7LJ3K4/ref=sr_1_7?keywords=arduino%2Bmidi%2Bshield&qid=1575846038&sr=8-7&th=1

would piggyback on top of the Arduino Uno and save you some work. As an added bonus, the Uno comes with a DC power socket already on the board so you'd pretty much just be soldering the footswitch wires... aaah no hang on... just seen in the description of that MIDI shield that it comes with the MIDI connectors unsoldered. Bummer!

 

Link to comment
Share on other sites

Aha! Nice one @stoo - The Nextion upgrade!

 

They certainly give projects the pro looking upgrade don’t they?


I haven’t done much tinkering of late. I’ve been tinkering with video controllers and that’s about it.
 

I want to revisit MIDI and DMX controllers. I’ve currently got a 32 switch DMX foot controller on the drawing board!

Link to comment
Share on other sites

9 hours ago, EBS_freak said:

Aha! Nice one @stoo - The Nextion upgrade!

 

They certainly give projects the pro looking upgrade don’t they?


I haven’t done much tinkering of late. I’ve been tinkering with video controllers and that’s about it.
 

I want to revisit MIDI and DMX controllers. I’ve currently got a 32 switch DMX foot controller on the drawing board!

Yeah - It's a big improvement over the 0.96"OLED, that's for sure... thanks again for the tipoff!

Although with the tiny OLED at least there was no danger I'd put my foot through it!

Slowly getting there......

IMG_20191209_182116.jpg

  • Like 1
Link to comment
Share on other sites

12 hours ago, EBS_freak said:

I want to revisit MIDI and DMX controllers. I’ve currently got a 32 switch DMX foot controller on the drawing board!

32?!   I have enough trouble with 8...

F9A89960-DAD7-44E3-BE0E-1189B4863D38.thumb.jpeg.91a105b624604f02c6a136a3934609f5.jpeg

Raspberry Pi running QLC+, Teensy board for the footswitches and code to send MIDI over USB to QLC.  Only running 4 RGB lights from it, with a few sets of fades and chases set up in QLC, either free running with tap tempo, or set to change when hitting the tap button.

What I really need now is a 3D printer to make some decent cases, but the learning curve has put me off so far.

 

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...