Jump to content
sadicus

CAL - Select every othe midi note no matter the pitch?

Recommended Posts

What are some ways to Select every other midi note no matter the pitch, or duration? Just whatever note is next.
perhaps a CAL script could do this?

 

 

Share this post


Link to post
Share on other sites

I've got no great way to do this, but this is the best I've found...

Select all in the event viewer (showing only notes)...

CTRL+CLICK every other one.

You can then shift to Piano Roll View and have every other note selected.

Edited by Gswitz

Share this post


Link to post
Share on other sites

If they fall consistently on or near the the same beat(s ) in every measure, you may be able to do it using Select by Filter with the appropriate beat and tick windows defined, but you might need to do it in two or more passes. I presume you want to move or process them somehow...? 

CAL could very likely do the processing for you, but I don't think has the capability to make a multi-event  selection for you and then exit to let you do something with that selection. It just processes an existing selection, working through the array one event at a time.

Share this post


Link to post
Share on other sites
3 hours ago, sadicus said:

What are some ways to Select every other midi note no matter the pitch, or duration? Just whatever note is next.
perhaps a CAL script could do this?

I have hundreds of CAL files in my collection, not single one mentioning selecting notes in such fashion (every other notes). But it is possible to create one to do the job.

I think Gswitz suggestion is the easiest way.

Share this post


Link to post
Share on other sites

oThanks all,
@James ArgI know 0 about CAL except how to use it. Also I might have some of the same scripts you do but if your willing to share please post a link!
@Gswitz, this method is why i'm seeking a cal script. The notes are not consistent and I just need a way for it to read left to right and select every other note no matter the pitch or length.

CAL challenge for anyone interested!

Share this post


Link to post
Share on other sites

well it's a solution and this will now be a good reference post for others, thanks for contributing!

Share this post


Link to post
Share on other sites
13 hours ago, sadicus said:


@James ArgI know 0 about CAL except how to use it. Also I might have some of the same scripts you do but if your willing to share please post a link!
@Gswitz, this method is why i'm seeking a cal script. The notes are not consistent and I just need a way for it to read left to right and select every other note no matter the pitch or length.

CAL challenge for anyone interested!

 

On 9/19/2019 at 8:45 AM, James Argo said:

But it is possible to create one to do the job.

I took sometime to read the CAL help files from the archive,  then I just realize, I think I was wrong when I say it is possible. I even tried to create a script and test it, it does not work. In my understanding, CAL does not have any "select" function unless you specify the (limited pre-programmed) action after you select some events. For example, CAL may work to select certain events and copy the selected event to new track automatically, but may not work to select and show you the selected events. The problem with CAL is not stop there. Most CAL function does not work in x64 environment. Most CAL script I tried works in Win XP + Sonar 8.5, failed to run in Win7 x64 + CbB. So, sorry I can't help that much, at least I tried.

  • Like 1

Share this post


Link to post
Share on other sites

The nearest you could get with CAL would be to copy the events to another track, then delete/update every other note.

But in saying that, whatever you're wanting to do AFTER the select might be possible in CAL.

So rather than trying to get CAL to select every other note (which it can't), what you can do is skip every other note an actually perform the operation you were going to do after you'd selected them.

  • Like 1

Share this post


Link to post
Share on other sites

This is a CAL script that I wrote that should do the task. 

After selecting all the notes, run the script.  It asks the nth number of notes to select - in your case , you enter 2

Every nth note will remain selected.

(do
    (int note_number 1)
    (int even 0)
    (int nth 2)
    (getInt nth "Please enter nth note" 2 50)
    (forEachEvent
        (if (== Event.Kind NOTE)
            (do

                (= even (% note_number nth))
                (if (== even 1)
                    (do
                    );exit do
                    (do
                        (delete)
                        (insert Event.Time Event.Chan NOTE Note.Key Note.Vel Note.Dur)
                    )
                );exit if
                (++ note_number)    
            );exit do
        );exit if
    );exit for
);exit do

Edited by Promidi
Additional information
  • Thanks 1

Share this post


Link to post
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...