Hey all! I'm trying to get colors to switch automatically on my EN16 when I click on a track and I was hoping I could get some help with the last mile.
How do I setup LED color in EN16? led_color() gives me inconsistent results
Replies (49)
I'm trying to send a MIDI message using a different command code (EN16 uses 176) with the color index of the track, a number between 0 and 70-ish
I created a setup function self.midirx_cb that receives encoder values and led intensity from the Intech remote script and updates then when you switch tracks
And I created my own remote script that can also send MIDI messages with encoder values using command 176, I can see them in the Editor debugger
But when I try using a different command value (let's say 111) on Ableton with self._send_midi, I get an error on the debugger
I noticed the values of the midi status byte and the command value are both 176 (0xB0)
I ended up using 0xB0 for CC with param = 100
I wrote a table with hex values to map the color indexes and a function to parse it into RBG
All that's working now, except I cannot change the led colors
I tried with led_color_min / mid / max, the functions from docs don't do anything
I switched to led_color(), for some reason it assigned the RGB to the dimmest value of some LEDs but not all of them and the intensity was inconsistent
led_color_min/mid/max work for setting up a default state, but to change the color immediately you need led_value, not led_color
At least I think that might be the issue?
I'm already using led_value to update the intensity, it works - I read the current value when I switch to another track and update the intensity with that function, it's all part of the same loop just a different if block for my messages with param = 100
I have default blue layout and I attempt to switch to red. For those LEDs where the call works it gets mapped to zero, you have to turn the knob all the way to see the color and intensity at zero won't be consistent (some will be a dim red and other deep red)
Ideally I would like to change the color both immediately and as default so that when I turn the knob it stays on the right color
I don't think 111 is a valid MIDI command value range?
the MIDI implementation uses 176 as the command range for for all Control Change values.
Yes, I learned that everything in the lower half is treated as data and only the higher bits are valid
As I mentioned in a subsequent message I'm now using 176 (0xB0) with a param=100, or element number = 68
I think the simple color in the encoder element is what's interfering
I deleted it and got color working in a knob of I set the current color AND set min + mid + max
But I don't think I'll have enough code characters this way lol
the Remote Script stuff is a little beyond me, but there's a forum post that seems like someone got something like this working?
Thanks, I looked at it at some point yesterday, I'm already beyond that point
It was the simple color settings after all
I simplified my code and I still ran out of memory when trying to implement the RGB lookup table
Now I'm pushing the table to the python remote script and I think that should be it 😄
Actually that won't work because I'm limited to 127 max value, which was the reason I was sending the color index in the first place...
I guess I need to either hack a way to send the 6 RGB hex values or use a sysex message at this point
If you figure this out, you will be goated
I think I can use globals to parse six custom MIDI commands and check if all of them happened already
Another idea is using 3 midi messages instead of 6: divide each RGB / 2 on Ableton side, then RGB * 2 on grid
I tried sysex, it currently has a bug 🐛 🙁
Ufff, I finally got it working using 6 custom MIDI CCs, 100-105
Dropping all UI elements for ifs and vars and using a single code block instead gave me like 200 extra chars
Now I'm working on enabling color on button press, I had to get rid of it too to get the colors working properly
closing the loop here, I got it working: https://discordapp.com/channels/761513181696098335/783377796335403078/1450080242088673436 🥳
The hero we deserve
hey @user! I wanted to check out your track color profile, but I don't think it's set to public visibility?
Hmm maybe I didn't do it properly, let me take a look
@user ok, I opened the grid editor and the upload button was there, but I swear I had done these steps already...
grid-editor://?config-link=kIxQFouXLPmHWYolJhuz
@user do you mind trying again? 🙂
@user yes! thank you
For the record, I wrote this on my first two days. Now I understand I could have used my global vars as RGB values for the UI color elements. Their default values are -1 and I wrongly assumed this was some smart placeholder for whatever was the value stored in self. Instead, the UI in the enconder elements was setting it LEDs to blue while I was trying to set them to another color in system's MIDI RX. To change values on the fly you still need to call led_color and led_value, tho.
View on Discord
This post is from the Intech Studio Discord community.
