home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD-ROM Magazin 1996 February
/
CD_02_96.BIN
/
share
/
_music
/
disk1
/
thinaft.ca_
/
thinaft.bin
Wrap
Text File
|
1993-04-28
|
804b
|
42 lines
;; THINWHL.CAL
;;
;; A CAL program to "thin" channel aftertouch data.
;;
;; Deletes every N'th channel aftertouch event unless the pressure value is
;; is 0, 64, or 127.
;;
;;
(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 ChanAft event:" 1 100)
(forEachEvent
(do
(if (== Event.Kind CHANAFT)
(do
(switch ChanAft.Val
;; Don't delete if value is 0, 64, or 127....
0
NIL
64
NIL
127
NIL
ChanAft.Val ; Default -- anything else...
(if (== 0 (% i N)) ; is it the N'th event?
(delete)
)
)
(++ i) ; this counts
)
)
)
)
)