Upload
yamabushi
View
219
Download
0
Embed Size (px)
Citation preview
8/13/2019 Music Theory Performance Analysis
http://slidepdf.com/reader/full/music-theory-performance-analysis 1/43
Music Theory andPerformance Analysis with
Sebastian and CzernJames Tauber @jtauber
8/13/2019 Music Theory Performance Analysis
http://slidepdf.com/reader/full/music-theory-performance-analysis 2/43
8/13/2019 Music Theory Performance Analysis
http://slidepdf.com/reader/full/music-theory-performance-analysis 3/43
Sebastian
8/13/2019 Music Theory Performance Analysis
http://slidepdf.com/reader/full/music-theory-performance-analysis 4/43
Mathematical:Symbolic more than
Numerical
8/13/2019 Music Theory Performance Analysis
http://slidepdf.com/reader/full/music-theory-performance-analysis 5/43
repetitive
hierarchicalsequent ial + parallel
factorableunderspecified
Modeling Music
8/13/2019 Music Theory Performance Analysis
http://slidepdf.com/reader/full/music-theory-performance-analysis 6/43
Point of Departure
[ {PITCH: 3, OCTAVE: 5, DURATION: 16},
{PITCH: 2, OCTAVE: 4, DURATION: 8}
]
{
{OFFSET: 0, PITCH: 37, DURATION: 16},
{OFFSET: 16, PITCH: 21, DURATION: 8}
}
or
8/13/2019 Music Theory Performance Analysis
http://slidepdf.com/reader/full/music-theory-performance-analysis 7/43
Three Blind Mice
mice =
(seq1 * 2) + (seq2 + seq2a) + (seq2 + seq2b) + ((seq3 + seq3a) * 2) +
(seq3 + seq3b) + seq1
8/13/2019 Music Theory Performance Analysis
http://slidepdf.com/reader/full/music-theory-performance-analysis 8/43
Three Types of Sequence
HSeq — Horizontal / Sequent ialVSeq — Vertical / Parallel
OSeq — Offset-based
8/13/2019 Music Theory Performance Analysis
http://slidepdf.com/reader/full/music-theory-performance-analysis 9/43
HSeqeach element follows the previous
concatenate(next_seq)
repeat(count)
__add__
__mul__
A = B * 2 + C
8/13/2019 Music Theory Performance Analysis
http://slidepdf.com/reader/full/music-theory-performance-analysis 10/43
8/13/2019 Music Theory Performance Analysis
http://slidepdf.com/reader/full/music-theory-performance-analysis 11/43
OSeq
factory function that returns a class
using the given offset attribute andduration attribute
def OSeq(offset_attr,
duration_attr)has operators of both HSeq and VSeq
8/13/2019 Music Theory Performance Analysis
http://slidepdf.com/reader/full/music-theory-performance-analysis 12/43
All Sequences
__init__(*elements)
__getitem__ & __len__
__eq__ & __ne__
transform(func)
__or__
A = B | transpose(5) | reverse()
8/13/2019 Music Theory Performance Analysis
http://slidepdf.com/reader/full/music-theory-performance-analysis 13/43
8/13/2019 Music Theory Performance Analysis
http://slidepdf.com/reader/full/music-theory-performance-analysis 14/43
8/13/2019 Music Theory Performance Analysis
http://slidepdf.com/reader/full/music-theory-performance-analysis 15/43
Pitch
note names
two numbers or one?
MIDI pitch
Hewlett’s base-40 system
my own system
just have transforms for conversion
8/13/2019 Music Theory Performance Analysis
http://slidepdf.com/reader/full/music-theory-performance-analysis 16/43
8/13/2019 Music Theory Performance Analysis
http://slidepdf.com/reader/full/music-theory-performance-analysis 17/43
Lilypond
from sebastian.lilypond.interp import parse seq1 = parse("e4. d c r")seq2 = parse("g4. f4 f8 e4.")seq2a = parse("r4.")seq2b = parse("r4 g8")
seq3 = parse("c'4 c'8 b a b c'4 g8 g4")seq3a = parse("g8")seq3b = parse("f8")
8/13/2019 Music Theory Performance Analysis
http://slidepdf.com/reader/full/music-theory-performance-analysis 18/43
Lilypond
seq1 = parse("e4. d c r")
[{'midi_pitch': 52, 'offset_64': 0,
'duration_64': 24}, {'midi_pitch': 50,
'offset_64': 24, 'duration_64': 24},
{'midi_pitch': 48, 'offset_64': 48,'duration_64': 24}, {'offset_64': 96}]
8/13/2019 Music Theory Performance Analysis
http://slidepdf.com/reader/full/music-theory-performance-analysis 19/43
MIDI
library for parsing and generating MIDI files
from sebastian.midi import write_midi write_midi. write("mice.mid", [ mice])
8/13/2019 Music Theory Performance Analysis
http://slidepdf.com/reader/full/music-theory-performance-analysis 20/43
Alberti
common classical figuration of a triad
a function from a triad to a sequence ofnotes
great example of factorization andunderspecification
8/13/2019 Music Theory Performance Analysis
http://slidepdf.com/reader/full/music-theory-performance-analysis 21/43
Alberti
def alberti(triad):
return HSeq([ triad[0], triad[2], triad[1], triad[2]
])
8/13/2019 Music Theory Performance Analysis
http://slidepdf.com/reader/full/music-theory-performance-analysis 22/43
Alberti
root_triad = VSeq( Point(degree=1), Point(degree=3), Point(degree=5))
quaver = Point({DURATION_64: 8}) alberti_seq =
OSequence( alberti(root_triad) * 16 | add(quaver) )
8/13/2019 Music Theory Performance Analysis
http://slidepdf.com/reader/full/music-theory-performance-analysis 23/43
Alberti
C_major = Key("C", major_scale)
seq = alberti_seq | degree_in_key_with_octave(C_major, 5) | midi_pitch() write_midi. write("alberti.mid", [seq])
8/13/2019 Music Theory Performance Analysis
http://slidepdf.com/reader/full/music-theory-performance-analysis 24/43
What’s Next?
a lot more examples
better use of MIDI input control over instruments in MIDIoutput
nesting of sequences (for hierarchy) the notion of a “head” point
8/13/2019 Music Theory Performance Analysis
http://slidepdf.com/reader/full/music-theory-performance-analysis 25/43
Sebastian
8/13/2019 Music Theory Performance Analysis
http://slidepdf.com/reader/full/music-theory-performance-analysis 26/43
github.com/
jtauber/
sebastian
8/13/2019 Music Theory Performance Analysis
http://slidepdf.com/reader/full/music-theory-performance-analysis 27/43
Czerny
8/13/2019 Music Theory Performance Analysis
http://slidepdf.com/reader/full/music-theory-performance-analysis 28/43
What’s the Difference
between the “Score” and the “Performance”
8/13/2019 Music Theory Performance Analysis
http://slidepdf.com/reader/full/music-theory-performance-analysis 29/43
Positive vs Negative
Differences
study expression the performer isadding
what errors were made? what
inconsistencies or unevenness?
8/13/2019 Music Theory Performance Analysis
http://slidepdf.com/reader/full/music-theory-performance-analysis 30/43
8/13/2019 Music Theory Performance Analysis
http://slidepdf.com/reader/full/music-theory-performance-analysis 31/43
Representing the Score
just another sequence of eventsbut this time desired events
and with less information
8/13/2019 Music Theory Performance Analysis
http://slidepdf.com/reader/full/music-theory-performance-analysis 32/43
C major scale ascending thendescending over oneoctave
represent as sequenceof note + duration
60 8 62 4 64 4 65 4
67 4 69 4 71 4 72 8 71 4
69 4 67 4 65 4 64 4 62 4 60 8
8/13/2019 Music Theory Performance Analysis
http://slidepdf.com/reader/full/music-theory-performance-analysis 33/43
MIDI Performance 4d54 6864 0000 0006 0000 0001 01e0 4d54 726b 0000 00cd 00ff 0308 2364 6566 6175 6c74 00ff 0413 5374 6569 6e77 6179 2050 6961 6e6f 2048 616c 6c00 ff58 0404 0218 0800 ff59 0200 0000 ff54 0521 0000 0000
00ff 5103 07a1 2089 6d90 3c4f 832b 903e 3a2c 903c 0081 3290 3e00 0390 403f 8137 9040 001f 9041 4181 3e90 4100 0790 4344 812d 9043 002a 9045 4d81 2090 4500 2690 473b 814b 9047 0018 9048 5583 2690 4800
0b90 473b 8148 9047 0006 9045 3b81 5990 433d 0490 4500 8132 9043 0022 9041 3981 2c90 4100 2090 4038 810e 9040 0035 903e 3081 1490 3e00 4190 3c42 831c 903c 0000 ff2f 00
8/13/2019 Music Theory Performance Analysis
http://slidepdf.com/reader/full/music-theory-performance-analysis 34/43
Performance Eventsoffset in “ticks”
MIDI pitch
velocity
0 velocity indicatesnote off
1261 60 79 1688 62 58 1732 60 0 1910 62 0 1913 64 63 2096 64 0 2127 65 65 2317 65 0 2324 67 68 2497 67 0 2539 69 77
2699 69 0 2737 71 59 2940 71 0 2964 72 85 3386 72 0 ...
8/13/2019 Music Theory Performance Analysis
http://slidepdf.com/reader/full/music-theory-performance-analysis 35/43
Performance Eventsconvert fromnote start + note end
to just
start + duration
1261 60 79 471 1688 62 58 222 1913 64 63 183 2127 65 65 190 2324 67 68 173 2539 69 77 160 2737 71 59 203 2964 72 85 422 3397 71 59 200
3603 69 59 221 3820 67 61 182 4036 65 57 172 4240 64 56 142 4435 62 48 148
4648 60 66 412
8/13/2019 Music Theory Performance Analysis
http://slidepdf.com/reader/full/music-theory-performance-analysis 36/43
We Want to Diff 1261 60 79 471 1688 62 58 222 1913 64 63 183 2127 65 65 190 2324 67 68 173 2539 69 77 160 2737 71 59 203 2964 72 85 422 3397 71 59 200
3603 69 59 221 3820 67 61 182 4036 65 57 172 4240 64 56 142 4435 62 48 148
4648 60 66 412
60 8 62 4 64 4 65 4 67 4 69 4 71 4 72 8 71 4
69 4 67 4 65 4 64 4 62 4
60 8
vs
8/13/2019 Music Theory Performance Analysis
http://slidepdf.com/reader/full/music-theory-performance-analysis 37/43
Want to Diff
to diff, you must first align
alignment is a dynamic programmingproblem generally relying on notion ofscoring the relati ve cost of adding,deletion or changing items
the “change” score can be very domainspecific
Needleman-Wunsch algorithm
8/13/2019 Music Theory Performance Analysis
http://slidepdf.com/reader/full/music-theory-performance-analysis 38/43
“Change” Score
just consider note value: +1 if same, 0 ifdifferent
or: +1 if same, +0.5 if a tone or semi- tone apart, 0 if more
duration? wrong octave?
8/13/2019 Music Theory Performance Analysis
http://slidepdf.com/reader/full/music-theory-performance-analysis 39/43
Result ((60, 8), (1261, 60, 79, 471))((62, 4), (1688, 62, 58, 222))((64, 4), (1913, 64, 63, 183))((65, 4), (2127, 65, 65, 190))((67, 4), (2324, 67, 68, 173))
((69, 4), (2539, 69, 77, 160))((71, 4), (2737, 71, 59, 203))((72, 8), (2964, 72, 85, 422))((71, 4), (3397, 71, 59, 200))((69, 4), (3603, 69, 59, 221))
((67, 4), (3820, 67, 61, 182))((65, 4), (4036, 65, 57, 172))((64, 4), (4240, 64, 56, 142))((62, 4), (4435, 62, 48, 148))((60, 4), (4648, 60, 66, 412))
8/13/2019 Music Theory Performance Analysis
http://slidepdf.com/reader/full/music-theory-performance-analysis 40/43
Visualizing Mistakes
8/13/2019 Music Theory Performance Analysis
http://slidepdf.com/reader/full/music-theory-performance-analysis 41/43
Czerny
8/13/2019 Music Theory Performance Analysis
http://slidepdf.com/reader/full/music-theory-performance-analysis 42/43
github.com/jtauber/
czerny