a function to prevent midi notes length to overlap each other ?

Author
mw
Max Output Level: -90 dBFS
  • Total Posts : 4
  • Joined: 2004/12/26 06:19:39
  • Status: offline
2007/02/15 03:11:10 (permalink)

a function to prevent midi notes length to overlap each other ?

Is there a function to prevent midi notes length to overlap each other ?:

i played with my keyboard, a vocal melody on a midi track, but some of of the notes overlap the next note.
When i open the staff window, i don't recognize the melody because of these overlapping durations.

Is there a way to correct only these overlapping durations, without changing other notes durations ?




#1

7 Replies Related Threads

    Dele Abegunde
    Max Output Level: -82 dBFS
    • Total Posts : 409
    • Joined: 2006/12/04 10:25:01
    • Status: offline
    RE: a function to prevent midi notes length to overlap each other ? 2007/02/15 06:48:15 (permalink)
    mw,

    Not exactly sure, but I suppose <<Process>> - <<fit to time>>, <<process>>- <<lenght>> and <<process>> -<<quantize>> or a combinaton of these may work for you in the interim.
    #2
    bermuda
    Max Output Level: -52.5 dBFS
    • Total Posts : 2271
    • Joined: 2004/04/28 12:34:40
    • Location: Bermuda
    • Status: offline
    RE: a function to prevent midi notes length to overlap each other ? 2007/02/15 09:25:52 (permalink)

    The below gives you some CAL script program and (programming links)

    http://www.hexachord.net/cal/

    http://www.svpworld.com/cakewalk_cal/cal.asp

    http://forum.cakewalk.com/printable.asp?m=961016

    http://www.ericvonbayer.us/music/#soft (look down the page)

    I have not tried the below script...but it appears to cover a number of issues....Does anyone use this?

    ; MULTIFIX.CAL by John Cowles - 12/05/94
    ; Version 2.00 - 12/06/94 (25% speed increase, added mods counter, tightened docs)
    ; Version 2.01 - 12/06/94 (fix evaluation stack overflow)
    ; Version 2.02 - 12/09/94 (changed to agree with Cakewalk's idea of duration<g>!)
    ; Version 3.00 - 12/10/94 (speed increase - can now fix multiple continuous multistruck and duplicate notes)
    ; INTERNET: cowles@hydra.convex.com - CIS: 72074,451
    ;
    ; This program fixes multistruck, overlapped, and duplicate
    ; notes on a single track. It is designed to correct the effects of
    ; running a "humanize" program which modifies note times and
    ; durations by less than a 64th note, and to remove duplicate
    ; notes which have been entered by a defective input device,
    ; or by inadvertantly pasting a track over itself. It even does a
    ; fair job of fixing a track which has been pasted over itself and
    ; then "humanized".
    ;
    ; The program runs on one track at a time (the one where the cursor
    ; is currently at), and if you have NOT set From and Thru markers,
    ; it will run on the entire track.
    ;
    ; The program may take several minutes to run, and there
    ; is a progress message printed out in the message bar at the bottom.
    ;
    ; I have tried to take into account the various permutations of multistruck
    ; notes. If this does not cover the particular situation you have (or
    ; if the program misbehaves!) please contact me and I'll try to
    ; remedy the situation.
    ;
    ; Note that MULTIFIX assumes that every note on the track goes to
    ; a single channel. If this is NOT the case, you should take great care!
    ;
    ; In the following three cases of two notes of the same key beginning at
    ; the same time, 'X' means event deleted, and 'K' means event kept
    ; (note that the difference in ending times is less than a 64th note):
    ;
    ; Action Event Duration
    ;
    ; K ################## (Type 1)
    ; X ##################
    ;
    ; K ################## (Type 2)
    ; X #################
    ;
    ; X ################# (Type 3)
    ; K ##################
    ;
    ; When two notes overlap by less than a 64th note (TIMEBASE / 16), then
    ; the first note is shortened so that it ends 2 ticks before the second
    ; note begins - i.e.:
    ; ######### (Type 4)
    ; ##########
    ; becomes:
    ; #######
    ; ##########
    ;
    ; An overlap of greater than a 64th note is changed to a single note - i.e.:
    ; ########### (Type 5)
    ; #############
    ; becomes:
    ; #################
    ; Please note that you may not like this behavior, and may wish to modify the
    ; program to act differently (perhaps by changing the variable "scaletime"
    ; to a value greater than a 64th note).
    ;
    ; If an enclosed note is less than a 64th note, then two notes are made
    ; as follows:
    ; ################### (Type 6)
    ; ##
    ; becomes:
    ; #######
    ; ############
    ;
    ; and:
    ; ###################
    ; ## ##
    ; becomes:
    ; ###
    ; ########
    ; ########
    ; This happens because of an anomaly when Cakewalk saves files as SMF's
    ; rather than .WRK files, and the file contains overlapped notes (of Type 4).
    ;
    ; An enclosed note greater than a 64th note is deleted. (Type 7)
    ; In this case also, you may not like the behavior, and may wish to modify the
    ; program to act differently (perhaps by changing the variable "scaletime"
    ; to a value greater than a 64th note).
    ;
    ; Because it is possible to modify a single note multiple times, there are a few
    ; cases where you will see a modification count greater than the original number
    ; of notes.
    ;
    ; This routine can not handle duplicate note events if the events are offset by
    ; greater than a 64th note (but you may wish to try anyway, by modifying
    ; the "scaletime" variable to a value greater than a 64th note).
    ;
    ; If you have notes in your sequence which you wish to maintain at a duration less
    ; than a 64th note, then you may wish to shorten the "scaletime" variable by
    ; dividing it by 32, rather than 16, to give an initial value equivalent to a 128th note.

    (do
    (int ckey 0)
    (int first 1)
    (int nosave 0)
    (int nowrite 1)
    (int mods 0)
    (int both 0)
    (int notechan 0)
    (int notevel 0)
    (int lowkey 127)
    (int highkey 0)
    (int nexthigh 127)
    (dword eventend 0)
    (dword noteend 0)
    (dword tempend 0)
    (dword scaletime 7)
    (dword notestart 0)

    (= scaletime (/ TIMEBASE 16)) ; number of ticks for a 64th note
    (= scaletime 60)

    (if ( == From Thru ) ; if From and Thru are not set, do the entire track
    (do
    (= From 0)
    (= Thru End)
    )
    )

    ; (TrackSelect 0 -1) ; insure that only one track is selected (otherwise
    ; the last notes of a track are written to the next track)

    ; Find the lowest and highest notes on the track
    (= lowkey 127)
    (= highkey 0)
    (forEachEvent
    (if (== Event.Kind NOTE)
    (do
    (if (< Note.Key lowkey)
    (= lowkey Note.Key)
    )
    (if (> Note.Key highkey)
    (= highkey Note.Key)
    )
    )
    )
    )
    (= ckey lowkey) ; set key search parameters
    (++ highkey)

    ;begin main body of program
    (while (< ckey highkey)
    (do
    (message "Key From, To, Current = " lowkey highkey ckey "Modifications= " mods)
    (forEachEvent
    (if (&& (== Event.Kind NOTE) (== Note.Key ckey))
    (do
    (= eventend (+ Event.Time Note.Dur)) ; use this a lot - save it
    (if (== first 0) ; if NOT first
    (do
    ; (pause notestart noteend Event.Time eventend mods)
    (if (== Event.Time notestart) ; duplicate start times
    (do
    (if (> eventend noteend)
    (do
    (++ mods)
    (= noteend eventend) ; make buffer note duration equal
    ; to the longest of the two
    )
    )
    (= both 1)
    ) ; else NOT duplicate start times
    (do
    (if (< (- Event.Time notestart) scaletime) ; then got a duplicate of some sort
    (do
    (= both 1)
    (if (> eventend noteend)
    (do
    (++ mods)
    (= noteend eventend) ; make buffer note duration equal
    ; to the longest of the two
    )
    )
    )
    ) ; end if < - Event.Time notestart scaletime
    (if (&& (== both 0) (<= Event.Time noteend)) ; then - got a multistruck note
    (do
    (if (<= eventend noteend) ; then - got an enclosed note
    (if (< (- noteend eventend) scaletime) ; then - extraneous
    (= both 1)
    (do ; else - short enclosed note - make two notes
    (+= mods 2)
    (= tempend noteend)
    (= noteend (- Event.Time 2))
    (= Note.Dur (- tempend Event.Time))
    (= eventend (+ Event.Time Note.Dur))
    )
    ) ; end if < enclosure amount scaletime
    (do ;else - got an overlapped note
    (++ mods)
    (if (> (- noteend Event.Time) scaletime) ; then - big
    ; overlap - join
    (do
    (= noteend (+ Event.Time Note.Dur))
    (= both 1)
    )
    (do
    (++ mods)
    (= noteend (- Event.Time 2)) ; else - small overlap
    ; - make two notes
    )
    ) ; end if > - noteend Event.time scaletime
    )
    ) ; end if < eventend noteend
    )
    ) ; end if < Event.Time noteend
    )
    ) ; end if == Event.Time notestart
    )
    (= first 0) ; else if first time for this key
    ) ; end if == first 0
    (delete) ; current event
    (if (== both 1)
    (do
    (= both 0)
    (= nosave 1)
    (= nowrite 1)
    (++ mods)
    )
    )
    (if (== nowrite 0) ; then insert previous event
    (insert notestart notechan NOTE ckey notevel (- noteend notestart))
    ) ; end if == nowrite 0
    (if (== nosave 0) ;then save current event
    (do
    (= notestart Event.Time)
    (= notechan Event.Chan)
    (= notevel Note.Vel)
    (= noteend eventend)
    )
    ) ; end if == nosave 0
    (= nowrite 0)
    (= nosave 0)
    )
    (do ; else != Note.Key ckey
    (if (> Note.Key ckey)
    (if (< Note.Key nexthigh)
    (= nexthigh Note.Key)
    )
    )
    )
    ) ; if == Note.Key ckey
    ) ; end forEachEvent
    ; if first is not still set, we have found at least one event, and must
    ; put it back
    (if (== first 0)
    (insert notestart notechan NOTE ckey notevel (- noteend notestart))
    ) ; end if == first 0
    (= first 1)
    (= nowrite 1)
    (= ckey nexthigh)
    (= nexthigh highkey)
    )
    ) ; end while ckey
    (pause "There were " mods "modifications.")
    )




     Yes.
    #3
    fcarosone
    Max Output Level: -86 dBFS
    • Total Posts : 241
    • Joined: 2005/03/04 11:26:28
    • Location: Italy
    • Status: offline
    RE: a function to prevent midi notes length to overlap each other ? 2007/02/15 14:04:03 (permalink)
    I remember a MFX plug-in called "autolegato" (or something similar) by TenCrazy. Check google..

    "Below the realm of the musical note lies the realm of microsound. Sound coalesce, evaporate, and mutate into other sounds" (Curtis Roads)
    http://www.carosone.eu/
    #4
    mw
    Max Output Level: -90 dBFS
    • Total Posts : 4
    • Joined: 2004/12/26 06:19:39
    • Status: offline
    RE: a function to prevent midi notes length to overlap each other ? 2007/02/16 03:18:16 (permalink)
    thanks for your answer
    i discover the CAL functions, seems pretty good, i take an aspirin and come back to tou if i don't understand

    mw
    #5
    dreamkeeper
    Max Output Level: -54 dBFS
    • Total Posts : 2141
    • Joined: 2004/12/05 15:51:13
    • Status: offline
    RE: a function to prevent midi notes length to overlap each other ? 2007/02/16 07:16:03 (permalink)

    ORIGINAL: mw

    i played with my keyboard, a vocal melody on a midi track, but some of of the notes overlap the next note.

    Sounds to me like there might be problem with either your keyboard or the MIDI driver. You cannot hit a key for a second time before you released that same key - that's physically impossible. So it seems that some NoteOffs are being sent too late.

    Sure, there are CAL scripts that can fix the overlaps. But I'd try to find out why the overlaps happen in the first place. Just a thought...

    werner

    "... must've been another of my dreams ..."
    #6
    Susan G
    Max Output Level: 0 dBFS
    • Total Posts : 12016
    • Joined: 2003/11/05 22:49:26
    • Location: Putnam County, NY
    • Status: offline
    RE: a function to prevent midi notes length to overlap each other ? 2007/02/17 00:44:09 (permalink)
    Hi werner-

    Sounds to me like there might be problem with either your keyboard or the MIDI driver. You cannot hit a key for a second time before you released that same key - that's physically impossible. So it seems that some NoteOffs are being sent too late.

    I didn't take Michel to mean he was hitting the same key twice, just that notes overlapped when he didn't intend them to. LEGATO.CAL does work for this, but it's a bit of a pain compared to, oh, how FLS handles this, for example!

    -Susan

    2.30 gigahertz Intel Core i7-3610QM; 16 GB RAM
    Windows 10 x64; NI Komplete Audio 6.
    SONAR Platinum (Lexington) x64
    #7
    kaylen
    Max Output Level: -84 dBFS
    • Total Posts : 336
    • Joined: 2006/07/01 20:29:15
    • Location: Everywhere-Now Texas
    • Status: offline
    RE: a function to prevent midi notes length to overlap each other ? 2007/02/17 01:50:45 (permalink)
    I have to agree the overlapping notes are annoying,I import midi songs to play along with ect and the trills are always double notes that I dont easily read,I'm not sure if were talking about the same issue but tha and the triplets thing realy cut into midi enoyment

    Music is as useless and unimportant as life itself
    Kaylen, 
    Win 7 Home pr,  6GB DDR3,  intel2120
    X2P, 
    Battery 4,   BFD2,    BFD Eco,   EZdrmr 
    Finale 2012
     
    #8
    Jump to:
    © 2024 APG vNext Commercial Version 5.1