Me and a mate of mine started our first controllerbuild based on the Teensy++2.0
We ran into some issues though. We tried hooking up some LEDs, momentary buttons and pots with good results at first.
With the teensy in usbmidi mode midisignals is detected with Midi-OX. However, when trying to map our buttons in traktor it does not work. Learn does not work and the little blue light showing incoming midi is pitch black.
Hopefully this is a quick fix due to some user error but we just can’t think of what it could be.
Therefore we shout out to you guys! Hopefully someone familiar with the teensy could point us in the right direction.
I had the same issues with my Teensy MIDI project at first. It turned out to be a conflicting midi channel. Make sure you get a high number (to prevent issues with other MIDI devices). Also make sure that the controller settings are correct above the mapping area in Traktor.
Get some pictures in, because i’m curious about your progress.
@steffex,
We don’t have much to show yet. Mostly a huge birdsnest of stuff when testing different components. We’re out of town next week, but the week after that should show some progress. Hopefully our arcadebuttons should have arrived from Hongkong by then.
Make sure that you buy from an actual reseller, because the teensy have a lot of fake ones. That have different components and thereby don’t work good with the software. Check the official website for resellers.
@DJDoubleYou:
There is an official reseller in the Netherlands, floris.cc
You find the official list under teensy, references, counterfeit. I had a little trouble finding it myself, so I might aswell share Might save a minute for anyone looking.
And I must say that so far the Teensy has been brilliant to work with. Everything is going so much easier then expected! I’m already planning my next project even though this is hardly half finnished Great work by PJRC!
If so you can use the usbMIDI.read(channel) or usbMIDI.read() to check if it there is an incoming message. It will return true if so or false if not. Then you can use either usbMIDI.getData1() or usbMIDI.getData2() to get the actual message. Data1 is the midinote and Data2 is like the velocity (depending if CC or note).
Here is an example that worked for us. (We haven’t tried with multiple LEDs yet)
int led = 25;
int state = 1;
void setup(){
pinMode(led,OUTPUT);
}
void loop(){
if(usbMIDI.read(1)){
if(usbMIDI.getData1()==1){
if(state){
digitalWrite(led,HIGH);
state=0;
}
else{
digitalWrite(led,LOW);
state=1;
}
}
}
}
Since traktor sends is output as an impulse and not as an constant message. You have to store if the impulse mean on or off. That is why we use the state-variable. If someone knows a more effective way of doing this. Please let us know!
Hope this will point you in the right direction. For multiple LEDs just use an array.
A good practice to speed up your firmware is to first read all states of buttons and incoming notes and then process them. This is a lot faster than doing this per input and note. Collecting “data” is very time consuming.
example:
var button1 = AnalogRead(1);
var button2 = AnalogRead(2);
var button3 = AnalogRead(3);
if( button1 == HIGH ) {
// do something
} else {
//do something more
}
if( button2 == HIGH ) {
} else {
}
if( button3 == HIGH ) {
} else {
}