Change automation with script editor
Hi, I made this :
function HandleMIDI(event)
{
if (event instanceof ControlChange && event.number == 64)
{
if (event.value > 0)
{
event.value = 127;
event.send();
event.trace();
}
else
{
event.value = 0;
event.send();
event.trace();
}
}
else event.send();
}
it's work fine but this does not update the automation when I record. How to do it?
This script was made for transform CC of sustain pedal to have a binary result (0 or 127) and obtain a clean result on the automation.
Thanks in advance for you help.
MacBook Pro 16″