m@3
|
1 (cl:in-package #:amuse)
|
m@3
|
2
|
d@12
|
3 ;; collections of more than one event
|
m@1
|
4
|
d@12
|
5 (defclass constituent () ())
|
d@12
|
6 (defclass composition (constituent) ())
|
d@12
|
7 (defclass monody (constituent) ())
|
m@1
|
8
|
d@12
|
9 ;; types of information-specifiers
|
m@1
|
10
|
d@12
|
11 (defclass moment-designator () ())
|
m@14
|
12 (defclass period-designator () ())
|
m@14
|
13 (defclass anchored-period-designator (moment-designator period-designator) ())
|
d@12
|
14 (defclass pitch-designator () ())
|
d@12
|
15 (defclass pitch-interval-designator () ())
|
d@12
|
16
|
d@12
|
17 ;; time-related classes
|
d@12
|
18
|
m@14
|
19 (defclass moment (moment-designator)
|
m@14
|
20 ((time :accessor %moment-time :initarg :time)))
|
m@14
|
21
|
m@14
|
22 (defclass period (period-designator)
|
m@14
|
23 ((interval :accessor %period-interval :initarg :interval)))
|
m@14
|
24
|
m@14
|
25 (defclass floating-period (period) ())
|
m@14
|
26 (defclass anchored-period (period moment anchored-period-designator) ())
|
m@1
|
27
|
m@1
|
28 ;; pitch-related classes
|
m@1
|
29
|
m@13
|
30 (defclass frequency () ())
|
m@13
|
31
|
d@12
|
32 (defclass pitch (pitch-designator) ())
|
m@14
|
33 (defclass chromatic-pitch (pitch)
|
m@14
|
34 ((number :accessor %chromatic-pitch-number :initarg :number)))
|
m@14
|
35 (defclass diatonic-pitch (pitch)
|
m@14
|
36 ((name :accessor %diatonic-pitch-name :initarg :name)
|
m@14
|
37 (accidental :accessor %diatonic-pitch-accidental :initarg :accidental)
|
m@14
|
38 (octave :accessor %diatonic-pitch-octave :initarg :octave)))
|
m@14
|
39
|
m@14
|
40 (defclass pitch-interval (pitch-interval-designator)
|
m@14
|
41 ((span :accessor %pitch-interval-span :initarg :span)))
|
m@1
|
42
|
d@12
|
43 ;; events
|
m@1
|
44
|
m@14
|
45 (defclass event (anchored-period) ())
|
d@12
|
46 (defclass pitched-event (event pitch-designator) ())
|
d@19
|
47 (defclass chromatic-pitched-event (pitched-event chromatic-pitch) ())
|
m@13
|
48 (defclass percussive-event (event) ())
|
d@19
|
49
|
d@19
|
50 ;;; Range-based `constituents'
|
d@19
|
51 ;; Whilst these are all constituents in the CHARM sense, their
|
d@19
|
52 ;; properties apply to a timed range rather than to a set of
|
d@19
|
53 ;; events. As such, they can be regarded as anchored-periods with
|
d@19
|
54 ;; properties.
|
d@19
|
55
|
d@19
|
56 (defclass time-signature (anchored-period) ())
|
d@19
|
57
|
d@19
|
58 (defclass basic-time-signature (anchored-period)
|
d@19
|
59 ;; N.B. Can only deal with numeric signatures
|
d@19
|
60 ((numerator :accessor %basic-time-signature-numerator
|
d@19
|
61 :initarg :numerator)
|
d@19
|
62 (denominator :accessor %basic-time-signature-denominator
|
d@19
|
63 :initarg :denominator)))
|
d@19
|
64
|
d@19
|
65 (defclass key-signature (anchored-period) ())
|
d@19
|
66
|
d@19
|
67 (defclass basic-key-signature (key-signature)
|
d@19
|
68 ;; Only has line-of-fifths distance from c, so custom signatures
|
d@19
|
69 ;; won't work
|
d@19
|
70 ((sharp-count :accessor %basic-key-signature-sharp-count
|
d@19
|
71 :initarg sharp-count)))
|
d@19
|
72
|
d@19
|
73 (defclass tempo (anchored-period)
|
d@19
|
74 ;; accel and rit in symbolic encoding will need other structures, as
|
d@19
|
75 ;; will textual tempo markings.
|
d@19
|
76 ((bpm :accessor %tempo-bpm
|
d@19
|
77 :initarg :bpm)))
|
d@19
|
78 |