Posts Tagged ‘controllerism’
Exams are finally over and I can spend much more time experimenting with controllers without any traces of guilt. The major highlight for this post will be my new Arcade Warrior controller, a shameless rip-off of the Midi Fighter Pro (thank you DJTT for being such a great source of inspiration), and the Teensy++ micro-controller board.
I will start off real quick with Teensy++, it’s a very nice and small AVR micro-controller, very similar to Arduino. In fact you can use the Arduino IDE and libraries to program Teensy, which is amazingly handy! But the reason I chose to try it was because of it’s MIDI Class Device support, something that Arduino can’t do. This means that it can act like any professional plug-and-play MIDI controller, no drivers, compatibility layers and virtual MIDI ports required!
Of course to test it out in practice, I had to build a new controller. And this one I wanted it to be a really fun to play and cool looking device, and what suits better than the old school arcade games that we all loved as kids. I wanted to build something as expressive as the Midi Fighter Pro, but throw couple of more extra controls in there and a Pac-Man era joystick. Also being able to use Midi Fighter’s already very developed Traktor mappings would save me tons of time and effort. Fortunately all the MIDI signals documentation and mappings are publicly available at DJ TechTools so it was very easy to implement.
Armed with ergonomically placed rapid fire arcade buttons, smooth professional audio gear potentiometers and the joystick controlling expressive gestures, it turned out to be a very nice and responsive controller.
PS: After a lot of questions about the wiring of the buttons I decided to update this post.
One of my goals when building this controller was to make things as simple as possible and use the least number of components. That’s one of the reason why I have included only 3 LEDs. The buttons and Joystick are wired in a very simple manner. All the ground pins (white cable in photo) are daisy chained together and end up on the ground pin of Teensy and all the colored wires are connected to one Digital Input pin on the Teensy, so no resistors required. In order to use this method, you have to enable the pull up resistor for each of the pins in your microcontroller, and this is done by setting the pin mode to
pinMode(buttons[i],INPUT_PULLUP); during initialization.
Also note that if you use the pin 6, which is the one that has a LED on the Teensy, you have to set it to
pinMode(6,OUTPUT); in order for it to function like the rest.
Finally, since now the buttons operate in active-low logic, this means that if the button is pressed it becomes LOW other wise its HIGH, you have to check for button presses like this
if (buttonState[i]->read()==LOW)//is pressed
Also all the analog controls are routed through the breadboards and ribbon cables directly to one analog input on the Teensy.
Here is one simple diagram and a photo of my wiring. Hopefully this clarifies things.
Enjoy and keep your emails coming!
Greetings once again, the last few days I gave more emphasis on working on the [k]ontrolPad and realized that my previous video did not demonstrate much the original concept I had in mind. So here is one more little demonstration video and some pictures of the development process.
As I noted in my previous post, there is a lot of noise in the analog readings, I’m not really sure what is causing it but I managed to reduce that by lowering the resolution of the readings, anyway the MIDI protocol does not support 10-bit numbers though some spikes occasionally do get through. I tried taking the average of the previous few readings but that definitely slowed things to an unusable level, although it did produce amazingly smooth graphs. Also another way is implementing a LP filter using capacitors which I didn’t test either.
The communication protocol is quite similar as before, button presses send
b01 or b00 (where first digit denotes the button number and second the state), similarly the device recieves
l11 or l10 for setting LEDs and
r requesting for the analog values which are then sent back as one string separated by commas
The driver application then listens for changes in those values and sends them down to the virtual MIDI port. Unfortunately there are some bottlenecks with the set led commands. Which are most likely due to too many analog values coming through.
Also for the accelerometer and distance sensor I’ve set an option to choose which kind of MIDI command to send, the default CC passing the value or a NoteOn if the values pass a certain threshold so those can be used as a switch as well. This is demonstrated in the video above.
And finally designed a plywood jigsaw case to hold everything together.