home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-10-26 | 1.4 KB | 52 lines | [TEXT/ScoM] |
- GEN-EXPANSION ENHANCEMENT
-
- Here is gen-expansion enhancement invented by Harm Visser. Check
- out (gen-expansion-int 4 '(1 2) '( 1 -2)) in visualizer with different
- input values! The results play nice on chromatic scale, but I tweaked
- it a little so that it works with scales with less notes...
-
- ; gen-expansion-int
- ; Harm Visser <hvisser@worldaccess.nl>
-
- (defun transpose-to-int (base pattern)
- (append (change-length add base pattern) (change-length times base pattern)))
-
- (defun gen-expansion-int (level list expansion)
- (let ((out list))
- (do-quietly
- (dotimes (i level)
- (setq out (tr-expand-pattern-int out expansion)))
- out)))
-
- (defun tr-expand-pattern-int (pattern expansion)
- (let (out)
- (dolist (x pattern)
- (push (nreverse (transpose-to-int x expansion)) out))
- (nreverse (flatten out))))
-
- (defun zerobase-integers (l)
- (let ((minval (find-min-value l)))
- (mapcar #'(lambda (x) (+ (abs minval) x)) l)))
-
- (setq symbols (gen-expansion-int 4 '(1 2) '( 1 -2)))
-
- (def-section a
- default
- zone (* (length symbols) (get-tick '1/16))
- tonality (activate-tonality (hirajoshi c 3))
- length '(1/16)
- duration '(1/10)
- velocity '(74 64 84 74 94 64 74 54)
- piano
- symbol (symbol-fold 7 0 (change-to-symbols (zerobase-integers symbols)))
- channel 11
- )
-
- (midiport :printer)
- (def-tempo 90)
-
- (play-file-p "test"
- piano '(a)
- )
-
-