Jump to content
Craig Reeves

Non CAL Legato

Recommended Posts

I've requested this before but the only MIDI legato is by running CAL, which is buggy and doesn't work very well. It's one of those features I really miss when coming back from Ableton.

  • Like 1
  • Great Idea 1

Share this post


Link to post
Share on other sites

;; _Legato.CAL, by Serge Daigno 2003

(do
  (int tbase 1)      ; Or whatever you want, 2 for 480, 1 for 960
  (dword FromTime 0)
  (dword ToTime 0)
  (int Found 0)
  (int setting 1)         ; Or whatever you want, number of ticks cut before the next note

  (while (!= 4 Found)
  (do
    ;;  For each actual Note event occurence, get the Event.Time
    
    (= Found 0)

    (forEachEvent
    (do
      (if (&& (== Found 0) (&& (== Event.Kind NOTE) (> Event.Time FromTime)))
      (do
        (= FromTime Event.Time)
        (= Found 1)
      ))

      ;;  Find the next Note event occurence and get the Event.Time value

      (if (&& (== Found 1) (&& (== Event.Kind NOTE) (> Event.Time FromTime)))
      (do
        (= ToTime Event.Time)
        (= Found 2)
      ))
    ))

    ;;  Return to the actual Note event and resize the note duration
    
    (forEachEvent
    (do   
      (if (&& (== Found 2) (&& (== Event.Kind NOTE) (== Event.Time FromTime)))
      (do
         (= Note.Dur (- (/ (- ToTime FromTime) tbase) setting))
         (= Found 3)
      ))
    ))
    (if (< Found 3) (= Found 4)) ;; Ending when last note is reached
  ))
)

Share this post


Link to post
Share on other sites
7 hours ago, Craig Reeves said:

I've requested this before but the only MIDI legato is by running CAL, which is buggy and doesn't work very well. It's one of those features I really miss when coming back from Ableton.

Very good CALL! ;)

I wonder why isn't the obsolete CAL yet replaced with some more reliable and modern solution anyway?!

Share this post


Link to post
Share on other sites

I have often thought that the Bakers should go through all the old CALs, and convert them to native functions with corrected logic where necessary. Seems like low-hanging fruit. 

  • Like 1

Share this post


Link to post
Share on other sites
On 8/8/2021 at 6:11 PM, David Baay said:

I have often thought that the Bakers should go through all the old CALs, and convert them to native functions with corrected logic where necessary. Seems like low-hanging fruit. 

Yews - Lots of useful Cal functions that should be part of the DAW ! ☺️....hellooo humanise function !

Share this post


Link to post
Share on other sites

I have ended up simply writing my own CAL scripts....  like a pitch bend triangle wave generator.....(actual pitch bend events that can be transformed later)....for example.

Share this post


Link to post
Share on other sites
6 hours ago, Promidi said:

I have ended up simply writing my own CAL scripts....  like a pitch bend triangle wave generator.....(actual pitch bend events that can be transformed later)....for example.

Wowzers 😍

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...