Mercurial > hg > amuse
view implementations/tabcode/classes.lisp @ 190:725ce7ce77ba
remove DOS line endings in base/classes.lisp
darcs-hash:20090105150355-16a00-972232fbb3eb8030c3e0c6d3788ba6f389183d8c.gz
author | j.forth <j.forth@gold.ac.uk> |
---|---|
date | Mon, 05 Jan 2009 15:03:55 +0000 |
parents | 5b2d0e5a99f1 |
children |
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))) (defgeneric ul (timesig)) (defgeneric ll (timesig)) (defgeneric ur (timesig)) (defgeneric lr (timesig)) (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)))