pause-last.lsp

Add a pause mark (fermata) to the last note of every part in your sl-c piece. Includes option of placing fermata in a different bar and adding a final double bar line.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; File:    pause-last.lsp
;;;
;;; Author:  Daniel James Ross (mr.danielross@gmail.com)
;;;
;;; Date:    12 May 2016
;;;
;;; Update:  Fri Sep 23 12:16:40 BST 2016
;;;
;;; Purpose: Add a pause mark (fermata) to the last note
;;;          of every part in your sc piece.
;;;          Includes option of placing fermata in a different bar
;;;          and adding a final double bar line.
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(defmethod pause-last ((sc slippery-chicken) players
               &key
             (bar-num (num-bars sc))
             final-double-bar-line)
  "add a pause mark to the last note of every part"
  (unless players (setf players (players sc)))
  (when (typep players 'atom) (setf players (list players)))
  (loop for player in players do
       (let ((bar (get-bar sc bar-num player)))
     (unless (is-rest-bar bar)
       (let ((e (get-last-event bar)))
         (unless (is-rest e)
         (when e
           (add-mark e 'pause))
         (when final-double-bar-line
           (change-bar-line-type sc bar-num 2))))))))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; EOF pause-last.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