Jump to content

Is this possible with CAL


Recommended Posts

Is it possible to break from a (forEachEvent) function? I know (break) and (return) do not work, and (exit) ends the script execution entirely. Perhaps there's a (goto) at least?

Or, is it possible to (delete) an event outside (forEachEvent) function, e.g. by its index in the selection?

Or could I iterate over events without calling (forEachEvent)?

The reason for the question is that the default, bundled undupe.cal doesn't work with polyphonic sequences. So I wanted to write my own, but it seems it's pretty much impossible at this point. My last hope is for some undocumented features of the language to be there like a loop break I asked above.

Any other ideas are welcome of course. I guess the edit commands could be useful but I feel lazy to dig into those if there's a way to avoid them.

Link to comment
Share on other sites

Looking at my CAL scripts I found this RemoveDupNotes that I guess I wrote (don't remember it to be honest).  It does duplicate note removal on polyphonic sequences by processing each MIDI note lane.  Not sure it really works though, but it might be a start.  I bet it's pretty slow.  There is a bunch of debugging stuff commented out if you find it's not working for you.

 

RemoveDupNotes.cal

  • Great Idea 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...