home *** CD-ROM | disk | FTP | other *** search
- ; David Rude ID #31077
- ;
- ; Make it swing!
- ;
- ; CAL program for adding 'swing' to 16th note based music
- ;
- ; This CAL program will add that 'swing' feel to music that
- ; is based on 16th notes.
- ;
- ; Works independant of TIMEBASE!
- ;
- ;
- (do
- (dword tck 0) ; current note's tick
- (int swing 0) ; value to add for swing time
- (int division1 TIMEBASE) ; 16th note division value
- (int division2 0) ; 2nd possible 16th note division value
- (int swingadd TIMEBASE) ; value to add for full swing
- (/= swingadd 12) ; value of a triplet
-
- (/= division1 4) ; calc the tick divisor for a 16th note
- (= division2 (* division1 3 )) ; calc 2nd value
-
- (getInt swing "Swing percentage (10-100) " 10 100 ) ; Entering 100 means
- ; make it FULL swing
-
- (*= swing swingadd) ; make value to add to swing notes
- (/= swing 100) ; do % math (sort of)
- )
-
- (do
- (if (== Event.Kind NOTE) ; is it a note?
- (do
- (message "Measure: " (meas Event.Time )) ; update display
- (= tck (tick Event.Time))
- (if (== tck division1) ; is it the right note
- (+= Event.Time swing) ; make it swing time
- NIL
- )
- (if (== tck division2) ; is it the other right note
- (+= Event.Time swing) ; make it swing also
- NIL
- )
- )
- NIL
- )
- )
-
- ;;
- NIL
-
-
-