FREE!! Two New CAL for SONAR X1!
Random Velocity CAL & Delete Double CAL for SONAR X1. CAL 1 -RANDOM Velocity- Make a new Notepad document. Save it (Encoding = ANSI) as "RANDOM Velocity.cal" Copy and paste the following Code string
____________________________________
;;; RANDOM Velocity.CAL Freddie Hogblad 2012
;;;
;;
;; RANDOM Velocity CAL
;;
;; Creates variations on any musical Midi-Velcoity.
;;
;;
;; Prolog
;;
;
(do
(int max 127)
(getInt max "Enter max. velocity value:" 0 127)
(int min 0)
(getInt min "Enter min. velocity value:" 0 127)
(int ofs (random max min))
(forEachEvent
(do
(= ofs (random max min))
(if (== Event.Kind NOTE) ; Is it a NOTE
(= Note.Vel ofs))
)
)
)
;; Epilog
NIL
___________________________________________________
Save it!
*******************************
CAL 2 -Delete Double- Make a new Notepad document. Save it (Encoding = ANSI) as "Delete Double.cal" Copy and paste the following Code string
____________________________________
; Delete Double.CAL
;
; Remove duplicated Midi Events
; Made by Freddie Hogblad 2012
; prolog expression
(do
(int lastKind 0)
(dword lastTime 0)
(int lastKey 0)
(int nDeleted 0)
(int timeWindow 0)
(getInt timeWindow "Window for time identity:" 0 TIMEBASE)
(++ timeWindow)
(/= timeWindow 2)
)
; body expression - evaluated once for each selected event
(do
(if (== lastKind Event.Kind)
(if (== Event.Kind NOTE)
(do
(if (&& (>= Event.Time (- lastTime timeWindow)) (<= Event.Time (+ lastTime timeWindow)))
(if (== Note.Key lastKey)
(do
(delete)
(++ nDeleted)
)
NIL
)
NIL
)
(= lastKey Note.Key)
) ; do
NIL
)
NIL
)
(= lastKind Event.Kind)
(= lastTime Event.Time)
)
; epilog expression
(do
(pause "Deleted " nDeleted " duplicate events.")
)
________________________________________________
Save it!
Now move the two new CAL's to the
SONAR CAL-library so SONAR can find them! Hope it helps!