home *** CD-ROM | disk | FTP | other *** search
- ;; VELPCT.CAL
- ;;
- ;; This is a sample CAL program that implements an editing command to
- ;; scale note velocities by a certain percentage.
- ;;
- ;; Demonstrates:
- ;;
- ;; (forEachEvent)
- ;; Getting input from the user
- ;; Arithmetic operators
- ;; Event kind and parameter variables
-
- (do
- (include "need20.cal") ; Require version 2.0 or higher of CAL
-
- (int percent 100)
- (getInt percent "Percentage?" 1 1000)
-
- (forEachEvent
- (if (== Event.Kind NOTE)
- (do
- (*= Note.Vel percent)
- (/= Note.Vel 100)
- )
- )
- )
- )
-