Jump to content

Cal to split clip at measures


jm52

Recommended Posts

13 hours ago, jm52 said:

Cal to split clip at measures

Anybody?

One would have to be written.

However, I am pretty sure the resultant notes would end up being in the same clip.

Note: CAL scripts operate on MIDI events only.

Link to comment
Share on other sites

On 4/11/2025 at 3:32 AM, Bristol_Jonesey said:

You don't need a cal to do this

Right click the clip, choose Split, then enter these values

image.png.4853850f10018cb71e24c97b3a72db2e.png

Thank you for this... I don't use the program enough to know everything.

I have coded many CAL scripts for all kinds of stuff.... So, thought that was the way to go...

Also,,, reviewing CAL commands i could not find 'split' in any form.

Link to comment
Share on other sites

14 hours ago, jm52 said:

Thank you for this... I don't use the program enough to know everything.

I have coded many CAL scripts for all kinds of stuff.... So, thought that was the way to go...

Also,,, reviewing CAL commands i could not find 'split' in any form.

No there is not a CAL split command.   You would have to write the code to do the splits.

To split all selected notes at measures, you would have to shorten the duration of any notes that cross at least one measure threshold.  Then use the INSERT command to add any subsequent notes until the duration of the original note.  If course you would have to account for notes that cross more then one measure threshold.

There would be a few Beat , MakeTime and a Do While loop in there somewhere...

Does this CAL script do what you are after?

 

Split Notes to Measures.CAL

Edited by Promidi
Fixed Script to use Correct MIDI Channel.
  • Like 1
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...