-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add additional segment options when controlling over e1.31 #3616
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've also not added a docs PR yet, if that would be helpful for reviewing this PR let me know and I can expand upon the additional effect options in the |
That would be nice. And helps to understand and must be provided nevertheless. I don't have 2d matrix to test :-( For real user testing, post into wled discourse, hopefully someone is able to test it, good luck .. |
@mxklb I've also added documentation for this feature over at wled/WLED-Docs#179. I'll see if I can get someone else to verify this build. It only requires WLED be configured with a 2D strip to enable those options in the UI to verify. |
Discourse thread can be found at https://wled.discourse.group/t/validation-requested-for-expanded-segment-effects-over-e1-31/10522. Also for those catching up, I'm also available in the WLED Discord as |
97e20fe
to
6e3a96b
Compare
I'm sorry but I still have trouble understanding why the complexity of the code. IMO if your intention is to enhance E1.31 data received by WLED (in particular field 5) to include every segment option then why not simply use field 5 as a segment option bitfield? Well, not directly but something like:
There is no need for |
As far as I know, macros in standard DMX mostly utilize the full channel range of 255 possible values. Dividing the full range into X possible macros is a best practice. I think this is due to most DMX hardware consoles use sliders to adjust channel values - single value steps are mostly hard to adjust, depending on the DMX console used. Why not use equidistant range for all possible options|states? Actually you say in documentation you have 128 marcos (=possible options|states) but I can only see 9 in the documentation table you provided. Isn't it uncommon for DMX to use bit fields? I don't know exactly, but I've never seen DMX fixtures that use them, maybe I'm wrong.. @demophoon do you know commercial DMX hardware that uses such approach for controlling macros, can you give an example? If so, please post link to data sheet/manual, as an example.. DMX fixture manuals in general mostly show simple value ranges (like 0..50,51..100,..) to adjust macros - at least all manuals I looked into.. In current code (mainline) the option channel is implemented to switch all possible combinations of 2 options (X: mirror & reverse) = I think the more clear/easy you get it, the more uncomplicated UX you can expect (also true for code). |
P.S. Using first 4 macro ranges for 1D and following ranges for 2D options would also gain UX. |
|
Is this not the case for the Effect ID and Palette ID channels? They appear to be different at individual steps with a swath of the dmx range being unused. I was treating the segment options channel similarly where it would be assumed that a user would put an id in and get the options that they wanted out.
The current implementation in mainline can be implemented as a bitfield, you just use
Admittedly I am very new to commercial DMX hardware and only have experience with lighting software and controlling them with the MIDI boards I have laying around the house.
In 1D the only options that are applicable are Mirror and Reverse. Each option can occupy 2 states and thus the total options is Perhaps this feature is more appropriate as a separate DMX mode which includes an additional 3 channels. 1 channel that copies the structure of main's X-axis options, 1 channel for 1D to 2D mapping (also split into 4 ranges across Also thanks to both of you for taking the time to discuss this with me. |
I have not attempted this without the |
As I don't have any experience with DMX or E1.31 I cannot say anything contextual. |
This is true. It was done because already more than 128 effect IDs existed during implementation, so it didn't make sense to combine some into value ranges and some not. It made more sense to keep upper values unused, to be used by future upcomming effects IDs. Think of MIDI slider, it can only handle 128 states, so it will never be able to select more than these states. It is already an "issue" of the current implementation. With grandMA hardware, we had trouble selecting effects and palettes precisely via slider. As solution we made a fixture with each effect and palette accessible directly as a macro. Configuring custom lights for DMX hardware is one time setup, i.g. dependent on the vendor, if not open sourced - I think QLC+ can use OFL. Finally: Of cause it's okay to do single steps, but should be avoided if just some small amount of macro states shall be triggered. Combining ranges helps to be more accessible by (also cheap) DMX hardware, so it should be best practice.
Implementation detail shall have no effect to the end user. So if bitfield usage does the same, this is totally fine.
As mentioned above, with MIDI 7bit values transformed to 255 DMX values, it's not possible to perform single steps precisely. Of cause in MIDI world combining two 7bit CC could do so, I think it's call fine control or something like that ..
This I did not know, due to lack of 2D matrix usage. So there really are 128 options = macros. All right!
Because the effect channel already combines 1D and 2D effects, I don't think it makes sense to introduce special 2D modes with more channels. And of cause more channels per segment means less segments to be controlled (due to max 512 channels per DMX universe). Actually (I haven't tested) it should behave the same as in current implementation:
Doing so makes it backwards compatible, at least for 1D mode none. When looking to the docs table you provided, I see e1.31 values for mirror and reverse for 1D are already backwards compatible. That is really good! So DMX scenes saved for current 1D options shall be unchanged by your updated option channel value usage. Good work! Thank you for your contribution. P.S. In documentation it would be nice to write down all 128 combinations explicitly. This helps users to understand how to trigger wanted options. Otherwise everybody has to figure it out by them self. This must be done regularly, each time you have to configure your WLED DMX fixture for your desired DMX hard/software. I know it is a pain to do so, but may be useful for others to later copy & paste into DMX fixture definitions. This is what I think, nice to have, but not a must .. tbd By the way, the docs you provided are already self-explanatory. |
Entirely reasonable. I think one thing that I could do with this information is to make it so that the steps between each option are at least 2 values by shifting the options from This would make it so that the following values would be needed for each segment option.
That is context that I definitely missed and appreciate the callout.
I'm happy to do that for clarity. I actually already had that work done because I needed it for my custom fixture definition in QLC+ (Also happy to provide if desired). A python script took care of it for me so it won't take long at all. I mainly didn't want to muddy the documentation with features that I don't imagine many folks will be using considering there is many more options compared to a single 1D strip. I've updated the docs PR to list out all the effects in the table. |
@mxklb as you are my reference for DMX stuff, can you take the time and test this or validate that the change will not break existing stuff? Thank you. @demophoon please re-base this for 0_15 branch or wait until 0.15 hits beta. |
Before this commit it was only possible to control mirror and reverse on a 1d segment. All of the other options for 2d effects could not be set and thus they would be kept disabled. This commit replaces the Effect Option dmx channel with a bitfield which allows for each segment option to be individually toggled depending on which bit is set in the field. Backwards compatibility has been maintained with existing 1d segment options.
Due to the midi interface being difficult/impossible to increment on values of 1 because it has 7-bits of granularity, this commit moves all the bitfields for configuring segment options left by one which guarantees that every option has 2 values next to each other. This allows midi controllers to more easily select an individual segment option for 2D arrays.
023eab3
to
9e54de8
Compare
@blazoncek Rebased to |
Thank you. |
I'll test if it brakes my 1D strip DMX setup when I find time to.. But sadly I don't have 2D matrix to test new options. Would be nice if anyone else could do some 2D matrix option DMX change tests as well .. |
To compile the branch of this PR I had to manually I'll prepare a controller with this version and come back if I've done some (1D) tests with some of my already saved DMX scenes. I'll check if this version will break any of these scenes.. |
I found time and tested @demophoon 's changes with my 1D E1.31 WLED setup. I can confirm, that it behaves like before. So at least I can say that the changes applied here don't have an effect on older (0.14.*) 1D WLED setups controlled by E1.31. Nevertheless I don't have a 2D WLED setup, so I can't test the E1.31 option changes directly. @blazoncek I think this is save to be merged. It looks implemented properly and as far as I could test, it is backwards compatible. |
@demophoon would you like to share your custom QLC+ fixture definition? That would be nice .. |
Add additional segment options when controlling over e1.31
Before this commit it was only possible to control mirror and reverse on a 1d segment. All of the other options for 2d effects could not be set and thus they would be kept disabled.
This commit replaces the Effect Option dmx channel with a bitfield which allows for each segment option to be individually toggled depending on which bit is set in the field. Backwards compatibility has been maintained with existing 1d segment options.