Comments (8)
The thing is, you can configure MIDI channel for each LED individually, so hardcoding brightness against MIDI channel 2 wouldn't really work. I'll think some more about this.
from opendeck.
With the v5.1.0 release, I've added initial infrastructure for handling LED brightness, although the actual brightness control still isn't implemented. Hoping to get it done in next release. I've also completely reworked control values, so you can check the new control table here (spoiler alert: brightness control will be possible in combination with blinking, after all!):
https://github.com/paradajz/OpenDeck/wiki/LED-control
from opendeck.
I am thinking about the best way to implement this while staying compatible with the current system:
https://github.com/paradajz/OpenDeck/wiki/LED-control
What I had in mind was:
- For separate state/blink messages the current values are:
Velocity/control value/program range | Color |
---|---|
0-15 | Off |
16-31 | Red |
32-47 | Green |
48-63 | Yellow |
64-79 | Blue |
80-95 | Magenta |
96-111 | Cyan |
112-127 | White |
In order to implement brightness control, I could simply scale the defined range for specific color to brightness, ie. for red, the values would be something like this:
Value | Brightness |
---|---|
16-20 | 50% |
21-25 | 75% |
26-31 | 100% |
Fits into existing model quite well.
- Combined state and blinking:
Velocity/control value | Color | Blink speed |
---|---|---|
0-15 | Off | No blinking |
16 | Red | 100ms |
17 | Red | 200ms |
18 | Red | 300ms |
19 | Red | 400ms |
20 | Red | 500ms |
21 | Red | 600ms |
22 | Red | 700ms |
23 | Red | 800ms |
24 | Red | 900ms |
25 | Red | 1000ms |
26-31 | Red | No blinking |
32 | Green | 100ms |
33 | Green | 200ms |
34 | Green | 300ms |
35 | Green | 400ms |
36 | Green | 500ms |
37 | Green | 600ms |
38 | Green | 700ms |
39 | Green | 800ms |
40 | Green | 900ms |
41 | Green | 1000ms |
42-47 | Green | No blinking |
48 | Yellow | 100ms |
49 | Yellow | 200ms |
50 | Yellow | 300ms |
51 | Yellow | 400ms |
52 | Yellow | 500ms |
53 | Yellow | 600ms |
54 | Yellow | 700ms |
55 | Yellow | 800ms |
56 | Yellow | 900ms |
57 | Yellow | 1000ms |
58-63 | Yellow | No blinking |
64 | Blue | 100ms |
65 | Blue | 200ms |
66 | Blue | 300ms |
67 | Blue | 400ms |
68 | Blue | 500ms |
69 | Blue | 600ms |
70 | Blue | 700ms |
71 | Blue | 800ms |
72 | Blue | 900ms |
73 | Blue | 1000ms |
74-79 | Blue | No blinking |
80 | Magenta | 100ms |
81 | Magenta | 200ms |
82 | Magenta | 300ms |
83 | Magenta | 400ms |
84 | Magenta | 500ms |
85 | Magenta | 600ms |
86 | Magenta | 700ms |
87 | Magenta | 800ms |
88 | Magenta | 900ms |
89 | Magenta | 1000ms |
90-95 | Magenta | No blinking |
96 | Cyan | 100ms |
97 | Cyan | 200ms |
98 | Cyan | 300ms |
99 | Cyan | 400ms |
100 | Cyan | 500ms |
101 | Cyan | 600ms |
102 | Cyan | 700ms |
103 | Cyan | 800ms |
104 | Cyan | 900ms |
105 | Cyan | 1000ms |
106-111 | Cyan | No blinking |
112 | White | 100ms |
113 | White | 200ms |
114 | White | 300ms |
115 | White | 400ms |
116 | White | 500ms |
117 | White | 600ms |
118 | White | 700ms |
119 | White | 800ms |
120 | White | 900ms |
121 | White | 1000ms |
122-127 | White | No blinking |
In this case I would have to use another message for brightness, which gets kinda confusing, so you either have:
- State/Color with brightness message + blink message
or - State/Color/Blink message + brightness message
Not sure how to deal with this.
from opendeck.
Hi @paradajz ,
Thanks for your reply!
Your proposed solution would totally work for me (if 25% would be an option as well ;) ). Not offering brightness support when blinking seems a valid option. Another solution I could imagine would be offering brightness information as optional via MIDI channel 2. If no information is send, the brightness would stay at 100%, just as it is today.
Thanks and all the best,
Jonas
from opendeck.
Will start implementing this soon, however it will not be available on the current OpenDeck board - only on the next one (v2). I've also decided not to implement brightness control while the LED is blinking.
from opendeck.
from opendeck.
Finally working on this for real. Will be part of next release. Software PWM method will be used so that brightness control is possible on any board and any pin (be it through shift register, native output or in matrix).
from opendeck.
Resolved with 0c98723
from opendeck.
Related Issues (20)
- Blackpill flashing process completes, but device does not appear. HOT 9
- Opendeck 1.2.0 stuck in bootloader HOT 3
- STM32F4 Discovery HOT 13
- STM32F4 Discovery don't AutoSave HOT 8
- Unable to select display I2C adress in web configurator HOT 5
- Igor library? HOT 1
- RPI Pico W + 4067 multiplexer HOT 12
- blackpill401cc - Preset change HOT 1
- Latest firmware for Arduino Pro Micro hex firmware?
- Opendeck M board silk screen wrong label conparing to documentation. HOT 2
- I can't pack the project HOT 2
- LED not turning off HOT 4
- OSC HOT 2
- Problems with china-encoders HOT 12
- Problem with Analog Buttons HOT 5
- Mega 2560 not responding in web configurator HOT 4
- BLE for PICO? HOT 1
- nrf52840dk firmware doesn't work HOT 2
- Change leds blink time for PWM HOT 9
- Need help for arm board HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opendeck.