make-quick-qt-chromatic.lsp

sc-web-bar

Make all quarter-tone notes with rhythmic values of ‘e (i.e. a quaver / eighth note) or quicker chromatic. Handy for fast passages when playing qt notes can be difficult.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; File:     event-test.lsp
;;;
;;; Author:   Daniel James Ross (mr.danielross@gmail.com)
;;;
;;; Created:  17 March 2015
;;;
;;; Date:     Mon Nov 23 12:41:36 GMT 2015
;;;
;;; Purpose:  Make all quarter-tone notes with rhythmic values
;;;           of 'e or quicker chromatic. 
;;;           Handy for fast passages when playing qt notes is 
;;;           difficult.
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(defmethod make-quick-qt-chromatic ((sc slippery-chicken)
				    start-bar end-bar player)
;; Arguments: piece object, starting bar number
;; (nil defaults to 1), finishing bar number (nil defaults to
;; last bar), player 
  (unless end-bar (setf end-bar (num-bars sc)))
  (unless start-bar (setf start-bar 1))
  (loop for bn from start-bar to end-bar
     for bar = (get-bar sc bn player)
     do
       (loop for e in (rhythms bar)
	  for i from 1
	  for event = (get-event sc bn i player)
	  do 
	    (when (and (needs-new-note e)
		       (<= (compound-duration e) 0.5)
		       (qtr-tone (lowest event)))
	      (change-pitch sc bn i player 
			    (nearest-chromatic (lowest event)))))))

;; Example using an adapted and simplified version of Michael 
;; Edwards' template.lsp to show (make-quick-qt-chromatic ...)
;; at work.

#|
(in-package :sc)
(in-scale :quarter-tone)

(make-slippery-chicken  
 '+your-title-here+ 
 :title "Your Title Here" 
 :composer "Your Name Here"
 :ensemble '(((flt (flute :midi-channel 1 
                          :microtones-midi-channel 2))))
 :staff-groupings '(1)
 :tempo-map '((1 (q 60)))
 :set-palette '((set1 ((fqs2 b2 dqs4 aqf4 dqs5 e5 a5 d6))))
 :set-map '((1 (set1 set1 set1 set1 set1 set1)))
 :rthm-seq-palette '((seq1 ((((4 4) q - s s s s -  - e e - q))   
          :pitch-seq-palette (1 2 3 4 5 6 7 8))))
 :rthm-seq-map
 '((1 ((flt (seq1 seq1 seq1 seq1 seq1 seq1))))))

(make-quick-qt-chromatic +your-title-here+ 1 2 'flt)
(cmn-display +your-title-here+)

|#

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; EOF event-test.lsp

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s