Lighting up pads for Resolume

elisavage

2016-08-05 02:38:01

Hi all, I have read through the many posts and replies on setting up an APC 40/launchpad for Resolume. I too am attempting to get midi feedback for the leds. Ibanman555 had a great solve for getting the controller to light up when you first open it, which I have followed. Now I am hoping to get the led to change to green when you tap it, and back to red when it is pressed again. I didn't see any conditionals that say onPress if x=b then b=x and then visa versa. I left my APC at home and have a launchpad mini with me, which I hope to set up similarly. The velocity for a specific led color is different than for the apc (which is 1=Green, 3=Red, 5=Amber etc) SO I have been experimenting with the velocities and so far I have found that 3 is definitely red, and 60 is definitely green.

so I have started out with a timer that sets the velocity value of a pad to 03. So on the start a pad will be red(pp=03). I then add a translator that onNote of the pad sets the velocity to 60 and the pad turns green, but despite my attempts at different additional conditional statements I can' get it to switch back. I am probably missing the simple logic where I can make it work using a conditional that skips the next step but I can't think it out. I will attach my project file if anyone has time to help.

Thanks so much for any insight!

Eli
Attachments
Launchpad Mini Light.bmtp
(1.24 KiB) Downloaded 344 times

florian

2016-09-03 15:44:22

Hi elisavage,
sorry for the late reply. Have you been able to fix your project? Otherwise, we'll have a look at it!
Florian

elisavage

2016-09-03 19:03:25

thank you for replying, I know you all must get swamped and I appreciate your hard work and insight. No I haven't been able to solve this as of yet, I had another midi controller (a native instruments kontrol f1) that has a control editor that you can easily program light function. It is not ideal however, I would much prefer using bome because it will give me greater in-depth functionality. I am still trying to figure out the correct syntax for a Boolean - on press if light is green make light red, if light is red make light green.

Cheers,
Eli

florian

2016-09-13 23:44:59

Hi,
there are a few things to consider:
  1. when pressing a button, the Launchpad does not send the velocity of the current color. Therefore we need to remember ourselves the color of each button.
  2. to remember state across translators, use global variables, e.g. two-letter variables starting with g.
So let's use g0 for the upper left button on the Launchpad. Then we set it to 3 if it is currently green, otherwise to 60.
Now for flipping, a naive way would be this:

Code: Select all

if g0==3 then g0=60
if g0==60 then g0=3
However, Rules are executed one after another. So the first line will set g0 to 60, and the second line will also match then (because now g0 is 60), therefore it will set g0 back to 3.

A correct way is to use a temporary local variable:

Code: Select all

pp=3
if g0==3 then pp=60
g0=pp
It is a bit clumsy, but somewhat self explanatory. A more optimized way, but less readable is this one liner:

Code: Select all

// alternate g0 between 3 and 60
g0=63-g0
Such optimized code should be commented so that you still understand it when looking at it in a year from now...

Attached is an example project for doing this for the entire first row.

Hope that helps!
Florian
Attachments
Launchpad Mini Light2.bmtp
(4.82 KiB) Downloaded 274 times

sjcaldwell

2016-11-03 15:33:54

Is there any documentation for the Launchpad midi that shows what is sent when each button is pressed and what commands it receives to light up the various lights? I looked at the use doc but did not find anything.

florian

2016-11-07 15:10:54

Hi, I guess you'll need to use the normal Launchpad programmer's guide:
https://d19ulaff0trnck.cloudfront.net/s ... -v1-02.pdf
Note: in MT Pro, when entering raw hex MIDI data, do not enter the "h" in the hex numbers, e.g.:
F0 00 20 29 02 18 22 00 F7

Regards,
Florian

sjcaldwell

2016-11-07 15:17:41

florian wrote:Hi, I guess you'll need to use the normal Launchpad programmer's guide:
...
Florian
Well the Mini doesn't have RGB so guess I will have to experiment to see what color pallet gets applied.

florian

2016-11-07 23:17:43

ah, that's why the "colors" behaved so strangely when trying the Pong game on the Launchpad Mini (the project file is in the MT Pro example files, and on the BomeBox by default) :)