home *** CD-ROM | disk | FTP | other *** search
/ PC Musician 2000 / PC_Musician_2000.iso / PCMUSIC / SEQUENCE / CAL_CONT / RANDNOTE.CAL < prev    next >
Encoding:
Text File  |  1991-09-09  |  1.5 KB  |  52 lines

  1. ;;; RANDNOTE.CAL                                 Dennis Drew     1964
  2. ;;;
  3. ;;
  4. ;;                           RANDOM NOTE CAL
  5. ;;
  6. ;;     Creates variations on any musical line or selected lines. Notes 
  7. ;; in the selected tracks are shifted up or down in pitch by a random 
  8. ;; amount.    
  9. ;;
  10. ;;     The randomness is structured by the user to be within a defined 
  11. ;; pitch window.     The default pitch window value is 6, which means 
  12. ;; that each pitch may be shifted up or down by zero to 3 steps.   The
  13. ;; pitch shift can be set up to 127 which gives a shift range of +/- 64 
  14. ;; midi steps.      A value of 24 provides a shift window of one octave 
  15. ;; up or down.
  16. ;;
  17. ;;     When used with percussion lines you will get possibilities you'd 
  18. ;; never think of.     With this function, chords are turned into odd, 
  19. ;; modernistic implausible structures, while melody and harmony lines 
  20. ;; get an unexpected turn.     Great for coming up with new ideas or 
  21. ;; adding some randomness to a piece.
  22. ;; 
  23. ;;
  24. ;; Prolog
  25. ;;
  26.  
  27. (do
  28.   (dword range 6)
  29.   (int pshift)
  30.   (getInt range "Random pitch window " 1 127)
  31. )
  32.  
  33. ;; Body
  34.  
  35. (do
  36.   (= pshift (random 0 range))
  37.   (= pshift (- pshift (/ range 2)))
  38.   (if (== Event.Kind NOTE)
  39.      (= Note.Key (+ Note.Key pshift))
  40.      NIL
  41.   )
  42.   (message "         Randomizing note at measure " (meas Event.Time) 
  43. " beat " (beat Event.Time) "       Pitch Shift " pshift)
  44. )
  45.  
  46. ;; Epilog
  47.  
  48. NIL
  49.  
  50.  
  51.  
  52.