Toggle Potentiometer LED color with a Button on PBF4
Автор: intechstudio
Загружено: 2024-04-17
Просмотров: 1134
0:00 Intro
0:27 Set the toggle
4:17 Correcting the LED init
5:37 Outro
Toggling a potentiometer's LED value with a button on the PBF4 module using global variables:
1) Open Grid Editor
2) Go to system event/init, and open the code block to initialize the tables
code to write:
l_1 = {255, 0, 0}
l_2 = {0, 255, 0}
Since they don't have prefixes, these are global variables, which means they can be accessed from any control element on the module
3) Go to a button and edit the existing code block:
code to write in the If section:
led_color(0, 1, l_1[1], l_1[2], l_1[3])
meaning:
0 - control element index (counting starts at the top left corner so 0 is the top left potentiometer)
1 - layer 1
l_1[1] - l_1 Red value
l_1[2] - l_1 Green value
l_1[3] - l_1 Blue value
code to write in the Else section:
led_color(0, 1, l_2[1], l_2[2], l_2[3])
4) To initialize the LED correctly, you have to go to the chosen potentiometer/init:
set LED values:
r - l_2[1]
g - l_2[2]
b - l_2[3]
ABOUT US
Intech Studio is a Hungarian open-source tech startup. We empower digital creatives through our modular MIDI controllers, called Grid.
https://intech.studio/
SHOP
https://intech.studio/shop
FOLLOW US
Facebook / intechstudio
Instagram / intechstudio
Tiktok / intechstudio
Wanna get in touch? DM us on Discord!
/ discord
Join our Newsletter and stay updated!
https://intech.studio/community/newsl...
#MIDIcontroller #IntechStudio
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: