just to thank you guys, I did this code above of my reply and did some editing for 4 samplers and 4 keyboards, I hope it help a newbie like me.
const var Sampler1 = Synth.getChildSynth("Sampler1");
reg i;
for (i = 0; i < 127; i++)
{
if (Sampler1.asSampler().isNoteNumberMapped(i))
Engine.setKeyColour(i, Colours.withAlpha(Colours.blue, 0.2));
}
const var Sampler2 = Synth.getChildSynth("Sampler2");
reg i2;
for (i = 0; i < 127; i++)
{
if (Sampler2.asSampler().isNoteNumberMapped(i))
Engine.setKeyColour(i, Colours.withAlpha(Colours.yellow, 0.3));
}
const var Sampler3 = Synth.getChildSynth("Sampler3");
reg i3;
for (i = 0; i < 127; i++)
{
if (Sampler3.asSampler().isNoteNumberMapped(i))
Engine.setKeyColour(i, Colours.withAlpha(Colours.orange, 0.3));
}
const var Sampler4 = Synth.getChildSynth("Sampler4");
reg i4;
for (i = 0; i < 127; i++)
{
if (Sampler4.asSampler().isNoteNumberMapped(i))
Engine.setKeyColour(i, Colours.withAlpha(Colours.red, 0.3));
}