Automated Analysis and Transcription of Rhythm Data and Their Use for Composition
Total Page:16
File Type:pdf, Size:1020Kb
Automated Analysis and Transcription of Rhythm Data and their Use for Composition submitted by Georg Boenn for the degree of Doctor of Philosophy of the University of Bath Department of Computer Science February 2011 COPYRIGHT Attention is drawn to the fact that copyright of this thesis rests with its author. This copy of the thesis has been supplied on the condition that anyone who consults it is understood to recognise that its copyright rests with its author. This thesis may not be consulted, photocopied or lent to other libraries without the permission of the author for 3 years from the date of acceptance of the thesis. Signature of Author . .................................. Georg Boenn To Daiva, the love of my life. 1 Contents 1 Introduction 17 1.1 Musical Time and the Problem of Musical Form . 17 1.2 Context of Research and Research Questions . 18 1.3 Previous Publications . 24 1.4 Contributions..................................... 25 1.5 Outline of the Thesis . 27 2 Background and Related Work 28 2.1 Introduction...................................... 28 2.2 Representations of Musical Rhythm . 29 2.2.1 Notation of Rhythm and Metre . 29 2.2.2 The Piano-Roll Notation . 33 2.2.3 Necklace Notation of Rhythm and Metre . 34 2.2.4 Adjacent Interval Spectrum . 36 2.3 Onset Detection . 36 2.3.1 ManualTapping ............................... 36 The times Opcode in Csound . 38 2.3.2 MIDI ..................................... 38 MIDIFiles .................................. 38 MIDIinReal-Time.............................. 40 2.3.3 Onset Data extracted from Audio Signals . 40 2.3.4 Is it sufficient just to know about the onset times? . 41 2.4 Temporal Perception . 42 2.4.1 Shortest Timing Intervals . 43 2.4.2 The100msThreshold............................ 43 2.4.3 FastestBeats ................................. 44 2.4.4 SlowestBeats................................. 44 2.4.5 The Perceptual Time Scale . 44 2.5 Agogics ........................................ 44 2.6 MusicalOrnaments.................................. 46 2.7 GestaltTheory .................................... 49 2 2.7.1 K-means Clustering . 55 2.8 Metre ......................................... 55 2.8.1 Metre and the Dynamics of Attending . 56 2.8.2 Modelling of Neural Oscillations . 61 2.8.3 Bayesian Techniques for Metre Detection . 62 2.9 Quantisation ..................................... 65 2.9.1 GridQuantisation .............................. 65 2.9.2 Context-freeGrammar............................ 65 2.9.3 Pattern-Based Quantisation . 66 2.9.4 Models using Bayesian Statistics . 67 2.9.5 IRCAM’sKANT............................... 67 2.10TempoTracking ................................... 69 2.10.1 Multi-AgentSystems............................. 69 2.10.2 Probabilistic Methods . 70 2.10.3 PatternMatching............................... 71 2.11Summary ....................................... 72 3 The Farey Sequence 74 3.1 Introduction...................................... 74 3.2 The Farey Sequence as a Model for Musical Rhythm and Metre . 74 3.2.1 Building Consecutive Ratios Anywhere in Farey Sequences . 78 3.2.2 The Farey Sequence, Arnol’d Tongues and the Stern-Brocot tree . 79 3.2.3 Farey Sequences and Musical Rhythms . 80 Musically Relevant Structure of the Farey Sequence . 80 3.2.4 The Farey Sequence and Musical Notation . 82 3.3 Filtered Farey Sequences . 87 3.3.1 Introduction ................................. 87 3.3.2 Polyrhythms and Polyphony . 88 Hemiola ................................ 88 Polyrhythms as Compound Rhythms . 89 Ockeghem............................... 90 Stravinsky............................... 93 AfricanDrumming .......................... 98 3.3.3 Rhythm Transformations . 100 3.3.4 GreekVerseRhythms ............................ 100 3.3.5 Filters Based on Sequences of Natural Numbers . 104 Partitioning.................................. 105 3.3.6 Filters Based on the Prime Number Composition of an Integer . 105 Barlow’s Indigestibility Function . 106 Barlow’s Harmonicity Function . 107 Euler’s gradus suavitatis . 108 3 3.3.7 MetricalFilters................................ 109 Calculation of the Metrical Tempo Grid . 109 Graphical Derivation of Metrical Hierarchy . 110 3.4 Summary ....................................... 113 4 Experimental Framework 115 4.1 Introduction...................................... 115 4.2 TestMaterial ..................................... 115 4.3 Distance Measurements . 116 4.3.1 Euclidean Distance . 116 4.4 A Measure for Contrast in Rhythmic Sequences . 117 5 Grouping of Onset Data 118 5.1 Introduction...................................... 118 5.2 Calculation of Duration Classes . 119 5.2.1 Grouping of Noisy Beat Sequences . 122 5.2.2 Grouping of a Tempo-Modulated Rhythmic Ostinato . 124 5.3 Automatic Onset Segmentation . 127 5.4 Method of Overlapping Windows . 130 5.5 Some Further Examples of Grouping . 132 5.6 Summary and Discussion . 132 6 Farey Sequence Grid Quantisation 137 6.1 Introduction...................................... 137 6.2 The Quantisation Algorithm . 137 6.2.1 The Transcription Algorithm . 141 6.3 TestResults...................................... 143 6.3.1 The1955recording.............................. 144 6.3.2 The1981recording.............................. 145 6.3.3 EarlyTestResults .............................. 147 6.4 Summary and Discussion . 148 7 Retentional Maps of Rhythms and their Use for Composition and Music Analysis 159 7.1 Retentions and Protentions . 160 7.2 OnsetRhythms.................................... 160 7.3 RetentionalRhythms................................. 161 7.4 Compositional Applications . 165 7.5 Retentional Rhythms and Farey Sequences . 166 7.6 Examples ....................................... 167 7.7 Retentional Rhythms and Neuroscience . 168 7.8 Conclusion ...................................... 173 4 8 Future Work 177 8.1 Introduction...................................... 177 8.2 RetentionalRhythms................................. 177 8.3 Quantisation and Transcription . 178 9 Summary and Conclusion 179 A Csound Instrument for Interactive Onset Recording 183 B Examples of Quantisation Results Obtained from Commercial Software 184 5 List of Figures 2-1 Beginning of the Aria of J.S. Bach’s Goldberg Variations. Rows of equidistant dots denote pulsations on a specific level within the metrical hierarchy introduced by the nature of the 3/4 metre. The upper row represents 1/8 note pulsation, the centre row represents the beat level in 1/4 notes, and the lowest row indicates the strong downbeats, which form a pulsation in dotted 1/2 notes. Notes are found on weaker metrical levels if they do not coincide exactly with the downbeat. 30 2-2 Notation of note durations and rests as ratios in relation to the semibreve (whole note) as a reference but without reference to absolute physical time or musical tempo.......................................... 31 2-3 Principle of subdivision in CPN as extensions of basic durations given in figure 2-2. Higher prime number subdivisons are not often used in Western music, whereas subdivisions based on prime factors of 2 and 3 are very common. 32 2-4 Common time signatures for various metres in CPN. The notes display the pul- sationsonthebeatlevel................................ 32 2-5 A MIDI track in piano-roll notation. The view at the bottom indicates note velocities. They are equivalent to the force excerted on the key by the player . 33 2-6 The Arab rhythm th¯aqil th¯ani, after Right (2001). 35 2-7 The Ewe rhythm from Ghana, Africa, after Sethares (2007). 35 2-8 Adjacent interval spectrum of the compound rhythm of the first two bars of J.S. Bach’s Aria performed by Glenn Gould in 1981, with boxes plotting the normalised durations of inter-onset intervals on the y-axis. Figure 2-1 shows the score. ......................................... 37 2-9 Perceptual timing thresholds and musical time structures. 45 2-10 “Illustrations of the Gestalt principles of proximity, similarity, and good contin- uation.” (Deutsch, 1999a, p.300, Figure 1). Reproduced with kind permission. 50 2-11 “The beginning of Recuerdos de la Alhambra, by Tarrega. Although the tones are presented one at a time, two parallel lines are perceived, organized in accordance with pitch proximity.” (Deutsch, 1999a, p.309, Figure 5). Reproduced with kind permission. ...................................... 53 2-12 Hemiola with onsets marked by small integer ratios. The lowest staff shows its compound rhythmic structure. 58 6 2-13 Diagram of a 4-beat 8-cycle isochronous metre including a half-measure level. The pattern starts at beat 1 with arrows indicating the direction of temporal flow. The size of the dots indicates different periods of pulsation. After Justin London, reproduced with kind permission. 59 2-14 NI-meter structure 3-3-2-2-2 with 5 beats modelling Leonard Bernstein’s “Amer- ica”rhythm. ..................................... 60 3-1 Rhythm of two quavers against three. Onsets marked by F3. Its compound rhythm shown as the union of the two upper voices. 75 3-2 One of Messiaen’s non-retrogradable rhythms. His technique uses a central du- ration, marked ‘+’, around which a rhythmic pattern is mirrored: Pattern A is the mirror of pattern B. Durations are also shown in multiples of a semiquaver. 76 3-3 The Stern-Brocot tree. Its left-hand branch growing from 0/1 and 1/1 is called theFareytree. .................................... 79 3-4 F17 ........................................... 81 3-5 Rhythm of Horn Motive from the 1st Movement of Mahler’s 9th Symphony. 83 3-6 Hemiola with onsets marked