Initialise automatic keyboard colouring
-
Hi All,
Pardon me if someone has asked this before, I searched and couldn't see.
Followed @d-healey's video to automatically colour my keyboard which is working great, however when I'm using the exported instrument, the keyboard doesn't colour in until I change a sample map, even though the plugin instantiates with samples loaded and makes sound.
Is there a way to have the plugin run this check and colour in when instantiating?
Thanks,
Chris.
-
@bfaudio Anybody?
To give more info, I followed the autocolor keyboard video and its worked great on my previous instrument, which was simpler and had no SampleMap menu, just a single set.
This instrument has 6 different maps, with 2 menus to access these, and a preset browser.
The samples load straight away, but the keyboard doesn't colour.
If I change to a different preset, it colours.
Is there anyway to get this to colour when the plugin is instantiated?
Has anyone else had this?Thanks
Chris
-
@bfaudio is your "PaintKeyboard" an independent function you could just call it on init delayed with a timer maybe?
-
@bfaudio so guessing what is happening is on first load your "keyboard colouring" is happening before the samples are loaded, so no sample data = no colouring.
Try running your keyboard colouring code in the post-sample load callback.
-
@ulrik maybe... I haven't played with timers yet.
-
Solved.
Simply copied 'setKeyColour();' out of the 'inline function' keyboard part of the script and put it on its own line.