This forum is read-only. Please post new topics in our Q&A forum.

Toggling LEDs while turning LED bank Off - Kontrol F1

General discussion about MIDI Translator

Moderators: florian, DvlsAdvct

Post Reply
User avatar
PRKid
Power User
Posts: 33
Joined: Thu Dec 29, 2016 6:44 pm

Toggling LEDs while turning LED bank Off - Kontrol F1

Post by PRKid » Thu Jan 12, 2017 1:35 am

.
I am sure the Subject description is a little confusing, yet, let me explain. I am using the Traktor Kontrol F1 and would like to select the deck I am playing by switching these via the bottom 4 pads. So, I want 2 functions to be served.

(1) If I turn On/Off Deck 1 (enabled via pad 2) by pressing such pad (this is the easy part and works fine for all 4 pad/Decks). Once On, I assign the "ka" variable to the Deck # to keep track of the Deck that is On.

(2) Now, the 2nd functionality is, when a Deck is On (say Deck 1/pad 2) and I press to select another Deck/pad (say Deck 2/pad 3), I want to send an Outgoing message to turn Off the Deck's LED of the one that is ON (Deck 1). This gets very confusing once I want to enable such for all 4 pads/Decks, especially keeping track of the variables and toggle functions.

** Channel 13, CC#'s 37-40 (Decks 3/1/2/4) on pads. Used "ga/gb/gc/gd" to toggle, and, used velocities of "oo/pp/qq/rr" for decks 3/1/2/4 respectively. I tried unsuccessfully adding another Translator (variables of "gv" for toggle velocity "hv") to turn off the the On Deck once I press another one, yet, then they all go to the "On" mode. Read thru all the threads on LEDs yet did not find something similar.

I can do it with 2 Decks, yet, cannot do such beyond that.

Any ideas? Anyone wanting to tackle a little challenge?

Thanks in advance for any thoughts.

.

User avatar
florian
Bome Software: Founder
Posts: 2435
Joined: Thu Apr 28, 2005 10:09 pm
Location: Munich, Germany
Contact:

Re: Toggling LEDs while turning LED bank Off - Kontrol F1

Post by florian » Tue Jan 31, 2017 12:30 am

Hi PRKid,
first of all, my apologies for not responding earlier. We've had some busy weeks...
Your description seems familiar, maybe you have followed up in the Q&A?

If not, here's my general approach complicated LED feedback: I usually create a timer to set all LEDs at once (e.g. "Show LEDs"). A series of translators all react to the same timer "Show LEDs" and set the LED's according to all state variables.

Then anytime you change a state variable e.g. for the selected deck, start that timer "Show LEDs" once with 0ms delay for updating the LEDs.

Thanks,
Florian

User avatar
sjcaldwell
Power User
Posts: 167
Joined: Tue Sep 20, 2016 11:05 pm

Re: Toggling LEDs while turning LED bank Off - Kontrol F1

Post by sjcaldwell » Tue Jan 31, 2017 12:39 am

The approach I take is a little different. Any time I change a value that affects an led I set a global variable (dirty) bit.
I then have a recurring timer the goes off periodically and refresh all led states if the dirty bit is set. Then I turn off the dirty bit.
It may consume more cycles but then I don't have to remember to start a timer every time I change a global variable that varies led states.

Just a matter of preference. Either approach works but I suspect mine consume a bit more cycles. However I can adjust the
frequency of the recurring timer if it starts getting in the way of things.

User avatar
florian
Bome Software: Founder
Posts: 2435
Joined: Thu Apr 28, 2005 10:09 pm
Location: Munich, Germany
Contact:

Re: Toggling LEDs while turning LED bank Off - Kontrol F1

Post by florian » Tue Jan 31, 2017 1:11 am

Steve, that's a great way! The additional overhead shouldn't play a role in practice.

User avatar
PRKid
Power User
Posts: 33
Joined: Thu Dec 29, 2016 6:44 pm

Re: Toggling LEDs while turning LED bank Off - Kontrol F1

Post by PRKid » Tue Jan 31, 2017 4:28 am

florian wrote:Hi PRKid,
first of all, my apologies for not responding earlier. We've had some busy weeks...
Your description seems familiar, maybe you have followed up in the Q&A?

If not, here's my general approach complicated LED feedback: I usually create a timer to set all LEDs at once (e.g. "Show LEDs"). A series of translators all react to the same timer "Show LEDs" and set the LED's according to all state variables.

Then anytime you change a state variable e.g. for the selected deck, start that timer "Show LEDs" once with 0ms delay for updating the LEDs.

Thanks,
Florian
.
Hi Florian,

Yes, I had submitted the same question to the NEW Q&A support area (under Luis) assuming I'd probably would not get a response in your old forum area (this one...). Anyway, I had temporarily given up on this, yet, would love to tackle this if I can get some insights on how to pursue such. I can do all the testing and verifications.....just need some ideas.

My biggest challenge is that of not knowing how my DAW (Pioneer Rekordbox) is managing this. I MUST always add a MIDI file with their interface to manage the controller itself directly, in addition, to having BOME MTP manage the LED On/Off. So, per the limitations of Rekordbox, not sure how much I can do with BOME.

I will start by testing out both ideas....(1) your approach, and, (2) the one just submitted by Steve.

Thanks to both of you for the continued support, it's appreciated!

.
Last edited by PRKid on Tue Jan 31, 2017 4:39 am, edited 1 time in total.

User avatar
PRKid
Power User
Posts: 33
Joined: Thu Dec 29, 2016 6:44 pm

Re: Toggling LEDs while turning LED bank Off - Kontrol F1

Post by PRKid » Tue Jan 31, 2017 4:37 am

sjcaldwell wrote:The approach I take is a little different. Any time I change a value that affects an led I set a global variable (dirty) bit.

I then have a recurring timer the goes off periodically and refresh all led states if the dirty bit is set. Then I turn off the dirty bit.
It may consume more cycles but then I don't have to remember to start a timer every time I change a global variable that varies led states.

Just a matter of preference. Either approach works but I suspect mine consume a bit more cycles. However I can adjust the
frequency of the recurring timer if it starts getting in the way of things.
.
Steve, I am not fully following/internalizing the 2nd paragraph....your explanation on how to use the global variable. Any additional insight for this "wanna-be midi programmer still going thru the learning curve" would be great. Thanks!

Luis
.

User avatar
sjcaldwell
Power User
Posts: 167
Joined: Tue Sep 20, 2016 11:05 pm

Re: Toggling LEDs while turning LED bank Off - Kontrol F1

Post by sjcaldwell » Tue Jan 31, 2017 4:59 am

Well in my project I have a bit mapped variable with 16 bits. Each bit on is LED on and each bit off is LED off.
The led's I'm controlling is on my Novation Mini. The LED represent "enabled channels". Bit 0 = Midi Channel 1 and Bit 15 is midi channel 16.

So if I want to enable midi channels 1 and 3 for instance, the bit map would be 0000 0000 0000 0101 or in hex it is 0005.

For illustration purposes lets say the variable is ga.

Then I have another global variable (gd for "global dirty")

Any time I set the change the value of ga I set the value of gd to 1.

I have a recurring timer that monitors the value of gd and if it is set to 1, it goes through the bit map of ga and sets the state of
)each led represented in ga by sending either note on (LED on) or note of (LED off) to the appropriate led.

(actually I do a bit more since I color code my channels based on the device I am using. Sometimes I sent note on with green
velocity (my korg), or red velocity (my nord) or amber velocity (my hammond), the led color is based on note velocity)

The only reason I use bit map variable for led is to reduce number of global variables I need for the project. (Novation mini has a matrix of 80 buttons/LEDs ).

I also use buttons/LEDs for Rotory speaker control, expression pedal assignment and a few other things. I can even reset my project with push of a button.


Manipulating the bit map requires extra thought and overhead however it is worth it to me to save on creating 64 different global variables.

If you want to dissect my project you can see it in action here.

There is lots of other stuff going on. I tried to self document it but I'm sure you would have questions which I am happy to answer.
And yes, there are probably still some bugs in the version above. I tend to fix things and add features every week.

It is a hodge podge of the various techniques I've learned since I've been running MTP.

User avatar
PRKid
Power User
Posts: 33
Joined: Thu Dec 29, 2016 6:44 pm

Re: Toggling LEDs while turning LED bank Off - Kontrol F1

Post by PRKid » Tue Jan 31, 2017 7:35 pm

Thank you so much for the detailed explanation. In addition, I will be reviewing your current config of the Alesis/Launchpad Mini. I will certainly give this a shot. Your methodology got me thinking that maybe I can even control the state of other pads, yet, I will have to think a little bit more about what I'd like to do. Below is a pic of the Kontrol F1....

Image

The last row (4 orange small pads) is the one I want to enable as Decks 3/1/2/4 (sequence the Pioneer Rekordbox uses). Section one is pretty straight forward since these will be single assignments for each of the Decks (Faders/Knobs - Volume/Trim). Now, sections 2 & 3 (with the exception of the Browse Knob) will be assigned per the Deck selected on the last row. Thus, once I select a Deck, section 2 & 3 will act as a single Deck controller, including a 2nd set of controls when using the SHIFT pad.

I think I might be able to get most of this within Bome MTP, yet as I mentioned before, not sure about the interaction with Rekordbox. Rekordbox does not enable the use of same pads/buttons for different functions since (in addition to the Bome file of actions) you still need a mapping inside Rekordbox to manage the Kontrol F1....if not, nothing happens even if you pick the Bome Virtual MIDI. What I just described, does it make any sense to you?

Thanks!

Luis
.
Last edited by PRKid on Tue Jan 31, 2017 10:26 pm, edited 1 time in total.

User avatar
PRKid
Power User
Posts: 33
Joined: Thu Dec 29, 2016 6:44 pm

Re: Toggling LEDs while turning LED bank Off - Kontrol F1

Post by PRKid » Tue Jan 31, 2017 8:02 pm

.
Forgot to mention, I had been able to get just the LEDs to work properly with Bome MTP, yet, messed up upon using within Rekordbox. Here is the post from the Q&A area...

http://www.bome.com/support/kb/how-to-t ... Fjaw%3D%3D

Post Reply