• SONAR
  • A couple of feature suggestions for Sonar X(?) (p.3)
2014/09/06 13:41:12
scook
#18 was a little ugly so here is a cleaned up version.
 
;;; pitchUp.CAL
;;;
;;; Increments Note.Key values at Now time in selected events
;;;  
;;; After processing, the script has a side effect of selecting all notes
;;; in the current track based on the current select From and Thru values
;;; ---------------------------------------------------------------------
;;; Prolog
;;;
(do
   ; save From and Thru values
   (dword FromSave From)
   (dword ThruSave Thru)

   ; use Now to set From and Thru values
   (= From Now)
   (= Thru (+ Now 1))
)

;;; ---------------------------------------------------------------------
;;; Body
;;;
(do  
   ; Loop through selected Events starting with From ending with Thru
   ; and increment Note.Key
      (if (&& (== Event.Kind NOTE) (< Note.Key 127))
         (++ Note.Key))

)

;;; ---------------------------------------------------------------------
;;; Epilog
;;;
(do
   ; restore From and Thru values
   (= From FromSave)
   (= Thru ThruSave)
)


© 2026 APG vNext Commercial Version 5.1

Use My Existing Forum Account

Use My Social Media Account