Preface |
|
v | |
Introduction |
|
v | |
The Origin of this Book |
|
vi | |
Prerequisites and Approach |
|
vii | |
What this Book is Not About |
|
viii | |
Intended Audience |
|
ix | |
Regarding the Musical Examples |
|
x | |
About the Software |
|
x | |
Acknowledgements |
|
xii | |
|
|
1 | (172) |
|
1 Software Modeling And Object-Oriented Design |
|
|
3 | (8) |
|
1.1 Object-Oriented Design by Example |
|
|
3 | (3) |
|
1.2 A Concise Introduction to Python Classes |
|
|
6 | (2) |
|
1.3 What Can Go Wrong in Object-Oriented Design |
|
|
8 | (1) |
|
1.4 The Meaning of Music Representation |
|
|
9 | (2) |
|
2 The Chromatic Scale And The Diatonic Foundation |
|
|
11 | (14) |
|
2.1 The Pythagorean Scale |
|
|
11 | (2) |
|
2.2 Just Intonation and Equal-Tempered Chromatic Scales |
|
|
13 | (4) |
|
2.2.1 The Chromatic Scale Representation |
|
|
15 | (2) |
|
2.3 Tones, Pitches, and the Diatonic Foundation |
|
|
17 | (6) |
|
2.3.1 Diatonic Tone Representation |
|
|
19 | (2) |
|
|
21 | (1) |
|
2.3.3 Diatonic Pitch Representation |
|
|
22 | (1) |
|
|
23 | (2) |
|
|
25 | (16) |
|
3.1 What is a Music Interval? |
|
|
25 | (4) |
|
|
28 | (1) |
|
|
29 | (1) |
|
|
29 | (5) |
|
|
30 | (1) |
|
|
31 | (1) |
|
|
32 | (1) |
|
|
32 | (1) |
|
3.2.5 Afterword on Interval Operators |
|
|
33 | (1) |
|
3.3 Interval Representation and Implementation |
|
|
34 | (4) |
|
3.3.1 Negation, Inversion, and Reduction |
|
|
35 | (1) |
|
3.3.2 Interval Addition and Operator Overloading |
|
|
35 | (2) |
|
|
37 | (1) |
|
3.3.4 Computing Start and End Pitches |
|
|
38 | (1) |
|
|
38 | (1) |
|
|
39 | (2) |
|
4 Modality, Tonality, And Scales |
|
|
41 | (14) |
|
4.1 Modality and Tonality |
|
|
41 | (5) |
|
4.1.1 A Traditional Approach to Modality |
|
|
42 | (1) |
|
4.1.2 An Intervallic Approach to Modality |
|
|
43 | (1) |
|
|
44 | (1) |
|
4.1.4 Modes, Derived Modalities and Modal Index |
|
|
45 | (1) |
|
4.2 Modality and Tonality Representation |
|
|
46 | (7) |
|
4.2.1 Defining and Creating Modality |
|
|
47 | (1) |
|
|
48 | (1) |
|
|
49 | (1) |
|
4.2.4 Modal Index, Incremental Intervals, and Tonal Scale |
|
|
50 | (1) |
|
4.2.5 Tonality Representation |
|
|
50 | (2) |
|
|
52 | (1) |
|
|
53 | (2) |
|
|
55 | (16) |
|
5.1 Three Notions of Time in Music, an Introduction |
|
|
55 | (1) |
|
5.2 Whole Note Time: Measuring Time in Fractions |
|
|
56 | (1) |
|
5.3 Time Signature and Tempo |
|
|
57 | (2) |
|
|
58 | (1) |
|
|
58 | (1) |
|
5.4 Whole Time/Actual Time Conversions |
|
|
59 | (2) |
|
5.5 Whole Time/Beat Time Conversion |
|
|
61 | (2) |
|
5.6 Representational Considerations |
|
|
63 | (6) |
|
5.6.1 Whole Note Time Representation |
|
|
64 | (1) |
|
5.6.2 Position and Duration |
|
|
64 | (1) |
|
|
65 | (1) |
|
5.6.4 Time Signature and Tempo classes |
|
|
66 | (1) |
|
5.6.5 The Time Conversion Algorithms |
|
|
67 | (2) |
|
|
69 | (2) |
|
6 The Note And Note Aggregates |
|
|
71 | (18) |
|
6.1 Notes and Their Aggregative Partners |
|
|
71 | (3) |
|
|
71 | (2) |
|
|
73 | (1) |
|
|
73 | (1) |
|
|
74 | (9) |
|
6.2.1 The Note Inheritance Hierarchy |
|
|
74 | (7) |
|
6.2.2 Semantic Clarifications |
|
|
81 | (2) |
|
|
83 | (5) |
|
|
83 | (1) |
|
|
84 | (3) |
|
|
87 | (1) |
|
|
88 | (1) |
|
|
89 | (14) |
|
7.1 A Brief Introduction to Chords |
|
|
89 | (3) |
|
7.1.1 Tertian Chord Types |
|
|
90 | (1) |
|
7.1.2 Secundal Chord Types |
|
|
90 | (1) |
|
7.1.3 Quartal Chord Types |
|
|
91 | (1) |
|
7.1.4 Secondary Chord Types |
|
|
91 | (1) |
|
7.2 Chord Template and Chord Representation |
|
|
92 | (3) |
|
7.2.1 Template and Chord Class Design |
|
|
93 | (1) |
|
|
93 | (2) |
|
7.3 Chord Categories: Syntax and Examples |
|
|
95 | (5) |
|
|
96 | (1) |
|
|
97 | (1) |
|
|
98 | (1) |
|
|
99 | (1) |
|
|
100 | (3) |
|
|
103 | (12) |
|
8.1 A Simple Genealogical Model for Instruments |
|
|
103 | (2) |
|
8.2 A Software Model for an Instrument Catalog |
|
|
105 | (1) |
|
8.3 The Instrument Catalog Class Model |
|
|
105 | (7) |
|
|
107 | (1) |
|
8.3.2 Accessing Instrument Data |
|
|
107 | (2) |
|
8.3.3 The Instrument Catalog as Persistent Data |
|
|
109 | (2) |
|
8.3.4 Instrument Catalog Initialization |
|
|
111 | (1) |
|
|
112 | (3) |
|
|
115 | (20) |
|
9.1 What is a Musical Score? |
|
|
116 | (1) |
|
9.2 Score as a Class Model |
|
|
117 | (7) |
|
|
118 | (3) |
|
9.2.2 Event Sequences for Tempo, Time Signature, and Dynamics |
|
|
121 | (2) |
|
9.2.3 What Happened to Key Signature? |
|
|
123 | (1) |
|
9.2.4 Putting It All Together |
|
|
123 | (1) |
|
9.3 Time-Based Note Search |
|
|
124 | (6) |
|
|
125 | (1) |
|
9.3.2 Notes and Intervals |
|
|
125 | (1) |
|
9.3.3 Interval Search Trees |
|
|
126 | (1) |
|
9.3.4 Finding all Notes Sounding in an Interval |
|
|
127 | (2) |
|
9.3.5 Finding All Notes Starting in an Interval |
|
|
129 | (1) |
|
9.3.6 Adding Note Search to Score |
|
|
129 | (1) |
|
|
130 | (3) |
|
9.4.1 Interval Tree Update using the Observer Pattern |
|
|
130 | (3) |
|
|
133 | (1) |
|
|
133 | (2) |
|
10 Rendering Score To Midi |
|
|
135 | (12) |
|
10.1 An Introduction to MIDI |
|
|
135 | (5) |
|
10.1.1 Tracks, Channels, and Messages |
|
|
136 | (2) |
|
10.1.2 Time Representation in MIDI |
|
|
138 | (1) |
|
|
138 | (2) |
|
10.2 Mapping a Score to a MIDI File |
|
|
140 | (1) |
|
|
141 | (1) |
|
10.4 Score to MIDI Conversion Algorithms |
|
|
142 | (2) |
|
10.5 Converting a Line to a MIDI File |
|
|
144 | (1) |
|
|
145 | (2) |
|
11 Variable Dynamics And Tempo |
|
|
147 | (18) |
|
11.1 What are Variable Dynamics and Tempo? |
|
|
147 | (2) |
|
11.1.1 An Introduction to Variable Dynamics and Tempo |
|
|
147 | (2) |
|
11.2 Functions and Graphs |
|
|
149 | (7) |
|
11.2.1 The Piecewise Linear Function |
|
|
150 | (2) |
|
11.2.2 The Stepwise Function |
|
|
152 | (1) |
|
11.2.3 The Constant Function |
|
|
153 | (1) |
|
11.2.4 Generic Univariate Function |
|
|
153 | (2) |
|
11.2.5 Domain Reset with Affine Transformations |
|
|
155 | (1) |
|
11.3 Using Functions for Variable Tempo |
|
|
156 | (4) |
|
11.3.1 Tempo Functions and the Tempo Event Sequence |
|
|
157 | (2) |
|
11.3.2 Tempo Functions, MIDI Generation and Time Conversion |
|
|
159 | (1) |
|
11.4 Using Variable Dynamics Functions |
|
|
160 | (3) |
|
11.4.1 Details on Variable Dynamics Functions |
|
|
160 | (1) |
|
11.4.2 Computing MIDI Velocity Events |
|
|
161 | (2) |
|
|
163 | (2) |
|
12 Further Representations |
|
|
165 | (8) |
|
|
165 | (2) |
|
12.1.1 Harmonic Context and Harmonic Context Track Representations |
|
|
166 | (1) |
|
12.2 A Syntax for Constructing Music Structures |
|
|
167 | (4) |
|
|
168 | (1) |
|
|
168 | (3) |
|
12.2.3 Invoking the Parser in Code |
|
|
171 | (1) |
|
|
171 | (1) |
|
|
172 | (1) |
|
PART 2 MUSIC TRANSFORMATIONS |
|
|
173 | (136) |
|
13 An Introduction To Music Transformations |
|
|
175 | (4) |
|
13.1 What is a Music Transformation? |
|
|
175 | (1) |
|
13.2 Outline on Transformations |
|
|
176 | (1) |
|
13.3 A Word on Machine Learning |
|
|
177 | (1) |
|
|
178 | (1) |
|
14 A Constraint Engine For Pitch Assignment |
|
|
179 | (12) |
|
14.1 Constraint Programming |
|
|
179 | (1) |
|
14.2 Music Constraints and Solution Spaces |
|
|
180 | (2) |
|
14.3 Music Constraint Programming Elements |
|
|
182 | (5) |
|
|
182 | (2) |
|
|
184 | (2) |
|
14.3.3 Types of Constraints |
|
|
186 | (1) |
|
14.3.4 Invoking the Pitch Constraint Solver |
|
|
187 | (1) |
|
|
187 | (3) |
|
|
190 | (1) |
|
15 Shift: A Transform For Key Change |
|
|
191 | (16) |
|
15.1 An Overview of the Shift Transform |
|
|
191 | (2) |
|
15.2 Structural Design of the Shift Transform |
|
|
193 | (1) |
|
15.3 Tonal and Pitch Functions |
|
|
194 | (4) |
|
|
194 | (1) |
|
15.3.2 Cross Tonality Shift Tonal Function |
|
|
195 | (2) |
|
15.3.3 General Pitch Function |
|
|
197 | (1) |
|
15.3.4 Cross Tonality Shift Pitch Function |
|
|
197 | (1) |
|
|
198 | (4) |
|
15.4.1 Problem Context and Interface |
|
|
198 | (1) |
|
|
199 | (1) |
|
15.4.3 Clarifying Shifting with Mode Change |
|
|
200 | (1) |
|
15.4.4 Clarifying Shift with Secondary Chords |
|
|
201 | (1) |
|
|
202 | (4) |
|
15.5.1 Simple Key Shift using Intervals |
|
|
202 | (1) |
|
15.5.2 Shift with Modality Change |
|
|
203 | (1) |
|
15.5.3 Modality and Modal Index Change |
|
|
204 | (1) |
|
15.5.4 Modulating Sequence |
|
|
205 | (1) |
|
|
206 | (1) |
|
16 Reflection: A Transform For Melodic Inversion |
|
|
207 | (16) |
|
16.1 An Overview of Melodic Reflection |
|
|
208 | (1) |
|
|
209 | (2) |
|
16.2.1 Definition and Permutation Composition |
|
|
209 | (1) |
|
16.2.2 Using Permutations |
|
|
210 | (1) |
|
16.3 Class Structures for the Reflection Transform |
|
|
211 | (1) |
|
|
212 | (5) |
|
16.4.1 Scalar Reflection Details |
|
|
212 | (1) |
|
16.4.2 T Diatonic Reflection |
|
|
213 | (1) |
|
16.4.3 Examples of Scalar Reflection |
|
|
214 | (3) |
|
16.5 Chromatic Reflection |
|
|
217 | (4) |
|
16.5.1 Chromatic Reflection Details |
|
|
217 | (1) |
|
16.5.2 T Chromatic Reflection |
|
|
218 | (1) |
|
16.5.3 Examples of Chromatic Reflection |
|
|
219 | (2) |
|
|
221 | (2) |
|
17 Reshape: A Transform For Melodic Shaping |
|
|
223 | (11) |
|
|
223 | (2) |
|
17.2 A Model for Shaping Functions |
|
|
225 | (3) |
|
|
225 | (1) |
|
17.2.2 The Pitch Range Interpreter |
|
|
226 | (2) |
|
17.3 A Representation for Shaping Functions and Pitch Interpreters |
|
|
228 | (6) |
|
17.3.1 The Pitch Range Interpreters, Description and Examples |
|
|
229 | (2) |
|
17.3.2 Shaping Classes, Description and Examples |
|
|
231 | (3) |
|
17 A Melodic Forms and Constraints |
|
|
234 | (13) |
|
17.5 The Reshape Transform |
|
|
238 | (1) |
|
17.5.1 The TReshape Transform API |
|
|
239 | (1) |
|
|
239 | (6) |
|
|
245 | (2) |
|
18 Harmonic Transcription: Preserving Melody Over Harmonic Change |
|
|
247 | (14) |
|
|
247 | (2) |
|
18.2 Melodic Analysis for Similarity |
|
|
249 | (2) |
|
18.2.1 Harmonic Role Analysis |
|
|
249 | (1) |
|
18.2.2 Melodic Contour Analysis |
|
|
249 | (1) |
|
|
250 | (1) |
|
18.3 Further Constraining the Search Space |
|
|
251 | (2) |
|
18.3.1 The Melodic Window |
|
|
252 | (1) |
|
18.3.2 Melodic Variance (Tunnel) |
|
|
252 | (1) |
|
18.4 The Harmonic Transcription Transform |
|
|
253 | (2) |
|
|
255 | (4) |
|
|
259 | (2) |
|
19 Retrograde: Reversing A Melody |
|
|
261 | (8) |
|
|
261 | (2) |
|
19.2 The Retrograde Transform |
|
|
263 | (1) |
|
19.2.1 The Retrograde Transform Design |
|
|
263 | (1) |
|
19.2.2 The Retrograde Transform API |
|
|
264 | (1) |
|
|
264 | (3) |
|
|
267 | (2) |
|
20 Melodic Search And Pattern Substitution |
|
|
269 | (18) |
|
|
269 | (7) |
|
20.1.1 Melodic Search Options |
|
|
271 | (1) |
|
20.1.2 Melodic Search Technical Details |
|
|
272 | (3) |
|
20.1.3 Melodic Search API |
|
|
275 | (1) |
|
20.1.4 Melodic Search Examples |
|
|
275 | (1) |
|
20.2 The Melodic Pattern Substitution Transform |
|
|
276 | (5) |
|
20.2.1 The Foundations of Melodic Pattern Substitution |
|
|
276 | (2) |
|
20.2.2 An Approach to Melodic Pattern Substitution |
|
|
278 | (1) |
|
20.2.3 Harmonic Context Expression Rules |
|
|
278 | (2) |
|
20.2.4 The Melodic Pattern Substitution API |
|
|
280 | (1) |
|
|
281 | (3) |
|
|
284 | (3) |
|
21 Dilation: Musical Expansion And Contraction |
|
|
287 | (8) |
|
21.1 A Discussion on Dilation |
|
|
287 | (4) |
|
|
288 | (3) |
|
21.1.2 The Dilation Transform API |
|
|
291 | (1) |
|
|
291 | (2) |
|
|
293 | (2) |
|
22 The Step Shift Transform And Sequences |
|
|
295 | (10) |
|
22.1 An Introduction to Step Shift |
|
|
295 | (1) |
|
|
296 | (4) |
|
|
296 | (2) |
|
22.2.2 Simple Chord Remap |
|
|
298 | (1) |
|
|
298 | (1) |
|
22.2.4 The Step Shift API |
|
|
299 | (1) |
|
|
300 | (3) |
|
|
303 | (2) |
|
|
305 | (4) |
|
23.1 The Quest for a Broader Musical Synthesis |
|
|
305 | (1) |
|
23.2 The Quest for Real-time Synthesis |
|
|
306 | (1) |
|
23.3 Automated Score Analysis |
|
|
307 | (1) |
|
|
307 | (2) |
|
|
309 | (22) |
|
|
309 | (2) |
|
|
309 | (1) |
|
A.2 Pentatonic Modalities |
|
|
310 | (1) |
|
|
310 | (1) |
|
|
310 | (1) |
|
|
310 | (1) |
|
|
311 | (2) |
|
|
313 | (2) |
|
|
315 | (4) |
|
|
315 | (1) |
|
|
316 | (1) |
|
|
316 | (3) |
|
E A Brief Introduction To XML |
|
|
319 | (2) |
|
E.1 Tags, Elements, and Attributes |
|
|
319 | (1) |
|
|
319 | (1) |
|
E.3 Reading an XML File with Python |
|
|
320 | (1) |
|
|
321 | (2) |
|
G Processing Constraints: The Design Of A Pitch Constraint Engine |
|
|
323 | (8) |
|
G.1 Two Straight Forward Solutions |
|
|
323 | (1) |
|
|
323 | (2) |
|
G.1.2 Breadth-First Search and Chains |
|
|
325 | (2) |
|
G.2 Improvements on the Constraint Solution Algorithm |
|
|
327 | (4) |
Bibliography |
|
331 | |