Illuminated Piano used for note triggered tracking

First off I’d like to that David-san for the illuminated Piano gig file.

I made an edit to it so as to be more of a basic tracker for keys that are pushed during a performance. Instead of the keys reacting from velocity with the color changing when pushed and back to the original state upon release, I have them returning to a shaded value.

I’m triggering many choir and effect samples on the lower end of my 88 note controller and playing orchestra parts on the upper end.
I sometimes do not remember exactly which key I last triggered, so I can trigger the next one when I return for the next sample. This visual cue works great with the sample section split so only the lower section keys turn grey, and stay that way.

What I’m having a problem with is getting it to reset all the keys to their initialized color/state with a switch widget when I’m finished. I want to use midi cc11 with a pedal to reset.

I’ve read over the scripting documentation, but have no background in programming languages. I’ve tried many attempts to send an “initialization callback” from the switch widget, or if it would be from a midi cc callback? I get either syntax errors. Don’t know if I should use an initialization callback or an activation callback or some other callback and not sure what the declaration or statement would be. Tried these but nothing resets it unless I run the “compile” command from the script editor.

Yea, I’m lost without someone guiding me through this with real world examples.
I know it should be a simple thing… :frowning:

Here is the script I’m using with the changes I’ve made that work, but can’t figure out how to reset it.

If I understand what you want, remove the line


of the On NoteOffEvent callback

Then you will need something to reset the keys, but you can already tell me if this is what you want…

Thanks for the quick reply.
I’m going to attach the rackspace file I’m using. This is just a a rack I have for visual display. It’s not actually triggering anything.

You will see that a key press for example on a White key goes about 90% dark, then upon release they go to maybe a 60% value, and stays that way. This is what I want.

I have a switch that I want to reset the keys back to White. That part is the issue I’m having trouble figuring out.

88 keys.rackspace (1.1 MB)

I am not in a position to test your gig file immediatly, but in the meantime, you can replace this:


by this:


@krucible, here is a modified version of your rackspace, please tell me it it makes your day? :wink:

88 keys_2.rackspace (1.1 MB)


Thank you so much. Works like a charm!
Exactly what I was trying to get it to do. :smiley:
I did have one question though. When loading the rack, I get a message saying it was made with a newer version of GP and to download the latest copy. I’m using version 4.5.8 so I assume you are using a Beta version of GP. Just wanted to make sure.
Exported with my version, and the message appears no more so no issues.
Once again, thanks!!!

Hi @krucible, regarding the version number warning I probably did something which is not in the GP manual :grimacing: But it won’t be an issue for you. What you did is perfect. Happy it works for you. :cry: