home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD-ROM Magazin 1995 November
/
CD_11_95.BIN
/
demos
/
cakewal
/
velpct.ca_
/
velpct.bin
Wrap
Text File
|
1993-04-28
|
545b
|
28 lines
;; 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)
)
)
)
)