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″

Posted on Jun 12, 2024 2:36 PM

Reply

Similar questions

There are no replies.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Change automation with script editor

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.