stoo Posted May 9, 2022 Author Share Posted May 9, 2022 10 minutes ago, gobbersbubbus said: 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! Have replied on GitHub.... Hopefully that's enough to get you started... Otherwise I'll have a better look when I'm next at my computer Quote Link to comment Share on other sites More sharing options...
matybigfro Posted May 13, 2022 Share Posted May 13, 2022 Ooo this has really piqued my interest. I've just picked up a Source Audio C4, in my search for the cheapest Midi controller options picked up a 2nd hand Digitech Seven and was looking for the cheapest USB host to connect them up My search eventually took me to DIY projects at which point started thinking how useful it would be to have a USB host with display screen that could be programmed with preset and scene info. For the moment I've picked up all the components to build a USB host of the Adafruit Trinket M0 https://github.com/gdsports/midiuartusbh#readme as cheapest solution but long term I might have to consider something with a screen, my old housemate has a Raspberry Pi lying around doing nothing so might see if I can recycle it. My coding knowledge extends about as far as basic network troubleshooting and installing reaper on Linux on a Chromebook so might be a bit of task. 1 Quote Link to comment Share on other sites More sharing options...
tauzero Posted June 9, 2022 Share Posted June 9, 2022 Having just bought a MOD Duo, I thought I'd look again at DIY options for MIDI switching, and came across this in the MOD forum: https://github.com/alf45tar/PedalinoMini As I've got everything but the screen to build the breadboard version knocking around in my parts containers [1], I have some screens on the way and will start putting it together. Further reports when I've got somewhere. [1] I recommend takeaway Chinese food containers, the plastic sort, or ice cream tubs for the bigger things. 2 Quote Link to comment Share on other sites More sharing options...
SamIAm Posted June 9, 2022 Share Posted June 9, 2022 3 hours ago, tauzero said: Having just bought a MOD Duo, I thought I'd look again at DIY options for MIDI switching, and came across this in the MOD forum: https://github.com/alf45tar/PedalinoMini As I've got everything but the screen to build the breadboard version knocking around in my parts containers [1], I have some screens on the way and will start putting it together. Further reports when I've got somewhere. [1] I recommend takeaway Chinese food containers, the plastic sort, or ice cream tubs for the bigger things. You may want to have a look at this 1 Quote Link to comment Share on other sites More sharing options...
tauzero Posted June 9, 2022 Share Posted June 9, 2022 1 hour ago, Smanth said: You may want to have a look at this That's excellent. 1 Quote Link to comment Share on other sites More sharing options...
stringvelocity Posted December 29, 2022 Share Posted December 29, 2022 I would love to get the wiring diagram Quote Link to comment Share on other sites More sharing options...
LukeFRC Posted December 29, 2022 Share Posted December 29, 2022 On 13/05/2022 at 12:20, matybigfro said: Ooo this has really piqued my interest. I've just picked up a Source Audio C4, in my search for the cheapest Midi controller options picked up a 2nd hand Digitech Seven and was looking for the cheapest USB host to connect them up My search eventually took me to DIY projects at which point started thinking how useful it would be to have a USB host with display screen that could be programmed with preset and scene info. For the moment I've picked up all the components to build a USB host of the Adafruit Trinket M0 https://github.com/gdsports/midiuartusbh#readme as cheapest solution but long term I might have to consider something with a screen, my old housemate has a Raspberry Pi lying around doing nothing so might see if I can recycle it. My coding knowledge extends about as far as basic network troubleshooting and installing reaper on Linux on a Chromebook so might be a bit of task. I’m trying something similar - Adafruit Trinket M0 and buttons and led screen for the C4 preset number (Ie nothing more complex than that) Quote Link to comment Share on other sites More sharing options...
stringvelocity Posted December 30, 2022 Share Posted December 30, 2022 On 04/03/2019 at 06:55, stoo said: 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 Are there cuts between the MIDI connection and the screen connection or are they meant to be connected too? Quote Link to comment Share on other sites More sharing options...
stoo Posted December 30, 2022 Author Share Posted December 30, 2022 17 hours ago, stringvelocity said: Are there cuts between the MIDI connection and the screen connection or are they meant to be connected too? The two columns that overlap are the GND and +5V lines - don't cut the traces between those, otherwise the MIDI won't work! Looking at that diagram again, I'm not sure why I used confusing colours for the wires to the MIDI socket..... the MIDI TX line changes from blue to white for no sensible reason I can remember, and the GND to the MIDI socket is green while it's black everywhere else in the diagram. I think I maybe had the MIDI socket wired up before I started the project and didn't have green or white left when I got to the rest of it. Not sure - either way, sorry if it's a bit confusing! Quote Link to comment Share on other sites More sharing options...
stringvelocity Posted January 10, 2023 Share Posted January 10, 2023 Is the MIDI channel set in the program or is there a way to set it Quote Link to comment Share on other sites More sharing options...
tauzero Posted January 10, 2023 Share Posted January 10, 2023 8 hours ago, stringvelocity said: Is the MIDI channel set in the program or is there a way to set it Have a look at the start of 06_midi.ino: const int midiSendChannel = 1; // MIDI channel for outbound messages Just change that to whichever channel you want. Quote Link to comment Share on other sites More sharing options...
stringvelocity Posted January 10, 2023 Share Posted January 10, 2023 (edited) Will this run on the 168or just on the 328 Edited January 10, 2023 by stringvelocity Quote Link to comment Share on other sites More sharing options...
Geek99 Posted January 10, 2023 Share Posted January 10, 2023 On 05/03/2019 at 15:44, ChunkyMunky said: Man, I never thought I'd see the day of Arduino coming here! This is too Totally beyond me Fixed and I’m actually a cryptographics programmer Quote Link to comment Share on other sites More sharing options...
stoo Posted January 11, 2023 Author Share Posted January 11, 2023 11 hours ago, stringvelocity said: Will this run on the 168or just on the 328 I didn't even realise there were different versions until you'd asked, to be honest..... the ones I used were all 328s by the look of it - both for the original nano/OLED version and the 2nd mega/touchscreen one. The nano one was fairly tight on memory so I'd be less confident that a 168 version would work for that. The mega was massive overkill for the other one - just wanted the convenience of separate serial channels for MIDI/screen/sketch upload, and a bit more capacity to allow for lazier less efficient programming. I don't have a 168 version to test, but might be worth a try if that's all you have available? Quote Link to comment Share on other sites More sharing options...
stringvelocity Posted January 11, 2023 Share Posted January 11, 2023 10 hours ago, stoo said: I didn't even realise there were different versions until you'd asked, to be honest..... the ones I used were all 328s by the look of it - both for the original nano/OLED version and the 2nd mega/touchscreen one. The nano one was fairly tight on memory so I'd be less confident that a 168 version would work for that. The mega was massive overkill for the other one - just wanted the convenience of separate serial channels for MIDI/screen/sketch upload, and a bit more capacity to allow for lazier less efficient programming. I don't have a 168 version to test, but might be worth a try if that's all you have available? I only need the first 4 switches, I’ll add a sw1 + sw2 press to mode once I get this working Quote Link to comment Share on other sites More sharing options...
stringvelocity Posted January 12, 2023 Share Posted January 12, 2023 Can you tell me which libraries you used ? Quote Link to comment Share on other sites More sharing options...
stoo Posted January 12, 2023 Author Share Posted January 12, 2023 17 hours ago, stringvelocity said: Can you tell me which libraries you used ? If you're looking for the ones in the touchscreen version, they're all listed in 01_includes.ino I didn't think to do that on the first one, but the MIDI one is #include <MIDI.h> // https://github.com/FortySevenEffects/arduino_midi_library And then for the screen I used https://github.com/adafruit/Adafruit_SSD1306 - and copying the #includes from https://github.com/adafruit/Adafruit_SSD1306/blob/master/examples/ssd1306_128x32_spi/ssd1306_128x32_spi.ino led me to: #include <SPI.h> #include <Wire.h> #include <Adafruit_GFX.h> #include <Adafruit_SSD1306.h> and I think that's it? Quote Link to comment Share on other sites More sharing options...
stringvelocity Posted January 14, 2023 Share Posted January 14, 2023 On 10/01/2023 at 03:37, tauzero said: Have a look at the start of 06_midi.ino: const int midiSendChannel = 1; // MIDI channel for outbound messages Just change that to whichever channel you want. I don’t actually see that in the code Quote Link to comment Share on other sites More sharing options...
stringvelocity Posted January 14, 2023 Share Posted January 14, 2023 On 12/01/2023 at 14:09, stoo said: If you're looking for the ones in the touchscreen version, they're all listed in 01_includes.ino I didn't think to do that on the first one, but the MIDI one is #include <MIDI.h> // https://github.com/FortySevenEffects/arduino_midi_library And then for the screen I used https://github.com/adafruit/Adafruit_SSD1306 - and copying the #includes from https://github.com/adafruit/Adafruit_SSD1306/blob/master/examples/ssd1306_128x32_spi/ssd1306_128x32_spi.ino led me to: #include <SPI.h> #include <Wire.h> #include <Adafruit_GFX.h> #include <Adafruit_SSD1306.h> and I think that's it? Is there a line in the code somewhere that says what channel it’s sending on? Quote Link to comment Share on other sites More sharing options...
stoo Posted January 14, 2023 Author Share Posted January 14, 2023 11 hours ago, stringvelocity said: Is there a line in the code somewhere that says what channel it’s sending on? If you're using the Nano/OLED version, I didn't really consider changing the MIDI channel at the time.... No reason why it can't be changed, but it'll take a bit more effort than just changing one value, unfortunately.... In the mega/touchscreen version I fixed this by declaring the "midiSendChannel" constant using the line that tauzero mentioned before: const int midiSendChannel = 1; // MIDI channel for outbound messages and then whenever I called the MIDI library to send a message, it references that constant to decide which channel to send on. MIDI.sendControlChange(controlNumber,controlValue,midiSendChannel); MIDI.sendProgramChange(programNumber,midiSendChannel); On the earlier version though, the channel number is just hard coded into each MIDI send call's parameters, like these: MIDI.sendProgramChange(0,1); MIDI.sendControlChange(68,68,1); //tuner You could go through and replace each of those with your new channel number, but I'd be tempted to do a find and replace for ,1) to ,midiSendChannel) and then add the const int midiSendChannel = 1; // MIDI channel for outbound messages somewhere near the top... then you could just change that 1 to whatever channel you wanted to use, and if you decided to change again in the future it'd be that much easier to do. Quote Link to comment Share on other sites More sharing options...
tauzero Posted January 14, 2023 Share Posted January 14, 2023 12 hours ago, stringvelocity said: I don’t actually see that in the code 1 Quote Link to comment Share on other sites More sharing options...
stoo Posted January 14, 2023 Author Share Posted January 14, 2023 36 minutes ago, tauzero said: I think they're probably using the https://github.com/stoonoon/hxsMidiSwitcher version which wouldn't have that bit in it though..... Quote Link to comment Share on other sites More sharing options...
stringvelocity Posted January 14, 2023 Share Posted January 14, 2023 On 04/09/2021 at 12: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.... I’m working in doing this build with just the four buttons and no led… Quote Link to comment Share on other sites More sharing options...
stringvelocity Posted January 14, 2023 Share Posted January 14, 2023 4 hours ago, stoo said: If you're using the Nano/OLED version, I didn't really consider changing the MIDI channel at the time.... No reason why it can't be changed, but it'll take a bit more effort than just changing one value, unfortunately.... In the mega/touchscreen version I fixed this by declaring the "midiSendChannel" constant using the line that tauzero mentioned before: const int midiSendChannel = 1; // MIDI channel for outbound messages and then whenever I called the MIDI library to send a message, it references that constant to decide which channel to send on. MIDI.sendControlChange(controlNumber,controlValue,midiSendChannel); MIDI.sendProgramChange(programNumber,midiSendChannel); On the earlier version though, the channel number is just hard coded into each MIDI send call's parameters, like these: MIDI.sendProgramChange(0,1); MIDI.sendControlChange(68,68,1); //tuner You could go through and replace each of those with your new channel number, but I'd be tempted to do a find and replace for ,1) to ,midiSendChannel) and then add the const int midiSendChannel = 1; // MIDI channel for outbound messages somewhere near the top... then you could just change that 1 to whatever channel you wanted to use, and if you decided to change again in the future it'd be that much easier to do. I really just want to make sure my hx is on the right channel to communicate with the pedal or vise versa Quote Link to comment Share on other sites More sharing options...
stoo Posted January 14, 2023 Author Share Posted January 14, 2023 2 hours ago, stringvelocity said: I’m working in doing this build with just the four buttons and no led… Fair enough - but the two different versions I've made and posted the details for use completely different codebases - so if you're asking questions about the code, we'd need to work out which one you're starting from as the answers will probably be different depending on which you've chosen. 1 hour ago, stringvelocity said: I really just want to make sure my hx is on the right channel to communicate with the pedal or vise versa Ah in that case - both of the ones I wrote send on channel 1 by default. And the HX stomp listens on channel 1 by default as well.... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.