home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Boot Disc 4
/
boot-disc-1996-12.iso
/
Apps
/
Cakewalk
/
PROAUD45
/
THINWHL.CA_
/
THINWHL.bin
Wrap
Text File
|
1996-05-20
|
884b
|
41 lines
;; Thinwhl.cal
;;
;; A CAL program to "thin" pitch wheel data.
;;
;; Deletes every N'th pitch wheel event unless the wheel value is
;; is -8191, 0, or 8191 (min, center, and max values, respectively).
(do
(include "need20.cal") ; Require version 2.0 or higher of CAL
(int N 4) ; thin every N'th event
(int i 0) ; index for moving through
(getInt N "Delete every Nth wheel event:" 1 100 )
(forEachEvent
(if (== Event.Kind WHEEL)
(do
(switch Wheel.Val
; If -8192, 0, or 8192, don't delete
0
NIL
-8192
NIL
8191
NIL
Wheel.Val ;default
(if (== (% i N) 0) ; Is it the N'th event?
(do
(delete) ; Yes: delete it
(message "Deleted #" i) ; Let 'em know how it's going
)
)
)
(++ i) ; this counts
)
)
)
)