The BIG Arduino MIDI controller thread - Page 11
Page 11 of 16 FirstFirst ... 789101112131415 ... LastLast
Results 101 to 110 of 155
  1. #101
    Tech Convert
    Join Date
    Nov 2013
    Posts
    11

    Default building my own arduino controller as we speak

    hi all, just wanted to weigh in on this thread ive been following for years now! i recently started building my own arduino mega based controller, with a mux sheild and some arcade buttons, i will post up pics when i start the actual construction!
    for no though i am just working on the code, im a total programming noob, like seriously never programmed in my life before, and yet i have made a modular code, with "blocks" of functions that can be copied and pasted, with a "mux sheild block" that goes before the function "block". in this way it is long and un elegant but extremely easy to understand and modify, i want to post if for all the super noobs, who like me may have been regretting buying an arduino because the coding is too hard.

    i just want to guage interest in this at the moment, before i go posting a full build log!

  2. #102
    Tech Convert
    Join Date
    Nov 2013
    Posts
    11

    Default modular midi controller code for the inexperienced

    For some reason my last post was not accepted by the moderators, im assuming because it was not useful. My bad.
    I am building a midi controller for traktor just now and have finished the basic code, its an extremely simple code with a modular cut and paste system, the plan is to release it in the next couple of days with full documentation, so that people who cant understand arduino code can still easily build controllers.

    My question though, in order to get my pots to send clean messages that didnt flutter i had to create a threshold of 2. Meaning that the pots only have a 64 step resolution, its fine for effects and stuff but not ideal. Did any of you have the same problem and if so, how did you overcome it?

  3. #103
    Tech Convert
    Join Date
    Nov 2013
    Posts
    11

    Default so build started!

    im about halfway through the build now, so heres some pics if you all want to see! DSC_0064.jpgDSC_0082.jpgDSC_0054.jpg

  4. #104
    Tech Convert
    Join Date
    Jan 2011
    Posts
    18

    Default

    This is a cool thread any instructables on the thread?

  5. #105
    Tech Mentor
    Join Date
    Sep 2013
    Posts
    159

    Default

    Here's an instructable for a relatively simple usb to midi controller using either an arduino uno, teensy 2.0 etc.

    http://www.instructables.com/id/Arca...DI-Controller/

    best of using either a teensy 2.0 or uno with this software as it's got native usb-midi support, you can hack in support for a leonardo but it requires https://github.com/rkistner/arcore to be added to the arduino IDE + some code changes to get it working.

    I've just built myself a controller using the above software and an arduino leonardo, very simple indeed to have 16 buttons and 6 faders. I haven't put any leds on it but I don't see any reason why you couldn't use some addressable rgb leds, the ws2812 LEDs only require a single wire :-) It's pretty cheap to build too, £11 for the arduino leonardo board, £32 for buttons and about £3 for potentiometers. The prototype case is a bit of scrap mdf with some 4mm plywood as the top, chunky but functional. you can go cheaper and buy the £1 chinese sanwa clones that are all over ebay but having used the sanwa 24mm buttons that are on the midifighters, the cheap chinese 30mm clones and the standard happ concave arcade buttons, I can say DON'T BE CHEAP, get the sanwas whatever you build!!

    I started to write a tutorial on how to build your own midifighter using the djtechtools midifighter open source project, it's very simple to actually build one with minimal skills, however I got bogged down in explaining many different ways to do it, I will post what I have so far in a seperate thread so people can get a better idea of what's involved.

    Personally I like the idea of both approaches, you have access to the software sources, so you can write your own nifty functions into either, the instructable + a leonardo is the easier method, you don't need any extra components and there's minimal soldering, I made myself some little 'wing' boards that have screw terminals and pins, all my buttons are connected using 2.8mm crimps to female header connector that I hand crimped, the pots are all done using female to female wires jumper wires.

    It should also be relatively simple to expand the above instructable, you can add code to receive serial data and add another arduino into the box connected up in the same manner, or add something like an arduino mega which would give you access to another 50+ buttons and analog inputs.

    The midi-fighter approach is of course well respected, lots of pre-made mappings for software so you have the compatibility in software and a great community base but it's a bit more advanced building the hardware, lots of soldering, PCB design of some description and this is where I started to get a little bogged down in my tutorial, you can end up building a midi fighter using just breakout boards but you'll need to learn to solder surface mount components or you can do a full blown design with all of the ICs on the same board.

    I managed to get a fair way with actually making a midi-fighter from scratch, I still have one built on breadboards, I also designed my own PCBs, hand etched and tinned, I even got to the point where I was putting my own solder mask onto boards for that pro look, I will revisit this very soon and see about finishing off the whole tutorial. Here's a picture of some of the shenanigans I got up to recently.

    Attachment 21267

    The central boards are some breakouts I made for some addressable LEDs which you can see in action in the tube behind the boards, the other boards are the midifighter adc chip, the midighter shift registers and the midifighter LED controller. you can see one of the boards is green, this is the soldermask technique I was talking about.

  6. #106
    Tech Mentor
    Join Date
    Sep 2013
    Posts
    159

    Default

    Things have moved on a little since my last post, I haven't had a go at finishing the midifighter 'proper' but I did complete a clone unit from the instructables for my son using an arduino leonardo, I had to use the 'arcore' arduino cores to add usb midi support, it only has raw midi data input/output, so I added a couple of commands in there to make things much easier (sendNoteOn, SendNoteOff,SendCC).

    I also added midi input via serial, this makes it super simple to expand a unit with anything that can output midi via serial, essentially, it allows you to add another arduino midi controller and only use a single usb socket, I can now add, for instance, an arduino atmega1280 running some controller software which would give me another 50 or so digital inputs and a load more analog inputs. With the number of IO available, you could easily implement a very comprehensive traktor controller.

    The only thing I haven't added is LEDs, at the moment I have 16 buttons and 4 faders + 1 spare pin (3 if it doesn't use serial-midi), it might be possible to add addressable LEDs but for the time being I'm going to wait, I have some other neat ideas for leds :-)

    I'll post some pictures and a detailed list of things you'll need in the next day or so, my case is really simple, I just used 4pieces of 3x3/4" pine, using pocket holes to join them together nicely, 2 pieces of 4mm ply wood to act as the base and the bezel. I used a 30mm holesaw using 4cm apart centres to mark out the holes for a 4x4 grid for the buttons, the extra space either side of the buttons accounts for the button surrounds.

    I cut out the slots for the faders using a scrollsaw and then a simple set of needle files to get them wide enough.

    The total cost of the unit has worked out at around £31 inc taxes, 16buttons @ £1 each, 4 faders @ £1.20 each and an arduino leonardo £9.89.
    Last edited by ReggieUK; 01-23-2014 at 02:22 PM.

  7. #107
    Tech Mentor
    Join Date
    Sep 2013
    Posts
    159

    Default

    I fixed another issue today in the instructable code, basically, with the fader moving at slow speeds, it was liable to wobble between values, even though the code (not mine!) had originally been written to mitigate just this situation.

    I've cut the analog code down from about 40 lines to 6 and the analog inputs are now smooth as butter no matter how fast/slow they're moving :-)

  8. #108
    Tech Mentor
    Join Date
    Oct 2012
    Posts
    160

    Default

    Make sure your voltage for analogue stuff (pots) is stable - if you're doing this on PCB make sure you use ground planes. Separating ground from digital planes is also very good idea.
    Shantea Controls - Custom MIDI controllers: Official | Youtube | Instagram | Tindie
    DJ Mixes: Psychill, Psydub, Dub | House, Progressive, Techno | Dubstep

  9. #109
    Tech Mentor
    Join Date
    Sep 2013
    Posts
    159

    Default

    Thank's Paradajz, it's all good thanks, it's a simple arduino leonardo board, I've got header pins in the sockets so that I can use female header wires to plug straight in. The issue wasn't with stability, it was to do with how the code was setup to cope with false readings and also how and when it converted from 10bit to 7bit.

    Essentially, they applied the hysteresis to the 7bit value and had a misplaced || (or) in an if statement. so no matter what you did, it wouldwobble because the errors had already crept in.

    It was all fine once I'd taken a look at how they were doing it compared to how it should be done and rewritten the code

  10. #110
    Newbie
    Join Date
    Feb 2014
    Posts
    2

    Default Fresh code examples?

    Hello everyone!

    Firstly I just want to mention that I'm completely new to forums so if this is posted wrong in some way, please delete my post or tell me what to do instead.

    I recently bought myself an arduino mega and wanted to build my own MIDI-controller. But I found it very hard coding it so it works with Traktor pro 2. I have looked around on the internet, including this thread (though not every page) and all code examples I find are either outdated or doesn't use the MIDI lib. I'm testing bit by bit and so far I have managed to compose a code that works with two pots. It's when I try to add a third pot that the assigned knob in traktor starts to wobble back and forth and I'm not able to control it. I have tried to use other pots and changed analog inputs but I'm fairly sure that it's the code that is failing. Below is the code I've used when I tried to make it work with three pots. This is code that I have copy-pasted from other websites and then gone for some trial and error. The code is not really commented since I barely know what it actually does.
    I use "loopmidi" and "hairless midi->serial bridge" to convert the signals.


    #include <MIDI.h>
    int potPin0 =0;
    int potPin1 =0;
    int potPin2 =0;

    void setup()
    {
    MIDI.begin();
    Serial.begin(115200);
    }

    void loop()
    {
    potPin0 = analogRead(0)/8;
    MIDI_TX(176,1,potPin0);
    delay(10);

    potPin1 = analogRead(1)/8;
    MIDI_TX(176,2,potPin1);
    delay(10);

    //this is the third pot I've added. without this one it works.
    potPin2 = analogRead(2)/8;
    MIDI_TX(176,3,potPin2);
    delay(10);

    MIDI.read();
    }


    void MIDI_TX(unsigned char MESSAGE, unsigned char CONTROL, unsigned char VALUE)
    {
    Serial.write(MESSAGE);
    Serial.write(CONTROL);
    Serial.write(VALUE);
    }


    //END OF CODE

    This is just a small problem since I have to make some arcade buttons and leds work too but I'll try to figure that out myself. Though it would be nice if someone posted a new code example with some pots and buttons that works with traktor. It can't just be me who is having trouble with this right? Or, maybe. Anyway, I hope you are willing to help and if not then it's fine. :)

Page 11 of 16 FirstFirst ... 789101112131415 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •