Remove duplicate MIDI notes?

Author
bluzgtr
Max Output Level: -90 dBFS
  • Total Posts : 5
  • Joined: 2006/05/27 01:25:34
  • Status: offline
2006/10/13 02:07:43 (permalink)

Remove duplicate MIDI notes?

I have a MIDI track that, for some unknown reason, has a lot of duplicate notes. Is there any way to filter these out, or do I have to go through and manually delete every one?

Thanks for your time.

Larry
#1

23 Replies Related Threads

    JohnrC
    Max Output Level: -83 dBFS
    • Total Posts : 393
    • Joined: 2005/06/25 01:15:02
    • Status: offline
    RE: Remove duplicate MIDI notes? 2006/10/13 02:53:58 (permalink)
    There's a CAL program at ftp://ftp.cakewalk.com/pub/CAL/ in "Remove Duplicate Events CAL.zip". Maybe that'll help.
    #2
    Susan G
    Max Output Level: 0 dBFS
    • Total Posts : 12016
    • Joined: 2003/11/05 22:49:26
    • Location: Putnam County, NY
    • Status: offline
    RE: Remove duplicate MIDI notes? 2006/10/13 03:17:30 (permalink)
    I could've sworn there was a "DUPES.CAL", but I can't locate it right now. Aargh! Maybe someone will come up with it...

    -Susan

    2.30 gigahertz Intel Core i7-3610QM; 16 GB RAM
    Windows 10 x64; NI Komplete Audio 6.
    SONAR Platinum (Lexington) x64
    #3
    luismacedo
    Max Output Level: -87 dBFS
    • Total Posts : 190
    • Joined: 2003/12/12 04:14:52
    • Location: Portugal
    • Status: offline
    RE: Remove duplicate MIDI notes? 2006/10/13 04:10:47 (permalink)
    I am not at my DAW right now but my guess is "UNDUPES.CAL".

    Best regards,
    Luis
    #4
    Tosch
    Max Output Level: -89 dBFS
    • Total Posts : 53
    • Joined: 2004/06/18 02:28:58
    • Location: Germany
    • Status: offline
    RE: Remove duplicate MIDI notes? 2006/10/13 04:38:56 (permalink)
    hi bluz!

    You have to Downloald the zip-file mentioned above, unzip it, and put the File "UNDUPE.CAL" in your CAL-Folder...

    best
    Tosch;)
    #5
    JohnrC
    Max Output Level: -83 dBFS
    • Total Posts : 393
    • Joined: 2005/06/25 01:15:02
    • Status: offline
    RE: Remove duplicate MIDI notes? 2006/10/13 10:28:45 (permalink)
    So to combine above posts...

    Go to ftp://ftp.cakewalk.com/pub/CAL/

    Download the file called "Remove Duplicate Events CAL.zip".

    Unzip that file to get "Undupe.cal"

    Run "Undupe.cal" on the track to remove duplicates and maybe it'll do what you want.
    #6
    bluzgtr
    Max Output Level: -90 dBFS
    • Total Posts : 5
    • Joined: 2006/05/27 01:25:34
    • Status: offline
    RE: Remove duplicate MIDI notes? 2006/10/14 01:22:21 (permalink)
    Hey, thanks for all your help! I've never gotten into CAL (I'm a newcomer to Sonar from another DAW), so now's the time. I'll let you know how it works out.

    Larry
    #7
    Frank2525
    Max Output Level: -90 dBFS
    • Total Posts : 45
    • Joined: 2003/11/06 04:21:18
    • Location: Germany
    • Status: offline
    RE: Remove duplicate MIDI notes? 2006/10/14 08:21:02 (permalink)
    There is a midi plugin called "Delete Doubles" on www.midi-plugins.de that deletes all kinds of doubled, repeated and possibly unnecessary MIDI events: Doubled events, Repeated events, octaves.

    It also allows you to delete doubled notes that have slightly different starting time (and are -for that reason - not "doubled" in a strict sense).
    #8
    Jaybee
    Max Output Level: -82 dBFS
    • Total Posts : 423
    • Joined: 2005/07/19 09:29:59
    • Location: Dayton, Kentucky
    • Status: offline
    RE: Remove duplicate MIDI notes? 2006/10/14 09:15:17 (permalink)
    Hmmm! Now THIS is interesting. There should be an option under Process called Run CAL. However, although it is clearly indicated in the help file under CAL, it does not show up in my Process menu at all. So the question remains, how do I access CAL under S6.01? I've not had a need to use it so far but thought I'd check it out so I could reply within this thread. Ideas, anyone?

    Jerry
    Dayton, KY.
    Sonar 8PE, Project 5v2.5, Music Creator 5, Dimension Pro, Akoustik Piano, Battery 3, B4 II, Kontakt 2 & 3, GPO, JABB, CoMB, VDL 2.5, Garritan Authorized Steinway Model D, True Piano
    AMD 64 3500+, 2GB RAM, Audiophile 192

    #9
    sonomusic
    Max Output Level: -88 dBFS
    • Total Posts : 149
    • Joined: 2005/10/27 21:58:47
    • Status: offline
    RE: Remove duplicate MIDI notes? 2006/10/14 09:20:35 (permalink)
    It's at the very bottom, hidden in a sub menu. There's a thick line, mouse over it and Run Cal will cascade out of it.

    Brian
    #10
    Jaybee
    Max Output Level: -82 dBFS
    • Total Posts : 423
    • Joined: 2005/07/19 09:29:59
    • Location: Dayton, Kentucky
    • Status: offline
    RE: Remove duplicate MIDI notes? 2006/10/14 10:24:18 (permalink)
    Thanks.

    Jerry
    Dayton, KY.
    Sonar 8PE, Project 5v2.5, Music Creator 5, Dimension Pro, Akoustik Piano, Battery 3, B4 II, Kontakt 2 & 3, GPO, JABB, CoMB, VDL 2.5, Garritan Authorized Steinway Model D, True Piano
    AMD 64 3500+, 2GB RAM, Audiophile 192

    #11
    Jaybee
    Max Output Level: -82 dBFS
    • Total Posts : 423
    • Joined: 2005/07/19 09:29:59
    • Location: Dayton, Kentucky
    • Status: offline
    RE: Remove duplicate MIDI notes? 2006/10/14 10:30:56 (permalink)

    ORIGINAL: bluzgtr

    I have a MIDI track that, for some unknown reason, has a lot of duplicate notes. Is there any way to filter these out, or do I have to go through and manually delete every one?

    Thanks for your time.

    Larry


    Under the Process menu, Run Cal and select Undupe. This is included with S6. HTH

    Jerry
    Dayton, KY.
    Sonar 8PE, Project 5v2.5, Music Creator 5, Dimension Pro, Akoustik Piano, Battery 3, B4 II, Kontakt 2 & 3, GPO, JABB, CoMB, VDL 2.5, Garritan Authorized Steinway Model D, True Piano
    AMD 64 3500+, 2GB RAM, Audiophile 192

    #12
    g_randybrown
    Max Output Level: -40 dBFS
    • Total Posts : 3522
    • Joined: 2003/12/24 11:30:04
    • Location: Las Cruces, NM, USA
    • Status: offline
    Re: RE: Remove duplicate MIDI notes? 2012/01/05 18:07:27 (permalink)
    When I try to run undupe I get a dialogue "windows for time identity"....what does this mean?
    Whether I leave it at the default of 0 or enter 100 I get "deleted 0 duplicate events".
    I know I have hundreds of duplicated events in the track...what am I missing here?
    Thanks very much,
    Randy



    G. Randy Brown 
    Windows 10, 64 bit, Platinum
    Intel Core i7-3770S
    Asus P8Z77-V LK mobo   
    4X8GB Corsair XMS3 memory 
    500 GB Crucial BX100 SSD (OS)
    two WD Black 1 TB HDD
    SAPPHIRE DUAL-X 100314-4L Radeon HD 6970 2GB 256-Bit GDDR5 
    Presonus AudioBox 22VSL
    youtube.com/crystalclearnm
    #13
    rogeriodec
    Max Output Level: -75 dBFS
    • Total Posts : 753
    • Joined: 2004/04/09 13:55:04
    • Location: Brazil
    • Status: offline
    Re: RE: Remove duplicate MIDI notes? 2016/07/05 21:08:43 (permalink)
    g_randybrown
    When I try to run undupe I get a dialogue "windows for time identity"....what does this mean?
    Whether I leave it at the default of 0 or enter 100 I get "deleted 0 duplicate events".
    I know I have hundreds of duplicated events in the track...what am I missing here?
    Thanks very much,
    Randy

    +1
    Anyone?

    rogeriodec.com.br


    * Cakewalk By Bandlabs (always lastest versions), Window 10 x64
    * Focusrite Scarlett Solo Audio Interface
    * Intel i7-4790K CPU @ 4.00 GHz / ASROCK EXTREME 4 Z97 Mobo
    * 2 SSD Samsung Evo 250 Gb (RAID-0) + 1 Western Digital 2 Tb + 1 Seagate 1 Tb
    * Onboard video / 16 Gb RAM HyperX Fury 1600 Mhz
    * 3 LCD Monitors
    * Axiom 61 MIDI Controller, Tapco S5 Active Studio Monitors
    #14
    jpetersen
    Max Output Level: -61 dBFS
    • Total Posts : 1499
    • Joined: 2015/07/11 20:22:53
    • Status: offline
    Re: RE: Remove duplicate MIDI notes? 2016/07/06 04:56:41 (permalink)
    It identifies the span of time that defines a duplicated note.
    So if two notes are very close to each other, are they to be handled as duplicates?
     
    But having said that, I have never managed to get the dupe cal script to work.
    Others have had more success, I followed the steps they mentioned, no luck.
     
    #15
    tenfoot
    Max Output Level: -53.5 dBFS
    • Total Posts : 2186
    • Joined: 2015/01/22 18:12:07
    • Location: Qld, Australia
    • Status: offline
    Re: RE: Remove duplicate MIDI notes? 2016/07/06 06:42:37 (permalink)
    I too have had mixed success with undupe.  It seems to work well when the duplicated notes are identical in length etc. If you have notes triggering at the same time but different lengths or velocities, results seem to be less predictable.
     
    A remove duplicates with a few options like ignore note length and velocities would be a great new feature for splat.

    Bruce.
     
    Sonar Platinum 2017-09, Studio One 3.5.3, Win 10 x64, Quad core i7, RME Fireface, Behringer X32 Producer, Behringer X32 Rack, Presonus Faderport, Lemure Software Controller (Android), Enttec DMXIS VST lighting controller, Xtempo POK.
    #16
    Bristol_Jonesey
    Max Output Level: 0 dBFS
    • Total Posts : 16775
    • Joined: 2007/10/08 15:41:17
    • Location: Bristol, UK
    • Status: offline
    Re: RE: Remove duplicate MIDI notes? 2016/07/06 07:01:17 (permalink)
    I also have had mixed luck with UNDUPE.
     
    What I've done in the past is to open the track with the duplicates in Staff View.
    Any duplicated notes are clearly visible as they will be on both sides of the stalk.
     
    It's then a question of identifying them and deleting them. One word of caution, if you do decide to pursue this, when you delete a duplicated it initially removes both notes, but a quick Undo (ctrl + z) will restore just ONE of the notes to it's previous position, which is exactly what you want.
     
    It's a very long winded workaround but also guaranteed to work.

    CbB, Platinum, 64 bit throughout
    Custom built i7 3930, 32Gb RAM, 2 x 1Tb Internal HDD, 1 x 1TB system SSD (Win 7), 1 x 500Gb system SSD (Win 10), 2 x 1Tb External HDD's, Dual boot Win 7 & Win 10 64 Bit, Saffire Pro 26, ISA One, Adam P11A,
    #17
    rogeriodec
    Max Output Level: -75 dBFS
    • Total Posts : 753
    • Joined: 2004/04/09 13:55:04
    • Location: Brazil
    • Status: offline
    Re: RE: Remove duplicate MIDI notes? 2016/07/06 09:40:29 (permalink)
    It's a shame that after so many years Cakewalk continue providing the same scripts that do not work ...
    It makes me want to learn the CAL language to do something more decent ...

    rogeriodec.com.br


    * Cakewalk By Bandlabs (always lastest versions), Window 10 x64
    * Focusrite Scarlett Solo Audio Interface
    * Intel i7-4790K CPU @ 4.00 GHz / ASROCK EXTREME 4 Z97 Mobo
    * 2 SSD Samsung Evo 250 Gb (RAID-0) + 1 Western Digital 2 Tb + 1 Seagate 1 Tb
    * Onboard video / 16 Gb RAM HyperX Fury 1600 Mhz
    * 3 LCD Monitors
    * Axiom 61 MIDI Controller, Tapco S5 Active Studio Monitors
    #18
    rogeriodec
    Max Output Level: -75 dBFS
    • Total Posts : 753
    • Joined: 2004/04/09 13:55:04
    • Location: Brazil
    • Status: offline
    Re: RE: Remove duplicate MIDI notes? 2016/07/06 14:28:14 (permalink)
    Well, I spent a few hours studying the rare and still existing materials about CAL scripts on the web.
    I did some tests and I discovered the cause of UNDUPE.CAL (and other scripts) do not work:
    This is a bug in CAL language.
    Basically events (notes, controls, etc.) should be read sequentially (by commands like forEachEvent), ie, the events should be read in chronological order.
    However, events are read from a TOTALLY RANDOM way.
    Thus, it is IMPOSSIBLE to compare a previous note with a later note, because the script simply NOT BRING EVENTS IN CHRONOLOGICAL ORDER.
    Certainly these old scripts worked in some older version of Sonar, but after that CAL was abandoned, Cakewalk still managed to spoil it.
    As I said, it's a shame Cakewalk still provide CAL if it is no longer supported. Or they correct the CAL or remove it once and for all.


    rogeriodec.com.br


    * Cakewalk By Bandlabs (always lastest versions), Window 10 x64
    * Focusrite Scarlett Solo Audio Interface
    * Intel i7-4790K CPU @ 4.00 GHz / ASROCK EXTREME 4 Z97 Mobo
    * 2 SSD Samsung Evo 250 Gb (RAID-0) + 1 Western Digital 2 Tb + 1 Seagate 1 Tb
    * Onboard video / 16 Gb RAM HyperX Fury 1600 Mhz
    * 3 LCD Monitors
    * Axiom 61 MIDI Controller, Tapco S5 Active Studio Monitors
    #19
    tparker24
    Max Output Level: -80 dBFS
    • Total Posts : 544
    • Joined: 2003/11/06 02:42:14
    • Status: offline
    Re: RE: Remove duplicate MIDI notes? 2016/07/06 18:37:31 (permalink)
    As I recall, the problem occurs if processing multiple clips at one time.  If you work on a single clip, all is well.  So, you'll need to bounce multiple clips into a single clip (or process the clips one at a time).  

    I'm not 100% positive on this, but at least, it's something to try.


    #20
    rogeriodec
    Max Output Level: -75 dBFS
    • Total Posts : 753
    • Joined: 2004/04/09 13:55:04
    • Location: Brazil
    • Status: offline
    Re: RE: Remove duplicate MIDI notes? 2016/07/06 20:42:30 (permalink)
    tparker24
    As I recall, the problem occurs if processing multiple clips at one time.  If you work on a single clip, all is well.  So, you'll need to bounce multiple clips into a single clip (or process the clips one at a time).  

    I'm not 100% positive on this, but at least, it's something to try.




    Yeah, try this:
    1. Open a new project, 1 midi track
    2. Open PRV and create, for example, 10 identical notes, one after another.
    3. Select all
    4. Set all velocities of notes to 10 (Process -> Scale Velocity), so you'll have 10 identical, consecutive notes, all with the velocity 10
    5. Run the following script, which adds 1 to 1 increment each note position, i.e., theoretically the first note should be with the velocity 11, the second note should be 12, and so forth (save the code below into a new file any CAL and run it (Ctrl + F1)
     
    (int x 0)

    (forEachEvent
        (if (&& (== Event.Kind NOTE) (< Note.Vel 127))
            (do
                (+= x 1)
       (pause x)
                (+= Note.Vel x)
            )
        )
    )

     
    • The first thing you'll notice is that the loop (forEachEvent) runs more than the number of events (notes). This is shown by the command (pause x) that shows the value being added to each note.
    • After running the script finished, you will see that all velocities were changed, however randomly.
    • And there is only one clip, one track, only 10 events (10 notes), nothing more.

    rogeriodec.com.br


    * Cakewalk By Bandlabs (always lastest versions), Window 10 x64
    * Focusrite Scarlett Solo Audio Interface
    * Intel i7-4790K CPU @ 4.00 GHz / ASROCK EXTREME 4 Z97 Mobo
    * 2 SSD Samsung Evo 250 Gb (RAID-0) + 1 Western Digital 2 Tb + 1 Seagate 1 Tb
    * Onboard video / 16 Gb RAM HyperX Fury 1600 Mhz
    * 3 LCD Monitors
    * Axiom 61 MIDI Controller, Tapco S5 Active Studio Monitors
    #21
    rogeriodec
    Max Output Level: -75 dBFS
    • Total Posts : 753
    • Joined: 2004/04/09 13:55:04
    • Location: Brazil
    • Status: offline
    Re: RE: Remove duplicate MIDI notes? 2016/07/06 21:12:32 (permalink)
    tparker24
    As I recall, the problem occurs if processing multiple clips at one time.  If you work on a single clip, all is well.  So, you'll need to bounce multiple clips into a single clip (or process the clips one at a time).  

    I'm not 100% positive on this, but at least, it's something to try.




    tparker, first I have to thank you and also I have to retract.
    After reading your post I realized that the KEY to UNDUPE.CAL work is: ENSURE THAT ALL EVENTS ARE SELECTED IN ONLY 1 CLIP.


    And also, in the example script I created in my previous post, I replaced the "forEachEvent" by command "do" which correctly handles all events.
     
    With this I understand that this case is closed, that is, every time we need to use a script that make a sequence analysis of events (UNDUPE, LEGATO, etc.), we must always remember to keep the selected events in a single clip.

    rogeriodec.com.br


    * Cakewalk By Bandlabs (always lastest versions), Window 10 x64
    * Focusrite Scarlett Solo Audio Interface
    * Intel i7-4790K CPU @ 4.00 GHz / ASROCK EXTREME 4 Z97 Mobo
    * 2 SSD Samsung Evo 250 Gb (RAID-0) + 1 Western Digital 2 Tb + 1 Seagate 1 Tb
    * Onboard video / 16 Gb RAM HyperX Fury 1600 Mhz
    * 3 LCD Monitors
    * Axiom 61 MIDI Controller, Tapco S5 Active Studio Monitors
    #22
    AdamGrossmanLG
    Max Output Level: -62 dBFS
    • Total Posts : 1436
    • Joined: 2014/07/13 03:40:34
    • Status: offline
    Re: RE: Remove duplicate MIDI notes? 2017/01/12 22:26:12 (permalink)
    tparker24
    As I recall, the problem occurs if processing multiple clips at one time.  If you work on a single clip, all is well.  So, you'll need to bounce multiple clips into a single clip (or process the clips one at a time).  

    I'm not 100% positive on this, but at least, it's something to try.






    i just tried on a single clip and it still didn't work.  then again, nothing works right for me :(
    #23
    rogeriodec
    Max Output Level: -75 dBFS
    • Total Posts : 753
    • Joined: 2004/04/09 13:55:04
    • Location: Brazil
    • Status: offline
    Re: RE: Remove duplicate MIDI notes? 2017/01/13 08:20:38 (permalink)
    SilverBlueMedallion
     
    i just tried on a single clip and it still didn't work.  then again, nothing works right for me :(


    Send me a link with this project (or just the part that does not work) for me to take a look.

    rogeriodec.com.br


    * Cakewalk By Bandlabs (always lastest versions), Window 10 x64
    * Focusrite Scarlett Solo Audio Interface
    * Intel i7-4790K CPU @ 4.00 GHz / ASROCK EXTREME 4 Z97 Mobo
    * 2 SSD Samsung Evo 250 Gb (RAID-0) + 1 Western Digital 2 Tb + 1 Seagate 1 Tb
    * Onboard video / 16 Gb RAM HyperX Fury 1600 Mhz
    * 3 LCD Monitors
    * Axiom 61 MIDI Controller, Tapco S5 Active Studio Monitors
    #24
    Jump to:
    © 2024 APG vNext Commercial Version 5.1