Mick Hamer Posted February 12, 2022 Share Posted February 12, 2022 I’m trying to analyse two polyphonic midi sequences as part of a project to analyse the accuracy of wave to midi software. Many of the notes in one sequence are duplicated in the second sequence, with onsets a few ticks apart. Some notes aren’t duplicated. If I put the two sequences on different tracks RemoveDupNotes.cal does a good job at removing duplicates, but the output is random; sometimes it’s a duplicate from track 1 that remains, sometimes track 2. What I’d like to do is to identify which notes in track 1 are duplicated in track 2 and then remove the duplicates from just one track. Does anyone have any suggestions how to modify this script to achieve this? RemoveDupNotes.cal Link to comment Share on other sites More sharing options...
Glenn Stanton Posted February 12, 2022 Share Posted February 12, 2022 this looks like it's intended to run on a single track. one option - lock one of the clips so the delete cannot happen. Link to comment Share on other sites More sharing options...
Mick Hamer Posted February 13, 2022 Author Share Posted February 13, 2022 Thanks Glenn, I'll give it a go Link to comment Share on other sites More sharing options...
sergedaigno Posted February 13, 2022 Share Posted February 13, 2022 Create a Cal script which assigns a specific channel to note events into each track (forEachEvent (do (if (== Event.Kind NOTE)) (= Event.Chan 0)) ; any chosen channel )) you know then which note belongs to which track and can use into RemoveDupNotes.Cal, something like (if (== Channel Event.Chan)) ; Link to comment Share on other sites More sharing options...
Mick Hamer Posted February 13, 2022 Author Share Posted February 13, 2022 Thanks to both Glenn and Serge for your input. Locking the track just means that that the script doesn't detect any duplicates. But your suggestion, Glenn, did force me to use the 2021 Cakewalk by Bandlab (I normally run CAL scripts in my aged Cakewalk Pro 9.0) and I found by accident that the script removes duplicates from track 1, and only track 1 in the 2021 edition, which essentially solves my problem. Why the script should behave so differently in the two editions, I don't know Link to comment Share on other sites More sharing options...
Glenn Stanton Posted February 13, 2022 Share Posted February 13, 2022 maybe something got fixed so which ever track is selected first is the "primary one"? there are a number of software products that behave like that, and its possible someone called out the arbitrary nature of running a CAL on two or more tracks and the Bakers decided to force the first selected as primary. for myself, i simply merge two (or more) tracks into a new single midi and then run my CAL (or MIDI plugin) on that. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now