Jump to content
Why become a member? ×

Build your own MIDI controller. (I did!)


stoo

Recommended Posts

Stoo,

You read my mind, I was just doing some testing using a MIDI monitor. For some reason the signal is not sent properly to the Stomp. Nothing in the command center.
See the image below showing the results for the 3 first button on page 1. I looks like I get only 61 and even a Chan 8 request ???

I start wondering if maybe something wrong with the Adruino. Considering getting a Mega and try. Any recommendation on the model?

1168732551_ScreenShot2021-02-07at4_54_08PM.thumb.png.ed291d7e7a189ce7d7f1e532e05545bb.png

 

Link to comment
Share on other sites

Well that's proper weird, eh?

Does it behave the same if the Arduino is disconnected from the computer and powered separately? I never had any issues with mine, but with the Nano, it uses the same Serial pins for the MIDI communications as well as uploading sketches... could be some sort of conflict there maybe causing weirdness?

Other than that - obviously do a search for 8 in your code and double check there's not any weird typos in there which could cause it to be sending anything in channel 8.

The Mega I used was one of these - https://smile.amazon.co.uk/gp/product/B06XKMZ3T9/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1 - I've had a couple of them and both work fine. Not sure whether a sample size of 2 is really enough to justify much of a recommendation, but they've done me OK so far!

Link to comment
Share on other sites

6 minutes ago, Bklyn3 said:

Hello all, 

 

Does anyone know if there is a MIDI CC code to mimic pushing the  view button ?

 

 

 

 

I don't think so.... All the CC codes are documented in the back of the owner's manual - https://line6.com/data/6/0a020a4112bbf5fb6a519e8b18/application/pdf/HX Stomp 3.0 Owner's Manual - Rev C - English .pdf 

I suppose it's possible there might be some undocumented extras, but I've not seen any mention of any so far....

Link to comment
Share on other sites

9 minutes ago, stoo said:

I don't think so.... All the CC codes are documented in the back of the owner's manual - https://line6.com/data/6/0a020a4112bbf5fb6a519e8b18/application/pdf/HX Stomp 3.0 Owner's Manual - Rev C - English .pdf 

I suppose it's possible there might be some undocumented extras, but I've not seen any mention of any so far....

Have you tried sending it a Midi CC of 128? Maybe that would work.

Link to comment
Share on other sites

El 4/3/2019 a las 9:07, stoo dijo:

He adjuntado el código que estoy usando en este momento ... No pretendo ser un programador decente en cualquier forma, forma o forma, pero hasta ahora funcionar bien.

Si alguien más está en Arduino y puede sugerir mejoras, ¡soy todo oídos!

 

midiSwitcher4x2v0.2.ino

Hola Stoo, por favor podrías compartir nuevamente el código de Arduino que usaste para el controlador midi del Hx Stomp, ya que no aparece en el enlace que dejaste. gracias

Link to comment
Share on other sites

1 hour ago, JIMHU26 said:

Hola Stoo, por favor podrías compartir nuevamente el código de Arduino que usaste para el controlador midi del Hx Stomp, ya que no aparece en el enlace que dejaste. gracias

Hiya - the best place to get my code for the first version (Arduino nano + oled screen) is on github - https://github.com/stoonoon/hxsMidiSwitcher/blob/master/hxsMidiSwitcher.ino

If you're after the other version (Arduino Mega + Nextion touchscreen) then start here - https://github.com/stoonoon/hxsMidiSwitchTouch - the code is split into several files but I think everything you should need is in there.

Cheers,

Link to comment
Share on other sites

@stoo

Hey man,

Thanks for putting all this together. It's really cool and looking through the code file you shared it looks pretty straightforward to understand (though I doubt I could write this from scratch as programming is not my forté!)

Quick question for you, is it possible to build this without the display so it's just a 2/4/6/or 8 button midi footswitch sans screen?

Would I need to be removing any chunks of the original code to make it work this way?

 

Cheers again for the work you've put into this

Elbee

Link to comment
Share on other sites

Not 100% sure without trying it, but I think the code should work fine as is without the screen being present.

If not, it'd be a really quick job to remove all the screen related bits.

The other thing to consider is that at the moment, the code has multiple pages of button configurations setup..... Without the screen you'd have no visual cue to let you know which page is currently selected. Easy enough to reconfigure it to lock it to a single page setup, which would probably make sense.

Going to less than 8 buttons will work fine with no code changes.... it will treat missing buttons exactly the same as buttons which are connected but not pressed...

Link to comment
Share on other sites

This is a great project Stoo, thanks for sharing it all. I'm building something similar, but with one dedicated page up switch, and 4 command switches. 

For keeping tabs on which Page I'm on, I have a simple 7 segment single number display LED, and the other switches have their own green 5mm LED. 

Would editing your code allow something like this, or am I looking at a from scratch build?

My controller will look like this one: https://www.youtube.com/watch?v=z4jOhp0Z0G4 

The way he has it set is just for presets, so i was banging my head against the wall trying to figure how to get the other pages to do other commands as he has it all defined just to do the presets.

Thanks!

 

Link to comment
Share on other sites

11 hours ago, bastoe said:

This is a great project Stoo, thanks for sharing it all. I'm building something similar, but with one dedicated page up switch, and 4 command switches. 

For keeping tabs on which Page I'm on, I have a simple 7 segment single number display LED, and the other switches have their own green 5mm LED. 

Would editing your code allow something like this, or am I looking at a from scratch build?

My controller will look like this one: https://www.youtube.com/watch?v=z4jOhp0Z0G4 

The way he has it set is just for presets, so i was banging my head against the wall trying to figure how to get the other pages to do other commands as he has it all defined just to do the presets.

Thanks!

 

There's no reason why you couldn't replace the OLED code in mine with some other code to run a 7 segment LED instead.

I'm not sure what you're expecting from the LEDs for each switch though.... If you're just changing presets then you can just have the MIDI controller light the LED for whichever footswitch you last pressed, and then as long as you don't adjust the preset on the Stomp (or whichever device you're controlling) then it should all match up. 

If you're planning on controlling block bypass / toggling effect parameters or anything else, then there's no way to get the current state back from the Stomp to the MIDI controller. Even if you added a MIDI IN port, the Stomp just doesn't relay that information out.

If the Stomp had different MIDI commands for turning FSx on and off then maybe you could come up with a workaround, but all its MIDI commands for FSx are just toggles. Maybe you could do something like that in Command Center, but it'd be a lot of work to set up, and you'd have to do it separately for each and every preset....

Link to comment
Share on other sites

Thanks. Now to figure the code, just learning the arduino language. The device is an M5, only has the 2 buttons, so I wanted to setup a few pages of commands, to do presets, tbh, If i preset my presets, that would be most of what's needed. In a pinch, though, I'd like to be able to change effect mode and page up/down to select a not preset one if needed. baby steps I guess. 

  • Like 1
Link to comment
Share on other sites

Yep. - start as simple as you can, get something working and gradually add to it. 

And make regular backups so you can easily revert back to when it last worked!

If you do get stuck though, by all means give us a shout on here.... I'm no expert, but happy to try and help where I can

Link to comment
Share on other sites

  • 2 weeks later...

Hey there, i rebuild the switch, very cool, i make a mini-version. Can you give me a tip, how i can change the code to get 8 Programm Changes? Like Bank 1, Sound 4, in this way...

And i try to push two buttons, but the display and funktion dont change, if you hav a tip...

Thank you- best regards oliver

My Version: https://www.dropbox.com/s/8owr6oqfxwk46bj/Midi8.JPG?dl=0

Link to comment
Share on other sites

  • 3 weeks later...

I've finally got round to doing my own version. This uses 6 buttons and a 20 x 4 I2C display (much easier than messing around with 16 connectors). I've got the facility to change the selections on the screen but as yet I've just got one set of selections.

I used a 5V Arduino Nano. Power supply is via a 9V socket, and I used a bridge rectifier to avoid any embarrassment about having the wrong polarity. There's two 220R resistors, one to the MIDI +5V and one to the MIDI Tx pin. All built on a bit of Vero, secured to the lid by 4 M3 spacers held on by J-B Weld.

At first I had a problem with issuing multiple commands, but I realised that the Stomp would have to react to one before doing the next so I put a delay in. I found 100mS worked - I didn't bother experimenting further.

 

stomp_switcher.jpg

stomp_switcher_board.jpg

stomp_switcher_disp_buttons.jpg

stomp_switcher_display_1.jpg

stomp_switcher_display_2.jpg

This is the sketch:

Stomp_switch_I2C.ino

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

On 21/03/2021 at 17:54, Oliver70 said:

Hey there, i rebuild the switch, very cool, i make a mini-version. Can you give me a tip, how i can change the code to get 8 Programm Changes? Like Bank 1, Sound 4, in this way...

And i try to push two buttons, but the display and funktion dont change, if you hav a tip...

Thank you- best regards oliver

My Version: https://www.dropbox.com/s/8owr6oqfxwk46bj/Midi8.JPG?dl=0

Sorry - I've only just seen this - I'm guessing as your post is over 3 weeks old you've probably sorted it by now....... If not, give us a shout and see if I can help

Link to comment
Share on other sites

  • 3 weeks later...

Bonjour Stoo,

J'ai téléchargé ton dossier pour le footswitch touch.

J'ai un arduino mega2560, l'écran Nextion et des boutons aux pieds. J'ai téléversé les fichiers INO dans l'arduino (téléversement OK). J'ai préparé l'ecran avec le fichier HMI (avec Nextion setup OK) et suivit les branchements de ton schéma (sans les pédales d'expression car pas besoin...)

Mais j'ai un probleme car rien ne se passe.... Les footswichs ne transmettent pas de signale, l'écran reste sur Booting...

Je ne connais pas la programmation Arduino mais j'ai réussi à réaliser ton premier footswich (mais sans l'écran...)

Y a t-il d'autres manœuvres à faire ?

Pourrais tu en dire plus sur les procédures a suivre ? car là je me tire les cheveux....

Merci beaucoup

Guillaume

Link to comment
Share on other sites

31 minutes ago, guillaumegart said:

Hello Stoo, I downloaded your file for the touch footswitch. I have an arduino mega2560, the Nextion screen, and buttons on my feet. I uploaded the INO files to the arduino (upload OK). I prepared the screen with the HMI file (with Nextion setup OK) and followed the connections of your diagram (without the expression pedals because no need ...) But I have a problem because nothing happens .... The footswichs do not transmit signals, the screen remains on Booting ... I do not know Arduino programming but I managed to make your first footswich (but without the screen ...) Are there other maneuvers to do? Could you say more about the procedures to follow? because here I am pulling my hair .... thank you so much Guillaume

Okay - so you have power to the Arduino and Nextion screen working OK if you see the Booting message.

If the code compiled and uploaded to the Arduino OK, then I would first concentrate on the serial connection pins between Arduino and the Nextion - TX2(16) and RX2(17). A common mistake is to connect the Nextion TX wire to the Arduino TX2 pin, and the Nextion RX wire to the Arduino RX2 pin..... but Nextion TX goes to Arduino RX2 and Nextion RX goes to Arduino TX2.

Hope this helps!

Link to comment
Share on other sites

Merci Stoo pour ta réponse. 

J'ai inversé les TX et RX comme tu me dis. Malheureusement ça fait rien. 

J'ai encore branché les boutons et le prix MIDI de mon premier footswitch qui fonctionne très bien avec l'arduino Nano. 

Rien ne se passe sur le Helix stomp

Et a quoi servent les fichiers .Code-workspace, .Fzz, .graphml dans ton dossier ? 

IMG_20210429_113122.jpg

Edited by guillaumegart
Link to comment
Share on other sites

1 hour ago, guillaumegart said:

Thanks Stoo for your answer.
I reversed the TX and RX as you tell me. Unfortunately it doesn't matter.
I still plugged in the MIDI knobs and price of my first footswitch which works great with the arduino Nano.
Nothing happens on the Helix stomp
And what are the .Code-workspace, .Fzz, .graphml files in your folder for?

 

Ah - have you set up the Nextion library to use Serial2 ? 

I think when I did my initial Nextion testing I followed the guide at https://nextion.ca/portfolio-items/nextion-iteadlib-and-mega-step-by-step/ - pay particular attention to Step 3

I thought I'd mentioned that on my github page or in my code somewhere, but maybe not.

The other files aren't really needed, 

.code-workspace is to do with VS-Code - I was using that rather than the Arduino IDE while I was coding this up, and it creates a configuration file in the code directory.

.fzz are Fritzing files - circuit diagrams. The same information as in the .png files, but they're editable if you have Fritzing installed.

.graphml are files created in yEd - which is a bit like Visio. Just flowcharts I used to make notes while I was planning/testing.

 

Link to comment
Share on other sites

3 hours ago, guillaumegart said:

Thanks for the Stoo link.
The screen works!
But I still have a problem, the switches do not act on the helix stomp by midday but they act on the screen because they change the menu.
Grrrrrrrr ....... !!! 😥

OK - so we know the foot switches are probably wired up fine to the arduino if you are seeing the changes on the screen.

 - The wiring for the MIDI socket is easy to get wrong if you don't orient the diagram carefully - it might help to look at the pictures on Step 3 of this page - https://www.instructables.com/Send-and-Receive-MIDI-with-Arduino/ - to double check.

 - Make sure the MIDI wire is definitely going to TX1 / pin 18 on your Arduino Mega

 - Double check your MIDI cable is going to the "IN" socket on your HX Stomp. 

You're almost there now though! Good job!

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