Open MIDI Controller -From Scratch-

Home :: Reviews of DJ equipment :: Open MIDI Controller -From Scratch-Reply
Open MIDI Controller -From Scratch-
Posted on: 24.02.2012 by Lajuana Polinder
Hi everybody

A friend and I have got an Arduino at school (we study Industrial Engineering Sciences Electronics/ICT), and the goal was to "build something". Being total ubergeeks we took this project serious and in 2 minutes we decided to build an MIDI controller.

Our initial build is going to be something you can compare with a Traktor Kontrol S2. But we'll include arcadebuttons (3 guesses why we would want to do that ), and an extra touchpad for expressive effects.

Now, I myself am a huge FLOSS/H advocate (Free and Libre Open Source Software/Hardware), and so I'd like to break the project open!

But first about the initial build: We spend about 30 minutes with the arduino and we got the MIDI interface working (using 1 pot to control 1 knob). After that I spend some time discovering how to get a lot of inputs on to a device that has only 6 analog inputs. In the end we're using Multiplexers to solve our problem (we also considered latch registers, but this allows us to address better. ). And on this very own moment my teammate is drawing the layout for our controller (which I'll share as soon as I have it).

But since the simplicity of the code and the setup, we figured we might want to convince others to build their own controller! Because afterall it's more easy than most people believe. And if you don't do it because you want a different layout, do it because of the knowledge you'll gain!

Anyhow, believeing beyond this build, I'd like to ask you guys: how does your perfect controller look? I'd like to start an open MIDI controller project (like the auroramixer which was a great shot to make an open mixer, and I still hate the fact they failed). Now I'm not really a DJ, I'm just a TechGuy, so I need help in finding the perfect layout!

Because of my believe in open software, I started out talking to the people over at the MIXXX IRC channel and they said this was the best place to start. In a perfect world I'd make a controller that is really made to blend perfectly with MIXXX, but being somewhat realistic I'll believe it would be a better idea to start making a traktor controller.. (Another friend told me to take a look at the Xone 4D and aim for something better)
One of the features the people at MIXXX had in mind though was a hardware implementation to keep the same amount of base throughout the mix (now you sometimes need to put one bass higher, another one lower and at the same time switching the crossfader), due to the fact most people have only 2 hands this might be harder to do.
Now I've understand this is a standard software feature in Traktor, but it are ideas like this that can make a controller stand out...

So my plot:
- build this school controller as a beta for the open project
- set up a website and share build considerations and ideas both there and here
- make a prototype, let some DJ's play with it
- share code and schemes

Any tips or advice are more than welcome!

Grts


Wouter
Lajuana Polinder
25.02.2012
Originally Posted by Skirmitt
If you're planning on using jogs I wouldn't use a serial to midi conversion program. I tried it with a high resolution jog and there was too much latency at high rotation speeds. Instead try a hardware midi to usb converter, I find that a lot better with good latency.
Thx for the tip! I'll keep it in mind. (But for this build we might try it out any way because of the setup )
Lajuana Polinder
25.02.2012
Originally Posted by Skirmitt
Nice to see another promising midi controller project.
Hou ons op de hoogte ;-)
Haha dank je ;-)

Short overview of the things that have gone wrong so far (and how we fixed them):
  • The arduino was to slow, controller was laggy
  • I'm using Audio Faders at the moment (logaritmic)
  • I don't have an midi port on my pc
  • Arduino uses serial over USB to communicate


The arduino being slow was a major issue when we just started, I knew the arduino should have been fast enough, so I was questioning whether it was the arduino, the arduino's code, the serial > midi program, the music software or the input devices connected to the arduino. Turned out it was the code of the arduino. When I was testing my first version of the code I insert a "blink led" script. Basically it just put's the LED on for 50ms and out for 50ms as long as serial data is being transmitted. Needless to say using 2x a 50ms delay for this makes 1 loop at least 100ms long. removing the blink led (which was for troubleshooting purposes only) solved this problem.

The logarithmic faders where a problem because my physical device would be on 50% and the software version would be above 89%. We're going to buy new linear faders, but for the tests I just use the logarithmic ones. We solve the position problem by deviding the analogValue by 210.6 and then we make an exponential function out of it, like this: e^(analogValue/210.6); this gives us a much better curve, although it isn't complete linear. The middle part has a greater value increase than the outer parts. But, once we've got our new faders this problem resolves itself.

Making an midi controller is nice, but I don't have a MIDI port on my pc (let alone my laptop) we had to solve it. Therefor we started sending MIDI messages over the arduino's USB cable (which is on it's own serial over USB).

Serial over USB isn't viewed as MIDI signals however, you need to convert it. I'm on a linux machine so I tested using PortMidi and ttyMidi, both worked well and we had a working midi communication between the computer and the arduino. Because most of you might rather have a *real* USB/MIDI device, we might reconsider using something like a teensy instead of an arduino.

As you see, not all has gone like planned, on the other hand, all these problems occured in the first 24h we were working on it. And all of them where fixed in those same 24h. I'm at my parents place this weekend and I took an old piece of metal to put the controllers in. I'm adding a couple of pots later today and I'll make some pictures or a video of it in action

Grts


Wouter
Lajuana Polinder
24.02.2012
Hi everybody

A friend and I have got an Arduino at school (we study Industrial Engineering Sciences Electronics/ICT), and the goal was to "build something". Being total ubergeeks we took this project serious and in 2 minutes we decided to build an MIDI controller.

Our initial build is going to be something you can compare with a Traktor Kontrol S2. But we'll include arcadebuttons (3 guesses why we would want to do that ), and an extra touchpad for expressive effects.

Now, I myself am a huge FLOSS/H advocate (Free and Libre Open Source Software/Hardware), and so I'd like to break the project open!

But first about the initial build: We spend about 30 minutes with the arduino and we got the MIDI interface working (using 1 pot to control 1 knob). After that I spend some time discovering how to get a lot of inputs on to a device that has only 6 analog inputs. In the end we're using Multiplexers to solve our problem (we also considered latch registers, but this allows us to address better. ). And on this very own moment my teammate is drawing the layout for our controller (which I'll share as soon as I have it).

But since the simplicity of the code and the setup, we figured we might want to convince others to build their own controller! Because afterall it's more easy than most people believe. And if you don't do it because you want a different layout, do it because of the knowledge you'll gain!

Anyhow, believeing beyond this build, I'd like to ask you guys: how does your perfect controller look? I'd like to start an open MIDI controller project (like the auroramixer which was a great shot to make an open mixer, and I still hate the fact they failed). Now I'm not really a DJ, I'm just a TechGuy, so I need help in finding the perfect layout!

Because of my believe in open software, I started out talking to the people over at the MIXXX IRC channel and they said this was the best place to start. In a perfect world I'd make a controller that is really made to blend perfectly with MIXXX, but being somewhat realistic I'll believe it would be a better idea to start making a traktor controller.. (Another friend told me to take a look at the Xone 4D and aim for something better)
One of the features the people at MIXXX had in mind though was a hardware implementation to keep the same amount of base throughout the mix (now you sometimes need to put one bass higher, another one lower and at the same time switching the crossfader), due to the fact most people have only 2 hands this might be harder to do.
Now I've understand this is a standard software feature in Traktor, but it are ideas like this that can make a controller stand out...

So my plot:
- build this school controller as a beta for the open project
- set up a website and share build considerations and ideas both there and here
- make a prototype, let some DJ's play with it
- share code and schemes

Any tips or advice are more than welcome!

Grts


Wouter
Lajuana Polinder
25.02.2012
Originally Posted by Skirmitt
If you're planning on using jogs I wouldn't use a serial to midi conversion program. I tried it with a high resolution jog and there was too much latency at high rotation speeds. Instead try a hardware midi to usb converter, I find that a lot better with good latency.
Thx for the tip! I'll keep it in mind. (But for this build we might try it out any way because of the setup )
Dannielle Glassey
25.02.2012
If you're planning on using jogs I wouldn't use a serial to midi conversion program. I tried it with a high resolution jog and there was too much latency at high rotation speeds. Instead try a hardware midi to usb converter, I find that a lot better with good latency.
Era Roka
25.02.2012
gaaf project man, de ideale controller! tja das lastig te zeggen iets wat ik zoiezo graag in een controller zou willen zien is de track naam en andere dingen uit traktor zodat je zo min mogelijk naar het scherm hoeft te kijken, ook jog's zouden fantastisch zijn!

Hier een paar liknks:

"DJTT Threads Of Interest - The DIY Midi Controller 'FAQ'

http://community .djranking s.com/showthread.php?t=26660

*Build Log* 'CDJ 2000'-style DIY Traktor controller

http://community .djranking s.com/showthread.php?t=19053

"Midi2LCD" - The ultimate DIY Traktor VU meter

http://community .djranking s.com/showthread.php?t=18512

"CloneThing" - rearrange Traktor GUI elements

http://community .djranking s.com/showthread.php?t=5489


sorry for the dutch talk guys, normaly i write a transalation but i have a appointment.
Lajuana Polinder
25.02.2012
Originally Posted by Skirmitt
Nice to see another promising midi controller project.
Hou ons op de hoogte ;-)
Haha dank je ;-)

Short overview of the things that have gone wrong so far (and how we fixed them):
  • The arduino was to slow, controller was laggy
  • I'm using Audio Faders at the moment (logaritmic)
  • I don't have an midi port on my pc
  • Arduino uses serial over USB to communicate


The arduino being slow was a major issue when we just started, I knew the arduino should have been fast enough, so I was questioning whether it was the arduino, the arduino's code, the serial > midi program, the music software or the input devices connected to the arduino. Turned out it was the code of the arduino. When I was testing my first version of the code I insert a "blink led" script. Basically it just put's the LED on for 50ms and out for 50ms as long as serial data is being transmitted. Needless to say using 2x a 50ms delay for this makes 1 loop at least 100ms long. removing the blink led (which was for troubleshooting purposes only) solved this problem.

The logarithmic faders where a problem because my physical device would be on 50% and the software version would be above 89%. We're going to buy new linear faders, but for the tests I just use the logarithmic ones. We solve the position problem by deviding the analogValue by 210.6 and then we make an exponential function out of it, like this: e^(analogValue/210.6); this gives us a much better curve, although it isn't complete linear. The middle part has a greater value increase than the outer parts. But, once we've got our new faders this problem resolves itself.

Making an midi controller is nice, but I don't have a MIDI port on my pc (let alone my laptop) we had to solve it. Therefor we started sending MIDI messages over the arduino's USB cable (which is on it's own serial over USB).

Serial over USB isn't viewed as MIDI signals however, you need to convert it. I'm on a linux machine so I tested using PortMidi and ttyMidi, both worked well and we had a working midi communication between the computer and the arduino. Because most of you might rather have a *real* USB/MIDI device, we might reconsider using something like a teensy instead of an arduino.

As you see, not all has gone like planned, on the other hand, all these problems occured in the first 24h we were working on it. And all of them where fixed in those same 24h. I'm at my parents place this weekend and I took an old piece of metal to put the controllers in. I'm adding a couple of pots later today and I'll make some pictures or a video of it in action

Grts


Wouter
Dannielle Glassey
25.02.2012
Nice to see another promising midi controller project.
Hou ons op de hoogte ;-)

<< Back to Reviews of DJ equipment Reply

Copyright 2012-2023
DJRANKINGS.ORG n.g.o.
Chuo-ku, Osaka, Japan

Created by Ajaxel CMS

Terms & Privacy