home *** CD-ROM | disk | FTP | other *** search
- ;; 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
- )
- )
- )
- )
- )
-