I am in the process of creating a template for touchOSC<->OSCulator<->Traktor... Seems popular these days, huh...
Anyway, I have everything working except for the annoying way Traktor deals with MASTER deck association. Here is how it works in Traktor:
- There are 4 decks in Traktor - known as A, B, C, D
- Only one of the 4 decks can be designated as the MASTER deck at a time
- When one of the 4 decks become the MASTER deck, Traktor sends out a one-shot message to that deck only
So what I need to be able to do is to listen for this one-shot message (MIDI CC value of 127) to any of the MIDI_CC channels associated with the 4 decks, and then send the appropriate MIDI_CC messages to each deck's MASTER LED depending on which one was selected as the master.
sudo code looks like this:
Anyway, I have everything working except for the annoying way Traktor deals with MASTER deck association. Here is how it works in Traktor:
- There are 4 decks in Traktor - known as A, B, C, D
- Only one of the 4 decks can be designated as the MASTER deck at a time
- When one of the 4 decks become the MASTER deck, Traktor sends out a one-shot message to that deck only
So what I need to be able to do is to listen for this one-shot message (MIDI CC value of 127) to any of the MIDI_CC channels associated with the 4 decks, and then send the appropriate MIDI_CC messages to each deck's MASTER LED depending on which one was selected as the master.
sudo code looks like this:
Code:
#DeckA_midi_cc_num = 100 #DeckB_midi_cc_num = 101 #DeckC_midi_cc_num = 102 #DeckD_midi_cc_num = 103 wait for midi_cc message for each deck // i.e., check for a midi_CC_val of 127 on midi_cc_channel 100, 101, 102, & 103 { // note - traktor sends a one-shot midi cc message for MASTER deck outputs - // i.e., a 127 followed quickly by a 0 on the channel associted with the deck which was selected as master if (MIDI_CC_val == 127) { // i.e. which deck triggered the midi_cc_val of 127 int midi_cc_num = midi_cc_num of deck which triggered a value of 127; // send a midi_cc_val of 127 to Deck A if deck A triggered the value of 127, otherwise send a value of 0 midi_cc_val.deckA = (midi_cc_num == DeckA_midi_cc_num) ? 127 : 0; // send a midi_cc_val of 127 to Deck B if deck B triggered the value of 127, otherwise send a value of 0 midi_cc_val.deckB = (midi_cc_num == DeckB_midi_cc_num) ? 127 : 0; // send a midi_cc_val of 127 to Deck C if deck C triggered the value of 127, otherwise send a value of 0 midi_cc_val.deckC = (midi_cc_num == DeckC_midi_cc_num) ? 127 : 0; // send a midi_cc_val of 127 to Deck D if deck D triggered the value of 127, otherwise send a value of 0 midi_cc_val.deckD = (midi_cc_num == DeckD_midi_cc_num) ? 127 : 0; } }
Comment