metamidi a tool for automatic metadata extraction from

  • Slides: 18
Download presentation
metamidi: a tool for automatic metadata extraction from MIDI files Tomás Pérez-García, Jose M.

metamidi: a tool for automatic metadata extraction from MIDI files Tomás Pérez-García, Jose M. Iñesta, and David Rizo Computer Music Laboratory University of Alicante {tperez, inesta, drizo}@dlsi. ua. es

Introduction • Metadata permit organization, indexing, and retrieval of music information. • Metadata are

Introduction • Metadata permit organization, indexing, and retrieval of music information. • Metadata are an important subject of research. • metamidi is introduced as a tool for metadata extraction from MIDI files: – Global technical – Track content description and metaevents

MIDI Metadata • File global metadata: – filename, text metaevents, size, format, number of

MIDI Metadata • File global metadata: – filename, text metaevents, size, format, number of tracks, resolution, tempo, meter, key, timbral, … • Track metatada: – Text metaevents: • track name, instrument name, lyrics, markers, … – Content description: • duration, occupation, polyphony, pitch range, …

The metamidi tool • Downloadable from our group web site – http: //grfia. dlsi.

The metamidi tool • Downloadable from our group web site – http: //grfia. dlsi. ua. es/gen. php? id=resources • Source code, DTD, XSD • Developed in ANSI C 4. 2. 4 version • Open source • Tested under Linux.

The metamidi tool • metamidi –{r|x|l} file [-o fileoutput] Metadata output formats: -r -r:

The metamidi tool • metamidi –{r|x|l} file [-o fileoutput] Metadata output formats: -r -r: register -l: line -x: XML ------- Midi features -------name: /Users/inesta/metamidi/straussmyrthenbluten. mid text metaevent: $ size: 48323 format: 1 num tracks: 5 resolution: 1024 tempo: 176. 00 tempo changes: 70 meter: 6/8(0), 1/4(15360), 6/8(24576), 1/4(113664), 3/4(114688) meter changes: 5 key: FM(0), CM(225280), FM(335872), Bb. M(385024), FM(495616), Bb. M(606208) key changes: 6 instruments: 1 percussion: -1 duration: 1515521 has sysex: 0 ------ Features of track 0 ---text metaevent: $ channel: -1 duration: 1515521 duration rate: 1. 00 occupation: 0 occupation rate: 0. 00 polyphony duration rate: 0. 00 max polyphony: 0 avg polyphony: 0. 00 low pitch: -1

The metamidi tool • metamidi –{r|x|l} file [-o fileoutput] Metadata output formats: -l -r:

The metamidi tool • metamidi –{r|x|l} file [-o fileoutput] Metadata output formats: -l -r: register -l: line -x: XML '/Users/inesta/metamidi/straussmyrthenbluten. mid'; '$'; 48323; 1; 5; 1024; 176. 00; 70; 6/8(0), 1/4(15360), 6/8(24576), 1/4(113664), 3/4(114688); 5; FM(0), CM(225280), FM(335872), Bb. M(385024 ), FM(495616), Bb. M(606208); 6; 1; -1; 1515521; 0; |0; '$'; -1; 1515521; 1. 00; 0; 0. 00; 1; -1; 0; 0; 0; $; |1; 'Acoustic Grand Piano'; 1; 1515521; 1. 00; 606315; 0. 40; 0. 47; 4; 1. 69; 33; 69; 0; 0; 0; 1(0); |2; 'ACP 4'; 4; 1515521; 1. 00; 1263793; 0. 83; 0. 71; 4; 1. 85; 43; 93; 0; 0; 0; 1(0); |3; 'ACP 3'; 3; 1515521; 1. 00; 127284; 0. 08; 0. 27; 9; 1. 71; 48; 84; 0; 0; 0; 1(0); |4; 'B. S. Lengton'; 2; 1515521; 1. 00; 760688; 0. 50; 0. 96; 4; 2. 87; 29; 70; 0; 1(0);

The metamidi tool • metamidi –{r|x|l} file [-o fileoutput] Metadata output formats: -x -r:

The metamidi tool • metamidi –{r|x|l} file [-o fileoutput] Metadata output formats: -x -r: register -l: line -x: XML <? xml version="1. 0" encoding="ISO-8859 -1"? > <!DOCTYPE midifile SYSTEM "metamidi. dtd"> <midifile> <external name="/Users/inesta/metamidi/straussmyrthenbluten. mid" size="48323" midiformat="1" numtracks="5" resolution="1024"> <comments></comments> </external> <global metaeventtext="$" tempo="176. 00" tempo. Changes="70" meter="6/8(0), 1/4(15360), 6/8(24576), 1/4(113664), 3/4(114688)" meter. Changes="5" key="FM(0), CM(225280), FM(335872), Bb. M(385024), FM(495616), Bb. M(606208)" key. Changes= "6" instruments="1" percussion="-1" duration="1515521. 00" has. Sys. Ex="0"> <comments></comments> </global> <tracks> <track metaeventtext="$" channel="-1" duration="1515521" duration. Rate="1. 00" occupation="0" occupation. Rate="0. 00" polyphony. Duration. Rate="0. 00" max. Polyphony="0" avg. Polyphony="0. 00" lowpitch="-1" highpitch="-1" modulations="0" after. Touches="0" pitch. Bends="0" program. Changes="$"> <comments></comments> <track metaeventtext="Acoustic Grand Piano" channel="1" duration="1515521" duration. Rate="1. 00" occupation="606315" occupation. Rate="0. 40" polyphony. Duration. Rate="0. 47" max. Polyphony="4" avg. Polyphony="1. 69" lowpitch="33" highpitch="69" modulations="0" after. Touches="0" pitch. Bends="0" program. Changes="1(0)"> <comments></comments> </track> <track metaeventtext="ACP 4" channel="4" duration="1515521" duration. Rate="1. 00" occupation="1263793" occupation. Rate="0. 83" polyphony. Duration. Rate="0. 71" max. Polyphony="4" avg. Polyphony="1. 85" lowpitch="43" highpitch="93" modulations="0"

Applications • Metadata can help in MIDI file indexing, organizing or classifying tasks. •

Applications • Metadata can help in MIDI file indexing, organizing or classifying tasks. • In this paper we have presented two examples of the use of the metamidi output in MIR problems: – Melody track selection using track content features – Genre classification using timbral metadata

Melody track selection • Metadata are used to compute the probability of a track

Melody track selection • Metadata are used to compute the probability of a track to contain the melody of a MIDI file. • What metadata should be used? – Amount of music information: occupation rate – Melody are usually monophonic: polyphony duration rate, max polyphony, average polypohony – Pitch ranges: lowest pitch, highest pitch

Melody track selection • Training phase: assuming a Gaussian distribution for the values of

Melody track selection • Training phase: assuming a Gaussian distribution for the values of a descriptor d, P(d|M) and P(d| M) are obtained from the tracks labeled as melodies and not melodies. • Test phase: Bayes theorem is used to compute the probability of a track to be a melody:

Melody track selection • The decision is taken using a maximum likelihood criterion for

Melody track selection • The decision is taken using a maximum likelihood criterion for all the tracks (i) in the file with probability over a threshold, : Corpus Descr. S% P R F Clas 200 High pitch 0. 05 98. 5 0. 99 1. 00 0. 99 Clas Avg. Poly 0. 20 80. 81 1. 00 0. 89 Jazz 200 Max. Poly & Low p. 0. 12 86. 5 0. 88 0. 93 Jazz Max. Poly & Low p. 0. 052 82. 0 0. 83 0. 99 0. 90 Kar 200 Avg. Poly 0. 10 80. 9 0. 81 1. 00 0. 89 Kar Avg. Poly 0. 10 88. 6 0. 87 1. 00 0. 94

Timbre-based genre classification • Use timbral information provided by metamidi to classify MIDI files

Timbre-based genre classification • Use timbral information provided by metamidi to classify MIDI files into musical genres also under a probabilistic approach. (128 GM + 3 percussions) • File representation: Grand piano Electric bass Electric guitar Drum kit x = (1, 0, 0, 1, 0, 0, 0, 0 … 0, 0, 1, 0, 0)

Timbre-based genre classification • The probability for instrument ti in class cj is computed

Timbre-based genre classification • The probability for instrument ti in class cj is computed from the training set # files of cj with ti # files of cj • A MIDI file is assigned to the class cj that maximizes the a posteriori probability

Timbre-based genre classification • Data set: – Hierarchical classes: 3 9 (235) Classical Baroque

Timbre-based genre classification • Data set: – Hierarchical classes: 3 9 (235) Classical Baroque (56) Classic (50) Romantic (129) (338) Jazz Pre-bop (178) Bop (94) Bossanova (66) (283) Popular Celtic (99) Blues (84) Pop (100)

Timbre-based genre classification • 3 class experiment – (10 fold crossvalidation) – 93 2

Timbre-based genre classification • 3 class experiment – (10 fold crossvalidation) – 93 2 % (39. 5 % baseline) (+53. 5 %) Academic Jazz Popular Academic 228 6 1 Jazz 3 295 40 Popular 5 16 262

Timbre-based genre classification • 9 class experiment – (10 fold crossvalidation) – 68 5

Timbre-based genre classification • 9 class experiment – (10 fold crossvalidation) – 68 5 % (20. 8 % baseline) (+47. 2 %) bar clas Rom Pre Bop Bos Cel Blu pop Baroque 35 5 16 0 0 0 Classic 8 1 41 0 0 0 Romantic 12 7 110 0 0 0 Prebop 0 0 0 150 22 6 0 0 0 Bop 0 0 0 78 10 6 0 0 0 bossa 0 0 0 3 1 52 1 0 9 Celtic 0 0 1 2 0 1 96 0 0 Blues 0 0 0 7 1 1 5 62 8 pop 0 1 2 13 4 7 73

Conclusions • metamidi has been designed as a tool for metadata extraction from standard

Conclusions • metamidi has been designed as a tool for metadata extraction from standard MIDI files. • The good performances of the presented examples show the power of metadata automatc extraction tools for helping in the solution of MIR problems.

metamidi: a tool for automatic metadata extraction from MIDI files Tomás Pérez-García, Jose M.

metamidi: a tool for automatic metadata extraction from MIDI files Tomás Pérez-García, Jose M. Iñesta, and David Rizo Computer Music Laboratory University of Alicante {tperez, inesta, drizo}@dlsi. ua. es