Mercurial > hg > amuse
view implementations/tabcode/classes.lisp @ 180:1a2b876b5587
ECOLM functionality for tabcode implementation
darcs-hash:20080708152414-40ec0-be5878c3d42affaf70ad7d08e987ba2223f5fa59.gz
author | d.lewis <d.lewis@gold.ac.uk> |
---|---|
date | Tue, 08 Jul 2008 16:24:14 +0100 |
parents | 88089258e08d |
children | 5b2d0e5a99f1 |
line wrap: on
line source
(cl:in-package #:amuse-tabcode) (defclass tabcode-object (amuse-object) ()) (defclass tabcode-composition (standard-composition tabcode-object) ((bars :initarg :bars :reader tabcode-bars) (rules :initarg :rules :reader tabcode-rules) (metres :initarg :metres :reader metrical-signs))) (defclass tabcode-pitched-event (standard-chromatic-pitched-event tabcode-object) ((course :initarg :course :reader course) (fret :initarg :fret :reader fret) (word :initarg :word :reader word) (bar :initarg :bar :reader in-bar))) (defclass tabcode-time-signature (standard-anchored-period tabcode-object) ((word :initarg :word :reader word) (ul)(ll)(ur)(lr))) (defmethod ul ((timesig tabcode-time-signature)) (unless (slot-boundp timesig 'ul) (let ((ul (tabcode::ul (word timesig)))) (setf (slot-value timesig 'ul) (when ul (or (parse-integer ul :junk-allowed t) ul))))) (slot-value timesig 'ul)) (defmethod ll ((timesig tabcode-time-signature)) (unless (slot-boundp timesig 'll) (let ((ll (tabcode::ll (word timesig)))) (setf (slot-value timesig 'll) (when ll (or (parse-integer ll :junk-allowed t) ll))))) (slot-value timesig 'll)) (defmethod ur ((timesig tabcode-time-signature)) (unless (slot-boundp timesig 'ur) (let ((ur (tabcode::ur (word timesig)))) (setf (slot-value timesig 'ur) (when ur (or (parse-integer ur :junk-allowed t) ur))))) (slot-value timesig 'ur)) (defmethod lr ((timesig tabcode-time-signature)) (unless (slot-boundp timesig 'lr) (let ((lr (tabcode::lr (word timesig)))) (setf (slot-value timesig 'lr) (when lr (or (parse-integer lr :junk-allowed t) lr))))) (slot-value timesig 'lr)) (defclass tabcode-file-identifier (identifier tabcode-object) ((pathname :initarg :pathname :reader tabcode-pathname))) (defclass tabcode-bar (standard-anchored-period tabcode-object) ((start :initarg :start :accessor start-tabword) (end :initarg :end :accessor end-tabword))) (defclass tabcode-ruleset (standard-anchored-period tabcode-object) ((rules :initarg :rules :accessor ruleset-rules) (tuning :initarg :tuning :accessor ruleset-tuning :initform nil)))