├── tests
├── data
│ ├── key
│ │ ├── est01.txt
│ │ ├── est03.txt
│ │ ├── est04.txt
│ │ ├── est06.txt
│ │ ├── est07.txt
│ │ ├── est08.txt
│ │ ├── est09.txt
│ │ ├── ref00.txt
│ │ ├── ref01.txt
│ │ ├── ref02.txt
│ │ ├── ref03.txt
│ │ ├── ref04.txt
│ │ ├── ref06.txt
│ │ ├── ref07.txt
│ │ ├── ref08.txt
│ │ ├── ref09.txt
│ │ ├── est02.txt
│ │ ├── est05.txt
│ │ ├── ref05.txt
│ │ ├── est00.txt
│ │ ├── output00.json
│ │ ├── output01.json
│ │ ├── output02.json
│ │ ├── output03.json
│ │ ├── output04.json
│ │ ├── output05.json
│ │ ├── output06.json
│ │ ├── output07.json
│ │ ├── output08.json
│ │ └── output09.json
│ ├── onset
│ │ ├── ref04.txt
│ │ ├── output04.json
│ │ ├── ref05.txt
│ │ ├── output03.json
│ │ ├── output05.json
│ │ ├── est01.txt
│ │ ├── output06.json
│ │ ├── output07.json
│ │ ├── output08.json
│ │ ├── output00.json
│ │ ├── output02.json
│ │ ├── output01.json
│ │ ├── output09.json
│ │ ├── est05.txt
│ │ ├── ref08.txt
│ │ ├── ref03.txt
│ │ ├── est06.txt
│ │ ├── est07.txt
│ │ ├── est08.txt
│ │ ├── ref07.txt
│ │ ├── ref06.txt
│ │ ├── ref00.txt
│ │ ├── est03.txt
│ │ ├── est00.txt
│ │ ├── ref02.txt
│ │ ├── ref01.txt
│ │ ├── est02.txt
│ │ ├── est04.txt
│ │ ├── est09.txt
│ │ └── ref09.txt
│ ├── tempo
│ │ ├── bad01.lab
│ │ ├── bad02.lab
│ │ ├── est01.lab
│ │ ├── est02.lab
│ │ ├── est03.lab
│ │ ├── ref00.lab
│ │ ├── ref01.lab
│ │ ├── ref02.lab
│ │ ├── ref03.lab
│ │ ├── est00.lab
│ │ ├── bad00.lab
│ │ ├── output00.json
│ │ ├── output01.json
│ │ ├── output02.json
│ │ └── output03.json
│ ├── alignment
│ │ ├── est04_mirex.txt
│ │ ├── ref04_mirex.txt
│ │ ├── est03_mirex.txt
│ │ ├── output00.json
│ │ ├── ref03_mirex.txt
│ │ ├── est00.txt
│ │ ├── est01.txt
│ │ ├── ref00.txt
│ │ ├── ref01.txt
│ │ ├── est02.txt
│ │ ├── output01.json
│ │ ├── ref02.txt
│ │ ├── output04_mirex.json
│ │ ├── output02.json
│ │ └── output03_mirex.json
│ ├── separation
│ │ ├── est01
│ │ │ ├── 0.wav
│ │ │ └── 1.wav
│ │ ├── est02
│ │ │ ├── 0.wav
│ │ │ ├── 1.wav
│ │ │ └── 2.wav
│ │ ├── est03
│ │ │ ├── 0.wav
│ │ │ ├── 1.wav
│ │ │ ├── 2.wav
│ │ │ └── 3.wav
│ │ ├── est05
│ │ │ ├── 0.wav
│ │ │ ├── 1.wav
│ │ │ └── 2.wav
│ │ ├── est06
│ │ │ ├── 0.wav
│ │ │ └── 1.wav
│ │ ├── est07
│ │ │ ├── 0.wav
│ │ │ └── 1.wav
│ │ ├── est08
│ │ │ ├── 0.wav
│ │ │ ├── 1.wav
│ │ │ └── 2.wav
│ │ ├── est09
│ │ │ └── 0.wav
│ │ ├── ref01
│ │ │ ├── 0.wav
│ │ │ └── 1.wav
│ │ ├── ref02
│ │ │ ├── 0.wav
│ │ │ ├── 1.wav
│ │ │ └── 2.wav
│ │ ├── ref03
│ │ │ ├── 0.wav
│ │ │ ├── 1.wav
│ │ │ ├── 2.wav
│ │ │ └── 3.wav
│ │ ├── ref05
│ │ │ ├── 0.wav
│ │ │ ├── 1.wav
│ │ │ └── 2.wav
│ │ ├── ref06
│ │ │ ├── 0.wav
│ │ │ └── 1.wav
│ │ ├── ref07
│ │ │ ├── 0.wav
│ │ │ └── 1.wav
│ │ ├── ref08
│ │ │ ├── 0.wav
│ │ │ ├── 1.wav
│ │ │ └── 2.wav
│ │ └── ref09
│ │ │ └── 0.wav
│ ├── segment
│ │ ├── ref04.lab
│ │ ├── raw_data
│ │ │ ├── LEGEND
│ │ │ ├── cf6segmentssalami000970_results.txt
│ │ │ ├── mp1segmentssalami000119_results.txt
│ │ │ ├── mp2segmentssalami000666_results.txt
│ │ │ ├── rbh3segmentssalami000025_results.txt
│ │ │ ├── rbh3segmentssalami000068_results.txt
│ │ │ ├── cf5segmentsstructmrx09000016_results.txt
│ │ │ ├── cf6segmentsstructmrx09000117_results.txt
│ │ │ ├── mp1segmentsstructmrx09000084_results.txt
│ │ │ ├── mp2segmentsstructmrx09000132_results.txt
│ │ │ ├── rbh4segmentsstructmrx09000020_results.txt
│ │ │ ├── mp1segmentsstructmrx09000084.js
│ │ │ ├── rbh3segmentssalami000025.js
│ │ │ ├── rbh4segmentsstructmrx09000020.js
│ │ │ ├── mp1segmentssalami000119.js
│ │ │ ├── mp2segmentsstructmrx09000132.js
│ │ │ ├── cf6segmentssalami000970.js
│ │ │ ├── cf5segmentsstructmrx09000016.js
│ │ │ ├── rbh3segmentssalami000068.js
│ │ │ ├── cf6segmentsstructmrx09000117.js
│ │ │ └── mp2segmentssalami000666.js
│ │ ├── est08.lab
│ │ ├── est01.lab
│ │ ├── est09.lab
│ │ ├── ref00.lab
│ │ ├── est07.lab
│ │ ├── ref07.lab
│ │ ├── est06.lab
│ │ ├── ref03.lab
│ │ ├── est04.lab
│ │ ├── est03.lab
│ │ ├── ref02.lab
│ │ ├── ref09.lab
│ │ ├── ref06.lab
│ │ ├── ref01.lab
│ │ ├── ref05.lab
│ │ ├── est00.lab
│ │ ├── ref08.lab
│ │ ├── est02.lab
│ │ ├── est05.lab
│ │ ├── output04.json
│ │ ├── output06.json
│ │ ├── output00.json
│ │ ├── output01.json
│ │ ├── output08.json
│ │ ├── output09.json
│ │ ├── output02.json
│ │ ├── output03.json
│ │ ├── output07.json
│ │ └── output05.json
│ ├── melody
│ │ ├── output04.json
│ │ ├── output00.json
│ │ ├── output01.json
│ │ ├── output02.json
│ │ ├── output03.json
│ │ ├── output05.json
│ │ ├── output06.json
│ │ ├── output07.json
│ │ ├── output08.json
│ │ └── output09.json
│ ├── hierarchy
│ │ ├── ref00.lab
│ │ ├── output_w=05.json
│ │ ├── output_w=15.json
│ │ ├── output_w=30.json
│ │ ├── est00.lab
│ │ ├── ref01.lab
│ │ └── est01.lab
│ ├── transcription_velocity
│ │ ├── output4.json
│ │ ├── output6.json
│ │ ├── output8.json
│ │ ├── output9.json
│ │ ├── output0.json
│ │ ├── output1.json
│ │ ├── output2.json
│ │ ├── output3.json
│ │ ├── output5.json
│ │ └── output7.json
│ ├── pattern
│ │ ├── output00.json
│ │ ├── output01.json
│ │ ├── output02.json
│ │ └── est00.txt
│ ├── beat
│ │ ├── output02.json
│ │ ├── output05.json
│ │ ├── output09.json
│ │ ├── output00.json
│ │ ├── output01.json
│ │ ├── output04.json
│ │ ├── output06.json
│ │ ├── output07.json
│ │ ├── output08.json
│ │ └── output03.json
│ ├── chord
│ │ ├── output03.json
│ │ ├── output09.json
│ │ ├── output00.json
│ │ ├── output01.json
│ │ ├── output02.json
│ │ ├── output04.json
│ │ ├── output05.json
│ │ ├── output06.json
│ │ ├── output07.json
│ │ ├── output08.json
│ │ ├── est01.lab
│ │ ├── ref01.lab
│ │ ├── est04.lab
│ │ ├── ref09.lab
│ │ ├── ref08.lab
│ │ ├── ref06.lab
│ │ ├── ref02.lab
│ │ ├── ref04.lab
│ │ ├── ref00.lab
│ │ ├── ref05.lab
│ │ ├── est06.lab
│ │ ├── ref07.lab
│ │ └── est07.lab
│ ├── transcription
│ │ ├── output05.json
│ │ ├── output08.json
│ │ ├── output06.json
│ │ ├── output02.json
│ │ ├── output04.json
│ │ ├── output01.json
│ │ ├── output07.json
│ │ ├── output09.json
│ │ ├── output00.json
│ │ ├── output03.json
│ │ ├── ref05.txt
│ │ ├── est03.txt
│ │ ├── ref03.txt
│ │ ├── est06.txt
│ │ ├── ref02.txt
│ │ ├── est01.txt
│ │ ├── ref06.txt
│ │ └── est04.txt
│ └── multipitch
│ │ ├── output03.json
│ │ ├── output06.json
│ │ ├── output07.json
│ │ ├── output08.json
│ │ ├── output01.json
│ │ ├── output02.json
│ │ ├── output04.json
│ │ ├── output05.json
│ │ ├── output09.json
│ │ └── output00.json
├── baseline_images
│ └── test_display
│ │ ├── test_display_events.png
│ │ ├── test_display_segment.png
│ │ ├── test_display_piano_roll.png
│ │ ├── test_display_pitch_hz.png
│ │ ├── test_display_pitch_midi.png
│ │ ├── test_display_separation.png
│ │ ├── test_display_segment_text.png
│ │ ├── test_display_hierarchy_label.png
│ │ ├── test_display_labeled_events.png
│ │ ├── test_display_multipitch_midi.png
│ │ ├── test_display_piano_roll_midi.png
│ │ ├── test_display_pitch_midi_hz.png
│ │ ├── test_display_hierarchy_nolabel.png
│ │ ├── test_display_labeled_intervals.png
│ │ ├── test_display_separation_label.png
│ │ ├── test_display_ticker_midi_zoom.png
│ │ ├── test_display_multipitch_hz_voiced.png
│ │ ├── test_display_multipitch_hz_unvoiced.png
│ │ ├── test_display_labeled_intervals_compare.png
│ │ ├── test_display_labeled_intervals_noextend.png
│ │ ├── test_display_labeled_intervals_compare_common.png
│ │ └── test_display_labeled_intervals_compare_noextend.png
├── test_key.py
├── test_onset.py
├── test_alignment.py
├── test_pattern.py
└── test_tempo.py
├── .codespell_ignore_list
├── setup.py
├── docs
└── api
│ ├── io.rst
│ ├── display.rst
│ ├── key.rst
│ ├── beat.rst
│ ├── chord.rst
│ ├── onset.rst
│ ├── tempo.rst
│ ├── util.rst
│ ├── melody.rst
│ ├── sonify.rst
│ ├── pattern.rst
│ ├── segment.rst
│ ├── alignment.rst
│ ├── hierarchy.rst
│ ├── multipitch.rst
│ ├── separation.rst
│ ├── transcription.rst
│ ├── transcription_velocity.rst
│ └── index.rst
├── .github
├── environment-docs.yml
├── environment.yml
├── environment-minimal.yml
├── environment-lint.yml
└── workflows
│ ├── release.yml
│ ├── lint_python.yml
│ ├── docs-ci.yml
│ └── test.yml
├── mir_eval
└── __init__.py
├── .gitignore
├── .readthedocs.yaml
├── LICENSE.txt
├── README.rst
└── setup.cfg
/tests/data/key/est01.txt:
--------------------------------------------------------------------------------
1 | G minor
--------------------------------------------------------------------------------
/tests/data/key/est03.txt:
--------------------------------------------------------------------------------
1 | D major
--------------------------------------------------------------------------------
/tests/data/key/est04.txt:
--------------------------------------------------------------------------------
1 | F# minor
--------------------------------------------------------------------------------
/tests/data/key/est06.txt:
--------------------------------------------------------------------------------
1 | Gb minor
--------------------------------------------------------------------------------
/tests/data/key/est07.txt:
--------------------------------------------------------------------------------
1 | G major
--------------------------------------------------------------------------------
/tests/data/key/est08.txt:
--------------------------------------------------------------------------------
1 | C major
--------------------------------------------------------------------------------
/tests/data/key/est09.txt:
--------------------------------------------------------------------------------
1 | C minor
--------------------------------------------------------------------------------
/tests/data/key/ref00.txt:
--------------------------------------------------------------------------------
1 | C major
--------------------------------------------------------------------------------
/tests/data/key/ref01.txt:
--------------------------------------------------------------------------------
1 | G minor
--------------------------------------------------------------------------------
/tests/data/key/ref02.txt:
--------------------------------------------------------------------------------
1 | Db minor
--------------------------------------------------------------------------------
/tests/data/key/ref03.txt:
--------------------------------------------------------------------------------
1 | A minor
--------------------------------------------------------------------------------
/tests/data/key/ref04.txt:
--------------------------------------------------------------------------------
1 | A major
--------------------------------------------------------------------------------
/tests/data/key/ref06.txt:
--------------------------------------------------------------------------------
1 | Gb major
--------------------------------------------------------------------------------
/tests/data/key/ref07.txt:
--------------------------------------------------------------------------------
1 | G minor
--------------------------------------------------------------------------------
/tests/data/key/ref08.txt:
--------------------------------------------------------------------------------
1 | G major
--------------------------------------------------------------------------------
/tests/data/key/ref09.txt:
--------------------------------------------------------------------------------
1 | A minor
--------------------------------------------------------------------------------
/tests/data/key/est02.txt:
--------------------------------------------------------------------------------
1 | Ab minor
2 |
--------------------------------------------------------------------------------
/tests/data/key/est05.txt:
--------------------------------------------------------------------------------
1 | A major
2 |
--------------------------------------------------------------------------------
/tests/data/key/ref05.txt:
--------------------------------------------------------------------------------
1 | F# minor
2 |
--------------------------------------------------------------------------------
/tests/data/onset/ref04.txt:
--------------------------------------------------------------------------------
1 | 0.00394557823129
2 |
--------------------------------------------------------------------------------
/tests/data/tempo/bad01.lab:
--------------------------------------------------------------------------------
1 | 60.0 120.0 -3
2 |
--------------------------------------------------------------------------------
/tests/data/tempo/bad02.lab:
--------------------------------------------------------------------------------
1 | 60.0 -120.0 0.25
2 |
--------------------------------------------------------------------------------
/tests/data/tempo/est01.lab:
--------------------------------------------------------------------------------
1 | 120.0 180.0 0.25
2 |
--------------------------------------------------------------------------------
/tests/data/tempo/est02.lab:
--------------------------------------------------------------------------------
1 | 120.0 180.0 0.25
2 |
--------------------------------------------------------------------------------
/tests/data/tempo/est03.lab:
--------------------------------------------------------------------------------
1 | 60.0 120.0 0.25
2 |
--------------------------------------------------------------------------------
/tests/data/tempo/ref00.lab:
--------------------------------------------------------------------------------
1 | 60.0 120.0 0.25
2 |
--------------------------------------------------------------------------------
/tests/data/tempo/ref01.lab:
--------------------------------------------------------------------------------
1 | 60.0 120.0 0.5
2 |
--------------------------------------------------------------------------------
/tests/data/tempo/ref02.lab:
--------------------------------------------------------------------------------
1 | 60.0 120.0 0.75
2 |
--------------------------------------------------------------------------------
/tests/data/tempo/ref03.lab:
--------------------------------------------------------------------------------
1 | 60.0 120.0 0.25
2 |
--------------------------------------------------------------------------------
/tests/data/key/est00.txt:
--------------------------------------------------------------------------------
1 | # A comment
2 | C major
3 |
--------------------------------------------------------------------------------
/tests/data/key/output00.json:
--------------------------------------------------------------------------------
1 | {"Weighted Score": 1.0}
--------------------------------------------------------------------------------
/tests/data/key/output01.json:
--------------------------------------------------------------------------------
1 | {"Weighted Score": 1.0}
--------------------------------------------------------------------------------
/tests/data/key/output02.json:
--------------------------------------------------------------------------------
1 | {"Weighted Score": 0.5}
--------------------------------------------------------------------------------
/tests/data/key/output03.json:
--------------------------------------------------------------------------------
1 | {"Weighted Score": 0.0}
--------------------------------------------------------------------------------
/tests/data/key/output04.json:
--------------------------------------------------------------------------------
1 | {"Weighted Score": 0.3}
--------------------------------------------------------------------------------
/tests/data/key/output05.json:
--------------------------------------------------------------------------------
1 | {"Weighted Score": 0.3}
--------------------------------------------------------------------------------
/tests/data/key/output06.json:
--------------------------------------------------------------------------------
1 | {"Weighted Score": 0.2}
--------------------------------------------------------------------------------
/tests/data/key/output07.json:
--------------------------------------------------------------------------------
1 | {"Weighted Score": 0.2}
--------------------------------------------------------------------------------
/tests/data/key/output08.json:
--------------------------------------------------------------------------------
1 | {"Weighted Score": 0.0}
--------------------------------------------------------------------------------
/tests/data/key/output09.json:
--------------------------------------------------------------------------------
1 | {"Weighted Score": 0.0}
--------------------------------------------------------------------------------
/tests/data/tempo/est00.lab:
--------------------------------------------------------------------------------
1 | # A comment
2 | 120.0 180.0 0.25
3 |
--------------------------------------------------------------------------------
/.codespell_ignore_list:
--------------------------------------------------------------------------------
1 | nce
2 | fpr
3 | shepard
4 | dum
5 | theis
6 |
--------------------------------------------------------------------------------
/tests/data/alignment/est04_mirex.txt:
--------------------------------------------------------------------------------
1 | 2.17454162309
2 | 5.20
3 | 6.20
--------------------------------------------------------------------------------
/tests/data/tempo/bad00.lab:
--------------------------------------------------------------------------------
1 | 60.0 120.0 0.25
2 | 60.0 120.0 0.25
3 |
--------------------------------------------------------------------------------
/tests/data/alignment/ref04_mirex.txt:
--------------------------------------------------------------------------------
1 | 0.624541623091
2 | 4.61454162309
3 | 7.0
--------------------------------------------------------------------------------
/tests/data/onset/output04.json:
--------------------------------------------------------------------------------
1 | {"F-measure": 0.0, "Precision": 0.0, "Recall": 0.0}
--------------------------------------------------------------------------------
/setup.py:
--------------------------------------------------------------------------------
1 | from setuptools import setup
2 |
3 | if __name__ == "__main__":
4 | setup()
5 |
--------------------------------------------------------------------------------
/tests/data/onset/ref05.txt:
--------------------------------------------------------------------------------
1 | 0.194467120
2 | 1.128639455
3 | 2.023877551
4 | 4.079727891
5 |
--------------------------------------------------------------------------------
/tests/data/onset/output03.json:
--------------------------------------------------------------------------------
1 | {"F-measure": 0.5, "Precision": 0.4, "Recall": 0.6666666666666666}
--------------------------------------------------------------------------------
/tests/data/onset/output05.json:
--------------------------------------------------------------------------------
1 | {"F-measure": 0.22222222222222224, "Precision": 0.2, "Recall": 0.25}
--------------------------------------------------------------------------------
/tests/data/alignment/est03_mirex.txt:
--------------------------------------------------------------------------------
1 | 2.17454162309
2 | 2.57454162309
3 | 5.20
4 | 6.20
5 | 6.20
6 | 11.911836
--------------------------------------------------------------------------------
/tests/data/onset/est01.txt:
--------------------------------------------------------------------------------
1 | 1.015873015873015872e-01
2 | 1.416707482993197331e+01
3 | 1.468081632653061241e+01
4 |
--------------------------------------------------------------------------------
/tests/data/onset/output06.json:
--------------------------------------------------------------------------------
1 | {"F-measure": 0.0909090909090909, "Precision": 0.1, "Recall": 0.08333333333333333}
--------------------------------------------------------------------------------
/tests/data/onset/output07.json:
--------------------------------------------------------------------------------
1 | {"F-measure": 0.9523809523809523, "Precision": 1.0, "Recall": 0.9090909090909091}
--------------------------------------------------------------------------------
/tests/data/onset/output08.json:
--------------------------------------------------------------------------------
1 | {"F-measure": 0.4210526315789474, "Precision": 0.36363636363636365, "Recall": 0.5}
--------------------------------------------------------------------------------
/tests/data/alignment/output00.json:
--------------------------------------------------------------------------------
1 | {"pc": 1.0, "mae": 0.0, "aae": 0.0, "pcs": 1.0, "perceptual": 0.9606239680360235}
--------------------------------------------------------------------------------
/tests/data/alignment/ref03_mirex.txt:
--------------------------------------------------------------------------------
1 | 0.624541623091
2 | 4.61454162309
3 | 4.61454162309
4 | 7.0
5 | 7.0
6 | 11.911836
--------------------------------------------------------------------------------
/tests/data/tempo/output00.json:
--------------------------------------------------------------------------------
1 | {
2 | "Both-correct": false,
3 | "P-score": 0.75,
4 | "One-correct": true
5 | }
--------------------------------------------------------------------------------
/tests/data/tempo/output01.json:
--------------------------------------------------------------------------------
1 | {
2 | "Both-correct": false,
3 | "P-score": 0.5,
4 | "One-correct": true
5 | }
--------------------------------------------------------------------------------
/tests/data/tempo/output02.json:
--------------------------------------------------------------------------------
1 | {
2 | "Both-correct": false,
3 | "P-score": 0.25,
4 | "One-correct": true
5 | }
--------------------------------------------------------------------------------
/tests/data/tempo/output03.json:
--------------------------------------------------------------------------------
1 | {
2 | "Both-correct": true,
3 | "P-score": 1.0,
4 | "One-correct": true
5 | }
--------------------------------------------------------------------------------
/tests/data/alignment/est00.txt:
--------------------------------------------------------------------------------
1 | 0.0
2 | 1.0
3 | 2.0
4 | 3.0
5 | 8.0
6 | 9.0
7 | 10.0
8 | 15.0
9 | 16.0
10 | 17.0
--------------------------------------------------------------------------------
/tests/data/alignment/est01.txt:
--------------------------------------------------------------------------------
1 | 0.5
2 | 1.5
3 | 2.5
4 | 3.5
5 | 8.5
6 | 9.5
7 | 10.5
8 | 15.5
9 | 16.5
10 | 17.5
--------------------------------------------------------------------------------
/tests/data/alignment/ref00.txt:
--------------------------------------------------------------------------------
1 | 0.0
2 | 1.0
3 | 2.0
4 | 3.0
5 | 8.0
6 | 9.0
7 | 10.0
8 | 15.0
9 | 16.0
10 | 17.0
--------------------------------------------------------------------------------
/tests/data/alignment/ref01.txt:
--------------------------------------------------------------------------------
1 | 0.0
2 | 1.0
3 | 2.0
4 | 3.0
5 | 8.0
6 | 9.0
7 | 10.0
8 | 15.0
9 | 16.0
10 | 17.0
--------------------------------------------------------------------------------
/tests/data/onset/output00.json:
--------------------------------------------------------------------------------
1 | {"F-measure": 0.5306122448979591, "Precision": 0.48148148148148145, "Recall": 0.5909090909090909}
--------------------------------------------------------------------------------
/tests/data/onset/output02.json:
--------------------------------------------------------------------------------
1 | {"F-measure": 0.17582417582417584, "Precision": 0.2222222222222222, "Recall": 0.14545454545454545}
--------------------------------------------------------------------------------
/tests/data/separation/est01/0.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/data/separation/est01/0.wav
--------------------------------------------------------------------------------
/tests/data/separation/est01/1.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/data/separation/est01/1.wav
--------------------------------------------------------------------------------
/tests/data/separation/est02/0.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/data/separation/est02/0.wav
--------------------------------------------------------------------------------
/tests/data/separation/est02/1.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/data/separation/est02/1.wav
--------------------------------------------------------------------------------
/tests/data/separation/est02/2.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/data/separation/est02/2.wav
--------------------------------------------------------------------------------
/tests/data/separation/est03/0.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/data/separation/est03/0.wav
--------------------------------------------------------------------------------
/tests/data/separation/est03/1.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/data/separation/est03/1.wav
--------------------------------------------------------------------------------
/tests/data/separation/est03/2.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/data/separation/est03/2.wav
--------------------------------------------------------------------------------
/tests/data/separation/est03/3.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/data/separation/est03/3.wav
--------------------------------------------------------------------------------
/tests/data/separation/est05/0.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/data/separation/est05/0.wav
--------------------------------------------------------------------------------
/tests/data/separation/est05/1.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/data/separation/est05/1.wav
--------------------------------------------------------------------------------
/tests/data/separation/est05/2.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/data/separation/est05/2.wav
--------------------------------------------------------------------------------
/tests/data/separation/est06/0.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/data/separation/est06/0.wav
--------------------------------------------------------------------------------
/tests/data/separation/est06/1.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/data/separation/est06/1.wav
--------------------------------------------------------------------------------
/tests/data/separation/est07/0.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/data/separation/est07/0.wav
--------------------------------------------------------------------------------
/tests/data/separation/est07/1.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/data/separation/est07/1.wav
--------------------------------------------------------------------------------
/tests/data/separation/est08/0.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/data/separation/est08/0.wav
--------------------------------------------------------------------------------
/tests/data/separation/est08/1.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/data/separation/est08/1.wav
--------------------------------------------------------------------------------
/tests/data/separation/est08/2.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/data/separation/est08/2.wav
--------------------------------------------------------------------------------
/tests/data/separation/est09/0.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/data/separation/est09/0.wav
--------------------------------------------------------------------------------
/tests/data/separation/ref01/0.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/data/separation/ref01/0.wav
--------------------------------------------------------------------------------
/tests/data/separation/ref01/1.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/data/separation/ref01/1.wav
--------------------------------------------------------------------------------
/tests/data/separation/ref02/0.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/data/separation/ref02/0.wav
--------------------------------------------------------------------------------
/tests/data/separation/ref02/1.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/data/separation/ref02/1.wav
--------------------------------------------------------------------------------
/tests/data/separation/ref02/2.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/data/separation/ref02/2.wav
--------------------------------------------------------------------------------
/tests/data/separation/ref03/0.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/data/separation/ref03/0.wav
--------------------------------------------------------------------------------
/tests/data/separation/ref03/1.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/data/separation/ref03/1.wav
--------------------------------------------------------------------------------
/tests/data/separation/ref03/2.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/data/separation/ref03/2.wav
--------------------------------------------------------------------------------
/tests/data/separation/ref03/3.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/data/separation/ref03/3.wav
--------------------------------------------------------------------------------
/tests/data/separation/ref05/0.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/data/separation/ref05/0.wav
--------------------------------------------------------------------------------
/tests/data/separation/ref05/1.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/data/separation/ref05/1.wav
--------------------------------------------------------------------------------
/tests/data/separation/ref05/2.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/data/separation/ref05/2.wav
--------------------------------------------------------------------------------
/tests/data/separation/ref06/0.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/data/separation/ref06/0.wav
--------------------------------------------------------------------------------
/tests/data/separation/ref06/1.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/data/separation/ref06/1.wav
--------------------------------------------------------------------------------
/tests/data/separation/ref07/0.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/data/separation/ref07/0.wav
--------------------------------------------------------------------------------
/tests/data/separation/ref07/1.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/data/separation/ref07/1.wav
--------------------------------------------------------------------------------
/tests/data/separation/ref08/0.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/data/separation/ref08/0.wav
--------------------------------------------------------------------------------
/tests/data/separation/ref08/1.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/data/separation/ref08/1.wav
--------------------------------------------------------------------------------
/tests/data/separation/ref08/2.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/data/separation/ref08/2.wav
--------------------------------------------------------------------------------
/tests/data/separation/ref09/0.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/data/separation/ref09/0.wav
--------------------------------------------------------------------------------
/tests/data/alignment/est02.txt:
--------------------------------------------------------------------------------
1 | 0.1
2 | 1.2
3 | 2.3
4 | 3.4
5 | 8.5
6 | 9.6
7 | 10.7
8 | 15.8
9 | 16.9
10 | 18.0
11 | 35.0
--------------------------------------------------------------------------------
/tests/data/alignment/output01.json:
--------------------------------------------------------------------------------
1 | {"pc": 0.0, "mae": 0.5, "aae": 0.5, "pcs": 0.7352941176470589, "perceptual": 0.0833538912522229}
--------------------------------------------------------------------------------
/tests/data/alignment/ref02.txt:
--------------------------------------------------------------------------------
1 | 0.0
2 | 1.0
3 | 2.0
4 | 3.0
5 | 8.0
6 | 9.0
7 | 10.0
8 | 15.0
9 | 16.0
10 | 17.0
11 | 20.0
--------------------------------------------------------------------------------
/tests/data/onset/output01.json:
--------------------------------------------------------------------------------
1 | {"F-measure": 0.03278688524590164, "Precision": 0.3333333333333333, "Recall": 0.017241379310344827}
--------------------------------------------------------------------------------
/tests/data/onset/output09.json:
--------------------------------------------------------------------------------
1 | {"F-measure": 0.04838709677419355, "Precision": 0.05172413793103448, "Recall": 0.045454545454545456}
--------------------------------------------------------------------------------
/tests/data/segment/ref04.lab:
--------------------------------------------------------------------------------
1 | 0.000 34.752 Part 1
2 | 34.752 89.014 Part 2
3 | 89.014 123.498 Part 3 (with complete ending)
4 |
--------------------------------------------------------------------------------
/tests/data/alignment/output04_mirex.json:
--------------------------------------------------------------------------------
1 | {"pc": 0, "mae": 0.7999999999999998, "aae": 0.9784861256363334, "pcs": 0.5395690469032295, "perceptual": 0.014511670347043502}
--------------------------------------------------------------------------------
/tests/data/onset/est05.txt:
--------------------------------------------------------------------------------
1 | 2.438095238095238093e-01
2 | 1.190022675736961411e+00
3 | 2.086893424036281086e+00
4 | 4.130249433106575552e+00
5 | 4.612063492063492198e+00
6 |
--------------------------------------------------------------------------------
/tests/baseline_images/test_display/test_display_events.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/baseline_images/test_display/test_display_events.png
--------------------------------------------------------------------------------
/tests/baseline_images/test_display/test_display_segment.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/baseline_images/test_display/test_display_segment.png
--------------------------------------------------------------------------------
/tests/data/alignment/output02.json:
--------------------------------------------------------------------------------
1 | {"pc": 0.2727272727272727, "mae": 0.5999999999999996, "aae": 1.8636363636363635, "pcs": 0.7250000000000001, "perceptual": 0.17994453887587472}
--------------------------------------------------------------------------------
/tests/baseline_images/test_display/test_display_piano_roll.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/baseline_images/test_display/test_display_piano_roll.png
--------------------------------------------------------------------------------
/tests/baseline_images/test_display/test_display_pitch_hz.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/baseline_images/test_display/test_display_pitch_hz.png
--------------------------------------------------------------------------------
/tests/baseline_images/test_display/test_display_pitch_midi.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/baseline_images/test_display/test_display_pitch_midi.png
--------------------------------------------------------------------------------
/tests/baseline_images/test_display/test_display_separation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/baseline_images/test_display/test_display_separation.png
--------------------------------------------------------------------------------
/tests/data/alignment/output03_mirex.json:
--------------------------------------------------------------------------------
1 | {"pc": 0.16666666666666666, "mae": 0.7999999999999998, "aae": 0.9625763961515, "pcs": 0.5591983153121662, "perceptual": 0.1679578367769917}
--------------------------------------------------------------------------------
/tests/baseline_images/test_display/test_display_segment_text.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/baseline_images/test_display/test_display_segment_text.png
--------------------------------------------------------------------------------
/tests/baseline_images/test_display/test_display_hierarchy_label.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/baseline_images/test_display/test_display_hierarchy_label.png
--------------------------------------------------------------------------------
/tests/baseline_images/test_display/test_display_labeled_events.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/baseline_images/test_display/test_display_labeled_events.png
--------------------------------------------------------------------------------
/tests/baseline_images/test_display/test_display_multipitch_midi.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/baseline_images/test_display/test_display_multipitch_midi.png
--------------------------------------------------------------------------------
/tests/baseline_images/test_display/test_display_piano_roll_midi.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/baseline_images/test_display/test_display_piano_roll_midi.png
--------------------------------------------------------------------------------
/tests/baseline_images/test_display/test_display_pitch_midi_hz.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/baseline_images/test_display/test_display_pitch_midi_hz.png
--------------------------------------------------------------------------------
/docs/api/io.rst:
--------------------------------------------------------------------------------
1 | mir_eval.io
2 | ===========
3 |
4 | .. automodule:: mir_eval.io
5 | :members:
6 | :undoc-members:
7 | :show-inheritance:
8 | :member-order: bysource
9 |
10 |
--------------------------------------------------------------------------------
/tests/baseline_images/test_display/test_display_hierarchy_nolabel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/baseline_images/test_display/test_display_hierarchy_nolabel.png
--------------------------------------------------------------------------------
/tests/baseline_images/test_display/test_display_labeled_intervals.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/baseline_images/test_display/test_display_labeled_intervals.png
--------------------------------------------------------------------------------
/tests/baseline_images/test_display/test_display_separation_label.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/baseline_images/test_display/test_display_separation_label.png
--------------------------------------------------------------------------------
/tests/baseline_images/test_display/test_display_ticker_midi_zoom.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/baseline_images/test_display/test_display_ticker_midi_zoom.png
--------------------------------------------------------------------------------
/docs/api/display.rst:
--------------------------------------------------------------------------------
1 | mir_eval.display
2 | ================
3 |
4 | .. automodule:: mir_eval.display
5 | :members:
6 | :undoc-members:
7 | :show-inheritance:
8 | :member-order: bysource
9 |
--------------------------------------------------------------------------------
/docs/api/key.rst:
--------------------------------------------------------------------------------
1 | mir_eval.key
2 | ============
3 |
4 | .. automodule:: mir_eval.key
5 | :members:
6 | :undoc-members:
7 | :show-inheritance:
8 | :member-order: bysource
9 |
10 |
--------------------------------------------------------------------------------
/tests/baseline_images/test_display/test_display_multipitch_hz_voiced.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/baseline_images/test_display/test_display_multipitch_hz_voiced.png
--------------------------------------------------------------------------------
/docs/api/beat.rst:
--------------------------------------------------------------------------------
1 | mir_eval.beat
2 | =============
3 |
4 | .. automodule:: mir_eval.beat
5 | :members:
6 | :undoc-members:
7 | :show-inheritance:
8 | :member-order: bysource
9 |
10 |
--------------------------------------------------------------------------------
/docs/api/chord.rst:
--------------------------------------------------------------------------------
1 | mir_eval.chord
2 | ==============
3 |
4 | .. automodule:: mir_eval.chord
5 | :members:
6 | :undoc-members:
7 | :show-inheritance:
8 | :member-order: bysource
9 |
10 |
--------------------------------------------------------------------------------
/docs/api/onset.rst:
--------------------------------------------------------------------------------
1 | mir_eval.onset
2 | ==============
3 |
4 | .. automodule:: mir_eval.onset
5 | :members:
6 | :undoc-members:
7 | :show-inheritance:
8 | :member-order: bysource
9 |
10 |
--------------------------------------------------------------------------------
/docs/api/tempo.rst:
--------------------------------------------------------------------------------
1 | mir_eval.tempo
2 | ==============
3 |
4 | .. automodule:: mir_eval.tempo
5 | :members:
6 | :undoc-members:
7 | :show-inheritance:
8 | :member-order: bysource
9 |
10 |
--------------------------------------------------------------------------------
/docs/api/util.rst:
--------------------------------------------------------------------------------
1 | mir_eval.util
2 | =============
3 |
4 | .. automodule:: mir_eval.util
5 | :members:
6 | :undoc-members:
7 | :show-inheritance:
8 | :member-order: bysource
9 |
10 |
--------------------------------------------------------------------------------
/tests/baseline_images/test_display/test_display_multipitch_hz_unvoiced.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/baseline_images/test_display/test_display_multipitch_hz_unvoiced.png
--------------------------------------------------------------------------------
/docs/api/melody.rst:
--------------------------------------------------------------------------------
1 | mir_eval.melody
2 | ===============
3 |
4 | .. automodule:: mir_eval.melody
5 | :members:
6 | :undoc-members:
7 | :show-inheritance:
8 | :member-order: bysource
9 |
10 |
--------------------------------------------------------------------------------
/docs/api/sonify.rst:
--------------------------------------------------------------------------------
1 | mir_eval.sonify
2 | ===============
3 |
4 | .. automodule:: mir_eval.sonify
5 | :members:
6 | :undoc-members:
7 | :show-inheritance:
8 | :member-order: bysource
9 |
10 |
--------------------------------------------------------------------------------
/tests/baseline_images/test_display/test_display_labeled_intervals_compare.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/baseline_images/test_display/test_display_labeled_intervals_compare.png
--------------------------------------------------------------------------------
/docs/api/pattern.rst:
--------------------------------------------------------------------------------
1 | mir_eval.pattern
2 | ================
3 |
4 | .. automodule:: mir_eval.pattern
5 | :members:
6 | :undoc-members:
7 | :show-inheritance:
8 | :member-order: bysource
9 |
10 |
--------------------------------------------------------------------------------
/docs/api/segment.rst:
--------------------------------------------------------------------------------
1 | mir_eval.segment
2 | ================
3 |
4 | .. automodule:: mir_eval.segment
5 | :members:
6 | :undoc-members:
7 | :show-inheritance:
8 | :member-order: bysource
9 |
10 |
--------------------------------------------------------------------------------
/tests/baseline_images/test_display/test_display_labeled_intervals_noextend.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/baseline_images/test_display/test_display_labeled_intervals_noextend.png
--------------------------------------------------------------------------------
/tests/data/segment/raw_data/LEGEND:
--------------------------------------------------------------------------------
1 | Fold
2 | Track
3 | S_Over
4 | S_Under
5 | F_Pair
6 | P_Pair
7 | R_Pair
8 | RAND
9 | F@0.5
10 | P@0.5
11 | R@0.5
12 | F@3.0
13 | P@3.0
14 | R@3.0
15 | T_to_P
16 | P_to_T
17 |
--------------------------------------------------------------------------------
/.github/environment-docs.yml:
--------------------------------------------------------------------------------
1 | name: docs
2 | channels:
3 | - conda-forge
4 | - defaults
5 | dependencies:
6 | - pip
7 | - numpy >=1.15.4
8 | - scipy >=1.4.0
9 | - matplotlib-base>=3.3.0
10 | - numpydoc
11 |
--------------------------------------------------------------------------------
/docs/api/alignment.rst:
--------------------------------------------------------------------------------
1 | mir_eval.alignment
2 | ==================
3 |
4 | .. automodule:: mir_eval.alignment
5 | :members:
6 | :undoc-members:
7 | :show-inheritance:
8 | :member-order: bysource
9 |
10 |
--------------------------------------------------------------------------------
/docs/api/hierarchy.rst:
--------------------------------------------------------------------------------
1 | mir_eval.hierarchy
2 | ==================
3 |
4 | .. automodule:: mir_eval.hierarchy
5 | :members:
6 | :undoc-members:
7 | :show-inheritance:
8 | :member-order: bysource
9 |
10 |
--------------------------------------------------------------------------------
/docs/api/multipitch.rst:
--------------------------------------------------------------------------------
1 | mir_eval.multipitch
2 | ===================
3 |
4 | .. automodule:: mir_eval.multipitch
5 | :members:
6 | :undoc-members:
7 | :show-inheritance:
8 | :member-order: bysource
9 |
10 |
--------------------------------------------------------------------------------
/docs/api/separation.rst:
--------------------------------------------------------------------------------
1 | mir_eval.separation
2 | ===================
3 |
4 | .. automodule:: mir_eval.separation
5 | :members:
6 | :undoc-members:
7 | :show-inheritance:
8 | :member-order: bysource
9 |
10 |
--------------------------------------------------------------------------------
/tests/baseline_images/test_display/test_display_labeled_intervals_compare_common.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/baseline_images/test_display/test_display_labeled_intervals_compare_common.png
--------------------------------------------------------------------------------
/tests/data/melody/output04.json:
--------------------------------------------------------------------------------
1 | {"Voicing Recall": 0.55196674128557721, "Voicing False Alarm": 0.0, "Raw Pitch Accuracy": 0.53118004477134639, "Raw Chroma Accuracy": 0.5890629996802047, "Overall Accuracy": 0.48461074230537116}
--------------------------------------------------------------------------------
/tests/baseline_images/test_display/test_display_labeled_intervals_compare_noextend.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mir-evaluation/mir_eval/HEAD/tests/baseline_images/test_display/test_display_labeled_intervals_compare_noextend.png
--------------------------------------------------------------------------------
/tests/data/segment/est08.lab:
--------------------------------------------------------------------------------
1 | 0.000 15.920 C
2 | 15.920 36.543 D
3 | 36.543 50.721 B
4 | 50.721 85.522 D
5 | 85.522 97.122 B
6 | 97.122 134.501 D
7 | 134.501 169.302 D
8 | 169.302 180.903 C
9 | 180.903 185.400 C
10 |
--------------------------------------------------------------------------------
/tests/data/segment/est01.lab:
--------------------------------------------------------------------------------
1 | 0.000 5.550 N1
2 | 5.550 17.264 B
3 | 17.264 23.116 N2
4 | 23.116 36.467 B
5 | 36.467 110.980 N3
6 | 110.980 154.076 A
7 | 154.076 197.265 A
8 | 197.265 241.232 A
9 | 241.232 291.979 N5
10 |
--------------------------------------------------------------------------------
/docs/api/transcription.rst:
--------------------------------------------------------------------------------
1 | mir_eval.transcription
2 | ======================
3 |
4 | .. automodule:: mir_eval.transcription
5 | :members:
6 | :undoc-members:
7 | :show-inheritance:
8 | :member-order: bysource
9 |
10 |
--------------------------------------------------------------------------------
/tests/data/melody/output00.json:
--------------------------------------------------------------------------------
1 | {"Voicing Recall": 0.97653429602888087, "Voicing False Alarm": 0.03248259860788863, "Raw Pitch Accuracy": 0.96425992779783398, "Raw Chroma Accuracy": 0.96425992779783398, "Overall Accuracy": 0.96393171806167399}
--------------------------------------------------------------------------------
/tests/data/melody/output01.json:
--------------------------------------------------------------------------------
1 | {"Voicing Recall": 0.90236220472440942, "Voicing False Alarm": 0.035772357723577237, "Raw Pitch Accuracy": 0.94488188976377951, "Raw Chroma Accuracy": 0.94488188976377951, "Overall Accuracy": 0.90554089709762531}
--------------------------------------------------------------------------------
/tests/data/melody/output02.json:
--------------------------------------------------------------------------------
1 | {"Voicing Recall": 0.81715951686797172, "Voicing False Alarm": 0.17938931297709923, "Raw Pitch Accuracy": 0.76343190337359434, "Raw Chroma Accuracy": 0.76343190337359434, "Overall Accuracy": 0.76455125797972212}
--------------------------------------------------------------------------------
/tests/data/melody/output03.json:
--------------------------------------------------------------------------------
1 | {"Voicing Recall": 0.83470456245325353, "Voicing False Alarm": 0.083333333333333329, "Raw Pitch Accuracy": 0.89005235602094246, "Raw Chroma Accuracy": 0.89005235602094246, "Overall Accuracy": 0.83958453548759382}
--------------------------------------------------------------------------------
/tests/data/melody/output05.json:
--------------------------------------------------------------------------------
1 | {"Voicing Recall": 0.58853783982365904, "Voicing False Alarm": 0.039049235993208829, "Raw Pitch Accuracy": 0.69250551065393096, "Raw Chroma Accuracy": 0.71307861866274802, "Overall Accuracy": 0.63726970703714891}
--------------------------------------------------------------------------------
/tests/data/melody/output06.json:
--------------------------------------------------------------------------------
1 | {"Voicing Recall": 0.79990757855822547, "Voicing False Alarm": 0.14705882352941177, "Raw Pitch Accuracy": 0.75277264325323479, "Raw Chroma Accuracy": 0.75277264325323479, "Overall Accuracy": 0.72190201729106629}
--------------------------------------------------------------------------------
/tests/data/melody/output07.json:
--------------------------------------------------------------------------------
1 | {"Voicing Recall": 0.69313725490196076, "Voicing False Alarm": 0.14507772020725387, "Raw Pitch Accuracy": 0.45392156862745098, "Raw Chroma Accuracy": 0.62287581699346406, "Overall Accuracy": 0.45037724898432968}
--------------------------------------------------------------------------------
/tests/data/melody/output08.json:
--------------------------------------------------------------------------------
1 | {"Voicing Recall": 0.81575793888556025, "Voicing False Alarm": 0.018633540372670808, "Raw Pitch Accuracy": 0.7369682444577591, "Raw Chroma Accuracy": 0.84002396644697419, "Overall Accuracy": 0.74038209892698248}
--------------------------------------------------------------------------------
/tests/data/melody/output09.json:
--------------------------------------------------------------------------------
1 | {"Voicing Recall": 0.86051660516605166, "Voicing False Alarm": 0.078590785907859076, "Raw Pitch Accuracy": 0.80184501845018452, "Raw Chroma Accuracy": 0.84575645756457563, "Overall Accuracy": 0.78770301624129935}
--------------------------------------------------------------------------------
/tests/data/onset/ref08.txt:
--------------------------------------------------------------------------------
1 | 1.499999999999999944e-01
2 | 6.280000000000000027e-01
3 | 6.939999999999999503e-01
4 | 1.141000000000000014e+00
5 | 1.179000000000000048e+00
6 | 1.298999999999999932e+00
7 | 1.631999999999999895e+00
8 | 2.104999999999999982e+00
9 |
--------------------------------------------------------------------------------
/tests/data/segment/est09.lab:
--------------------------------------------------------------------------------
1 | 0.000 10.902 B
2 | 10.902 43.431 D
3 | 43.431 51.563 B
4 | 51.563 59.695 B
5 | 59.695 94.257 D
6 | 94.257 102.389 B
7 | 102.389 120.686 D
8 | 120.686 128.818 D
9 | 128.818 155.248 D
10 | 155.248 182.000 B
11 |
--------------------------------------------------------------------------------
/tests/data/segment/raw_data/cf6segmentssalami000970_results.txt:
--------------------------------------------------------------------------------
1 | 0
2 | salami000970
3 | 0.6933
4 | 0.5805
5 | 0.5464
6 | 0.4956
7 | 0.6088
8 | 0.7543
9 | 0.4167
10 | 0.5000
11 | 0.3571
12 | 0.5000
13 | 0.6000
14 | 0.4286
15 | 13.0770
16 | 0.5370
17 |
--------------------------------------------------------------------------------
/tests/data/segment/raw_data/mp1segmentssalami000119_results.txt:
--------------------------------------------------------------------------------
1 | 0
2 | salami000119
3 | 0.3301
4 | 0.7676
5 | 0.3200
6 | 0.7935
7 | 0.2004
8 | 0.6162
9 | 0.1818
10 | 0.2000
11 | 0.1667
12 | 0.5454
13 | 0.6000
14 | 0.5000
15 | 2.9813
16 | 2.2660
17 |
--------------------------------------------------------------------------------
/tests/data/segment/raw_data/mp2segmentssalami000666_results.txt:
--------------------------------------------------------------------------------
1 | 0
2 | salami000666
3 | 0.3285
4 | 0.8827
5 | 0.2194
6 | 0.8914
7 | 0.1251
8 | 0.6058
9 | 0.4210
10 | 0.3810
11 | 0.4706
12 | 0.5263
13 | 0.4762
14 | 0.5882
15 | 1.2814
16 | 2.0915
17 |
--------------------------------------------------------------------------------
/tests/data/segment/raw_data/rbh3segmentssalami000025_results.txt:
--------------------------------------------------------------------------------
1 | 0
2 | salami000025
3 | 0.4482
4 | 0.3491
5 | 0.4746
6 | 0.4203
7 | 0.5451
8 | 0.5955
9 | 0.4546
10 | 0.4546
11 | 0.4546
12 | 0.4546
13 | 0.4546
14 | 0.4546
15 | 4.1181
16 | 4.1181
17 |
--------------------------------------------------------------------------------
/tests/data/segment/raw_data/rbh3segmentssalami000068_results.txt:
--------------------------------------------------------------------------------
1 | 0
2 | salami000068
3 | 0.6091
4 | 0.4092
5 | 0.5674
6 | 0.4452
7 | 0.7823
8 | 0.6475
9 | 0.2759
10 | 0.4000
11 | 0.2105
12 | 0.5517
13 | 0.8000
14 | 0.4210
15 | 5.4102
16 | 0.9919
17 |
--------------------------------------------------------------------------------
/tests/data/segment/ref00.lab:
--------------------------------------------------------------------------------
1 | 0.383 7.332 Intro
2 | 7.332 27.109 Verse
3 | 27.109 47.015 Verse
4 | 47.015 67.123 Bridge
5 | 67.123 87.103 Verse (Guitar Solo)
6 | 87.103 107.649 Verse
7 | 107.649 128.114 Bridge
8 | 128.114 142.763 Outro (fade-out)
9 |
--------------------------------------------------------------------------------
/.github/environment.yml:
--------------------------------------------------------------------------------
1 | name: test
2 | channels:
3 | - conda-forge
4 | - defaults
5 | dependencies:
6 | - pip
7 | - numpy >=1.15.4
8 | - scipy >=1.4.0
9 | - matplotlib-base>=3.3.0
10 | - pytest
11 | - pytest-cov
12 | - pytest-mpl
13 |
--------------------------------------------------------------------------------
/tests/data/segment/est07.lab:
--------------------------------------------------------------------------------
1 | 0.000 58.249 C
2 | 58.249 74.409 C
3 | 74.409 86.529 B
4 | 86.529 112.788 B
5 | 112.788 120.868 D
6 | 120.868 159.247 B
7 | 159.247 175.406 C
8 | 175.406 183.486 D
9 | 183.486 211.765 B
10 | 211.765 227.733 C
11 |
--------------------------------------------------------------------------------
/tests/data/segment/ref07.lab:
--------------------------------------------------------------------------------
1 | 0.488 34.145 A
2 | 34.145 62.367 B
3 | 62.367 86.586 B
4 | 86.586 102.772 C
5 | 102.772 126.972 B
6 | 126.972 143.189 C
7 | 143.189 159.275 D
8 | 159.275 183.465 B
9 | 183.465 193.567 C
10 | 193.567 227.796 C
11 |
--------------------------------------------------------------------------------
/.github/environment-minimal.yml:
--------------------------------------------------------------------------------
1 | name: test
2 | channels:
3 | - conda-forge
4 | - defaults
5 | dependencies:
6 | - pip
7 | - numpy ==1.15.4
8 | - scipy ==1.4.0
9 | - matplotlib-base==3.3.0
10 | - pytest
11 | - pytest-cov
12 | - pytest-mpl
13 |
--------------------------------------------------------------------------------
/tests/data/segment/raw_data/cf5segmentsstructmrx09000016_results.txt:
--------------------------------------------------------------------------------
1 | 0
2 | struct_mrx_09_000016
3 | 0.6220
4 | 0.8514
5 | 0.6192
6 | 0.8644
7 | 0.4823
8 | 0.8386
9 | 0.3704
10 | 0.2778
11 | 0.5556
12 | 0.5926
13 | 0.4444
14 | 0.8889
15 | 0.4490
16 | 4.5000
17 |
--------------------------------------------------------------------------------
/tests/data/segment/raw_data/cf6segmentsstructmrx09000117_results.txt:
--------------------------------------------------------------------------------
1 | 0
2 | struct_mrx_09_000117
3 | 0.8303
4 | 0.4029
5 | 0.4005
6 | 0.2658
7 | 0.8119
8 | 0.5314
9 | 0.0606
10 | 0.0435
11 | 0.1000
12 | 0.3030
13 | 0.2174
14 | 0.5000
15 | 2.9320
16 | 12.3300
17 |
--------------------------------------------------------------------------------
/tests/data/segment/raw_data/mp1segmentsstructmrx09000084_results.txt:
--------------------------------------------------------------------------------
1 | 0
2 | struct_mrx_09_000084
3 | 0.4981
4 | 0.9093
5 | 0.5342
6 | 0.9009
7 | 0.3797
8 | 0.8115
9 | 0.1429
10 | 0.1000
11 | 0.2500
12 | 0.4286
13 | 0.3000
14 | 0.7500
15 | 1.5221
16 | 11.3320
17 |
--------------------------------------------------------------------------------
/tests/data/segment/raw_data/mp2segmentsstructmrx09000132_results.txt:
--------------------------------------------------------------------------------
1 | 0
2 | struct_mrx_09_000132
3 | 0.6241
4 | 0.8438
5 | 0.5560
6 | 0.7901
7 | 0.4289
8 | 0.7960
9 | 0.3810
10 | 0.4000
11 | 0.3636
12 | 0.7619
13 | 0.8000
14 | 0.7273
15 | 1.5851
16 | 0.4952
17 |
--------------------------------------------------------------------------------
/tests/data/segment/raw_data/rbh4segmentsstructmrx09000020_results.txt:
--------------------------------------------------------------------------------
1 | 0
2 | struct_mrx_09_000020
3 | 0.3517
4 | 0.2743
5 | 0.4005
6 | 0.2959
7 | 0.6193
8 | 0.5149
9 | 0.0952
10 | 0.0909
11 | 0.1000
12 | 0.4762
13 | 0.4546
14 | 0.5000
15 | 2.9997
16 | 6.1291
17 |
--------------------------------------------------------------------------------
/docs/api/transcription_velocity.rst:
--------------------------------------------------------------------------------
1 | mir_eval.transcription_velocity
2 | ===============================
3 |
4 | .. automodule:: mir_eval.transcription_velocity
5 | :members:
6 | :undoc-members:
7 | :show-inheritance:
8 | :member-order: bysource
9 |
10 |
--------------------------------------------------------------------------------
/tests/data/hierarchy/ref00.lab:
--------------------------------------------------------------------------------
1 | 0.000 0.441 Z
2 | 0.441 17.512 A
3 | 17.512 40.445 B
4 | 40.445 63.101 C
5 | 63.101 68.797 D
6 | 68.797 91.580 B
7 | 91.580 114.351 C
8 | 114.351 125.636 E
9 | 125.636 137.074 B
10 | 137.074 148.451 C
11 | 148.451 187.779 C
12 |
--------------------------------------------------------------------------------
/tests/data/onset/ref03.txt:
--------------------------------------------------------------------------------
1 | 0.026848072
2 | 0.211882086
3 | 0.379501133
4 | 0.514897959
5 | 0.703469387
6 | 0.844625850
7 | 0.958163265
8 | 1.096417233
9 | 1.231383219
10 | 1.487528344
11 | 1.636530612
12 | 1.779795918
13 | 1.938140589
14 | 2.075283446
15 | 2.231292517
16 |
--------------------------------------------------------------------------------
/tests/data/segment/est06.lab:
--------------------------------------------------------------------------------
1 | 0.000 0.499 Seg#001
2 | 0.499 3.823 Seg#002
3 | 3.823 28.706 Seg#003
4 | 28.706 42.635 Seg#004
5 | 42.635 66.801 Seg#005
6 | 66.801 79.868 Seg#006
7 | 79.868 108.669 Seg#007
8 | 108.669 117.563 Seg#008
9 | 117.563 124.552 Seg#009
10 |
--------------------------------------------------------------------------------
/tests/data/segment/ref03.lab:
--------------------------------------------------------------------------------
1 | 0.041 5.478 Z
2 | 5.478 24.498 A
3 | 24.498 44.068 B
4 | 44.068 63.352 C
5 | 63.352 82.600 B
6 | 82.600 101.552 C
7 | 101.552 120.820 B
8 | 120.820 149.498 C
9 | 149.498 187.963 C
10 | 187.963 263.877 C
11 | 263.877 288.160 Z
12 |
--------------------------------------------------------------------------------
/tests/data/segment/est04.lab:
--------------------------------------------------------------------------------
1 | 0.000 19.522 Seg#001
2 | 19.522 31.083 Seg#002
3 | 31.083 52.390 Seg#003
4 | 52.390 69.346 Seg#004
5 | 69.346 89.580 Seg#005
6 | 89.580 96.447 Seg#006
7 | 96.447 106.017 Seg#007
8 | 106.017 121.020 Seg#008
9 | 121.020 139.833 Seg#009
10 |
--------------------------------------------------------------------------------
/tests/data/segment/est03.lab:
--------------------------------------------------------------------------------
1 | 0.000 32.009 Seg#001
2 | 32.009 61.652 Seg#002
3 | 61.652 100.252 Seg#003
4 | 100.252 123.652 Seg#004
5 | 123.652 159.359 Seg#005
6 | 159.359 191.094 Seg#006
7 | 191.094 217.223 Seg#007
8 | 217.223 262.742 Seg#008
9 | 262.742 288.000 Seg#009
10 |
--------------------------------------------------------------------------------
/tests/data/segment/ref02.lab:
--------------------------------------------------------------------------------
1 | 0.200 76.986 Intro
2 | 76.986 92.729 Verse
3 | 92.729 108.453 Verse
4 | 108.453 124.201 Bridge
5 | 124.201 139.933 Refrain
6 | 139.933 195.049 Instrumental solo
7 | 195.049 210.808 Break
8 | 210.808 226.512 Ad Lib
9 | 226.512 322.560 Outro
10 |
--------------------------------------------------------------------------------
/tests/data/segment/ref09.lab:
--------------------------------------------------------------------------------
1 | 0.245 3.424 Intro
2 | 3.424 27.753 Verse
3 | 27.753 52.156 Refrain
4 | 52.156 75.851 Verse
5 | 75.851 100.386 Refrain
6 | 100.386 122.004 Verse (instrumental)
7 | 122.004 137.268 Bridge
8 | 137.268 161.414 Refrain
9 | 161.414 179.425 Outro
10 |
--------------------------------------------------------------------------------
/tests/data/segment/ref06.lab:
--------------------------------------------------------------------------------
1 | 0.384 3.686 Intro
2 | 3.686 15.372 Verse
3 | 15.372 27.121 Verse
4 | 27.121 42.510 Refrain
5 | 42.510 54.285 Verse
6 | 54.285 66.194 Verse
7 | 66.194 81.670 Refrain
8 | 81.670 93.143 Verse (Guitar Solo)
9 | 93.143 108.536 Refrain
10 | 108.536 119.267 Outro (fade out)
11 |
--------------------------------------------------------------------------------
/tests/data/onset/est06.txt:
--------------------------------------------------------------------------------
1 | 3.047619047619047894e-01
2 | 4.295691609977324021e-01
3 | 5.601814058956916531e-01
4 | 7.111111111111111382e-01
5 | 8.272108843537414602e-01
6 | 9.520181405895691285e-01
7 | 1.076825396825396908e+00
8 | 1.239365079365079447e+00
9 | 1.520907029478458128e+00
10 | 1.657324263038548740e+00
11 |
--------------------------------------------------------------------------------
/tests/data/onset/est07.txt:
--------------------------------------------------------------------------------
1 | 3.121541950113378983e-01
2 | 4.543764172335601481e-01
3 | 6.053061224489796333e-01
4 | 9.478004535147391829e-01
5 | 1.072607709750566851e+00
6 | 1.252562358276643861e+00
7 | 1.568934240362811705e+00
8 | 1.888208616780045368e+00
9 | 2.065260770975056559e+00
10 | 2.248117913832199388e+00
11 |
--------------------------------------------------------------------------------
/tests/data/segment/ref01.lab:
--------------------------------------------------------------------------------
1 | 0.436 111.316 N
2 | 111.316 124.345 A
3 | 124.345 137.409 B
4 | 137.409 154.178 C
5 | 154.178 167.193 A
6 | 167.193 180.410 B
7 | 180.410 197.305 C
8 | 197.305 210.605 A
9 | 210.605 224.052 B
10 | 224.052 241.258 C
11 | 241.258 254.268 A
12 | 254.268 267.205 B
13 | 267.205 292.617 C'
14 |
--------------------------------------------------------------------------------
/tests/data/onset/est08.txt:
--------------------------------------------------------------------------------
1 | 1.770521541950113298e-01
2 | 2.089795918367347016e-01
3 | 4.847165532879818550e-01
4 | 6.907936507936508486e-01
5 | 8.126984126984126977e-01
6 | 1.198730158730158646e+00
7 | 1.253877551020408099e+00
8 | 1.367074829931972824e+00
9 | 1.689251700680272084e+00
10 | 2.162358276643991051e+00
11 | 3.059229024943310726e+00
12 |
--------------------------------------------------------------------------------
/tests/data/onset/ref07.txt:
--------------------------------------------------------------------------------
1 | 0.000000000000000000e+00
2 | 3.300000000000000155e-01
3 | 4.959999999999999964e-01
4 | 6.500000000000000222e-01
5 | 9.599999999999999645e-01
6 | 1.116000000000000103e+00
7 | 1.278000000000000025e+00
8 | 1.612999999999999989e+00
9 | 1.933000000000000052e+00
10 | 2.108999999999999986e+00
11 | 2.250000000000000000e+00
12 |
--------------------------------------------------------------------------------
/tests/data/transcription_velocity/output4.json:
--------------------------------------------------------------------------------
1 | {"Precision": 0.44022011005502754, "Recall": 0.332703213610586, "F-measure": 0.3789836347975883, "Average_Overlap_Ratio": 0.8454735050026583, "Precision_no_offset": 0.7008504252126063, "Recall_no_offset": 0.5296786389413989, "F-measure_no_offset": 0.603359173126615, "Average_Overlap_Ratio_no_offset": 0.7201617111516434}
--------------------------------------------------------------------------------
/tests/data/transcription_velocity/output6.json:
--------------------------------------------------------------------------------
1 | {"Precision": 0.4370477568740955, "Recall": 0.3647342995169082, "F-measure": 0.3976300197498354, "Average_Overlap_Ratio": 0.8822838814507282, "Precision_no_offset": 0.7098408104196816, "Recall_no_offset": 0.592391304347826, "F-measure_no_offset": 0.6458196181698486, "Average_Overlap_Ratio_no_offset": 0.7471297378130326}
--------------------------------------------------------------------------------
/tests/data/transcription_velocity/output8.json:
--------------------------------------------------------------------------------
1 | {"Precision": 0.3445705024311183, "Recall": 0.2888586956521739, "F-measure": 0.31426459719142646, "Average_Overlap_Ratio": 0.8369252164559063, "Precision_no_offset": 0.6512155591572123, "Recall_no_offset": 0.5459239130434783, "F-measure_no_offset": 0.593939393939394, "Average_Overlap_Ratio_no_offset": 0.6678654264520998}
--------------------------------------------------------------------------------
/tests/data/transcription_velocity/output9.json:
--------------------------------------------------------------------------------
1 | {"Precision": 0.4347258485639687, "Recall": 0.415211970074813, "F-measure": 0.42474489795918374, "Average_Overlap_Ratio": 0.8655241964749644, "Precision_no_offset": 0.701976874300634, "Recall_no_offset": 0.6704666904168151, "F-measure_no_offset": 0.6858600583090378, "Average_Overlap_Ratio_no_offset": 0.7234184926475985}
--------------------------------------------------------------------------------
/tests/data/hierarchy/output_w=05.json:
--------------------------------------------------------------------------------
1 | {"T-Precision reduced": 0.9037379015435819, "T-Recall reduced": 0.9645859626864335, "T-Measure reduced": 0.9331710743157444, "T-Precision full": 0.914103820262725, "T-Recall full": 0.9695550559527968, "T-Measure full": 0.9410132501083357, "L-Precision": 0.76637322676449, "L-Recall": 0.8816707087885174, "L-Measure": 0.8199888503715905}
--------------------------------------------------------------------------------
/tests/data/hierarchy/output_w=15.json:
--------------------------------------------------------------------------------
1 | {"T-Precision reduced": 0.7484596791031685, "T-Recall reduced": 0.7564831451158136, "T-Measure reduced": 0.7524500239192489, "T-Precision full": 0.8377303685813188, "T-Recall full": 0.8044189667273323, "T-Measure full": 0.820736802677731, "L-Precision": 0.76637322676449, "L-Recall": 0.8816707087885174, "L-Measure": 0.8199888503715905}
--------------------------------------------------------------------------------
/tests/data/hierarchy/output_w=30.json:
--------------------------------------------------------------------------------
1 | {"T-Precision reduced": 0.8258236282977253, "T-Recall reduced": 0.6179435977681829, "T-Measure reduced": 0.7069178670620068, "T-Precision full": 0.8897226874011187, "T-Recall full": 0.705521675534329, "T-Measure full": 0.7869874431288547, "L-Precision": 0.76637322676449, "L-Recall": 0.8816707087885174, "L-Measure": 0.8199888503715905}
--------------------------------------------------------------------------------
/tests/data/transcription_velocity/output0.json:
--------------------------------------------------------------------------------
1 | {"Precision": 0.41062534587714444, "Recall": 0.37915176290240166, "F-measure": 0.39426142401700326, "Average_Overlap_Ratio": 0.8562035496966018, "Precision_no_offset": 0.7000553403431101, "Recall_no_offset": 0.6463975472662238, "F-measure_no_offset": 0.6721572794899044, "Average_Overlap_Ratio_no_offset": 0.696084896276489}
--------------------------------------------------------------------------------
/tests/data/transcription_velocity/output1.json:
--------------------------------------------------------------------------------
1 | {"Precision": 0.33754512635379064, "Recall": 0.33754512635379064, "F-measure": 0.33754512635379064, "Average_Overlap_Ratio": 0.8555580621632016, "Precision_no_offset": 0.5794223826714802, "Recall_no_offset": 0.5794223826714802, "F-measure_no_offset": 0.5794223826714802, "Average_Overlap_Ratio_no_offset": 0.7419337908739874}
--------------------------------------------------------------------------------
/tests/data/transcription_velocity/output2.json:
--------------------------------------------------------------------------------
1 | {"Precision": 0.17532971295577968, "Recall": 0.15586206896551724, "F-measure": 0.16502373128879153, "Average_Overlap_Ratio": 0.6346439422322657, "Precision_no_offset": 0.5865011636927852, "Recall_no_offset": 0.5213793103448275, "F-measure_no_offset": 0.552026286966046, "Average_Overlap_Ratio_no_offset": 0.4720752936805029}
--------------------------------------------------------------------------------
/tests/data/transcription_velocity/output3.json:
--------------------------------------------------------------------------------
1 | {"Precision": 0.46438450899031813, "Recall": 0.46778126088470917, "F-measure": 0.46607669616519176, "Average_Overlap_Ratio": 0.8933130962405428, "Precision_no_offset": 0.6756569847856155, "Recall_no_offset": 0.6805990943921978, "F-measure_no_offset": 0.6781190352247094, "Average_Overlap_Ratio_no_offset": 0.7935061683198985}
--------------------------------------------------------------------------------
/tests/data/transcription_velocity/output5.json:
--------------------------------------------------------------------------------
1 | {"Precision": 0.32124930284439485, "Recall": 0.31101511879049676, "F-measure": 0.3160493827160494, "Average_Overlap_Ratio": 0.8372286735500298, "Precision_no_offset": 0.6252091466815394, "Recall_no_offset": 0.6052915766738661, "F-measure_no_offset": 0.6150891632373114, "Average_Overlap_Ratio_no_offset": 0.6540703679868634}
--------------------------------------------------------------------------------
/tests/data/transcription_velocity/output7.json:
--------------------------------------------------------------------------------
1 | {"Precision": 0.30756578947368424, "Recall": 0.280359820089955, "F-measure": 0.29333333333333333, "Average_Overlap_Ratio": 0.8874841539695477, "Precision_no_offset": 0.5197368421052632, "Recall_no_offset": 0.4737631184407796, "F-measure_no_offset": 0.4956862745098039, "Average_Overlap_Ratio_no_offset": 0.7011687042397756}
--------------------------------------------------------------------------------
/tests/data/onset/ref06.txt:
--------------------------------------------------------------------------------
1 | 0.000000000000000000e+00
2 | 2.479999999999999982e-01
3 | 3.679999999999999938e-01
4 | 5.020000000000000018e-01
5 | 6.410000000000000142e-01
6 | 7.690000000000000169e-01
7 | 8.930000000000000160e-01
8 | 1.020000000000000018e+00
9 | 1.183000000000000052e+00
10 | 1.461000000000000076e+00
11 | 1.600999999999999979e+00
12 | 1.655999999999999917e+00
13 |
--------------------------------------------------------------------------------
/tests/data/pattern/output00.json:
--------------------------------------------------------------------------------
1 | {"F": 0.0, "P": 0.0, "R": 0.0, "F_est": 0.35878787878787882, "P_est": 0.44848484848484849, "R_est": 0.29898989898989897, "F_occ.5": 0.0, "P_occ.5": 0, "R_occ.5": 0, "F_occ.75": 0.0, "P_occ.75": 0, "R_occ.75": 0, "F_3": 0.16165324386492833, "P_3": 0.20206655483116043, "R_3": 0.13471103655410696, "FFP": 0.20206655483116043, "FFTP_est": 0.29898989898989897}
--------------------------------------------------------------------------------
/.github/environment-lint.yml:
--------------------------------------------------------------------------------
1 | name: lint
2 | channels:
3 | - conda-forge
4 | - defaults
5 | dependencies:
6 | # required
7 | - pip
8 | - bandit
9 | - codespell
10 | - flake8
11 | - pytest
12 | - pydocstyle
13 |
14 | # Dependencies for velin
15 | - numpydoc>=1.1.0
16 | - sphinx>=5.1.0
17 | - pygments
18 | - black
19 |
20 | - pip:
21 | - velin
22 |
--------------------------------------------------------------------------------
/tests/data/onset/ref00.txt:
--------------------------------------------------------------------------------
1 | 0.355011337
2 | 0.807006802
3 | 0.943990929
4 | 1.968367346
5 | 2.171428571
6 | 2.380612244
7 | 2.563265306
8 | 3.439455782
9 | 4.643990929
10 | 6.185215419
11 | 6.339047619
12 | 6.526258503
13 | 6.678639455
14 | 7.397006802
15 | 8.354829931
16 | 8.798911564
17 | 8.877278911
18 | 8.948390022
19 | 9.184943310
20 | 9.430204081
21 | 9.601451247
22 | 9.811882086
23 |
--------------------------------------------------------------------------------
/tests/data/segment/ref05.lab:
--------------------------------------------------------------------------------
1 | 0.372 23.490 A
2 | 23.490 147.424 A
3 | 147.424 171.866 A
4 | 171.866 183.994 C
5 | 183.994 196.361 C
6 | 196.361 208.201 D
7 | 208.201 220.353 C
8 | 220.353 232.328 D
9 | 232.328 254.136 C
10 | 254.136 266.072 D
11 | 266.072 278.600 C
12 | 278.600 302.370 D
13 | 302.370 315.045 C
14 | 315.045 327.589 D
15 | 327.589 341.350 D
16 | 341.350 431.961 A
17 |
--------------------------------------------------------------------------------
/tests/data/pattern/output01.json:
--------------------------------------------------------------------------------
1 | {"F": 0.28571428571428575, "P": 0.25, "R": 0.3333333333333333, "F_est": 0.25249448754612192, "P_est": 0.25927023102889601, "R_est": 0.246063877642825, "F_occ.5": 0.0, "P_occ.5": 0, "R_occ.5": 0, "F_occ.75": 0.0, "P_occ.75": 0, "R_occ.75": 0, "F_3": 0.10211154049937549, "P_3": 0.094650816870979773, "R_3": 0.11084906966815376, "FFP": 0.094650816870979773, "FFTP_est": 0.246063877642825}
--------------------------------------------------------------------------------
/tests/data/beat/output02.json:
--------------------------------------------------------------------------------
1 | {"F-measure": 0.710691823899371, "Cemgil": 0.5142812021968689, "Cemgil Best Metric Level": 0.5142812021968689, "Goto": 0.0, "P-score": 0.78616352201257866, "Correct Metric Level Continuous": 0.069182389937106917, "Correct Metric Level Total": 0.70230607966457026, "Any Metric Level Continuous": 0.069182389937106917, "Any Metric Level Total": 0.70230607966457026, "Information gain": 0.16915072749280333}
--------------------------------------------------------------------------------
/tests/data/beat/output05.json:
--------------------------------------------------------------------------------
1 | {"F-measure": 0.2191304347826087, "Cemgil": 0.12313752600283781, "Cemgil Best Metric Level": 0.12313752600283781, "Goto": 0.0, "P-score": 0.6470588235294118, "Correct Metric Level Continuous": 0.02768166089965398, "Correct Metric Level Total": 0.42560553633217996, "Any Metric Level Continuous": 0.02768166089965398, "Any Metric Level Total": 0.42560553633217996, "Information gain": 0.37609621063532095}
--------------------------------------------------------------------------------
/tests/data/beat/output09.json:
--------------------------------------------------------------------------------
1 | {"F-measure": 0.9992082343626286, "Cemgil": 0.983071489454861, "Cemgil Best Metric Level": 0.983071489454861, "Goto": 1.0, "P-score": 0.99841772151898733, "Correct Metric Level Continuous": 0.99841772151898733, "Correct Metric Level Total": 0.99841772151898733, "Any Metric Level Continuous": 0.99841772151898733, "Any Metric Level Total": 0.99841772151898733, "Information gain": 0.77527393651396859}
--------------------------------------------------------------------------------
/tests/data/hierarchy/est00.lab:
--------------------------------------------------------------------------------
1 | # A comment
2 | 0.000 0.469 Z
3 | 0.469 6.170 A
4 | 6.170 17.610 A
5 | 17.610 28.988 A
6 | 28.988 40.409 A
7 | 40.409 51.674 B
8 | 51.674 63.138 B
9 | 63.138 68.826 C
10 | 68.826 80.204 A
11 | 80.204 91.586 A
12 | 91.586 103.002 B
13 | 103.002 114.332 B
14 | 114.332 125.722 D
15 | 125.722 137.082 A
16 | 137.082 148.490 B
17 | 148.490 182.886 B
18 | 182.886 187.787 Z'
19 |
--------------------------------------------------------------------------------
/tests/data/segment/est00.lab:
--------------------------------------------------------------------------------
1 | # comment
2 | 0.000 6.000 A
3 | 6.000 14.800 B
4 | 14.800 26.400 C
5 | 26.400 34.800 B
6 | 34.800 46.600 C
7 | 46.600 52.600 D
8 | 52.600 58.000 E
9 | 58.000 67.200 F
10 | 67.200 85.800 G
11 | 85.800 95.000 B
12 | 95.000 107.200 C
13 | 107.200 114.000 D
14 | 114.000 119.000 E
15 | 119.000 127.800 F
16 | 127.800 133.800 D
17 | 133.800 138.400 E
18 | 138.400 147.400 H
19 |
--------------------------------------------------------------------------------
/tests/data/beat/output00.json:
--------------------------------------------------------------------------------
1 | {"F-measure": 0.6216216216216216, "Cemgil": 0.36267669947376407, "Cemgil Best Metric Level": 0.36267669947376407, "Goto": 0.0, "P-score": 0.8281853281853282, "Correct Metric Level Continuous": 0.032818532818532815, "Correct Metric Level Total": 0.65444015444015446, "Any Metric Level Continuous": 0.032818532818532815, "Any Metric Level Total": 0.65444015444015446, "Information gain": 0.20492902479030584}
--------------------------------------------------------------------------------
/tests/data/beat/output01.json:
--------------------------------------------------------------------------------
1 | {"F-measure": 0.5714285714285714, "Cemgil": 0.37930967713752983, "Cemgil Best Metric Level": 0.37930967713752983, "Goto": 0.0, "P-score": 0.7786624203821656, "Correct Metric Level Continuous": 0.065286624203821655, "Correct Metric Level Total": 0.59235668789808915, "Any Metric Level Continuous": 0.065286624203821655, "Any Metric Level Total": 0.59235668789808915, "Information gain": 0.18165289235165968}
--------------------------------------------------------------------------------
/tests/data/beat/output04.json:
--------------------------------------------------------------------------------
1 | {"F-measure": 0.5517241379310345, "Cemgil": 0.36213884390750961, "Cemgil Best Metric Level": 0.36213884390750961, "Goto": 0.0, "P-score": 0.80689655172413788, "Correct Metric Level Continuous": 0.043103448275862072, "Correct Metric Level Total": 0.61896551724137927, "Any Metric Level Continuous": 0.043103448275862072, "Any Metric Level Total": 0.61896551724137927, "Information gain": 0.17432052000795428}
--------------------------------------------------------------------------------
/tests/data/beat/output06.json:
--------------------------------------------------------------------------------
1 | {"F-measure": 0.38995568685376664, "Cemgil": 0.22357721675815428, "Cemgil Best Metric Level": 0.22357721675815428, "Goto": 0.0, "P-score": 0.74117647058823533, "Correct Metric Level Continuous": 0.041176470588235294, "Correct Metric Level Total": 0.57647058823529407, "Any Metric Level Continuous": 0.041176470588235294, "Any Metric Level Total": 0.57647058823529407, "Information gain": 0.29985845720926313}
--------------------------------------------------------------------------------
/tests/data/beat/output07.json:
--------------------------------------------------------------------------------
1 | {"F-measure": 0.41231593038821956, "Cemgil": 0.22720728663021972, "Cemgil Best Metric Level": 0.22720728663021972, "Goto": 0.0, "P-score": 0.89333333333333331, "Correct Metric Level Continuous": 0.090666666666666673, "Correct Metric Level Total": 0.72533333333333339, "Any Metric Level Continuous": 0.090666666666666673, "Any Metric Level Total": 0.72533333333333339, "Information gain": 0.45951853335878939}
--------------------------------------------------------------------------------
/tests/data/beat/output08.json:
--------------------------------------------------------------------------------
1 | {"F-measure": 0.17100371747211895, "Cemgil": 0.10601534783891264, "Cemgil Best Metric Level": 0.10601534783891264, "Goto": 0.0, "P-score": 0.64814814814814814, "Correct Metric Level Continuous": 0.022222222222222223, "Correct Metric Level Total": 0.45555555555555555, "Any Metric Level Continuous": 0.022222222222222223, "Any Metric Level Total": 0.45555555555555555, "Information gain": 0.36848147577387486}
--------------------------------------------------------------------------------
/tests/data/segment/ref08.lab:
--------------------------------------------------------------------------------
1 | 0.139 5.410 A
2 | 5.410 15.581 B
3 | 15.581 25.983 C
4 | 25.983 31.045 D
5 | 31.045 41.583 C
6 | 41.583 51.733 D
7 | 51.733 62.009 C
8 | 62.009 67.272 D
9 | 67.272 88.013 E
10 | 88.013 98.093 B
11 | 98.093 108.558 C
12 | 108.558 113.773 D
13 | 113.773 124.018 C
14 | 124.018 134.292 D
15 | 134.292 144.632 C
16 | 144.632 149.704 D
17 | 149.704 170.478 C
18 | 170.478 185.469 B
19 |
--------------------------------------------------------------------------------
/tests/data/beat/output03.json:
--------------------------------------------------------------------------------
1 | {"F-measure": 0.15827338129496404, "Cemgil": 0.10490347511815068, "Cemgil Best Metric Level": 0.20035411158345875, "Goto": 0.0, "P-score": 0.40521327014218012, "Correct Metric Level Continuous": 0.0023696682464454978, "Correct Metric Level Total": 0.0047393364928909956, "Any Metric Level Continuous": 0.003669724770642202, "Any Metric Level Total": 0.012844036697247707, "Information gain": 0.034733860498019208}
--------------------------------------------------------------------------------
/tests/data/pattern/output02.json:
--------------------------------------------------------------------------------
1 | {"F": 0.0, "P": 0.0, "R": 0.0, "F_est": 0.59059477273784466, "P_est": 0.53696061490272651, "R_est": 0.65613236703756328, "F_occ.5": 0.47732667346571606, "P_occ.5": 0.56455932565087485, "R_occ.5": 0.41344360478577541, "F_occ.75": 0.47732667346571606, "P_occ.75": 0.56455932565087485, "R_occ.75": 0.41344360478577541, "F_3": 0.36829084595436512, "P_3": 0.33484219438175999, "R_3": 0.40916375938472338, "FFP": 0.46540500984993144, "FFTP_est": 0.60838976846150139}
--------------------------------------------------------------------------------
/tests/data/chord/output03.json:
--------------------------------------------------------------------------------
1 | {"thirds": 0.72013661910808879, "thirds_inv": 0.6752525345964725, "triads": 0.551201950767642, "triads_inv": 0.53919658590025954, "tetrads": 0.3184048214587859, "tetrads_inv": 0.30639945659140355, "root": 0.77169647053595714, "mirex": 0.60518026902732736, "majmin": 0.74138825567913169, "majmin_inv": 0.72524056878247878, "sevenths": 0.42826698064547669, "sevenths_inv": 0.41211929374882367, "underseg": 0.92753387865, "overseg": 0.858606159941, "seg": 0.858606159941}
2 |
--------------------------------------------------------------------------------
/tests/data/chord/output09.json:
--------------------------------------------------------------------------------
1 | {"thirds": 0.7962928556965031, "thirds_inv": 0.7962928556965031, "triads": 0.7962928556965031, "triads_inv": 0.7962928556965031, "tetrads": 0.23258851286870402, "tetrads_inv": 0.23258851286870402, "root": 0.80729838398181941, "mirex": 0.7962928556965031, "majmin": 0.7962928556965031, "majmin_inv": 0.7962928556965031, "sevenths": 0.23258851286870402, "sevenths_inv": 0.23258851286870402, "underseg": 0.985101943227, "overseg": 0.269990550826, "seg": 0.269990550826}
2 |
--------------------------------------------------------------------------------
/docs/api/index.rst:
--------------------------------------------------------------------------------
1 | API Reference
2 | =============
3 |
4 | Below is the reference documentation for all **mir_eval** submodules:
5 |
6 | .. toctree::
7 | :maxdepth: 2
8 | :titlesonly:
9 |
10 | alignment
11 | beat
12 | chord
13 | melody
14 | multipitch
15 | onset
16 | pattern
17 | segment
18 | hierarchy
19 | separation
20 | tempo
21 | transcription
22 | transcription_velocity
23 | key
24 | util
25 | io
26 | sonify
27 | display
28 |
--------------------------------------------------------------------------------
/tests/data/chord/output00.json:
--------------------------------------------------------------------------------
1 | {"thirds": 0.76314050772927455, "thirds_inv": 0.74084785691131028, "triads": 0.76314050772927455, "triads_inv": 0.74084785691131028, "tetrads": 0.74350305483862278, "tetrads_inv": 0.72121040402065839, "root": 0.80276927493052763, "mirex": 0.76314050772927455, "majmin": 0.76314050772927455, "majmin_inv": 0.74084785691131028, "sevenths": 0.74350305483862278, "sevenths_inv": 0.72121040402065839, "underseg": 0.900273562098, "overseg": 0.780828010977, "seg": 0.780828010977}
2 |
--------------------------------------------------------------------------------
/tests/data/chord/output01.json:
--------------------------------------------------------------------------------
1 | {"thirds": 0.2257723638759061, "thirds_inv": 0.2257723638759061, "triads": 0.13168315063682912, "triads_inv": 0.13168315063682912, "tetrads": 0.13168315063682912, "tetrads_inv": 0.13168315063682912, "root": 0.88297902097902081, "mirex": 0.73392446544143686, "majmin": 0.73392446544143686, "majmin_inv": 0.73392446544143686, "sevenths": 0.73392446544143686, "sevenths_inv": 0.73392446544143686, "underseg": 0.897004020503, "overseg": 0.64457485294, "seg": 0.64457485294}
2 |
--------------------------------------------------------------------------------
/tests/data/chord/output02.json:
--------------------------------------------------------------------------------
1 | {"thirds": 0.62235241230972749, "thirds_inv": 0.5999746953382874, "triads": 0.62235241230972749, "triads_inv": 0.5999746953382874, "tetrads": 0.59832989232691602, "tetrads_inv": 0.59832989232691602, "root": 0.73874627645401281, "mirex": 0.62235241230972749, "majmin": 0.62235241230972749, "majmin_inv": 0.5999746953382874, "sevenths": 0.59832989232691602, "sevenths_inv": 0.59832989232691602, "underseg": 0.947849657658, "overseg": 0.586538153191, "seg": 0.586538153191}
2 |
--------------------------------------------------------------------------------
/tests/data/chord/output04.json:
--------------------------------------------------------------------------------
1 | {"thirds": 0.61377316975360119, "thirds_inv": 0.54760240590439091, "triads": 0.61377316975360119, "triads_inv": 0.54760240590439091, "tetrads": 0.54216401269552861, "tetrads_inv": 0.48493654010175835, "root": 0.61377316975360119, "mirex": 0.70954975432509093, "majmin": 0.74187242134913767, "majmin_inv": 0.66189130256050943, "sevenths": 0.67437894070820537, "sevenths_inv": 0.60319567984343858, "underseg": 0.551395407985, "overseg": 0.942801858904, "seg": 0.551395407985}
2 |
--------------------------------------------------------------------------------
/tests/data/chord/output05.json:
--------------------------------------------------------------------------------
1 | {"thirds": 0.54805508051922081, "thirds_inv": 0.53908937896741549, "triads": 0.5411086020794218, "triads_inv": 0.53214290052761659, "tetrads": 0.5411086020794218, "tetrads_inv": 0.53214290052761659, "root": 0.61754483525649884, "mirex": 0.5411086020794218, "majmin": 0.55139366172919813, "majmin_inv": 0.54225754563416062, "sevenths": 0.55139366172919813, "sevenths_inv": 0.54225754563416062, "underseg": 0.623182058069, "overseg": 0.71294165444, "seg": 0.623182058069}
2 |
--------------------------------------------------------------------------------
/tests/data/chord/output06.json:
--------------------------------------------------------------------------------
1 | {"thirds": 0.86233665785350588, "thirds_inv": 0.85200037700744258, "triads": 0.86233665785350588, "triads_inv": 0.85200037700744258, "tetrads": 0.68752442224833576, "tetrads_inv": 0.67718814140227235, "root": 0.86233665785350588, "mirex": 0.87498407755581697, "majmin": 0.86233665785350588, "majmin_inv": 0.85200037700744258, "sevenths": 0.68752442224833576, "sevenths_inv": 0.67718814140227235, "underseg": 0.887955983157, "overseg": 0.878630816686, "seg": 0.878630816686}
2 |
--------------------------------------------------------------------------------
/tests/data/chord/output07.json:
--------------------------------------------------------------------------------
1 | {"thirds": 0.79412682857142791, "thirds_inv": 0.58257699999999979, "triads": 0.7869349918367341, "triads_inv": 0.57538516326530587, "tetrads": 0.65067331836734621, "tetrads_inv": 0.47650731020408149, "root": 0.80047788571428513, "mirex": 0.84289421224489736, "majmin": 0.81069326801782837, "majmin_inv": 0.59275655958287776, "sevenths": 0.69772853045224192, "sevenths_inv": 0.49373832106319904, "underseg": 0.902303669388, "overseg": 0.900598579592, "seg": 0.900598579592}
2 |
--------------------------------------------------------------------------------
/tests/data/chord/output08.json:
--------------------------------------------------------------------------------
1 | {"thirds": 0.58387551023364859, "thirds_inv": 0.58387551023364859, "triads": 0.51898833336814898, "triads_inv": 0.51898833336814898, "tetrads": 0.46432900228964935, "tetrads_inv": 0.46432900228964935, "root": 0.70902490931479811, "mirex": 0.61737654673925113, "majmin": 0.61737654673925113, "majmin_inv": 0.61737654673925113, "sevenths": 0.55235506764487585, "sevenths_inv": 0.55235506764487585, "underseg": 0.943561201816, "overseg": 0.554632653078, "seg": 0.554632653078}
2 |
--------------------------------------------------------------------------------
/tests/data/transcription/output05.json:
--------------------------------------------------------------------------------
1 | {"Precision": 0.0, "Recall": 0.0, "F-measure": 0.0, "Average_Overlap_Ratio": 0, "Precision_no_offset": 0.03333333333333333, "Recall_no_offset": 0.07291666666666667, "F-measure_no_offset": 0.0457516339869281, "Average_Overlap_Ratio_no_offset": 0.41481713300167772, "Onset_Precision": 0.1523809523809524, "Onset_Recall": 0.3333333333333333, "Onset_F-measure": 0.20915032679738563, "Offset_Precision": 0.38571428571428573, "Offset_Recall": 0.84375, "Offset_F-measure": 0.5294117647058824}
--------------------------------------------------------------------------------
/tests/data/segment/est02.lab:
--------------------------------------------------------------------------------
1 | 0.000 3.750 N1
2 | 3.750 17.415 A
3 | 17.415 33.158 A
4 | 33.158 48.913 A
5 | 48.913 64.656 A
6 | 64.656 80.399 A
7 | 80.399 96.142 A
8 | 96.142 111.897 A
9 | 111.897 127.628 A
10 | 127.628 141.398 A
11 | 141.398 164.525 N9
12 | 164.525 180.280 B
13 | 180.280 196.023 B
14 | 196.023 207.331 N10
15 | 207.331 224.061 A
16 | 224.061 239.804 A
17 | 239.804 253.574 A
18 | 253.574 261.457 N13
19 | 261.457 277.200 A
20 | 277.200 292.943 A
21 | 292.943 308.686 A
22 | 308.686 321.991 A
23 |
--------------------------------------------------------------------------------
/tests/data/multipitch/output03.json:
--------------------------------------------------------------------------------
1 | {"Precision": 0.8890164561806353, "Recall": 0.20416593425909652, "Accuracy": 0.19909153239629757, "Chroma Precision": 0.9642173746651359, "Chroma Recall": 0.22143610476357883, "Chroma Accuracy": 0.21963126007932704, "Substitution Error": 0.025487783441729653, "Miss Error": 0.77034628229917379, "False Alarm Error": 0.0, "Total Error": 0.79583406574090354, "Chroma Substitution Error": 0.0082176129372473188, "Chroma Miss Error": 0.77034628229917379, "Chroma False Alarm Error": 0.0, "Chroma Total Error": 0.77856389523642111}
--------------------------------------------------------------------------------
/tests/data/transcription/output08.json:
--------------------------------------------------------------------------------
1 | {"Precision": 0.19270833333333334, "Recall": 0.09226932668329177, "F-measure": 0.12478920741989884, "Average_Overlap_Ratio": 0.72256747506016228, "Precision_no_offset": 0.453125, "Recall_no_offset": 0.2169576059850374, "F-measure_no_offset": 0.2934232715008432, "Average_Overlap_Ratio_no_offset": 0.48476467726821298, "Onset_Precision": 0.6458333333333334, "Onset_Recall": 0.3092269326683292, "Onset_F-measure": 0.41821247892074204, "Offset_Precision": 0.6875, "Offset_Recall": 0.32917705735660846, "Offset_F-measure": 0.44519392917369305}
--------------------------------------------------------------------------------
/tests/data/transcription/output06.json:
--------------------------------------------------------------------------------
1 | {"Precision": 0.2, "Recall": 0.18181818181818182, "F-measure": 0.1904761904761905, "Average_Overlap_Ratio": 0.73602077166935231, "Precision_no_offset": 0.37857142857142856, "Recall_no_offset": 0.34415584415584416, "F-measure_no_offset": 0.36054421768707484, "Average_Overlap_Ratio_no_offset": 0.60104325916355583, "Onset_Precision": 0.6928571428571428, "Onset_Recall": 0.6298701298701299, "Onset_F-measure": 0.6598639455782312, "Offset_Precision": 0.7357142857142858, "Offset_Recall": 0.6688311688311688, "Offset_F-measure": 0.7006802721088435}
--------------------------------------------------------------------------------
/tests/data/multipitch/output06.json:
--------------------------------------------------------------------------------
1 | {"Precision": 0.6321412996075011, "Recall": 0.6311778793816678, "Accuracy": 0.46162420382165603, "Chroma Precision": 0.6838203227213258, "Chroma Recall": 0.6827781406488134, "Chroma Accuracy": 0.51894754261128584, "Substitution Error": 0.18833006749401263, "Miss Error": 0.18049205312431962, "False Alarm Error": 0.17896799477465708, "Total Error": 0.54779011539298939, "Chroma Substitution Error": 0.13672980622686698, "Chroma Miss Error": 0.18049205312431962, "Chroma False Alarm Error": 0.17896799477465708, "Chroma Total Error": 0.49618985412584365}
--------------------------------------------------------------------------------
/tests/data/multipitch/output07.json:
--------------------------------------------------------------------------------
1 | {"Precision": 0.5150130548302873, "Recall": 0.6145817105468141, "Accuracy": 0.38928359976317345, "Chroma Precision": 0.5659268929503917, "Chroma Recall": 0.6753388378252064, "Chroma Accuracy": 0.44488916256157635, "Substitution Error": 0.21966038323726436, "Miss Error": 0.16575790621592149, "False Alarm Error": 0.35909020096588251, "Total Error": 0.74450849041906841, "Chroma Substitution Error": 0.15890325595887209, "Chroma Miss Error": 0.16575790621592149, "Chroma False Alarm Error": 0.35909020096588251, "Chroma Total Error": 0.68375136314067608}
--------------------------------------------------------------------------------
/tests/data/multipitch/output08.json:
--------------------------------------------------------------------------------
1 | {"Precision": 0.39356984478935697, "Recall": 0.39615009066815454, "Accuracy": 0.24599393676916415, "Chroma Precision": 0.498059866962306, "Chroma Recall": 0.5013251499511787, "Chroma Accuracy": 0.33305532388101194, "Substitution Error": 0.29404379969312316, "Miss Error": 0.30980610963872229, "False Alarm Error": 0.31636211466034314, "Total Error": 0.9202120239921886, "Chroma Substitution Error": 0.18886874041009905, "Chroma Miss Error": 0.30980610963872229, "Chroma False Alarm Error": 0.31636211466034314, "Chroma Total Error": 0.81503696470916442}
--------------------------------------------------------------------------------
/tests/data/multipitch/output01.json:
--------------------------------------------------------------------------------
1 | {"Precision": 0.7238741088506346, "Recall": 0.326561029181048, "Accuracy": 0.29038783482142855, "Chroma Precision": 0.8137715179968701, "Chroma Recall": 0.36711641041732035, "Chroma Accuracy": 0.33866415804327377, "Substitution Error": 0.11146846564166928, "Miss Error": 0.56197050517728275, "False Alarm Error": 0.013100094132412927, "Total Error": 0.68653906495136496, "Chroma Substitution Error": 0.070913084405396926, "Chroma Miss Error": 0.56197050517728275, "Chroma False Alarm Error": 0.013100094132412927, "Chroma Total Error": 0.64598368371509252}
--------------------------------------------------------------------------------
/tests/data/multipitch/output02.json:
--------------------------------------------------------------------------------
1 | {"Precision": 0.7112561174551386, "Recall": 0.5278450363196125, "Accuracy": 0.43469591226321036, "Chroma Precision": 0.8166705507651674, "Chroma Recall": 0.6060763288366194, "Chroma Accuracy": 0.53349233735917989, "Substitution Error": 0.13807217802375188, "Miss Error": 0.33408278565663552, "False Alarm Error": 0.076213536261962408, "Total Error": 0.54836849994234982, "Chroma Substitution Error": 0.059840885506745073, "Chroma Miss Error": 0.33408278565663552, "Chroma False Alarm Error": 0.076213536261962408, "Chroma Total Error": 0.47013720742534304}
--------------------------------------------------------------------------------
/tests/data/multipitch/output04.json:
--------------------------------------------------------------------------------
1 | {"Precision": 0.66839986581684, "Recall": 0.3125980545967995, "Accuracy": 0.27062818336162986, "Chroma Precision": 0.7759141227775914, "Chroma Recall": 0.36288045183558204, "Chroma Accuracy": 0.32845782448168132, "Substitution Error": 0.15147474113586445, "Miss Error": 0.53592720426733609, "False Alarm Error": 0.0036084091622215248, "Total Error": 0.69101035456542204, "Chroma Substitution Error": 0.1011923438970819, "Chroma Miss Error": 0.53592720426733609, "Chroma False Alarm Error": 0.0036084091622215248, "Chroma Total Error": 0.64072795732663945}
--------------------------------------------------------------------------------
/tests/data/multipitch/output05.json:
--------------------------------------------------------------------------------
1 | {"Precision": 0.7472312703583062, "Recall": 0.3306237749337023, "Accuracy": 0.29736596494866741, "Chroma Precision": 0.8578501628664496, "Chroma Recall": 0.37956877666320765, "Chroma Accuracy": 0.35710798936920324, "Substitution Error": 0.089646027902686498, "Miss Error": 0.57973019716361118, "False Alarm Error": 0.022195318805488296, "Total Error": 0.69157154387178599, "Chroma Substitution Error": 0.040701026173181137, "Chroma Miss Error": 0.57973019716361118, "Chroma False Alarm Error": 0.022195318805488296, "Chroma Total Error": 0.64262654214228065}
--------------------------------------------------------------------------------
/tests/data/multipitch/output09.json:
--------------------------------------------------------------------------------
1 | {"Precision": 0.6274555477909776, "Recall": 0.5184448578943992, "Accuracy": 0.3964189354917832, "Chroma Precision": 0.7192328596940756, "Chroma Recall": 0.5942772823506769, "Chroma Accuracy": 0.48237254595636098, "Substitution Error": 0.24161159940976454, "Miss Error": 0.23994354269583629, "False Alarm Error": 0.066209020337460706, "Total Error": 0.54776416244306148, "Chroma Substitution Error": 0.16577917495348687, "Chroma Miss Error": 0.23994354269583629, "Chroma False Alarm Error": 0.066209020337460706, "Chroma Total Error": 0.47193173798678384}
--------------------------------------------------------------------------------
/tests/data/transcription/output02.json:
--------------------------------------------------------------------------------
1 | {"Precision": 0.1164021164021164, "Recall": 0.15942028985507245, "F-measure": 0.1345565749235474, "Average_Overlap_Ratio": 0.871948149157037, "Precision_no_offset": 0.3492063492063492, "Recall_no_offset": 0.4782608695652174, "F-measure_no_offset": 0.40366972477064217, "Average_Overlap_Ratio_no_offset": 0.58729690225319064, "Onset_Precision": 0.4126984126984127, "Onset_Recall": 0.5652173913043478, "Onset_F-measure": 0.4770642201834862, "Offset_Precision": 0.5132275132275133, "Offset_Recall": 0.7028985507246377, "Offset_F-measure": 0.5932721712538227}
--------------------------------------------------------------------------------
/tests/data/transcription/output04.json:
--------------------------------------------------------------------------------
1 | {"Precision": 0.1270718232044199, "Recall": 0.11917098445595854, "F-measure": 0.12299465240641712, "Average_Overlap_Ratio": 0.79479231600521139, "Precision_no_offset": 0.7734806629834254, "Recall_no_offset": 0.7253886010362695, "F-measure_no_offset": 0.748663101604278, "Average_Overlap_Ratio_no_offset": 0.49770963250522282, "Onset_Precision": 0.861878453038674, "Onset_Recall": 0.8082901554404145, "Onset_F-measure": 0.8342245989304813, "Offset_Precision": 0.6850828729281768, "Offset_Recall": 0.6424870466321243, "Offset_F-measure": 0.6631016042780749}
--------------------------------------------------------------------------------
/tests/data/multipitch/output00.json:
--------------------------------------------------------------------------------
1 | {"Precision": 0.8246219899197312, "Recall": 0.3882492529442784, "Accuracy": 0.35863608686827686, "Chroma Precision": 0.8774500653350756, "Chroma Recall": 0.41312181402706977, "Chroma Accuracy": 0.39058540030744943, "Substitution Error": 0.081385129196695383, "Miss Error": 0.53036561785902614, "False Alarm Error": 0.0011865002636667252, "Total Error": 0.61293724731938826, "Chroma Substitution Error": 0.056512568113904024, "Chroma Miss Error": 0.53036561785902614, "Chroma False Alarm Error": 0.0011865002636667252, "Chroma Total Error": 0.58806468623659691}
--------------------------------------------------------------------------------
/tests/data/transcription/output01.json:
--------------------------------------------------------------------------------
1 | {"Precision": 0.2446043165467626, "Recall": 0.11486486486486487, "F-measure": 0.15632183908045977, "Average_Overlap_Ratio": 0.76932674055538197, "Precision_no_offset": 0.5467625899280576, "Recall_no_offset": 0.25675675675675674, "F-measure_no_offset": 0.34942528735632183, "Average_Overlap_Ratio_no_offset": 0.58151450278701833, "Onset_Precision": 0.7697841726618705, "Onset_Recall": 0.3614864864864865, "Onset_F-measure": 0.49195402298850577, "Offset_Precision": 0.8345323741007195, "Offset_Recall": 0.3918918918918919, "Offset_F-measure": 0.5333333333333333}
--------------------------------------------------------------------------------
/tests/data/transcription/output07.json:
--------------------------------------------------------------------------------
1 | {"Precision": 0.13227513227513227, "Recall": 0.07861635220125786, "F-measure": 0.09861932938856015, "Average_Overlap_Ratio": 0.73459052448613871, "Precision_no_offset": 0.4074074074074074, "Recall_no_offset": 0.24213836477987422, "F-measure_no_offset": 0.3037475345167653, "Average_Overlap_Ratio_no_offset": 0.50249110561442467, "Onset_Precision": 0.708994708994709, "Onset_Recall": 0.42138364779874216, "Onset_F-measure": 0.5285996055226824, "Offset_Precision": 0.7037037037037037, "Offset_Recall": 0.41823899371069184, "Offset_F-measure": 0.52465483234714}
--------------------------------------------------------------------------------
/tests/data/transcription/output09.json:
--------------------------------------------------------------------------------
1 | {"Precision": 0.13191489361702127, "Recall": 0.09967845659163987, "F-measure": 0.11355311355311355, "Average_Overlap_Ratio": 0.81129809533273478, "Precision_no_offset": 0.42127659574468085, "Recall_no_offset": 0.3183279742765273, "F-measure_no_offset": 0.3626373626373626, "Average_Overlap_Ratio_no_offset": 0.56517655829605251, "Onset_Precision": 0.6170212765957447, "Onset_Recall": 0.4662379421221865, "Onset_F-measure": 0.531135531135531, "Offset_Precision": 0.7574468085106383, "Offset_Recall": 0.572347266881029, "Offset_F-measure": 0.652014652014652}
--------------------------------------------------------------------------------
/tests/data/transcription/output00.json:
--------------------------------------------------------------------------------
1 | {"Precision": 0.08173076923076923, "Recall": 0.07234042553191489, "F-measure": 0.07674943566591423, "Average_Overlap_Ratio": 0.88768195115369952, "Precision_no_offset": 0.16826923076923078, "Recall_no_offset": 0.14893617021276595, "F-measure_no_offset": 0.1580135440180587, "Average_Overlap_Ratio_no_offset": 0.6158246059728274, "Onset_Precision": 0.30288461538461536, "Onset_Recall": 0.2680851063829787, "Onset_F-measure": 0.28442437923250563, "Offset_Precision": 0.7980769230769231, "Offset_Recall": 0.7063829787234043, "Offset_F-measure": 0.7494356659142212}
--------------------------------------------------------------------------------
/tests/data/transcription/output03.json:
--------------------------------------------------------------------------------
1 | {"Precision": 0.08256880733944955, "Recall": 0.07692307692307693, "F-measure": 0.07964601769911504, "Average_Overlap_Ratio": 0.83144872723186047, "Precision_no_offset": 0.46788990825688076, "Recall_no_offset": 0.4358974358974359, "F-measure_no_offset": 0.45132743362831856, "Average_Overlap_Ratio_no_offset": 0.53625642573827337, "Onset_Precision": 0.5412844036697247, "Onset_Recall": 0.5042735042735043, "Onset_F-measure": 0.5221238938053097, "Offset_Precision": 0.5321100917431193, "Offset_Recall": 0.49572649572649574, "Offset_F-measure": 0.5132743362831859}
--------------------------------------------------------------------------------
/tests/data/segment/est05.lab:
--------------------------------------------------------------------------------
1 | 0.000 27.408 Seg#001
2 | 27.408 68.069 Seg#002
3 | 68.069 94.822 Seg#003
4 | 94.822 128.659 Seg#004
5 | 128.659 147.444 Seg#005
6 | 147.444 160.784 Seg#006
7 | 160.784 193.152 Seg#007
8 | 193.152 232.371 Seg#008
9 | 232.371 251.103 Seg#009
10 | 251.103 255.417 Seg#010
11 | 255.417 266.069 Seg#011
12 | 266.069 276.230 Seg#012
13 | 276.230 279.931 Seg#013
14 | 279.931 302.550 Seg#014
15 | 302.550 315.533 Seg#015
16 | 315.533 339.258 Seg#016
17 | 339.258 341.066 Seg#017
18 | 341.066 366.039 Seg#018
19 | 366.039 402.347 Seg#019
20 | 402.347 431.962 Seg#020
21 |
--------------------------------------------------------------------------------
/mir_eval/__init__.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | """Top-level module for mir_eval"""
3 |
4 | # Import all submodules (for each task)
5 | from . import alignment
6 | from . import beat
7 | from . import chord
8 | from . import io
9 | from . import onset
10 | from . import segment
11 | from . import separation
12 | from . import util
13 | from . import sonify
14 | from . import melody
15 | from . import multipitch
16 | from . import pattern
17 | from . import tempo
18 | from . import hierarchy
19 | from . import transcription
20 | from . import transcription_velocity
21 | from . import key
22 |
23 | __version__ = "0.8.2"
24 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.py[co]
2 |
3 | # Packages
4 | *.egg
5 | *.egg-info
6 | dist
7 | build
8 | eggs
9 | parts
10 | bin
11 | var
12 | sdist
13 | develop-eggs
14 | .installed.cfg
15 |
16 | # Installer logs
17 | pip-log.txt
18 |
19 | # Unit test / coverage reports
20 | .coverage
21 | .tox
22 |
23 | #Translations
24 | *.mo
25 |
26 | #Mr Developer
27 | .mr.developer.cfg
28 |
29 | # OS generated files #
30 | .DS_Store
31 | .DS_Store?
32 | ._*
33 | .Spotlight-V100
34 | .Trashes
35 | ehthumbs.db
36 | Thumbs.db
37 |
38 | # Vim
39 | *.swp
40 |
41 | # pycharm
42 | .idea/*
43 |
44 | # docs
45 | docs/_build/*
46 |
47 | # matplotlib tests
48 | tests/result_images/*
49 |
50 | # coverage
51 | coverage.xml
52 |
53 |
--------------------------------------------------------------------------------
/.readthedocs.yaml:
--------------------------------------------------------------------------------
1 | # Read the Docs configuration file
2 | # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3 |
4 | # Required
5 | version: 2
6 |
7 | # Set the OS, Python version, and other tools you might need
8 | build:
9 | os: ubuntu-24.04
10 | tools:
11 | python: "3.12"
12 |
13 | # Build documentation in the "docs/" directory with Sphinx
14 | sphinx:
15 | configuration: docs/conf.py
16 |
17 | # Optionally, but recommended,
18 | # declare the Python requirements required to build your documentation
19 | # See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
20 | python:
21 | install:
22 | - method: pip
23 | path: .
24 | extra_requirements:
25 | - docs
26 |
--------------------------------------------------------------------------------
/tests/data/onset/est03.txt:
--------------------------------------------------------------------------------
1 | 9.578231292517007389e-02
2 | 2.380045351473922821e-01
3 | 3.773242630385487684e-01
4 | 4.469841269841269837e-01
5 | 5.659863945578231803e-01
6 | 7.517460317460317176e-01
7 | 8.968707482993196756e-01
8 | 1.007165532879818581e+00
9 | 1.155192743764172247e+00
10 | 1.282902494331065846e+00
11 | 1.369977324263038643e+00
12 | 1.497687074829932019e+00
13 | 1.538321995464852598e+00
14 | 1.683446712018140667e+00
15 | 1.808253968253968225e+00
16 | 1.869206349206349316e+00
17 | 1.976598639455782402e+00
18 | 2.113015873015873236e+00
19 | 2.153650793650793815e+00
20 | 2.275555555555555554e+00
21 | 2.618049886621315103e+00
22 | 2.946031746031746223e+00
23 | 3.038911564625850215e+00
24 | 3.085351473922902432e+00
25 | 3.140498866213151885e+00
26 |
--------------------------------------------------------------------------------
/tests/data/hierarchy/ref01.lab:
--------------------------------------------------------------------------------
1 | 0.000 0.441 z
2 | 0.441 6.172 a
3 | 6.172 11.861 b
4 | 11.861 17.512 b
5 | 17.512 23.244 c
6 | 23.244 28.875 d
7 | 28.875 34.667 c
8 | 34.667 40.445 d
9 | 40.445 46.071 e
10 | 46.071 51.768 e
11 | 51.768 57.360 e
12 | 57.360 63.101 e
13 | 63.101 68.797 f
14 | 68.797 74.457 c
15 | 74.457 80.170 d
16 | 80.170 85.774 c
17 | 85.774 91.580 d
18 | 91.580 97.311 e
19 | 97.311 103.029 e
20 | 103.029 108.627 e
21 | 108.627 114.351 e
22 | 114.351 120.031 g
23 | 120.031 125.636 g
24 | 125.636 131.424 c
25 | 131.424 137.074 d
26 | 137.074 142.860 e
27 | 142.860 148.451 e
28 | 148.451 154.212 e
29 | 154.212 159.832 e
30 | 159.832 165.571 e
31 | 165.571 171.200 e
32 | 171.200 177.041 e
33 | 177.041 187.779 e
34 |
--------------------------------------------------------------------------------
/tests/data/hierarchy/est01.lab:
--------------------------------------------------------------------------------
1 | 0.000 0.469 z
2 | 0.469 6.170 b
3 | 6.170 11.923 c
4 | 11.923 17.610 c
5 | 17.610 23.312 d
6 | 23.312 28.988 d
7 | 28.988 34.638 e
8 | 34.638 40.409 e
9 | 40.409 46.066 f
10 | 46.066 51.674 f
11 | 51.674 57.410 g
12 | 57.410 63.138 g
13 | 63.138 68.826 h
14 | 68.826 74.498 i
15 | 74.498 80.204 i
16 | 80.204 85.904 j
17 | 85.904 91.586 j
18 | 91.586 97.266 k
19 | 97.266 103.002 k
20 | 103.002 108.668 l
21 | 108.668 114.332 l
22 | 114.332 120.042 m
23 | 120.042 125.722 m
24 | 125.722 131.378 n
25 | 131.378 137.082 o
26 | 137.082 142.818 p
27 | 142.818 148.490 p
28 | 148.490 154.196 q
29 | 154.196 159.890 q
30 | 159.890 165.554 q
31 | 165.554 171.226 q
32 | 171.226 176.970 q
33 | 176.970 182.886 r
34 | 182.886 187.787 z'
35 |
--------------------------------------------------------------------------------
/tests/data/segment/raw_data/mp1segmentsstructmrx09000084.js:
--------------------------------------------------------------------------------
1 | var mp1segmentsstructmrx09000084_data = [
2 | [{o: 0, f: 34.752, l: "Part 1", a: 0},
3 | {o: 34.752, f: 89.014, l: "Part 2", a: 1},
4 | {o: 89.014, f: 123.498, l: "Part 3 (with complete ending)", a: 0}],
5 | [{o: 0, f: 19.522, l: "Seg#001", a: 0},
6 | {o: 19.522, f: 31.083, l: "Seg#002", a: 1},
7 | {o: 31.083, f: 52.39, l: "Seg#003", a: 0},
8 | {o: 52.39, f: 69.346, l: "Seg#004", a: 1},
9 | {o: 69.346, f: 89.58, l: "Seg#005", a: 0},
10 | {o: 89.58, f: 96.447, l: "Seg#006", a: 1},
11 | {o: 96.447, f: 106.017, l: "Seg#007", a: 0},
12 | {o: 106.017, f: 121.02, l: "Seg#008", a: 1},
13 | {o: 121.02, f: 139.833, l: "Seg#009", a: 0}]
14 | ];
15 |
16 | var mp1segmentsstructmrx09000084_seriesNames = ["Ground-truth","Prediction"];
17 |
--------------------------------------------------------------------------------
/tests/data/segment/output04.json:
--------------------------------------------------------------------------------
1 | {"Precision@0.5": 0.2, "Recall@0.5": 0.5, "F-measure@0.5": 0.28571428571428575, "Precision@3.0": 0.3, "Recall@3.0": 0.75, "F-measure@3.0": 0.4285714285714285, "Ref-to-est deviation": 0.28300000000000125, "Est-to-ref deviation": 5.5510000000000055, "Pairwise Precision": 0.9259504360795314, "Pairwise Recall": 0.35218495476813033, "Pairwise F-measure": 0.5102836753967455, "Rand Index": 0.7634802520108155, "Adjusted Rand Index": 0.3932978729758545, "Mutual Information": 0.9753774660402063, "Adjusted Mutual Information": 0.46809981616245017, "Normalized Mutual Information": 0.6531566123520159, "NCE Over": 0.4989682378320722, "NCE Under": 0.9101726390597747, "NCE F-measure": 0.6445732222832662, "V Precision": 0.4697768990421939, "V Recall": 0.9081194948686581, "V-measure": 0.619224438273351}
--------------------------------------------------------------------------------
/tests/data/segment/output06.json:
--------------------------------------------------------------------------------
1 | {"Precision@0.5": 0.6, "Recall@0.5": 0.5, "F-measure@0.5": 0.5454545454545454, "Precision@3.0": 0.9, "Recall@3.0": 0.75, "F-measure@3.0": 0.8181818181818182, "Ref-to-est deviation": 0.37199999999999966, "Est-to-ref deviation": 0.1349999999999978, "Pairwise Precision": 0.7930906509181269, "Pairwise Recall": 0.42685807583415836, "Pairwise F-measure": 0.5550022583559169, "Rand Index": 0.7779261688615399, "Adjusted Rand Index": 0.4242977075000336, "Mutual Information": 1.035858923763909, "Adjusted Mutual Information": 0.5522348156967383, "Normalized Mutual Information": 0.6674317823737799, "NCE Over": 0.6238817066529372, "NCE Under": 0.856245768212157, "NCE F-measure": 0.7218244107457634, "V Precision": 0.5562329768516343, "V Recall": 0.8008607951366766, "V-measure": 0.6564987524332658}
--------------------------------------------------------------------------------
/tests/data/segment/output00.json:
--------------------------------------------------------------------------------
1 | {"Precision@0.5": 0.3333333333333333, "Recall@0.5": 0.6, "F-measure@0.5": 0.42857142857142855, "Precision@3.0": 0.5, "Recall@3.0": 0.9, "F-measure@3.0": 0.6428571428571429, "Ref-to-est deviation": 0.3989999999999996, "Est-to-ref deviation": 2.8474999999999997, "Pairwise Precision": 0.8744274410225826, "Pairwise Recall": 0.4806828513199742, "Pairwise F-measure": 0.6203513883678935, "Rand Index": 0.8289077311831233, "Adjusted Rand Index": 0.5216688396951437, "Mutual Information": 1.1375211793868052, "Adjusted Mutual Information": 0.587379258678572, "Normalized Mutual Information": 0.6939260940391484, "NCE Over": 0.6199174381303865, "NCE Under": 0.8569466776016775, "NCE F-measure": 0.719411059330737, "V Precision": 0.590037137766286, "V Recall": 0.8161069755903478, "V-measure": 0.6848991073026666}
--------------------------------------------------------------------------------
/tests/data/segment/output01.json:
--------------------------------------------------------------------------------
1 | {"Precision@0.5": 0.5454545454545454, "Recall@0.5": 0.4, "F-measure@0.5": 0.4615384615384615, "Precision@3.0": 0.5454545454545454, "Recall@3.0": 0.4, "F-measure@3.0": 0.4615384615384615, "Ref-to-est deviation": 13.036000000000001, "Est-to-ref deviation": 0.3359999999999985, "Pairwise Precision": 0.4993901657926098, "Pairwise Recall": 0.6122131984623336, "Pairwise F-measure": 0.5500761521812191, "Rand Index": 0.7541046088414509, "Adjusted Rand Index": 0.383287188265407, "Mutual Information": 0.8298500378099933, "Adjusted Mutual Information": 0.5476970266015448, "Normalized Mutual Information": 0.572695060137702, "NCE Over": 0.7123495615691824, "NCE Under": 0.6198417839591657, "NCE F-measure": 0.662883788470274, "V Precision": 0.59718972940023, "V Recall": 0.5492050779833786, "V-measure": 0.572193156831662}
--------------------------------------------------------------------------------
/tests/data/segment/output08.json:
--------------------------------------------------------------------------------
1 | {"Precision@0.5": 0.36363636363636365, "Recall@0.5": 0.2, "F-measure@0.5": 0.25806451612903225, "Precision@3.0": 0.7272727272727273, "Recall@3.0": 0.4, "F-measure@3.0": 0.5161290322580645, "Ref-to-est deviation": 5.225, "Est-to-ref deviation": 0.9710000000000036, "Pairwise Precision": 0.44839875095110193, "Pairwise Recall": 0.7850756399553728, "Pairwise F-measure": 0.5707892096558619, "Rand Index": 0.6475984889368591, "Adjusted Rand Index": 0.30779373726984793, "Mutual Information": 0.4046609393909751, "Adjusted Mutual Information": 0.29558782096748565, "Normalized Mutual Information": 0.3794279546668087, "NCE Over": 0.6084725966142581, "NCE Under": 0.4654090955931627, "NCE F-measure": 0.5274113208902106, "V Precision": 0.4847412878552114, "V Recall": 0.2969946575411979, "V-measure": 0.3683227658404129}
--------------------------------------------------------------------------------
/tests/data/onset/est00.txt:
--------------------------------------------------------------------------------
1 | # A comment
2 | 1.741496598639455662e-01
3 | 4.150566893424036397e-01
4 | 8.504308390022675690e-01
5 | 9.926530612244898188e-01
6 | 1.904036281179138257e+00
7 | 2.023038548752834398e+00
8 | 2.214603174603174462e+00
9 | 2.438095238095238315e+00
10 | 2.609342403628117868e+00
11 | 3.482993197278911435e+00
12 | 4.684625850340135678e+00
13 | 4.728163265306122298e+00
14 | 5.700498866213151494e+00
15 | 5.868843537414965894e+00
16 | 6.217142857142857082e+00
17 | 6.266485260770974897e+00
18 | 6.385487528344671482e+00
19 | 6.713469387755101714e+00
20 | 7.439092970521541837e+00
21 | 7.471020408163265181e+00
22 | 8.182131519274376430e+00
23 | 8.405623582766439839e+00
24 | 8.852607709750566656e+00
25 | 9.232834467120181188e+00
26 | 9.505668934240363299e+00
27 | 9.665306122448980020e+00
28 | 9.830748299319727934e+00
29 |
--------------------------------------------------------------------------------
/tests/data/segment/output09.json:
--------------------------------------------------------------------------------
1 | {"Precision@0.5": 0.18181818181818182, "Recall@0.5": 0.18181818181818182, "F-measure@0.5": 0.18181818181818182, "Precision@3.0": 0.45454545454545453, "Recall@3.0": 0.45454545454545453, "F-measure@3.0": 0.45454545454545453, "Ref-to-est deviation": 2.003, "Est-to-ref deviation": 6.128999999999991, "Pairwise Precision": 0.30179861778785755, "Pairwise Recall": 0.6240045992191486, "Pairwise F-measure": 0.4068331629834462, "Rand Index": 0.509983392618762, "Adjusted Rand Index": 0.06878135700536266, "Mutual Information": 0.18722544508364072, "Adjusted Mutual Information": 0.12414774373232058, "Normalized Mutual Information": 0.1921195689816766, "NCE Over": 0.3540591969283001, "NCE Under": 0.32758171294161753, "NCE F-measure": 0.3403062126498245, "V Precision": 0.29486295945439467, "V Recall": 0.12517655270774686, "V-measure": 0.17574503215524864}
--------------------------------------------------------------------------------
/tests/data/segment/output02.json:
--------------------------------------------------------------------------------
1 | {"Precision@0.5": 0.08333333333333333, "Recall@0.5": 0.18181818181818182, "F-measure@0.5": 0.1142857142857143, "Precision@3.0": 0.20833333333333334, "Recall@3.0": 0.45454545454545453, "F-measure@3.0": 0.28571428571428575, "Ref-to-est deviation": 2.4509999999999934, "Est-to-ref deviation": 7.9399999999999995, "Pairwise Precision": 0.2672317510709366, "Pairwise Recall": 0.8168035627504561, "Pairwise F-measure": 0.4027098445443217, "Rand Index": 0.5319929982495624, "Adjusted Rand Index": 0.15746191367518272, "Mutual Information": 0.5875580090173058, "Adjusted Mutual Information": 0.31916695064697315, "Normalized Mutual Information": 0.4589766773608936, "NCE Over": 0.840693801923244, "NCE Under": 0.4364389820106126, "NCE F-measure": 0.5745863730219845, "V Precision": 0.6546216709365502, "V Recall": 0.32180356947221267, "V-measure": 0.4314914888375012}
--------------------------------------------------------------------------------
/tests/data/segment/output03.json:
--------------------------------------------------------------------------------
1 | {"Precision@0.5": 0.18181818181818182, "Recall@0.5": 0.15384615384615385, "F-measure@0.5": 0.16666666666666669, "Precision@3.0": 0.5454545454545454, "Recall@3.0": 0.46153846153846156, "F-measure@3.0": 0.4999999999999999, "Ref-to-est deviation": 2.832000000000008, "Est-to-ref deviation": 1.6999999999999957, "Pairwise Precision": 0.7954247684219311, "Pairwise Recall": 0.20372577015066376, "Pairwise F-measure": 0.3243725890898819, "Rand Index": 0.6171646611901732, "Adjusted Rand Index": 0.17206814668546003, "Mutual Information": 0.7069980597186302, "Adjusted Mutual Information": 0.3228843702423049, "Normalized Mutual Information": 0.4718348883991217, "NCE Over": 0.36093183448445665, "NCE Under": 0.7989240945963056, "NCE F-measure": 0.4972292365742599, "V Precision": 0.32453331344779024, "V Recall": 0.6859947890878926, "V-measure": 0.44061745804392516}
--------------------------------------------------------------------------------
/tests/data/segment/output07.json:
--------------------------------------------------------------------------------
1 | {"Precision@0.5": 0.4166666666666667, "Recall@0.5": 0.4166666666666667, "F-measure@0.5": 0.4166666666666667, "Precision@3.0": 0.4166666666666667, "Recall@3.0": 0.4166666666666667, "F-measure@3.0": 0.4166666666666667, "Ref-to-est deviation": 2.3029999999999973, "Est-to-ref deviation": 2.0904999999999916, "Pairwise Precision": 0.4223814364640884, "Pairwise Recall": 0.5491989347481521, "Pairwise F-measure": 0.47751363003359354, "Rand Index": 0.5964686214170435, "Adjusted Rand Index": 0.15784334203696132, "Mutual Information": 0.29666187029734625, "Adjusted Mutual Information": 0.2439028213895503, "Normalized Mutual Information": 0.2842593987759491, "NCE Over": 0.45120545761579733, "NCE Under": 0.4320411658955198, "NCE F-measure": 0.44141540262395995, "V Precision": 0.32978028695038797, "V Recall": 0.24502194033392954, "V-measure": 0.2811520274520297}
--------------------------------------------------------------------------------
/tests/data/segment/output05.json:
--------------------------------------------------------------------------------
1 | {"Precision@0.5": 0.38095238095238093, "Recall@0.5": 0.4444444444444444, "F-measure@0.5": 0.41025641025641024, "Precision@3.0": 0.47619047619047616, "Recall@3.0": 0.5555555555555556, "F-measure@3.0": 0.5128205128205129, "Ref-to-est deviation": 0.8845000000000027, "Est-to-ref deviation": 2.0920000000000414, "Pairwise Precision": 0.8936198585154119, "Pairwise Recall": 0.12923035832531626, "Pairwise F-measure": 0.22580591492517105, "Rand Index": 0.6057626818003455, "Adjusted Rand Index": 0.12775042299090225, "Mutual Information": 0.8118894611245795, "Adjusted Mutual Information": 0.2857955541041399, "Normalized Mutual Information": 0.49582597324973304, "NCE Over": 0.32765438933312685, "NCE Under": 0.9012719390410426, "NCE F-measure": 0.48059139102383136, "V Precision": 0.28728701796701817, "V Recall": 0.8557414027572561, "V-measure": 0.43016147506335445}
--------------------------------------------------------------------------------
/tests/data/onset/ref02.txt:
--------------------------------------------------------------------------------
1 | 0.157142857
2 | 0.378571428
3 | 0.587755102
4 | 0.798979591
5 | 0.996938775
6 | 1.220408163
7 | 1.441836734
8 | 1.561224489
9 | 1.667346938
10 | 1.750000000
11 | 1.833673469
12 | 2.057142857
13 | 2.295918367
14 | 2.378004535
15 | 2.471428571
16 | 2.681995464
17 | 2.902040816
18 | 3.127551020
19 | 3.279591836
20 | 3.327551020
21 | 3.461995464
22 | 3.553990929
23 | 3.761224489
24 | 3.992993197
25 | 4.200000000
26 | 4.414693877
27 | 4.535147392
28 | 4.616326530
29 | 4.744897959
30 | 4.846938775
31 | 4.993877551
32 | 5.045918367
33 | 5.228571428
34 | 5.366326530
35 | 5.451020408
36 | 5.639795918
37 | 5.734693877
38 | 5.880612244
39 | 5.957142857
40 | 6.063265306
41 | 6.257142857
42 | 6.359183673
43 | 6.440816326
44 | 6.664285714
45 | 6.872993197
46 | 7.089795918
47 | 7.284693877
48 | 7.470408163
49 | 7.559183673
50 | 7.675011337
51 | 7.763990929
52 | 7.873469387
53 | 8.101020408
54 | 8.181632653
55 | 8.277551020
56 |
--------------------------------------------------------------------------------
/tests/data/chord/est01.lab:
--------------------------------------------------------------------------------
1 | 0.000000 2.212063 N
2 | 2.212063 6.452063 G:maj
3 | 6.452063 12.884082 C:min
4 | 12.884082 14.680000 Bb:min
5 | 14.680000 26.776054 C:min
6 | 26.776054 27.284082 Bb:maj
7 | 27.284082 34.932063 C:min
8 | 34.932063 37.320000 Bb:maj
9 | 37.320000 51.128073 C:min
10 | 51.128073 59.996009 C:maj
11 | 59.996009 60.244082 F:maj
12 | 60.244082 61.556009 Bb:maj
13 | 61.556009 63.842086 C:maj
14 | 63.842086 66.956009 Bb:maj
15 | 66.956009 74.924082 C:min
16 | 74.924082 76.376054 A:min
17 | 76.376054 81.388027 C:min
18 | 81.388027 82.460045 A:min
19 | 82.460045 83.020045 Bb:maj
20 | 83.020045 87.832018 C:maj
21 | 87.832018 90.360000 C:min
22 | 90.360000 93.372063 Bb:maj
23 | 93.372063 94.124082 C:min
24 | 94.124082 97.468027 Bb:maj
25 | 97.468027 117.280000 C:min
26 | 117.280000 124.094059 Bb:maj
27 | 124.094059 141.666032 C:min
28 | 141.666032 144.364082 C:maj
29 | 144.364082 147.748027 C:min
30 | 147.748027 152.658050 Bb:maj
31 | 152.658050 179.452063 C:min
32 | 179.452063 183.576961 N
33 |
--------------------------------------------------------------------------------
/tests/data/onset/ref01.txt:
--------------------------------------------------------------------------------
1 | 0.052607709
2 | 0.322176870
3 | 0.584126984
4 | 0.833990929
5 | 1.092789115
6 | 1.361995464
7 | 1.620317460
8 | 1.867006802
9 | 2.128979591
10 | 2.380045351
11 | 2.647074829
12 | 2.911201814
13 | 3.183310657
14 | 3.424943310
15 | 3.678185941
16 | 3.939410430
17 | 4.207891156
18 | 4.470997732
19 | 4.738321995
20 | 4.983582766
21 | 5.253514739
22 | 5.512562358
23 | 5.780317460
24 | 6.030657596
25 | 6.293333333
26 | 6.576326530
27 | 6.833922902
28 | 7.084263038
29 | 7.348390022
30 | 7.613242630
31 | 7.857777777
32 | 8.130612244
33 | 8.386757369
34 | 8.632018140
35 | 8.898321995
36 | 9.162448979
37 | 9.421496598
38 | 9.699410430
39 | 9.935238095
40 | 10.200090702
41 | 10.454784580
42 | 10.726167800
43 | 10.981587301
44 | 11.233378684
45 | 11.494603174
46 | 11.758730158
47 | 12.018503401
48 | 12.270294784
49 | 12.531519274
50 | 12.805804988
51 | 13.062675736
52 | 13.327528344
53 | 13.581496598
54 | 13.848526077
55 | 14.094512471
56 | 14.360816326
57 | 14.612607709
58 | 14.898503401
59 |
--------------------------------------------------------------------------------
/tests/data/segment/raw_data/rbh3segmentssalami000025.js:
--------------------------------------------------------------------------------
1 | var rbh3segmentssalami000025_data = [
2 | [{o: 0.488, f: 34.145, l: "A", a: 0},
3 | {o: 34.145, f: 62.367, l: "B", a: 1},
4 | {o: 62.367, f: 86.586, l: "B", a: 0},
5 | {o: 86.586, f: 102.772, l: "C", a: 1},
6 | {o: 102.772, f: 126.972, l: "B", a: 0},
7 | {o: 126.972, f: 143.189, l: "C", a: 1},
8 | {o: 143.189, f: 159.275, l: "D", a: 0},
9 | {o: 159.275, f: 183.465, l: "B", a: 1},
10 | {o: 183.465, f: 193.567, l: "C", a: 0},
11 | {o: 193.567, f: 227.796, l: "C", a: 1}],
12 | [{o: 0, f: 58.249, l: "C", a: 0},
13 | {o: 58.249, f: 74.409, l: "C", a: 1},
14 | {o: 74.409, f: 86.529, l: "B", a: 0},
15 | {o: 86.529, f: 112.788, l: "B", a: 1},
16 | {o: 112.788, f: 120.868, l: "D", a: 0},
17 | {o: 120.868, f: 159.247, l: "B", a: 1},
18 | {o: 159.247, f: 175.406, l: "C", a: 0},
19 | {o: 175.406, f: 183.486, l: "D", a: 1},
20 | {o: 183.486, f: 211.765, l: "B", a: 0},
21 | {o: 211.765, f: 227.733, l: "C", a: 1}]
22 | ];
23 |
24 | var rbh3segmentssalami000025_seriesNames = ["Ground-truth","Prediction"];
25 |
--------------------------------------------------------------------------------
/tests/data/chord/ref01.lab:
--------------------------------------------------------------------------------
1 | 0.0000 1.7350 N
2 | 1.7350 6.2900 N
3 | 6.2900 37.4125 C:min(*b3)
4 | 37.4125 60.0224 C:min(*b3)
5 | 60.0224 61.4902 Bb
6 | 61.4902 62.0114 C:min(*b3)
7 | 62.0114 63.3928 Bb
8 | 63.3928 63.9312 C:min(*b3)
9 | 63.9312 65.2770 Bb
10 | 65.2770 65.7802 C:min(*b3)
11 | 65.7802 67.1846 Bb
12 | 67.1846 90.2743 C:min(*b3)
13 | 90.2743 91.7255 Bb
14 | 91.7255 92.3136 C:min(*b3)
15 | 92.3136 93.6330 Bb
16 | 93.6330 94.1714 C:min(*b3)
17 | 94.1714 95.5172 Bb
18 | 95.5172 96.0672 C:min(*b3)
19 | 96.0672 97.4248 Bb
20 | 97.4248 117.1151 C:min(*b3)
21 | 117.1151 118.5601 Bb
22 | 118.5601 119.1101 C:min(*b3)
23 | 119.1101 120.4911 Bb
24 | 120.4911 121.0411 C:min(*b3)
25 | 121.0411 122.4221 Bb
26 | 122.4221 122.9487 C:min(*b3)
27 | 122.9487 124.2711 Bb
28 | 124.2711 147.1664 C:min(*b3)
29 | 147.1664 148.6950 Bb
30 | 148.6950 149.2450 C:min(*b3)
31 | 149.2450 150.5791 Bb
32 | 150.5791 151.0941 C:min(*b3)
33 | 151.0941 152.4750 Bb
34 | 152.4750 152.9665 C:min(*b3)
35 | 152.9665 154.4060 Bb
36 | 154.4060 179.3023 C:min(*b3)
37 | 179.3023 183.6835 N
38 |
--------------------------------------------------------------------------------
/tests/data/segment/raw_data/rbh4segmentsstructmrx09000020.js:
--------------------------------------------------------------------------------
1 | var rbh4segmentsstructmrx09000020_data = [
2 | [{o: 0.245, f: 3.424, l: "Intro", a: 0},
3 | {o: 3.424, f: 27.753, l: "Verse", a: 1},
4 | {o: 27.753, f: 52.156, l: "Refrain", a: 0},
5 | {o: 52.156, f: 75.851, l: "Verse", a: 1},
6 | {o: 75.851, f: 100.386, l: "Refrain", a: 0},
7 | {o: 100.386, f: 122.004, l: "Verse (instrumental)", a: 1},
8 | {o: 122.004, f: 137.268, l: "Bridge", a: 0},
9 | {o: 137.268, f: 161.414, l: "Refrain", a: 1},
10 | {o: 161.414, f: 179.425, l: "Outro", a: 0}],
11 | [{o: 0, f: 10.902, l: "B", a: 0},
12 | {o: 10.902, f: 43.431, l: "D", a: 1},
13 | {o: 43.431, f: 51.563, l: "B", a: 0},
14 | {o: 51.563, f: 59.695, l: "B", a: 1},
15 | {o: 59.695, f: 94.257, l: "D", a: 0},
16 | {o: 94.257, f: 102.389, l: "B", a: 1},
17 | {o: 102.389, f: 120.686, l: "D", a: 0},
18 | {o: 120.686, f: 128.818, l: "D", a: 1},
19 | {o: 128.818, f: 155.248, l: "D", a: 0},
20 | {o: 155.248, f: 182, l: "B", a: 1}]
21 | ];
22 |
23 | var rbh4segmentsstructmrx09000020_seriesNames = ["Ground-truth","Prediction"];
24 |
--------------------------------------------------------------------------------
/tests/data/chord/est04.lab:
--------------------------------------------------------------------------------
1 | 0.000000 0.996009 N
2 | 0.996009 5.220045 F:maj
3 | 5.220045 8.168073 C:maj
4 | 8.168073 24.356009 G:maj
5 | 24.356009 39.532063 C:maj
6 | 39.532063 41.548027 F:maj
7 | 41.548027 61.232018 G:maj
8 | 61.232018 65.144036 C:maj
9 | 65.144036 67.136054 G:maj
10 | 67.136054 68.648073 F:maj
11 | 68.648073 73.064036 C:maj
12 | 73.064036 75.016054 E:min7
13 | 75.016054 80.936054 F:maj7
14 | 80.936054 84.868027 C:maj
15 | 84.868027 86.828027 G:maj
16 | 86.828027 88.320000 F:maj
17 | 88.320000 91.284082 C:maj
18 | 91.284082 92.764082 F:maj
19 | 92.764082 94.736054 G:maj
20 | 94.736054 96.720000 F:maj
21 | 96.720000 117.712018 G:maj
22 | 117.712018 124.216054 C:maj
23 | 124.216054 125.544036 F:maj
24 | 125.544036 130.156009 C:maj
25 | 130.156009 132.104036 E:min7
26 | 132.104036 136.516009 F:maj7
27 | 136.516009 141.904036 C:maj
28 | 141.904036 143.884082 G:maj
29 | 143.884082 145.348027 F:maj
30 | 145.348027 149.800091 C:maj
31 | 149.800091 151.768073 E:min7
32 | 151.768073 156.208073 F:maj7
33 | 156.208073 163.628027 C:maj
34 | 163.628027 168.437551 B:aug
35 |
--------------------------------------------------------------------------------
/tests/data/onset/est02.txt:
--------------------------------------------------------------------------------
1 | 2.031746031746031744e-01
2 | 4.353741496598639293e-01
3 | 6.559637188208616854e-01
4 | 8.620408163265306234e-01
5 | 1.062312925170068034e+00
6 | 1.288707482993197262e+00
7 | 1.497687074829932019e+00
8 | 1.732789115646258482e+00
9 | 1.906938775510204076e+00
10 | 2.113015873015873236e+00
11 | 2.533877551020408347e+00
12 | 2.742857142857142883e+00
13 | 2.960544217687074653e+00
14 | 3.163718820861677994e+00
15 | 3.343673469387755226e+00
16 | 3.398820861678004679e+00
17 | 3.625215419501133685e+00
18 | 3.822585034013605387e+00
19 | 4.257959183673469816e+00
20 | 4.484353741496598822e+00
21 | 4.678820861678004484e+00
22 | 4.913922902494331169e+00
23 | 5.111292517006802427e+00
24 | 5.305759637188208977e+00
25 | 5.523446712018140303e+00
26 | 5.700498866213151494e+00
27 | 5.947210884353741456e+00
28 | 6.135873015873015923e+00
29 | 6.507392290249432776e+00
30 | 6.725079365079364990e+00
31 | 6.934058956916099525e+00
32 | 7.151746031746031740e+00
33 | 7.540680272108843951e+00
34 | 7.938321995464852954e+00
35 | 8.251791383219954312e+00
36 | 8.353378684807255539e+00
37 |
--------------------------------------------------------------------------------
/tests/data/segment/raw_data/mp1segmentssalami000119.js:
--------------------------------------------------------------------------------
1 | var mp1segmentssalami000119_data = [
2 | [{o: 0.041, f: 5.478, l: "Z", a: 0},
3 | {o: 5.478, f: 24.498, l: "A", a: 1},
4 | {o: 24.498, f: 44.068, l: "B", a: 0},
5 | {o: 44.068, f: 63.352, l: "C", a: 1},
6 | {o: 63.352, f: 82.6, l: "B", a: 0},
7 | {o: 82.6, f: 101.552, l: "C", a: 1},
8 | {o: 101.552, f: 120.82, l: "B", a: 0},
9 | {o: 120.82, f: 149.498, l: "C", a: 1},
10 | {o: 149.498, f: 187.963, l: "C", a: 0},
11 | {o: 187.963, f: 263.877, l: "C", a: 1},
12 | {o: 263.877, f: 288.16, l: "Z", a: 0}],
13 | [{o: 0, f: 32.009, l: "Seg#001", a: 0},
14 | {o: 32.009, f: 61.652, l: "Seg#002", a: 1},
15 | {o: 61.652, f: 100.252, l: "Seg#003", a: 0},
16 | {o: 100.252, f: 123.652, l: "Seg#004", a: 1},
17 | {o: 123.652, f: 159.359, l: "Seg#005", a: 0},
18 | {o: 159.359, f: 191.094, l: "Seg#006", a: 1},
19 | {o: 191.094, f: 217.223, l: "Seg#007", a: 0},
20 | {o: 217.223, f: 262.742, l: "Seg#008", a: 1},
21 | {o: 262.742, f: 288, l: "Seg#009", a: 0}]
22 | ];
23 |
24 | var mp1segmentssalami000119_seriesNames = ["Ground-truth","Prediction"];
25 |
--------------------------------------------------------------------------------
/tests/data/segment/raw_data/mp2segmentsstructmrx09000132.js:
--------------------------------------------------------------------------------
1 | var mp2segmentsstructmrx09000132_data = [
2 | [{o: 0.384, f: 3.686, l: "Intro", a: 0},
3 | {o: 3.686, f: 15.372, l: "Verse", a: 1},
4 | {o: 15.372, f: 27.121, l: "Verse", a: 0},
5 | {o: 27.121, f: 42.51, l: "Refrain", a: 1},
6 | {o: 42.51, f: 54.285, l: "Verse", a: 0},
7 | {o: 54.285, f: 66.194, l: "Verse", a: 1},
8 | {o: 66.194, f: 81.67, l: "Refrain", a: 0},
9 | {o: 81.67, f: 93.143, l: "Verse (Guitar Solo)", a: 1},
10 | {o: 93.143, f: 108.536, l: "Refrain", a: 0},
11 | {o: 108.536, f: 119.267, l: "Outro (fade out)", a: 1}],
12 | [{o: 0, f: 0.499, l: "Seg#001", a: 0},
13 | {o: 0.499, f: 3.823, l: "Seg#002", a: 1},
14 | {o: 3.823, f: 28.706, l: "Seg#003", a: 0},
15 | {o: 28.706, f: 42.635, l: "Seg#004", a: 1},
16 | {o: 42.635, f: 66.801, l: "Seg#005", a: 0},
17 | {o: 66.801, f: 79.868, l: "Seg#006", a: 1},
18 | {o: 79.868, f: 108.669, l: "Seg#007", a: 0},
19 | {o: 108.669, f: 117.563, l: "Seg#008", a: 1},
20 | {o: 117.563, f: 124.552, l: "Seg#009", a: 0}]
21 | ];
22 |
23 | var mp2segmentsstructmrx09000132_seriesNames = ["Ground-truth","Prediction"];
24 |
--------------------------------------------------------------------------------
/tests/data/segment/raw_data/cf6segmentssalami000970.js:
--------------------------------------------------------------------------------
1 | var cf6segmentssalami000970_data = [
2 | [{o: 0.436, f: 111.316, l: "N", a: 0},
3 | {o: 111.316, f: 124.345, l: "A", a: 1},
4 | {o: 124.345, f: 137.409, l: "B", a: 0},
5 | {o: 137.409, f: 154.178, l: "C", a: 1},
6 | {o: 154.178, f: 167.193, l: "A", a: 0},
7 | {o: 167.193, f: 180.41, l: "B", a: 1},
8 | {o: 180.41, f: 197.305, l: "C", a: 0},
9 | {o: 197.305, f: 210.605, l: "A", a: 1},
10 | {o: 210.605, f: 224.052, l: "B", a: 0},
11 | {o: 224.052, f: 241.258, l: "C", a: 1},
12 | {o: 241.258, f: 254.268, l: "A", a: 0},
13 | {o: 254.268, f: 267.205, l: "B", a: 1},
14 | {o: 267.205, f: 292.617, l: "C'", a: 0}],
15 | [{o: 0, f: 5.55, l: "N1", a: 0},
16 | {o: 5.55, f: 17.264, l: "B", a: 1},
17 | {o: 17.264, f: 23.116, l: "N2", a: 0},
18 | {o: 23.116, f: 36.467, l: "B", a: 1},
19 | {o: 36.467, f: 110.98, l: "N3", a: 0},
20 | {o: 110.98, f: 154.076, l: "A", a: 1},
21 | {o: 154.076, f: 197.265, l: "A", a: 0},
22 | {o: 197.265, f: 241.232, l: "A", a: 1},
23 | {o: 241.232, f: 291.979, l: "N5", a: 0}]
24 | ];
25 |
26 | var cf6segmentssalami000970_seriesNames = ["Ground-truth","Prediction"];
27 |
--------------------------------------------------------------------------------
/.github/workflows/release.yml:
--------------------------------------------------------------------------------
1 | name: Publish Python 🐍 distributions 📦 to PyPI
2 |
3 | on:
4 | release:
5 | types: [created]
6 |
7 |
8 | jobs:
9 | pypi-publish:
10 | name: Upload release to PyPI
11 | runs-on: ubuntu-latest
12 | environment:
13 | name: pypi
14 | url: https://pypi.org/p/mir_eval
15 | permissions:
16 | id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
17 |
18 | steps:
19 | - uses: actions/checkout@v4
20 | - name: Set up Python 3.12
21 | uses: actions/setup-python@v5
22 | with:
23 | python-version: 3.12
24 |
25 | - name: Install pypa/build
26 | run: >-
27 | python -m
28 | pip install
29 | build
30 | --user
31 |
32 | - name: Build a binary wheel and a source tarball
33 | run: >-
34 | python -m
35 | build
36 | --sdist
37 | --wheel
38 | --outdir dist/
39 | .
40 |
41 | - name: Publish package distributions to PyPI
42 | if: startsWith(github.ref, 'refs/tags')
43 | uses: pypa/gh-action-pypi-publish@release/v1
44 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Colin Raffel
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/tests/data/segment/raw_data/cf5segmentsstructmrx09000016.js:
--------------------------------------------------------------------------------
1 | var cf5segmentsstructmrx09000016_data = [
2 | [{o: 0.383, f: 7.332, l: "Intro", a: 0},
3 | {o: 7.332, f: 27.109, l: "Verse", a: 1},
4 | {o: 27.109, f: 47.015, l: "Verse", a: 0},
5 | {o: 47.015, f: 67.123, l: "Bridge", a: 1},
6 | {o: 67.123, f: 87.103, l: "Verse (Guitar Solo)", a: 0},
7 | {o: 87.103, f: 107.649, l: "Verse", a: 1},
8 | {o: 107.649, f: 128.114, l: "Bridge", a: 0},
9 | {o: 128.114, f: 142.763, l: "Outro (fade-out)", a: 1}],
10 | [{o: 0, f: 6, l: "A", a: 0},
11 | {o: 6, f: 14.8, l: "B", a: 1},
12 | {o: 14.8, f: 26.4, l: "C", a: 0},
13 | {o: 26.4, f: 34.8, l: "B", a: 1},
14 | {o: 34.8, f: 46.6, l: "C", a: 0},
15 | {o: 46.6, f: 52.6, l: "D", a: 1},
16 | {o: 52.6, f: 58, l: "E", a: 0},
17 | {o: 58, f: 67.2, l: "F", a: 1},
18 | {o: 67.2, f: 85.8, l: "G", a: 0},
19 | {o: 85.8, f: 95, l: "B", a: 1},
20 | {o: 95, f: 107.2, l: "C", a: 0},
21 | {o: 107.2, f: 114, l: "D", a: 1},
22 | {o: 114, f: 119, l: "E", a: 0},
23 | {o: 119, f: 127.8, l: "F", a: 1},
24 | {o: 127.8, f: 133.8, l: "D", a: 0},
25 | {o: 133.8, f: 138.4, l: "E", a: 1},
26 | {o: 138.4, f: 147.4, l: "H", a: 0}]
27 | ];
28 |
29 | var cf5segmentsstructmrx09000016_seriesNames = ["Ground-truth","Prediction"];
30 |
--------------------------------------------------------------------------------
/tests/data/chord/ref09.lab:
--------------------------------------------------------------------------------
1 | 0.000 8.230 N
2 | 8.230 13.893 E:7
3 | 13.893 21.350 E:9
4 | 21.350 23.188 A:maj
5 | 23.188 25.058 F#:min
6 | 25.058 26.898 A:maj
7 | 26.898 28.773 F#:min
8 | 28.773 31.660 D:maj
9 | 31.660 39.078 E:maj
10 | 39.078 46.567 E:9
11 | 46.567 48.433 A:maj
12 | 48.433 50.344 F#:min
13 | 50.344 52.192 A:maj
14 | 52.192 54.093 F#:min
15 | 54.093 56.943 D:maj
16 | 56.943 64.435 E:maj
17 | 64.435 71.796 E:9
18 | 71.796 73.675 D:min
19 | 73.675 75.567 G:7
20 | 75.567 77.399 C:maj
21 | 77.399 79.246 A:min
22 | 79.246 81.103 D:min
23 | 81.103 82.935 G:7
24 | 82.935 86.625 C:maj
25 | 86.625 88.438 D:min
26 | 88.438 90.290 G:7
27 | 90.290 92.119 C:maj
28 | 92.119 93.951 A:min
29 | 93.951 95.809 D:min
30 | 95.809 97.631 G:7
31 | 97.631 99.455 C:maj
32 | 99.455 101.320 A:7
33 | 101.320 103.142 F#:min
34 | 103.142 105.028 D:min
35 | 105.028 106.831 E:maj
36 | 106.831 108.655 A:maj
37 | 108.655 110.546 F#:min
38 | 110.546 112.370 D:min
39 | 112.370 119.726 E:9
40 | 119.726 121.614 A:maj
41 | 121.614 123.472 F#:min
42 | 123.472 125.304 A:maj
43 | 125.304 127.093 F#:min
44 | 127.093 129.922 D:maj
45 | 129.922 324.196 E:7
46 | 324.196 327.795 N
47 | 327.795 333.281 E:7
48 | 333.281 349.861 E:9
49 | 349.861 350.288 A:maj
50 | 350.288 395.000 N
51 |
--------------------------------------------------------------------------------
/tests/data/segment/raw_data/rbh3segmentssalami000068.js:
--------------------------------------------------------------------------------
1 | var rbh3segmentssalami000068_data = [
2 | [{o: 0.139, f: 5.41, l: "A", a: 0},
3 | {o: 5.41, f: 15.581, l: "B", a: 1},
4 | {o: 15.581, f: 25.983, l: "C", a: 0},
5 | {o: 25.983, f: 31.045, l: "D", a: 1},
6 | {o: 31.045, f: 41.583, l: "C", a: 0},
7 | {o: 41.583, f: 51.733, l: "D", a: 1},
8 | {o: 51.733, f: 62.009, l: "C", a: 0},
9 | {o: 62.009, f: 67.272, l: "D", a: 1},
10 | {o: 67.272, f: 88.013, l: "E", a: 0},
11 | {o: 88.013, f: 98.093, l: "B", a: 1},
12 | {o: 98.093, f: 108.558, l: "C", a: 0},
13 | {o: 108.558, f: 113.773, l: "D", a: 1},
14 | {o: 113.773, f: 124.018, l: "C", a: 0},
15 | {o: 124.018, f: 134.292, l: "D", a: 1},
16 | {o: 134.292, f: 144.632, l: "C", a: 0},
17 | {o: 144.632, f: 149.704, l: "D", a: 1},
18 | {o: 149.704, f: 170.478, l: "C", a: 0},
19 | {o: 170.478, f: 185.469, l: "B", a: 1}],
20 | [{o: 0, f: 15.92, l: "C", a: 0},
21 | {o: 15.92, f: 36.543, l: "D", a: 1},
22 | {o: 36.543, f: 50.721, l: "B", a: 0},
23 | {o: 50.721, f: 85.522, l: "D", a: 1},
24 | {o: 85.522, f: 97.122, l: "B", a: 0},
25 | {o: 97.122, f: 134.501, l: "D", a: 1},
26 | {o: 134.501, f: 169.302, l: "D", a: 0},
27 | {o: 169.302, f: 180.903, l: "C", a: 1},
28 | {o: 180.903, f: 185.4, l: "C", a: 0}]
29 | ];
30 |
31 | var rbh3segmentssalami000068_seriesNames = ["Ground-truth","Prediction"];
32 |
--------------------------------------------------------------------------------
/tests/data/onset/est04.txt:
--------------------------------------------------------------------------------
1 | 9.868480725623582361e-02
2 | 1.509297052154195129e-01
3 | 2.060770975056689380e-01
4 | 2.670294784580498626e-01
5 | 3.308843537414966063e-01
6 | 3.918367346938775309e-01
7 | 4.527891156462585109e-01
8 | 5.253514739229024899e-01
9 | 5.979138321995465244e-01
10 | 6.588662131519273935e-01
11 | 7.256235827664399007e-01
12 | 8.039909297052154624e-01
13 | 8.649433106575963315e-01
14 | 9.317006802721088388e-01
15 | 9.984580498866213460e-01
16 | 1.065215419501133853e+00
17 | 1.149387755102040831e+00
18 | 1.204535147392290284e+00
19 | 1.294512471655328900e+00
20 | 1.338049886621315299e+00
21 | 1.445442176870748385e+00
22 | 1.483174603174603146e+00
23 | 1.622494331065759576e+00
24 | 1.738594104308390120e+00
25 | 1.785034013605442116e+00
26 | 1.863401360544217678e+00
27 | 1.918548752834467130e+00
28 | 1.962086167800453529e+00
29 | 2.319092970521541730e+00
30 | 2.464217687074830021e+00
31 | 2.571609977324262886e+00
32 | 2.702222222222222303e+00
33 | 2.800907029478457932e+00
34 | 2.980861678004535165e+00
35 | 3.244988662131519153e+00
36 | 3.305941043083900244e+00
37 | 3.422040816326530788e+00
38 | 3.480090702947845838e+00
39 | 3.662947845804988667e+00
40 | 3.741315192743764229e+00
41 | 3.898049886621315352e+00
42 | 4.002539682539682175e+00
43 | 4.234739229024943263e+00
44 | 4.533696145124716637e+00
45 | 4.687528344671202163e+00
46 |
--------------------------------------------------------------------------------
/tests/data/segment/raw_data/cf6segmentsstructmrx09000117.js:
--------------------------------------------------------------------------------
1 | var cf6segmentsstructmrx09000117_data = [
2 | [{o: 0.2, f: 76.986, l: "Intro", a: 0},
3 | {o: 76.986, f: 92.729, l: "Verse", a: 1},
4 | {o: 92.729, f: 108.453, l: "Verse", a: 0},
5 | {o: 108.453, f: 124.201, l: "Bridge", a: 1},
6 | {o: 124.201, f: 139.933, l: "Refrain", a: 0},
7 | {o: 139.933, f: 195.049, l: "Instrumental solo", a: 1},
8 | {o: 195.049, f: 210.808, l: "Break", a: 0},
9 | {o: 210.808, f: 226.512, l: "Ad Lib", a: 1},
10 | {o: 226.512, f: 322.56, l: "Outro", a: 0}],
11 | [{o: 0, f: 3.75, l: "N1", a: 0},
12 | {o: 3.75, f: 17.415, l: "A", a: 1},
13 | {o: 17.415, f: 33.158, l: "A", a: 0},
14 | {o: 33.158, f: 48.913, l: "A", a: 1},
15 | {o: 48.913, f: 64.656, l: "A", a: 0},
16 | {o: 64.656, f: 80.399, l: "A", a: 1},
17 | {o: 80.399, f: 96.142, l: "A", a: 0},
18 | {o: 96.142, f: 111.897, l: "A", a: 1},
19 | {o: 111.897, f: 127.628, l: "A", a: 0},
20 | {o: 127.628, f: 141.398, l: "A", a: 1},
21 | {o: 141.398, f: 164.525, l: "N9", a: 0},
22 | {o: 164.525, f: 180.28, l: "B", a: 1},
23 | {o: 180.28, f: 196.023, l: "B", a: 0},
24 | {o: 196.023, f: 207.331, l: "N10", a: 1},
25 | {o: 207.331, f: 224.061, l: "A", a: 0},
26 | {o: 224.061, f: 239.804, l: "A", a: 1},
27 | {o: 239.804, f: 253.574, l: "A", a: 0},
28 | {o: 253.574, f: 261.457, l: "N13", a: 1},
29 | {o: 261.457, f: 277.2, l: "A", a: 0},
30 | {o: 277.2, f: 292.943, l: "A", a: 1},
31 | {o: 292.943, f: 308.686, l: "A", a: 0},
32 | {o: 308.686, f: 321.991, l: "A", a: 1}]
33 | ];
34 |
35 | var cf6segmentsstructmrx09000117_seriesNames = ["Ground-truth","Prediction"];
36 |
--------------------------------------------------------------------------------
/README.rst:
--------------------------------------------------------------------------------
1 | .. image:: https://anaconda.org/conda-forge/mir_eval/badges/version.svg
2 | :target: https://anaconda.org/conda-forge/mir_eval
3 |
4 | .. image:: https://img.shields.io/pypi/v/mir_eval.svg
5 | :target: https://pypi.python.org/pypi/mir_eval
6 |
7 | .. image:: https://github.com/mir-evaluation/mir_eval/actions/workflows/test.yml/badge.svg
8 | :target: https://github.com/mir-evaluation/mir_eval/actions/workflows/test.yml
9 |
10 | .. image:: https://codecov.io/gh/mir-evaluation/mir_eval/graph/badge.svg?token=OzRL3aW7TX
11 | :target: https://codecov.io/gh/mir-evaluation/mir_eval
12 |
13 | .. image:: https://img.shields.io/pypi/l/mir_eval.svg
14 | :target: https://github.com/mir-evaluation/mir_eval/blob/main/LICENSE.txt
15 |
16 |
17 | mir_eval
18 | ========
19 |
20 | Python library for computing common heuristic accuracy scores for various music/audio information retrieval/signal processing tasks.
21 |
22 | Documentation, including installation and usage information: https://mir-evaluation.github.io/mir_eval/
23 |
24 | Dependencies:
25 |
26 | * `Scipy/Numpy `_
27 | * `decorator `_
28 |
29 | If you use mir_eval in a research project, please cite the following paper:
30 |
31 | Colin Raffel, Brian McFee, Eric J. Humphrey, Justin Salamon, Oriol Nieto, Dawen Liang, and Daniel P. W. Ellis, "`mir_eval: A Transparent Implementation of Common MIR Metrics `_", Proceedings of the 15th International Conference on Music Information Retrieval, 2014.
32 |
33 |
34 |
--------------------------------------------------------------------------------
/tests/data/onset/est09.txt:
--------------------------------------------------------------------------------
1 | 3.366893424036281335e-01
2 | 4.673015873015873289e-01
3 | 6.327437641723355766e-01
4 | 7.401360544217686632e-01
5 | 8.794557823129252050e-01
6 | 1.007165532879818581e+00
7 | 1.152290249433106650e+00
8 | 1.410612244897959222e+00
9 | 1.549931972789115653e+00
10 | 1.692154195011337903e+00
11 | 1.819863945578231279e+00
12 | 1.964988662131519348e+00
13 | 2.089795918367347127e+00
14 | 2.226213151927437739e+00
15 | 2.496145124716553365e+00
16 | 2.629659863945578380e+00
17 | 2.783492063492063462e+00
18 | 2.896689342403627965e+00
19 | 3.050521541950113491e+00
20 | 3.175328798185940826e+00
21 | 3.308843537414965841e+00
22 | 3.439455782312925258e+00
23 | 3.517823129251700820e+00
24 | 3.575873015873015870e+00
25 | 3.706485260770974843e+00
26 | 3.837097505668934261e+00
27 | 3.973514739229024872e+00
28 | 4.240544217687074458e+00
29 | 4.391473922902494387e+00
30 | 4.533696145124716637e+00
31 | 4.655600907029478819e+00
32 | 4.794920634920634583e+00
33 | 4.934240362811791236e+00
34 | 5.059047619047619015e+00
35 | 5.198367346938775668e+00
36 | 5.326077097505669045e+00
37 | 5.462494331065759212e+00
38 | 5.601814058956915865e+00
39 | 5.735328798185941324e+00
40 | 5.868843537414965894e+00
41 | 6.011065759637188144e+00
42 | 6.130068027210884729e+00
43 | 6.405804988662131549e+00
44 | 6.536417233560090523e+00
45 | 6.687346938775510452e+00
46 | 6.817959183673469425e+00
47 | 6.957278911564626078e+00
48 | 7.102403628117913925e+00
49 | 7.221405895691609622e+00
50 | 7.491337868480725248e+00
51 | 7.627755102040816304e+00
52 | 7.775782312925169748e+00
53 | 7.903492063492063124e+00
54 | 8.042811791383220665e+00
55 | 8.190839002267573221e+00
56 | 8.306938775510204209e+00
57 | 8.585578231292517515e+00
58 | 8.724897959183673279e+00
59 |
--------------------------------------------------------------------------------
/tests/data/segment/raw_data/mp2segmentssalami000666.js:
--------------------------------------------------------------------------------
1 | var mp2segmentssalami000666_data = [
2 | [{o: 0.372, f: 23.49, l: "A", a: 0},
3 | {o: 23.49, f: 147.424, l: "A", a: 1},
4 | {o: 147.424, f: 171.866, l: "A", a: 0},
5 | {o: 171.866, f: 183.994, l: "C", a: 1},
6 | {o: 183.994, f: 196.361, l: "C", a: 0},
7 | {o: 196.361, f: 208.201, l: "D", a: 1},
8 | {o: 208.201, f: 220.353, l: "C", a: 0},
9 | {o: 220.353, f: 232.328, l: "D", a: 1},
10 | {o: 232.328, f: 254.136, l: "C", a: 0},
11 | {o: 254.136, f: 266.072, l: "D", a: 1},
12 | {o: 266.072, f: 278.6, l: "C", a: 0},
13 | {o: 278.6, f: 302.37, l: "D", a: 1},
14 | {o: 302.37, f: 315.045, l: "C", a: 0},
15 | {o: 315.045, f: 327.589, l: "D", a: 1},
16 | {o: 327.589, f: 341.35, l: "D", a: 0},
17 | {o: 341.35, f: 431.961, l: "A", a: 1}],
18 | [{o: 0, f: 27.408, l: "Seg#001", a: 0},
19 | {o: 27.408, f: 68.069, l: "Seg#002", a: 1},
20 | {o: 68.069, f: 94.822, l: "Seg#003", a: 0},
21 | {o: 94.822, f: 128.659, l: "Seg#004", a: 1},
22 | {o: 128.659, f: 147.444, l: "Seg#005", a: 0},
23 | {o: 147.444, f: 160.784, l: "Seg#006", a: 1},
24 | {o: 160.784, f: 193.152, l: "Seg#007", a: 0},
25 | {o: 193.152, f: 232.371, l: "Seg#008", a: 1},
26 | {o: 232.371, f: 251.103, l: "Seg#009", a: 0},
27 | {o: 251.103, f: 255.417, l: "Seg#010", a: 1},
28 | {o: 255.417, f: 266.069, l: "Seg#011", a: 0},
29 | {o: 266.069, f: 276.23, l: "Seg#012", a: 1},
30 | {o: 276.23, f: 279.931, l: "Seg#013", a: 0},
31 | {o: 279.931, f: 302.55, l: "Seg#014", a: 1},
32 | {o: 302.55, f: 315.533, l: "Seg#015", a: 0},
33 | {o: 315.533, f: 339.258, l: "Seg#016", a: 1},
34 | {o: 339.258, f: 341.066, l: "Seg#017", a: 0},
35 | {o: 341.066, f: 366.039, l: "Seg#018", a: 1},
36 | {o: 366.039, f: 402.347, l: "Seg#019", a: 0},
37 | {o: 402.347, f: 431.962, l: "Seg#020", a: 1}]
38 | ];
39 |
40 | var mp2segmentssalami000666_seriesNames = ["Ground-truth","Prediction"];
41 |
--------------------------------------------------------------------------------
/tests/data/chord/ref08.lab:
--------------------------------------------------------------------------------
1 | 0.000 0.620 N
2 | 0.620 3.322 G#:min(*b3,*5)
3 | 3.322 6.071 F#:maj(*3)
4 | 6.071 8.834 E:maj
5 | 8.834 11.607 N
6 | 11.607 31.086 G#:min
7 | 31.086 31.799 C#:min(*b3)
8 | 31.799 32.472 D#:min(*b3)
9 | 32.472 33.191 E:maj(*3)
10 | 33.191 33.912 F#:maj(*3)
11 | 33.912 42.219 G#:min
12 | 42.219 42.893 C#:min(*b3)
13 | 42.893 43.608 D#:min(*b3)
14 | 43.608 44.294 E:maj(*3)
15 | 44.294 44.980 F#:maj(*3)
16 | 44.980 47.763 E:maj
17 | 47.763 50.555 F#:maj
18 | 50.555 53.363 E:maj
19 | 53.363 56.114 D#:7
20 | 56.114 58.915 G#:min
21 | 58.915 61.667 F#:maj
22 | 61.667 64.451 E:maj
23 | 64.451 67.251 D#:7
24 | 67.251 69.995 G#:min
25 | 69.995 72.827 F#:maj
26 | 72.827 75.611 E:maj
27 | 75.611 76.985 D#:7
28 | 76.985 77.665 E:maj(*3)
29 | 77.665 78.385 F#:maj(*3)
30 | 78.385 89.510 G#:min(*b3)
31 | 89.510 90.185 C#:min(*b3)
32 | 90.185 90.887 D#:min(*b3)
33 | 90.887 92.231 F#:maj(*3)
34 | 92.231 100.620 G#:min
35 | 100.620 101.299 C#:min(*b3)
36 | 101.299 102.031 D#:min(*b3)
37 | 102.031 102.682 E:maj(*3)
38 | 102.682 103.404 F#:maj(*3)
39 | 103.404 106.167 E:maj
40 | 106.167 108.963 F#:maj
41 | 108.963 111.747 E:maj
42 | 111.747 114.539 D#:7
43 | 114.539 117.314 G#:min
44 | 117.314 120.103 F#:maj
45 | 120.103 122.873 E:maj
46 | 122.873 125.691 D#:7
47 | 125.691 128.429 G#:min
48 | 128.429 131.237 F#:maj
49 | 131.237 134.008 E:maj
50 | 134.008 135.380 D#:7
51 | 135.380 136.099 E:maj(*3)
52 | 136.099 136.780 F#:maj(*3)
53 | 136.780 153.536 G#:min
54 | 153.536 156.267 F#:maj
55 | 156.267 159.048 E:maj
56 | 159.048 161.851 D#:7
57 | 161.851 164.604 G#:min
58 | 164.604 167.403 F#:maj
59 | 167.403 170.171 E:maj
60 | 170.171 172.946 D#:7
61 | 172.946 175.714 G#:min
62 | 175.714 178.525 F#:maj
63 | 178.525 181.315 E:maj
64 | 181.315 184.083 D#:7
65 | 184.083 186.829 G#:min
66 | 186.829 189.619 F#:maj
67 | 189.619 192.424 E:maj
68 | 192.424 193.803 D#:7
69 | 193.803 194.490 E:maj(*3)
70 | 194.490 195.208 F#:maj(*3)
71 | 195.208 200.000 G#:min
72 |
--------------------------------------------------------------------------------
/tests/data/onset/ref09.txt:
--------------------------------------------------------------------------------
1 | 0.000000000000000000e+00
2 | 2.770000000000000240e-01
3 | 4.129999999999999782e-01
4 | 5.699999999999999512e-01
5 | 6.830000000000000515e-01
6 | 8.139999999999999458e-01
7 | 9.489999999999999547e-01
8 | 1.098000000000000087e+00
9 | 1.350999999999999979e+00
10 | 1.493999999999999995e+00
11 | 1.631999999999999895e+00
12 | 1.762999999999999901e+00
13 | 1.897999999999999909e+00
14 | 2.032999999999999918e+00
15 | 2.172000000000000153e+00
16 | 2.438000000000000167e+00
17 | 2.575000000000000178e+00
18 | 2.717999999999999972e+00
19 | 2.841000000000000192e+00
20 | 2.987999999999999989e+00
21 | 3.117999999999999883e+00
22 | 3.254000000000000004e+00
23 | 3.367999999999999883e+00
24 | 3.443000000000000060e+00
25 | 3.503000000000000114e+00
26 | 3.572000000000000064e+00
27 | 3.649000000000000021e+00
28 | 3.774000000000000021e+00
29 | 3.919000000000000039e+00
30 | 4.049999999999999822e+00
31 | 4.179999999999999716e+00
32 | 4.338000000000000078e+00
33 | 4.463000000000000078e+00
34 | 4.597000000000000419e+00
35 | 4.732000000000000206e+00
36 | 4.743000000000000327e+00
37 | 4.865000000000000213e+00
38 | 5.003999999999999559e+00
39 | 5.136000000000000121e+00
40 | 5.269999999999999574e+00
41 | 5.410000000000000142e+00
42 | 5.528999999999999915e+00
43 | 5.676000000000000156e+00
44 | 5.807999999999999829e+00
45 | 5.817000000000000171e+00
46 | 5.945999999999999730e+00
47 | 6.076999999999999957e+00
48 | 6.219999999999999751e+00
49 | 6.349999999999999645e+00
50 | 6.482999999999999652e+00
51 | 6.621999999999999886e+00
52 | 6.759999999999999787e+00
53 | 6.903999999999999915e+00
54 | 7.038000000000000256e+00
55 | 7.169999999999999929e+00
56 | 7.306000000000000050e+00
57 | 7.434999999999999609e+00
58 | 7.573999999999999844e+00
59 | 7.711000000000000298e+00
60 | 7.847000000000000419e+00
61 | 7.990000000000000213e+00
62 | 8.130000000000000782e+00
63 | 8.253999999999999559e+00
64 | 8.391999999999999460e+00
65 | 8.528000000000000469e+00
66 | 8.670999999999999375e+00
--------------------------------------------------------------------------------
/tests/test_key.py:
--------------------------------------------------------------------------------
1 | """
2 | Tests for mir_eval.key
3 | """
4 |
5 | import mir_eval
6 | import pytest
7 | import glob
8 | import json
9 | import numpy as np
10 |
11 | A_TOL = 1e-12
12 |
13 | # Path to the fixture files
14 | REF_GLOB = "data/key/ref*.txt"
15 | EST_GLOB = "data/key/est*.txt"
16 | SCORES_GLOB = "data/key/output*.json"
17 |
18 | ref_files = sorted(glob.glob(REF_GLOB))
19 | est_files = sorted(glob.glob(EST_GLOB))
20 | sco_files = sorted(glob.glob(SCORES_GLOB))
21 |
22 | assert len(ref_files) == len(est_files) == len(sco_files) > 0
23 | file_sets = list(zip(ref_files, est_files, sco_files))
24 |
25 |
26 | @pytest.mark.parametrize(
27 | "good_key",
28 | ["C major", "c major", "C# major", "Bb minor", "db minor", "X", "x", "C other"],
29 | )
30 | @pytest.mark.parametrize(
31 | "bad_key", ["C maj", "Cb major", "C", "K major", "F## minor" "X other", "x minor"]
32 | )
33 | def test_key_function_fail(good_key, bad_key):
34 | score = mir_eval.key.weighted_score(good_key, good_key)
35 | assert score == 1.0
36 |
37 | with pytest.raises(ValueError):
38 | mir_eval.key.weighted_score(good_key, bad_key)
39 | with pytest.raises(ValueError):
40 | mir_eval.key.weighted_score(bad_key, good_key)
41 |
42 |
43 | @pytest.fixture
44 | def key_data(request):
45 | ref_f, est_f, sco_f = request.param
46 | with open(sco_f) as f:
47 | expected_scores = json.load(f)
48 | reference_key = mir_eval.io.load_key(ref_f)
49 | estimated_key = mir_eval.io.load_key(est_f)
50 |
51 | return reference_key, estimated_key, expected_scores
52 |
53 |
54 | @pytest.mark.parametrize("key_data", file_sets, indirect=True)
55 | def test_key_functions(key_data):
56 | reference_key, estimated_key, expected_scores = key_data
57 | # Compute scores
58 | scores = mir_eval.key.evaluate(reference_key, estimated_key)
59 | # Compare them
60 | assert scores.keys() == expected_scores.keys()
61 | for metric in scores:
62 | assert np.allclose(scores[metric], expected_scores[metric], atol=A_TOL)
63 |
--------------------------------------------------------------------------------
/setup.cfg:
--------------------------------------------------------------------------------
1 | [tool:pytest]
2 | addopts = --cov-report term-missing --cov mir_eval --cov-report=xml --mpl --mpl-baseline-path=baseline_images/test_display
3 |
4 | [coverage:report]
5 | show_missing = True
6 |
7 | [coverage:run]
8 | omit =
9 | mir_eval/separation.py
10 |
11 | [pydocstyle]
12 | # convention = numpy
13 | # Below is equivalent to numpy convention + D400 and D205
14 | ignore = D107,D203,D205,D212,D213,D400,D402,D413,D415,D416,D417
15 |
16 | [flake8]
17 | count = True
18 | statistics = True
19 | show_source = True
20 | select =
21 | E9,
22 | F63,
23 | F7,
24 | F82
25 |
26 | [metadata]
27 | name = mir_eval
28 | version = attr: mir_eval.__version__
29 | description = Common metrics for common audio/music processing tasks.
30 | author = Colin Raffel
31 | author_email = craffel@gmail.com
32 | url = https://github.com/mir-evaluation/mir_eval
33 | long_description = file: README.rst
34 | long_description_content_type = text/x-rst; charset=UTF-8
35 | license = MIT
36 | python_requires = ">=3.7"
37 | classifiers =
38 | License :: OSI Approved :: MIT License
39 | Programming Language :: Python
40 | Development Status :: 5 - Production/Stable
41 | Intended Audience :: Developers
42 | Topic :: Multimedia :: Sound/Audio :: Analysis
43 | Programming Language :: Python :: 3
44 | Programming Language :: Python :: 3.7
45 | Programming Language :: Python :: 3.8
46 | Programming Language :: Python :: 3.9
47 | Programming Language :: Python :: 3.10
48 | Programming Language :: Python :: 3.11
49 | Programming Language :: Python :: 3.12
50 | Programming Language :: Python :: 3.13
51 |
52 |
53 | [options]
54 | packages = find:
55 | keywords = audio music mir dsp
56 | install_requires =
57 | numpy >= 1.15.4
58 | scipy >= 1.4.0
59 | decorator
60 |
61 | [options.extras_require]
62 | display =
63 | matplotlib >= 3.3.0
64 | docs =
65 | numpydoc
66 | sphinx_rtd_theme
67 | matplotlib >= 3.3.0
68 | tests =
69 | matplotlib >= 3.3.0
70 | pytest
71 | pytest-cov
72 | pytest-mpl
73 |
--------------------------------------------------------------------------------
/tests/data/pattern/est00.txt:
--------------------------------------------------------------------------------
1 | pattern1
2 | occurrence1
3 | 77.000000, 67.000000
4 | 77.500000, 77.000000
5 | 78.000000, 76.000000
6 | 81.000000, 81.000000
7 | 82.000000, 77.000000
8 | 83.000000, 82.000000
9 | 84.000000, 73.000000
10 | 86.500000, 79.000000
11 | 87.000000, 76.000000
12 | 87.500000, 81.000000
13 | 88.000000, 77.000000
14 | 88.500000, 74.000000
15 | 90.500000, 77.000000
16 | 91.000000, 74.000000
17 | 91.500000, 79.000000
18 | occurrence2
19 | 220.000000, 62.000000
20 | 220.500000, 65.000000
21 | 221.000000, 56.000000
22 | 221.500000, 59.000000
23 | 222.000000, 64.000000
24 | 225.000000, 64.000000
25 | 226.000000, 60.000000
26 | 227.000000, 65.000000
27 | 228.000000, 56.000000
28 | 230.500000, 62.000000
29 | 231.000000, 59.000000
30 | 231.500000, 64.000000
31 | 232.000000, 60.000000
32 | 232.500000, 57.000000
33 | 233.000000, 54.000000
34 | 233.500000, 63.000000
35 | 234.000000, 52.000000
36 | 234.500000, 64.000000
37 | 234.750000, 60.000000
38 | 235.000000, 57.000000
39 | 235.500000, 60.000000
40 | 235.750000, 57.000000
41 | pattern2
42 | occurrence1
43 | 90.500000, 77.000000
44 | 91.000000, 74.000000
45 | 91.500000, 79.000000
46 | 92.000000, 76.000000
47 | 92.500000, 72.000000
48 | 93.000000, 69.000000
49 | 93.500000, 77.000000
50 | 94.000000, 74.000000
51 | 94.500000, 71.000000
52 | 95.000000, 68.000000
53 | 95.500000, 76.000000
54 | 96.000000, 72.000000
55 | 98.250000, 72.000000
56 | 98.500000, 76.000000
57 | 98.750000, 80.000000
58 | 99.000000, 83.000000
59 | 99.250000, 80.000000
60 | 99.500000, 76.000000
61 | 99.750000, 72.000000
62 | occurrence2
63 | 313.000000, 47.000000
64 | 313.250000, 50.000000
65 | 313.750000, 47.000000
66 | 314.000000, 43.000000
67 | 314.750000, 45.000000
68 | 315.000000, 47.000000
69 | 315.750000, 45.000000
70 | 316.000000, 48.000000
71 | 316.750000, 62.000000
72 | 317.000000, 65.000000
73 | 317.750000, 62.000000
74 | 318.000000, 59.000000
75 | 318.750000, 48.000000
76 | 319.000000, 52.000000
77 | 319.750000, 48.000000
78 | 320.000000, 45.000000
79 | 320.250000, 47.000000
80 | 320.500000, 50.000000
81 | 320.750000, 54.000000
82 | 321.000000, 57.000000
83 | 322.500000, 56.000000
84 | 322.750000, 54.000000
85 |
--------------------------------------------------------------------------------
/tests/data/transcription/ref05.txt:
--------------------------------------------------------------------------------
1 | 1.31 2.38 622.25
2 | 1.31 2.43 233.08
3 | 1.31 2.43 185.00
4 | 1.31 3.48 155.56
5 | 2.36 3.41 739.99
6 | 2.37 3.44 233.08
7 | 2.38 3.46 311.13
8 | 3.35 4.39 698.46
9 | 3.40 4.52 207.65
10 | 3.41 5.62 77.78
11 | 3.41 4.49 349.23
12 | 4.38 5.49 622.25
13 | 4.43 5.64 466.16
14 | 4.45 5.60 369.99
15 | 5.59 7.71 349.23
16 | 5.61 7.69 587.33
17 | 6.60 7.77 932.33
18 | 7.72 8.96 311.13
19 | 7.72 9.69 622.25
20 | 7.73 8.97 830.61
21 | 8.92 10.11 155.56
22 | 8.92 10.10 783.99
23 | 10.07 11.32 311.13
24 | 10.08 11.36 523.25
25 | 10.08 12.30 196.00
26 | 11.24 12.39 77.78
27 | 12.23 14.53 207.65
28 | 12.31 13.44 69.30
29 | 13.33 14.59 415.30
30 | 13.37 14.48 65.41
31 | 14.47 15.71 174.61
32 | 14.54 16.64 523.25
33 | 15.53 16.85 830.61
34 | 15.58 16.70 174.61
35 | 16.65 17.83 155.56
36 | 16.69 18.92 554.37
37 | 16.71 17.86 739.99
38 | 17.78 19.97 138.59
39 | 17.80 18.96 138.59
40 | 17.82 18.84 698.46
41 | 18.89 20.00 466.16
42 | 18.89 21.05 174.61
43 | 19.86 20.96 932.33
44 | 19.88 20.94 554.37
45 | 20.93 22.04 830.61
46 | 20.96 22.09 493.88
47 | 21.01 22.56 185.00
48 | 21.97 23.08 739.99
49 | 22.00 23.11 466.16
50 | 22.03 23.11 69.30
51 | 23.04 23.56 830.61
52 | 23.06 25.34 87.31
53 | 23.12 24.24 174.61
54 | 23.13 24.26 415.30
55 | 24.18 25.28 830.61
56 | 24.23 26.14 277.18
57 | 24.28 26.31 138.59
58 | 25.22 26.34 466.16
59 | 25.33 26.33 92.50
60 | 25.69 26.38 246.94
61 | 26.25 28.37 233.08
62 | 26.26 26.82 185.00
63 | 26.29 27.81 932.33
64 | 26.30 27.38 77.78
65 | 26.79 28.40 174.61
66 | 27.34 29.47 98.00
67 | 28.35 30.50 155.56
68 | 28.38 30.01 311.13
69 | 28.41 29.44 932.33
70 | 29.43 30.49 523.25
71 | 29.44 30.46 103.83
72 | 29.96 30.46 277.18
73 | 30.42 31.56 87.31
74 | 30.42 32.50 1046.50
75 | 30.44 32.87 261.63
76 | 30.46 31.03 207.65
77 | 30.98 32.69 220.00
78 | 31.53 33.67 110.00
79 | 32.65 33.62 1046.50
80 | 32.66 34.53 174.61
81 | 32.69 34.10 349.23
82 | 33.60 34.58 554.37
83 | 33.63 34.56 116.54
84 | 34.03 34.62 311.13
85 | 34.52 36.51 1108.73
86 | 34.57 35.12 220.00
87 | 34.57 36.64 277.18
88 | 34.65 35.72 92.50
89 | 35.09 36.71 233.08
90 | 35.67 37.59 116.54
91 | 36.60 37.42 1108.73
92 | 36.61 38.11 369.99
93 | 36.67 38.59 185.00
94 | 37.37 38.65 622.25
95 | 37.56 38.72 123.47
96 | 38.07 38.74 329.63
97 |
--------------------------------------------------------------------------------
/.github/workflows/lint_python.yml:
--------------------------------------------------------------------------------
1 | name: lint_python
2 | on: [pull_request, push]
3 | jobs:
4 | lint_python:
5 | name: "Lint and code analysis"
6 | runs-on: ubuntu-latest
7 | strategy:
8 | fail-fast: true
9 | matrix:
10 | include:
11 | - os: ubuntu-latest
12 | python-version: "3.11"
13 | channel-priority: "flexible"
14 | envfile: ".github/environment-lint.yml"
15 | steps:
16 | - uses: actions/checkout@v4
17 | with:
18 | fetch-depth: 0
19 | - name: Cache conda
20 | uses: actions/cache@v4
21 | env:
22 | CACHE_NUMBER: 0
23 | with:
24 | path: ~/conda_pkgs_dir
25 | key: ${{ runner.os }}-${{ matrix.python-version }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles( matrix.envfile ) }}
26 | - name: Install conda environmnent
27 | uses: conda-incubator/setup-miniconda@v3
28 | with:
29 | auto-update-conda: false
30 | python-version: ${{ matrix.python-version }}
31 | add-pip-as-python-dependency: true
32 | auto-activate-base: false
33 | activate-environment: lint
34 | # mamba-version: "*"
35 | channel-priority: ${{ matrix.channel-priority }}
36 | environment-file: ${{ matrix.envfile }}
37 | use-only-tar-bz2: false
38 |
39 | - name: Conda info
40 | shell: bash -l {0}
41 | run: |
42 | conda info -a
43 | conda list
44 |
45 | - name: Spell check package
46 | shell: bash -l {0}
47 | run: codespell --ignore-words .codespell_ignore_list mir_eval
48 |
49 | - name: Security check
50 | shell: bash -l {0}
51 | run: bandit --recursive --skip B101,B110 .
52 |
53 | - name: Style check package
54 | shell: bash -l {0}
55 | run: python -m flake8 mir_eval
56 |
57 | - name: Format check package
58 | shell: bash -l {0}
59 | run: python -m black --check mir_eval
60 |
61 | - name: Format check tests
62 | shell: bash -l {0}
63 | run: python -m black --check tests
64 |
65 | - name: Docstring check
66 | shell: bash -l {0}
67 | run: python -m velin --check mir_eval
68 |
69 | - name: Docstring style check
70 | shell: bash -l {0}
71 | run: python -m pydocstyle mir_eval
72 |
--------------------------------------------------------------------------------
/.github/workflows/docs-ci.yml:
--------------------------------------------------------------------------------
1 | name: CI Docs
2 |
3 | on:
4 | push:
5 | branches:
6 | - main
7 | pull_request:
8 | branches:
9 | - main
10 |
11 | concurrency:
12 | group: ${{ github.workflow }}-${{ github.ref }}
13 | cancel-in-progress: True
14 |
15 | jobs:
16 | setup:
17 | name: "Doc environment setup"
18 | runs-on: ${{ matrix.os }}
19 | strategy:
20 | fail-fast: true
21 | matrix:
22 | include:
23 | - os: ubuntu-latest
24 | python-version: "3.8"
25 | channel-priority: "flexible"
26 | envfile: ".github/environment-docs.yml"
27 | steps:
28 | - uses: actions/checkout@v4
29 | with:
30 | fetch-depth: 0
31 |
32 | - name: Cache conda
33 | uses: actions/cache@v4
34 | env:
35 | # Increase this value to reset cache if etc/example-environment.yml has not changed
36 | CACHE_NUMBER: 0
37 | with:
38 | path: ~/conda_pkgs_dir
39 | key: ${{ runner.os }}-${{ matrix.python-version }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles( matrix.envfile ) }}
40 |
41 | - name: Install Conda environment
42 | uses: conda-incubator/setup-miniconda@v3
43 | with:
44 | auto-update-conda: false
45 | python-version: ${{ matrix.python-version }}
46 | add-pip-as-python-dependency: true
47 | auto-activate-base: false
48 | activate-environment: docs
49 | channel-priority: ${{ matrix.channel-priority }}
50 | environment-file: ${{ matrix.envfile }}
51 | use-only-tar-bz2: false # IMPORTANT: This needs to be set for caching to work properly!
52 |
53 | - name: Conda info
54 | shell: bash -l {0}
55 | run: |
56 | conda info -a
57 | conda list
58 |
59 | - name: Install mir_eval
60 | shell: bash -l {0}
61 | run: python -m pip install --upgrade-strategy only-if-needed -e .[docs]
62 |
63 | - name: Build docs
64 | shell: bash -l {0}
65 | working-directory: docs
66 | run: make html
67 |
68 | - name: Link checking
69 | id: linkcheck
70 | shell: bash -l {0}
71 | working-directory: docs
72 | run: make linkcheck
73 |
--------------------------------------------------------------------------------
/tests/data/chord/ref06.lab:
--------------------------------------------------------------------------------
1 | 0.000 0.310 N
2 | 0.310 1.968 D:min
3 | 1.968 4.090 F:maj/5
4 | 4.090 5.762 C:maj
5 | 5.762 7.945 G:maj
6 | 7.945 9.839 D:min
7 | 9.839 11.758 G:maj
8 | 11.758 14.169 C:maj
9 | 14.169 14.866 F:maj/5
10 | 14.866 15.598 C:maj
11 | 15.598 17.490 D:min
12 | 17.490 19.435 G:maj
13 | 19.435 19.893 C:maj
14 | 19.893 20.633 F:maj/5
15 | 20.633 21.823 C:maj
16 | 21.823 22.568 F:maj/5
17 | 22.568 23.252 C:maj
18 | 23.252 25.177 D:min
19 | 25.177 27.069 G:maj
20 | 27.069 29.476 C:maj
21 | 29.476 30.189 F:maj/5
22 | 30.189 30.935 C:maj
23 | 30.935 32.805 D:min
24 | 32.805 34.723 Bb:maj
25 | 34.723 38.525 G:maj
26 | 38.525 40.200 D:min
27 | 40.200 42.386 F:maj
28 | 42.386 44.055 C:maj
29 | 44.055 46.171 G:maj
30 | 46.171 47.893 D:min
31 | 47.893 50.007 F:maj
32 | 50.007 51.661 C:maj
33 | 51.661 53.838 G:maj
34 | 53.838 55.520 D:min
35 | 55.520 57.692 F:maj
36 | 57.692 59.340 C:maj
37 | 59.340 61.472 G:maj
38 | 61.472 63.188 D:min
39 | 63.188 65.301 Bb:maj
40 | 65.301 69.121 G:maj
41 | 69.121 71.064 D:min
42 | 71.064 72.936 G:maj
43 | 72.936 75.432 C:maj
44 | 75.432 76.874 F:maj/5
45 | 76.874 78.776 D:min
46 | 78.776 80.622 G:maj
47 | 80.622 84.473 C:maj
48 | 84.473 86.388 D:min
49 | 86.388 88.312 G:maj
50 | 88.312 92.141 C:maj
51 | 92.141 94.019 D:min
52 | 94.019 95.938 Bb:maj
53 | 95.938 99.779 G:maj
54 | 99.779 101.433 D:min
55 | 101.433 103.570 F:maj
56 | 103.570 105.260 C:maj
57 | 105.260 107.386 G:maj
58 | 107.386 109.076 D:min
59 | 109.076 111.256 F:maj
60 | 111.256 112.825 C:maj
61 | 112.825 115.028 G:maj
62 | 115.028 116.681 D:min
63 | 116.681 118.839 F:maj
64 | 118.839 120.500 C:maj
65 | 120.500 122.629 G:maj
66 | 122.629 124.323 D:min
67 | 124.323 126.451 Bb:maj
68 | 126.451 130.272 G:maj
69 | 130.272 132.201 D:min
70 | 132.201 134.093 G:maj
71 | 134.093 137.964 C:maj
72 | 137.964 139.831 D:min
73 | 139.831 141.742 G:maj
74 | 141.742 145.564 C:maj
75 | 145.564 147.523 D:min
76 | 147.523 149.379 G:maj
77 | 149.379 153.236 C:maj
78 | 153.236 155.123 D:min
79 | 155.123 157.003 Bb:maj
80 | 157.003 160.842 G:maj
81 | 160.842 162.568 D:min
82 | 162.568 164.689 F:maj
83 | 164.689 166.337 C:maj
84 | 166.337 168.512 G:maj
85 | 168.512 170.200 D:min
86 | 170.200 172.293 F:maj
87 | 172.293 174.016 C:maj
88 | 174.016 176.142 G:maj
89 | 176.142 177.866 D:min
90 | 177.866 179.987 F:maj
91 | 179.987 181.648 C:maj
92 | 181.648 183.766 G:maj
93 | 183.766 185.430 D:min
94 | 185.430 187.603 Bb:maj
95 | 187.603 191.407 G:maj
96 | 191.407 193.078 D:min
97 | 193.078 195.247 Bb:maj
98 | 195.247 204.240 F:maj
99 |
--------------------------------------------------------------------------------
/tests/data/transcription/est03.txt:
--------------------------------------------------------------------------------
1 | 2.61 2.81 622.25
2 | 3.35 3.70 369.99
3 | 3.63 4.02 659.26
4 | 3.72 3.93 185.00
5 | 4.07 4.56 369.99
6 | 4.23 4.51 622.25
7 | 4.47 5.00 554.37
8 | 4.51 5.00 329.63
9 | 4.88 5.25 369.99
10 | 5.14 5.37 622.25
11 | 5.16 5.55 185.00
12 | 5.56 6.04 369.99
13 | 5.91 6.32 493.88
14 | 6.12 6.25 246.94
15 | 6.30 6.46 246.94
16 | 6.51 6.60 246.94
17 | 6.60 6.69 369.99
18 | 6.93 7.32 185.00
19 | 7.07 7.16 622.25
20 | 7.28 7.39 987.77
21 | 7.37 7.74 369.99
22 | 7.44 7.67 830.61
23 | 7.65 7.92 739.99
24 | 8.14 8.60 369.99
25 | 8.60 8.90 185.00
26 | 9.18 9.41 659.26
27 | 9.23 9.48 369.99
28 | 9.69 9.92 622.25
29 | 9.76 10.55 123.47
30 | 10.25 10.43 622.25
31 | 10.41 11.10 659.26
32 | 10.50 10.64 369.99
33 | 10.53 10.90 739.99
34 | 10.64 11.03 185.00
35 | 10.97 11.43 369.99
36 | 11.11 11.31 622.25
37 | 11.29 11.68 554.37
38 | 11.32 11.71 329.63
39 | 11.66 11.75 185.00
40 | 11.69 11.96 369.99
41 | 11.73 11.92 554.37
42 | 11.92 12.20 622.25
43 | 11.94 12.45 185.00
44 | 12.29 12.82 369.99
45 | 12.45 12.82 466.16
46 | 12.64 13.73 493.88
47 | 12.83 13.24 554.37
48 | 13.06 13.54 369.99
49 | 13.20 13.59 466.16
50 | 13.24 13.36 185.00
51 | 13.41 13.89 185.00
52 | 13.50 13.87 622.25
53 | 13.68 13.82 987.77
54 | 13.82 14.05 830.61
55 | 14.01 14.29 739.99
56 | 14.47 14.89 369.99
57 | 14.87 15.14 185.00
58 | 15.36 15.59 659.26
59 | 15.82 16.07 622.25
60 | 15.84 16.77 123.47
61 | 16.17 16.75 185.00
62 | 16.47 16.93 587.33
63 | 16.56 16.84 220.00
64 | 16.77 17.09 311.13
65 | 16.89 17.23 622.25
66 | 17.07 17.47 698.46
67 | 17.12 17.42 116.54
68 | 17.42 18.35 207.65
69 | 17.45 17.54 233.08
70 | 17.45 17.54 349.23
71 | 17.52 17.91 698.46
72 | 17.63 17.91 830.61
73 | 17.73 18.44 233.08
74 | 17.73 18.46 739.99
75 | 17.91 18.05 698.46
76 | 18.03 18.51 293.66
77 | 18.19 18.56 698.46
78 | 18.40 18.95 77.78
79 | 18.47 18.74 622.25
80 | 18.84 18.93 622.25
81 | 18.91 19.81 185.00
82 | 19.16 19.46 466.16
83 | 19.23 19.93 233.08
84 | 19.49 19.86 311.13
85 | 19.51 19.81 155.56
86 | 19.51 19.63 622.25
87 | 19.79 20.53 554.37
88 | 19.86 21.81 82.41
89 | 20.19 20.51 164.81
90 | 20.51 21.41 415.30
91 | 20.60 20.72 207.65
92 | 20.81 21.00 207.65
93 | 21.28 21.44 207.65
94 | 21.46 21.65 415.30
95 | 21.74 21.88 415.30
96 | 22.16 22.48 98.00
97 | 22.76 22.90 164.81
98 | 22.88 23.11 493.88
99 | 23.14 23.27 246.94
100 | 23.20 23.69 554.37
101 | 23.37 24.08 493.88
102 | 23.44 23.67 164.81
103 | 23.51 23.94 466.16
104 | 24.02 24.22 622.25
105 | 24.60 24.78 622.25
106 | 24.69 24.83 185.00
107 | 25.46 25.76 554.37
108 | 25.97 26.17 493.88
109 | 26.15 26.50 246.94
110 |
--------------------------------------------------------------------------------
/tests/data/chord/ref02.lab:
--------------------------------------------------------------------------------
1 | 0.0000 0.8622 N
2 | 0.8622 2.3859 E
3 | 2.3859 2.6761 B:9
4 | 2.6761 4.8816 E
5 | 4.8816 5.1950 E/5
6 | 5.1950 5.4852 D
7 | 5.4852 5.8334 D#
8 | 5.8334 7.0986 E
9 | 7.0986 8.3755 C#:min
10 | 8.3755 9.6407 A
11 | 9.6407 10.9408 B
12 | 10.9408 12.9373 E
13 | 12.9373 13.5873 E/7
14 | 13.5873 15.5606 C#:min
15 | 15.5606 16.2338 C#:min/b7
16 | 16.2338 18.8572 A
17 | 18.8572 21.5037 B
18 | 21.5037 23.4654 E
19 | 23.4654 24.1038 E/7
20 | 24.1038 26.1004 C#:min
21 | 26.1004 26.7504 C#:min/b7
22 | 26.7504 29.3737 A
23 | 29.3737 32.0086 B
24 | 32.0086 36.5588 C#:min
25 | 36.5588 37.2205 C#:min/b7
26 | 37.2205 39.8670 A
27 | 39.8670 42.4671 B
28 | 42.4671 44.4288 E
29 | 44.4288 45.0440 E/7
30 | 45.0440 46.9709 C#:min
31 | 46.9709 47.6093 C#:min/b7
32 | 47.6093 48.9558 A
33 | 48.9558 50.2095 B
34 | 50.2095 52.8908 E
35 | 52.8908 54.8177 E
36 | 54.8177 55.4561 E/7
37 | 55.4561 57.4642 C#:min
38 | 57.4642 58.0910 C#:min/b7
39 | 58.0910 60.7608 A
40 | 60.7608 63.3609 B
41 | 63.3609 65.3458 E
42 | 65.3458 65.9726 E/7
43 | 65.9726 67.9995 C#:min
44 | 67.9995 68.6076 C#:min/b7
45 | 68.6076 71.2309 A
46 | 71.2309 73.7962 B
47 | 73.7962 78.3812 C#:min
48 | 78.3812 79.0197 C#:min/b7
49 | 79.0197 81.6314 A
50 | 81.6314 84.2431 B
51 | 84.2431 86.1468 E
52 | 86.1468 86.8200 E/7
53 | 86.8200 88.7701 C#:min
54 | 88.7701 89.3853 C#:min/b7
55 | 89.3853 90.7318 A
56 | 90.7318 91.9738 B
57 | 91.9738 94.5971 E
58 | 94.5971 97.2088 A
59 | 97.2088 99.7625 F#:min
60 | 99.7625 102.3510 D
61 | 102.3510 104.9047 E
62 | 104.9047 107.4468 A
63 | 107.4468 110.0237 F#:min
64 | 110.0237 111.3121 D
65 | 111.3121 112.6122 E
66 | 112.6122 113.9007 A
67 | 113.9007 115.1659 B
68 | 115.1659 117.7776 E
69 | 117.7776 120.0514 C#:min
70 | 120.0514 120.3893 C#:min/b7
71 | 120.3893 123.0011 A
72 | 123.0011 125.5896 B
73 | 125.5896 127.5558 E
74 | 127.5558 128.2129 E/7
75 | 128.2129 130.1402 C#:min
76 | 130.1402 130.8014 C#:min/b7
77 | 130.8014 133.3899 A
78 | 133.3899 136.0132 B
79 | 136.0132 140.5286 C#:min
80 | 140.5286 141.1786 C#:min/b7
81 | 141.1786 143.8600 A
82 | 143.8600 146.4369 B
83 | 146.4369 148.3651 E
84 | 148.3651 149.0254 E/7
85 | 149.0254 150.8729 C#:min
86 | 150.8729 151.6139 C#:min/b7
87 | 151.6139 152.8792 A
88 | 152.8792 154.1444 B
89 | 154.1444 156.0417 C#:min
90 | 156.0417 156.6981 C#:min/b7
91 | 156.6981 157.9981 A
92 | 157.9981 159.2518 B
93 | 159.2518 161.1438 C#:min
94 | 161.1438 161.7822 C#:min/b7
95 | 161.7822 163.0707 A
96 | 163.0707 164.3475 B
97 | 164.3475 165.9842 E
98 | 165.9842 166.3673 B
99 | 166.3673 168.7149 E
100 | 168.7149 171.5099 N
101 |
--------------------------------------------------------------------------------
/tests/test_onset.py:
--------------------------------------------------------------------------------
1 | """
2 | Unit tests for mir_eval.onset
3 | """
4 |
5 | import numpy as np
6 | import pytest
7 | import json
8 | import mir_eval
9 | import glob
10 | import warnings
11 |
12 | A_TOL = 1e-12
13 |
14 | # Path to the fixture files
15 | REF_GLOB = "data/onset/ref*.txt"
16 | EST_GLOB = "data/onset/est*.txt"
17 | SCORES_GLOB = "data/onset/output*.json"
18 |
19 | ref_files = sorted(glob.glob(REF_GLOB))
20 | est_files = sorted(glob.glob(EST_GLOB))
21 | sco_files = sorted(glob.glob(SCORES_GLOB))
22 |
23 | assert len(ref_files) == len(est_files) == len(sco_files) > 0
24 |
25 | file_sets = list(zip(ref_files, est_files, sco_files))
26 |
27 |
28 | @pytest.fixture
29 | def onset_data(request):
30 | ref_f, est_f, sco_f = request.param
31 | with open(sco_f) as f:
32 | expected_scores = json.load(f)
33 | reference_onsets = mir_eval.io.load_events(ref_f)
34 | estimated_onsets = mir_eval.io.load_events(est_f)
35 |
36 | return reference_onsets, estimated_onsets, expected_scores
37 |
38 |
39 | def test_onset_empty_warnings():
40 | with pytest.warns(UserWarning, match="Reference onsets are empty."):
41 | mir_eval.onset.f_measure(np.array([]), np.arange(10))
42 |
43 | with pytest.warns(UserWarning, match="Estimated onsets are empty."):
44 | mir_eval.onset.f_measure(np.arange(10), np.array([]))
45 |
46 | with pytest.warns(UserWarning, match="onsets are empty"):
47 | # Also verify that the score is 0
48 | assert np.allclose(mir_eval.onset.f_measure(np.array([]), np.array([])), 0)
49 |
50 |
51 | @pytest.mark.xfail(raisses=ValueError)
52 | @pytest.mark.parametrize(
53 | "onsets",
54 | [
55 | np.array([[1.0, 2.0]]), # must be 1d ndarray
56 | np.array([1e10, 1e11]), # must not be huge
57 | np.array([2.0, 1.0]), # must be sorted
58 | ],
59 | )
60 | def test_onset_fail(onsets):
61 | mir_eval.onset.f_measure(onsets, onsets)
62 |
63 |
64 | def test_onset_match():
65 | # Valid onsets which are the same produce a score of 1 for all metrics
66 | onsets = np.arange(10, dtype=np.float64)
67 | assert np.allclose(mir_eval.onset.f_measure(onsets, onsets), 1.0)
68 |
69 |
70 | @pytest.mark.parametrize("onset_data", file_sets, indirect=True)
71 | def test_onset_functions(onset_data):
72 | reference_onsets, estimated_onsets, expected_scores = onset_data
73 |
74 | # Compute scores
75 | scores = mir_eval.onset.evaluate(reference_onsets, estimated_onsets)
76 | # Compare them
77 | assert scores.keys() == expected_scores.keys()
78 | for metric in scores:
79 | assert np.allclose(scores[metric], expected_scores[metric], atol=A_TOL)
80 |
--------------------------------------------------------------------------------
/tests/data/chord/ref04.lab:
--------------------------------------------------------------------------------
1 | 0.0000 0.9834 N
2 | 0.9834 5.2007 F:maj(9)/5
3 | 5.2007 7.2649 C
4 | 7.2649 9.3524 F:maj(9)/5
5 | 9.3524 12.6900 G
6 | 12.6900 13.4356 C/5
7 | 13.4356 16.7909 G
8 | 16.7909 17.4707 C/5
9 | 17.4707 18.7865 G
10 | 18.7865 19.4882 C/5
11 | 19.4882 20.8259 G
12 | 20.8259 21.5057 C/5
13 | 21.5057 24.8609 G
14 | 24.8609 25.4930 C/5
15 | 25.4930 27.4989 C
16 | 27.4989 29.4814 D:min7(4)/5
17 | 29.4814 31.4990 E:min7
18 | 31.4990 33.5049 F:maj(9)/6
19 | 33.5049 35.5458 C
20 | 35.5458 37.4934 D:min7(4)/5
21 | 37.4934 39.5226 E:min7
22 | 39.5226 41.5168 F:maj(9)
23 | 41.5168 44.8388 G
24 | 44.8388 45.5186 C/5
25 | 45.5186 46.7905 G
26 | 46.7905 47.4923 C/5
27 | 47.4923 48.8080 G
28 | 48.8080 49.4221 C/5
29 | 49.4221 50.7378 G
30 | 50.7378 51.4177 C/5
31 | 51.4177 52.7115 G
32 | 52.7115 53.3913 C/5
33 | 53.3913 54.6194 G
34 | 54.6194 55.3430 C/5
35 | 55.3430 56.6150 G
36 | 56.6150 57.2948 C/5
37 | 57.2948 58.6105 G
38 | 58.6105 59.2904 C/5
39 | 59.2904 60.5623 G
40 | 60.5623 61.2377 C/5
41 | 61.2377 63.2202 C
42 | 63.2202 65.2145 D:min7(4)/b7
43 | 65.2145 67.1271 E:min7
44 | 67.1271 69.0747 F:maj(9)/6
45 | 69.0747 71.1739 C
46 | 71.1739 73.0398 D:min7(4)/b7
47 | 73.0398 74.9991 E:min7
48 | 74.9991 77.0167 F:maj(9)
49 | 77.0167 77.4715 F
50 | 77.4715 77.9963 C/3
51 | 77.9963 78.4511 F
52 | 78.4511 78.9572 C/3
53 | 78.9572 79.4307 F
54 | 79.4307 79.9205 C/3
55 | 79.9205 80.4220 F
56 | 80.4220 80.9235 C/4
57 | 80.9235 82.9294 C
58 | 82.9294 84.8770 D:min7(4)/b7
59 | 84.8770 86.8362 E:min7/b3
60 | 86.8362 88.7955 F:maj(9)
61 | 88.7955 90.7548 C
62 | 90.7548 92.7607 D:min7(4)/b7
63 | 92.7607 94.7316 E:min7/b3
64 | 94.7316 96.7141 F:maj(9)
65 | 96.7141 118.3826 G
66 | 118.3826 120.2905 C
67 | 120.2905 122.2544 D:min7(4)/b7
68 | 122.2544 124.2487 E:min7/b3
69 | 124.2487 126.1729 F:maj(9)
70 | 126.1729 128.1672 C
71 | 128.1672 130.1148 D:min7(4)/b7
72 | 130.1148 132.1090 E:min7/b3
73 | 132.1090 134.0799 F:maj(9)
74 | 134.0799 134.5910 F
75 | 134.5910 135.0813 C/3
76 | 135.0813 135.5429 F
77 | 135.5429 136.0622 C/3
78 | 136.0622 136.5215 F
79 | 136.5215 137.0239 C/5
80 | 137.0239 137.5086 F/3
81 | 137.5086 138.0626 G/3
82 | 138.0626 139.9693 C
83 | 139.9693 141.9286 D:min7(4)/b7
84 | 141.9286 143.8878 E:min7/b3
85 | 143.8878 145.8704 F:maj(9)
86 | 145.8704 147.8530 C
87 | 147.8530 149.8706 D:min7(4)/b7
88 | 149.8706 151.8065 E:min7/b3
89 | 151.8065 153.7891 F:maj(9)
90 | 153.7891 154.1972 F
91 | 154.1972 154.7570 C/3
92 | 154.7570 155.2352 F
93 | 155.2352 155.7483 C/3
94 | 155.7483 156.1915 F
95 | 156.1915 156.6930 C/3
96 | 156.6930 157.2194 F
97 | 157.2194 157.6842 G/3
98 | 157.6842 159.2389 C
99 | 159.2389 168.2981 G:(1)
100 | 168.2981 169.0674 N
101 |
--------------------------------------------------------------------------------
/tests/data/transcription/ref03.txt:
--------------------------------------------------------------------------------
1 | 2.78 3.81 622.25
2 | 2.79 3.19 61.74
3 | 3.19 3.79 369.99
4 | 3.74 4.11 185.00
5 | 3.75 4.33 659.26
6 | 4.09 4.44 369.99
7 | 4.25 4.48 622.25
8 | 4.43 4.89 329.63
9 | 4.44 5.28 554.37
10 | 4.44 4.89 233.08
11 | 4.85 5.22 369.99
12 | 5.19 5.93 622.25
13 | 5.22 5.55 185.00
14 | 5.54 5.89 369.99
15 | 5.88 7.07 493.88
16 | 5.88 6.31 311.13
17 | 5.89 6.34 246.94
18 | 6.29 6.75 369.99
19 | 6.74 7.36 185.00
20 | 7.00 7.32 622.25
21 | 7.25 7.53 987.77
22 | 7.31 7.70 369.99
23 | 7.44 7.72 830.61
24 | 7.63 9.04 739.99
25 | 7.68 8.10 277.18
26 | 7.69 8.13 233.08
27 | 8.07 8.57 369.99
28 | 8.51 9.10 185.00
29 | 9.00 9.81 659.26
30 | 9.04 9.75 369.99
31 | 9.74 10.18 123.47
32 | 9.75 10.05 622.25
33 | 10.13 10.34 622.25
34 | 10.19 10.67 369.99
35 | 10.31 10.48 659.26
36 | 10.44 10.69 739.99
37 | 10.63 11.27 659.26
38 | 10.64 11.00 185.00
39 | 11.01 11.31 369.99
40 | 11.19 11.41 622.25
41 | 11.34 11.67 329.63
42 | 11.34 11.68 233.08
43 | 11.38 12.07 554.37
44 | 11.66 12.06 369.99
45 | 12.00 12.46 622.25
46 | 12.03 12.33 185.00
47 | 12.32 12.62 369.99
48 | 12.44 12.66 466.16
49 | 12.60 13.00 311.13
50 | 12.60 12.98 246.94
51 | 12.63 12.81 493.88
52 | 12.81 12.90 554.37
53 | 12.88 12.99 493.88
54 | 12.94 13.05 554.37
55 | 12.98 13.32 369.99
56 | 13.00 13.19 493.88
57 | 13.13 13.28 466.16
58 | 13.31 13.51 493.88
59 | 13.36 13.79 185.00
60 | 13.50 13.70 622.25
61 | 13.69 13.97 987.77
62 | 13.78 14.08 369.99
63 | 13.88 14.13 830.61
64 | 14.06 15.29 739.99
65 | 14.09 14.43 277.18
66 | 14.09 14.44 233.08
67 | 14.39 14.82 369.99
68 | 14.81 15.33 185.00
69 | 15.25 15.87 659.26
70 | 15.29 15.84 369.99
71 | 15.75 16.54 622.25
72 | 15.83 16.22 123.47
73 | 16.19 16.57 185.00
74 | 16.50 17.02 587.33
75 | 16.51 16.82 220.00
76 | 16.80 17.14 311.13
77 | 16.94 17.16 622.25
78 | 17.13 17.51 698.46
79 | 17.16 17.51 116.54
80 | 17.44 17.83 207.65
81 | 17.50 17.67 698.46
82 | 17.63 17.77 830.61
83 | 17.69 18.21 739.99
84 | 17.73 18.08 233.08
85 | 18.07 18.36 293.66
86 | 18.19 18.43 698.46
87 | 18.35 18.81 77.78
88 | 18.38 19.24 622.25
89 | 18.75 19.25 155.56
90 | 19.19 19.87 466.16
91 | 19.24 19.61 233.08
92 | 19.57 19.85 311.13
93 | 19.81 20.62 554.37
94 | 19.84 20.20 82.41
95 | 20.15 20.63 164.81
96 | 20.55 21.10 207.65
97 | 20.56 21.03 415.30
98 | 21.04 21.67 277.18
99 | 22.13 22.75 98.00
100 | 22.80 23.54 164.81
101 | 22.94 23.03 493.88
102 | 23.19 23.32 493.88
103 | 23.23 23.58 246.94
104 | 23.31 23.43 554.37
105 | 23.44 23.64 493.88
106 | 23.56 23.79 466.16
107 | 23.62 23.89 329.63
108 | 23.75 23.99 493.88
109 | 23.85 24.49 92.50
110 | 23.94 24.20 622.25
111 | 24.44 25.50 622.25
112 | 24.50 25.45 185.00
113 | 25.05 25.61 233.08
114 | 25.44 26.08 554.37
115 | 25.58 26.08 329.63
116 | 26.00 26.81 493.88
117 | 26.06 26.24 123.47
118 |
--------------------------------------------------------------------------------
/tests/test_alignment.py:
--------------------------------------------------------------------------------
1 | """
2 | Unit tests for mir_eval.alignment
3 | """
4 |
5 | import glob
6 | import json
7 |
8 | import pytest
9 | import numpy as np
10 |
11 | import mir_eval
12 |
13 | A_TOL = 1e-12
14 |
15 | # Path to the fixture files
16 | REF_GLOB = "data/alignment/ref*.txt"
17 | EST_GLOB = "data/alignment/est*.txt"
18 | SCORES_GLOB = "data/alignment/output*.json"
19 |
20 | ref_files = sorted(glob.glob(REF_GLOB))
21 | est_files = sorted(glob.glob(EST_GLOB))
22 | sco_files = sorted(glob.glob(SCORES_GLOB))
23 |
24 | assert len(ref_files) == len(est_files) == len(sco_files) > 0
25 |
26 | file_sets = list(zip(ref_files, est_files, sco_files))
27 |
28 |
29 | @pytest.mark.xfail(raises=ValueError)
30 | @pytest.mark.parametrize(
31 | "metric",
32 | [
33 | mir_eval.alignment.absolute_error,
34 | mir_eval.alignment.percentage_correct,
35 | mir_eval.alignment.percentage_correct_segments,
36 | (
37 | lambda ref_ts, est_ts: mir_eval.alignment.percentage_correct_segments(
38 | ref_ts, est_ts, duration=max(np.max(ref_ts), np.max(est_ts))
39 | )
40 | ),
41 | mir_eval.alignment.karaoke_perceptual_metric,
42 | ],
43 | )
44 | @pytest.mark.parametrize(
45 | "est_alignment, pred_alignment",
46 | [
47 | (
48 | np.array([[1.0, 2.0]]),
49 | np.array([[1.0, 2.0]]),
50 | ), # alignments must be 1d ndarray
51 | (
52 | np.array([[-1.0, 2.0]]),
53 | np.array([[1.0, 2.0]]),
54 | ), # alignments must be non-negative
55 | (np.array([[2.0, 1.0]]), np.array([[1.0, 2.0]])), # alignments must be sorted
56 | (
57 | np.array([[1.0, 2.0]]),
58 | np.array([[1.0]]),
59 | ), # alignments must have the same length
60 | ],
61 | )
62 | def test_alignment_functions_fail(metric, est_alignment, pred_alignment):
63 | metric(est_alignment, pred_alignment)
64 |
65 |
66 | @pytest.fixture
67 | def alignment_data(request):
68 | ref_f, est_f, sco_f = request.param
69 | with open(sco_f) as f:
70 | expected_scores = json.load(f)
71 | reference_alignments = mir_eval.io.load_events(ref_f)
72 | estimated_alignments = mir_eval.io.load_events(est_f)
73 |
74 | return reference_alignments, estimated_alignments, expected_scores
75 |
76 |
77 | @pytest.mark.parametrize("alignment_data", file_sets, indirect=True)
78 | def test_alignment_functions(alignment_data):
79 | reference_alignments, estimated_alignments, expected_scores = alignment_data
80 | scores = mir_eval.alignment.evaluate(reference_alignments, estimated_alignments)
81 |
82 | assert scores.keys() == expected_scores.keys()
83 | for metric in scores:
84 | assert np.allclose(scores[metric], expected_scores[metric], atol=A_TOL)
85 |
--------------------------------------------------------------------------------
/.github/workflows/test.yml:
--------------------------------------------------------------------------------
1 | name: Test Python code
2 |
3 | on:
4 | pull_request:
5 | branches:
6 | - main
7 | push:
8 | branches:
9 | - main
10 |
11 | concurrency:
12 | group: ${{ github.workflow }}-${{ github.ref }}
13 | cancel-in-progress: True
14 |
15 | jobs:
16 | test:
17 | strategy:
18 | fail-fast: false
19 | matrix:
20 | os: [ubuntu-latest]
21 | python-version: ["3.8", "3.10", "3.11", "3.12"]
22 | channel-priority: [strict]
23 | envfile: [".github/environment.yml"]
24 | include:
25 | - python-version: "3.13"
26 | os: macos-latest
27 | - python-version: "3.13"
28 | os: windows-latest
29 | - python-version: "3.13"
30 | os: ubuntu-latest
31 | channel-priority: flexible
32 | - os: ubuntu-latest
33 | python-version: "3.7"
34 | envfile: ".github/environment-minimal.yml"
35 | channel-priority: "flexible"
36 | name: "Minimal dependencies"
37 |
38 | runs-on: ${{ matrix.os }}
39 | steps:
40 | - uses: actions/checkout@v4
41 |
42 | - name: Cache conda packages
43 | uses: actions/cache@v4
44 | with:
45 | path: ~/conda_pkgs_dir
46 | key: ${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles( matrix.envfile ) }}
47 |
48 | - name: Create conda environment
49 | uses: conda-incubator/setup-miniconda@v3
50 | with:
51 | python-version: ${{ matrix.python-version }}
52 | auto-activate-base: false
53 | channel-priority: ${{ matrix.channel-priority }}
54 | environment-file: ${{ matrix.envfile }}
55 | # Disabling bz2 to get more recent dependencies.
56 | # NOTE: this breaks cache support, so CI will be slower.
57 | use-only-tar-bz2: False # IMPORTANT: This needs to be set for caching to work properly!
58 |
59 | - name: Install package in development mode
60 | shell: bash -l {0}
61 | run: python -m pip install --upgrade-strategy=only-if-needed -e .[display,tests]
62 |
63 | - name: Log installed packages for debugging
64 | shell: bash -l {0}
65 | run: |
66 | conda info -a
67 | conda list
68 |
69 | - name: Show libraries in the system on which NumPy was built
70 | shell: bash -l {0}
71 | run: python -c "import numpy; numpy.show_config()"
72 |
73 | - name: Show libraries in the system on which SciPy was built
74 | shell: bash -l {0}
75 | run: python -c "import scipy; scipy.show_config()"
76 |
77 | - name: Run unit tests
78 | shell: bash -l {0}
79 | run: pytest
80 | working-directory: tests
81 |
82 | - name: Upload coverage to Codecov
83 | uses: codecov/codecov-action@v5
84 | with:
85 | token: ${{ secrets.CODECOV_TOKEN }}
86 | files: ./coverage.xml
87 | flags: unittests
88 | env_vars: OS,PYTHON
89 | name: codecov-umbrella
90 | fail_ci_if_error: true
91 | verbose: true
92 |
--------------------------------------------------------------------------------
/tests/data/transcription/est06.txt:
--------------------------------------------------------------------------------
1 | 0.70 0.82 185.00
2 | 1.03 1.12 622.25
3 | 1.10 1.21 932.33
4 | 1.26 1.37 932.33
5 | 1.40 1.58 185.00
6 | 1.66 1.77 207.65
7 | 1.70 1.84 659.26
8 | 1.84 1.93 246.94
9 | 1.84 2.03 622.25
10 | 2.05 2.26 185.00
11 | 2.17 2.44 587.33
12 | 2.31 2.40 207.65
13 | 2.42 2.74 622.25
14 | 2.49 2.63 246.94
15 | 2.70 2.84 185.00
16 | 2.93 3.02 493.88
17 | 2.98 3.07 207.65
18 | 2.98 3.12 415.30
19 | 3.07 3.65 185.00
20 | 3.38 3.63 587.33
21 | 3.63 3.74 207.65
22 | 3.84 3.95 246.94
23 | 4.00 4.30 185.00
24 | 4.14 4.30 932.33
25 | 4.26 4.39 207.65
26 | 4.49 4.58 246.94
27 | 4.58 4.70 622.25
28 | 4.68 4.83 185.00
29 | 4.75 5.14 587.33
30 | 4.91 5.07 207.65
31 | 5.14 5.25 246.94
32 | 5.33 5.51 185.00
33 | 5.46 5.72 415.30
34 | 5.58 5.72 207.65
35 | 5.70 5.90 185.00
36 | 5.77 5.88 369.99
37 | 5.79 6.00 233.08
38 | 5.93 6.07 622.25
39 | 6.05 6.51 659.26
40 | 6.12 6.25 207.65
41 | 6.35 6.48 233.08
42 | 6.44 6.58 415.30
43 | 6.53 6.99 622.25
44 | 6.58 6.72 277.18
45 | 6.72 6.83 207.65
46 | 6.77 6.92 103.83
47 | 6.83 7.04 554.37
48 | 6.88 6.97 739.99
49 | 7.09 7.34 622.25
50 | 7.25 7.32 739.99
51 | 7.30 7.41 466.16
52 | 7.42 7.60 103.83
53 | 7.42 7.64 554.37
54 | 7.42 7.69 659.26
55 | 7.55 7.74 880.00
56 | 7.58 7.76 220.00
57 | 7.67 7.76 233.08
58 | 7.74 8.02 466.16
59 | 7.76 8.34 622.25
60 | 7.86 8.06 138.59
61 | 8.04 8.22 69.30
62 | 8.09 8.18 311.13
63 | 8.16 8.27 103.83
64 | 8.23 8.48 311.13
65 | 8.44 8.71 277.18
66 | 8.48 8.62 138.59
67 | 8.67 8.88 196.00
68 | 8.69 8.85 98.00
69 | 8.83 8.92 329.63
70 | 8.92 10.08 220.00
71 | 9.04 9.15 440.00
72 | 9.13 9.39 493.88
73 | 9.16 9.27 138.59
74 | 9.30 9.39 92.50
75 | 9.30 9.48 659.26
76 | 9.34 9.53 196.00
77 | 9.67 9.78 369.99
78 | 9.88 9.97 329.63
79 | 9.97 10.18 196.00
80 | 9.99 10.13 98.00
81 | 10.16 10.45 220.00
82 | 10.25 10.36 311.13
83 | 10.34 10.48 329.63
84 | 10.43 10.52 138.59
85 | 10.50 10.64 220.00
86 | 10.60 10.69 164.81
87 | 10.62 10.96 87.31
88 | 10.67 11.03 246.94
89 | 10.85 11.27 220.00
90 | 11.04 11.24 155.56
91 | 11.06 11.17 87.31
92 | 11.15 12.36 246.94
93 | 11.22 11.55 87.31
94 | 11.27 11.38 185.00
95 | 11.34 11.48 92.50
96 | 11.43 11.55 196.00
97 | 11.53 11.61 103.83
98 | 11.69 11.87 123.47
99 | 11.71 12.31 185.00
100 | 11.87 12.06 87.31
101 | 11.90 12.24 92.50
102 | 11.92 12.15 493.88
103 | 12.11 12.29 369.99
104 | 12.13 12.31 103.83
105 | 12.31 12.43 92.50
106 | 12.31 12.45 493.88
107 | 12.36 12.66 311.13
108 | 12.41 12.59 246.94
109 | 12.43 12.54 369.99
110 | 12.59 13.31 185.00
111 | 12.71 13.19 311.13
112 | 13.08 13.29 659.26
113 | 13.17 13.26 174.61
114 | 13.27 13.36 415.30
115 | 13.27 13.57 622.25
116 | 13.36 13.47 311.13
117 | 13.41 13.66 349.23
118 | 13.45 14.03 103.83
119 | 13.48 13.59 174.61
120 | 13.57 13.75 466.16
121 | 13.68 13.84 233.08
122 | 13.73 13.82 246.94
123 | 13.85 13.96 311.13
124 | 13.96 14.08 698.46
125 | 13.99 14.08 415.30
126 | 14.01 14.80 277.18
127 | 14.06 14.22 349.23
128 | 14.13 14.73 116.54
129 | 14.20 14.35 311.13
130 | 14.22 14.33 329.63
131 | 14.38 14.75 369.99
132 | 14.45 14.63 233.08
133 | 14.45 14.56 415.30
134 | 14.71 14.82 58.27
135 | 14.75 15.56 87.31
136 | 14.75 14.91 185.00
137 | 14.78 15.28 311.13
138 | 14.89 15.52 92.50
139 | 14.94 15.07 329.63
140 | 15.22 15.52 233.08
141 |
--------------------------------------------------------------------------------
/tests/data/transcription/ref02.txt:
--------------------------------------------------------------------------------
1 | 2.63 8.50 69.30
2 | 2.63 8.38 138.59
3 | 2.63 3.13 207.65
4 | 3.13 3.67 277.18
5 | 3.65 4.17 329.63
6 | 4.14 4.71 207.65
7 | 4.65 5.13 277.18
8 | 5.11 5.60 329.63
9 | 5.60 6.13 207.65
10 | 6.05 6.53 277.18
11 | 6.48 6.98 329.63
12 | 6.96 7.50 207.65
13 | 7.43 7.97 277.18
14 | 7.93 8.50 329.63
15 | 8.50 13.86 61.74
16 | 8.50 13.80 123.47
17 | 8.50 9.10 207.65
18 | 9.03 9.60 277.18
19 | 9.56 10.10 329.63
20 | 10.06 10.61 207.65
21 | 10.54 11.06 277.18
22 | 11.03 11.54 329.63
23 | 11.53 12.05 207.65
24 | 12.00 12.50 277.18
25 | 12.47 12.95 329.63
26 | 12.96 13.46 207.65
27 | 13.38 13.94 277.18
28 | 13.90 14.41 329.63
29 | 14.42 15.07 220.00
30 | 14.42 16.98 55.00
31 | 14.43 16.92 110.00
32 | 14.98 15.52 277.18
33 | 15.48 16.04 329.63
34 | 15.99 16.53 220.00
35 | 16.47 17.00 277.18
36 | 16.97 17.49 329.63
37 | 17.47 20.03 92.50
38 | 17.48 19.91 46.25
39 | 17.48 18.15 220.00
40 | 18.04 18.56 293.66
41 | 18.52 19.06 369.99
42 | 19.00 19.50 220.00
43 | 19.44 19.98 293.66
44 | 19.95 20.49 369.99
45 | 20.44 23.04 51.91
46 | 20.44 23.07 103.83
47 | 20.48 21.09 207.65
48 | 21.02 21.52 261.63
49 | 21.50 22.03 369.99
50 | 21.99 22.52 207.65
51 | 22.46 22.98 277.18
52 | 22.93 23.50 329.63
53 | 23.46 25.91 51.91
54 | 23.47 24.17 207.65
55 | 23.47 26.00 103.83
56 | 24.11 24.61 277.18
57 | 24.58 25.10 311.13
58 | 25.09 25.60 185.00
59 | 25.55 26.09 261.63
60 | 26.06 26.73 311.13
61 | 26.73 32.72 69.30
62 | 26.75 32.69 138.59
63 | 26.75 27.58 164.81
64 | 26.77 32.62 103.83
65 | 27.48 28.04 207.65
66 | 28.00 28.53 277.18
67 | 28.51 29.06 207.65
68 | 28.99 29.52 277.18
69 | 29.49 30.01 329.63
70 | 29.98 30.56 207.65
71 | 30.48 31.02 277.18
72 | 30.97 31.51 329.63
73 | 31.48 31.87 207.65
74 | 31.49 32.49 415.30
75 | 31.93 32.25 277.18
76 | 32.32 32.62 329.63
77 | 32.74 33.04 415.30
78 | 33.09 38.82 65.41
79 | 33.10 38.87 103.83
80 | 33.11 38.83 130.81
81 | 33.13 37.62 415.30
82 | 33.14 33.87 207.65
83 | 33.76 34.30 311.13
84 | 34.27 34.81 369.99
85 | 34.76 35.34 207.65
86 | 35.30 35.82 311.13
87 | 35.79 36.32 369.99
88 | 36.29 36.86 207.65
89 | 36.81 37.29 311.13
90 | 37.27 37.79 369.99
91 | 37.76 38.92 207.65
92 | 37.77 38.72 415.30
93 | 38.22 38.76 311.13
94 | 38.71 39.03 369.99
95 | 38.99 39.23 415.30
96 | 39.32 42.03 415.30
97 | 39.32 40.70 207.65
98 | 39.36 41.57 138.59
99 | 39.37 41.59 69.30
100 | 40.05 40.63 277.18
101 | 40.59 41.11 329.63
102 | 41.07 42.04 207.65
103 | 41.55 42.05 277.18
104 | 42.00 42.57 329.63
105 | 42.49 44.75 46.25
106 | 42.49 44.70 92.50
107 | 42.54 43.75 220.00
108 | 42.55 45.09 440.00
109 | 43.14 43.65 277.18
110 | 43.61 44.19 369.99
111 | 44.15 44.67 220.00
112 | 44.60 45.14 277.18
113 | 45.11 45.71 369.99
114 | 45.60 47.72 123.47
115 | 45.61 47.72 61.74
116 | 45.67 46.69 207.65
117 | 45.68 48.13 415.30
118 | 46.18 46.70 246.94
119 | 46.68 47.18 329.63
120 | 47.16 48.14 207.65
121 | 47.57 48.14 246.94
122 | 48.10 48.70 329.63
123 | 48.61 50.65 123.47
124 | 48.62 50.65 61.74
125 | 48.67 49.60 220.00
126 | 48.68 49.68 369.99
127 | 49.17 49.67 246.94
128 | 49.66 50.08 311.13
129 | 50.14 50.81 493.88
130 | 50.15 50.70 220.00
131 | 50.67 51.23 246.94
132 | 51.19 51.87 311.13
133 | 51.75 53.50 82.41
134 | 51.76 53.50 164.81
135 | 51.78 53.20 207.65
136 | 51.78 52.52 329.63
137 | 52.51 53.05 246.94
138 | 53.00 53.53 329.63
139 |
--------------------------------------------------------------------------------
/tests/data/chord/ref00.lab:
--------------------------------------------------------------------------------
1 | 0.0000 0.7353 N
2 | 0.7353 1.6222 G
3 | 1.6222 2.5039 D
4 | 2.5039 3.4158 G
5 | 3.4158 4.3394 D
6 | 4.3394 5.2630 G
7 | 5.2630 6.1983 D
8 | 6.1983 7.1336 G
9 | 7.1336 8.1394 D
10 | 8.1394 9.0071 G
11 | 9.0071 9.8811 D
12 | 9.8811 10.8047 G
13 | 10.8047 11.7049 D
14 | 11.7049 12.6285 G
15 | 12.6285 13.5755 D
16 | 13.5755 14.4874 G
17 | 14.4874 15.4227 D
18 | 15.4227 16.3463 G
19 | 16.3463 17.2789 D
20 | 17.2789 18.1936 E:min/b3
21 | 18.1936 19.1172 E:min
22 | 19.1172 20.9617 C
23 | 20.9617 22.8116 D
24 | 22.8116 23.7352 G
25 | 23.7352 24.6588 D
26 | 24.6588 25.5941 G
27 | 25.5941 26.5411 D
28 | 26.5411 27.4180 G
29 | 27.4180 28.3182 D
30 | 28.3182 29.2535 G
31 | 29.2535 30.1771 D
32 | 30.1771 31.0890 G
33 | 31.0890 32.0486 D
34 | 32.0486 32.9163 G
35 | 32.9163 33.8364 D
36 | 33.8364 34.7367 G
37 | 34.7367 35.6929 D
38 | 35.6929 36.5593 E:min/b3
39 | 36.5593 37.4958 E:min
40 | 37.4958 39.3080 C
41 | 39.3080 41.2136 B
42 | 41.2136 43.0842 E:min
43 | 43.0842 44.9081 C
44 | 44.9081 46.7991 G
45 | 46.7991 48.6142 B
46 | 48.6142 52.3137 E:min
47 | 52.3137 54.1441 G
48 | 54.1441 56.0543 G:7
49 | 56.0543 57.8503 C
50 | 57.8503 59.7371 D
51 | 59.7371 61.5447 G
52 | 61.5447 63.4153 E:min
53 | 63.4153 65.2902 C
54 | 65.2902 67.0864 D
55 | 67.0864 68.0567 G
56 | 68.0567 69.0037 D
57 | 69.0037 69.9273 G
58 | 69.9273 70.8860 D
59 | 70.8860 71.7979 G
60 | 71.7979 72.7098 D
61 | 72.7098 73.6335 G
62 | 73.6335 74.5571 D
63 | 74.5571 75.4456 G
64 | 75.4456 76.3809 D
65 | 76.3809 77.3279 G
66 | 77.3279 78.2632 D
67 | 78.2632 79.1751 G
68 | 79.1751 80.0753 D
69 | 80.0753 81.0106 E:min/b3
70 | 81.0106 81.9459 E:min
71 | 81.9459 83.7698 C
72 | 83.7698 85.6053 D
73 | 85.6053 86.5289 G
74 | 86.5289 87.4759 D
75 | 87.4759 88.4112 G
76 | 88.4112 89.3348 D
77 | 89.3348 90.2701 G
78 | 90.2701 91.1586 D
79 | 91.1586 92.0822 G
80 | 92.0822 92.9942 D
81 | 92.9942 93.9061 G
82 | 93.9061 94.8414 D
83 | 94.8414 95.7884 G
84 | 95.7884 96.6886 D
85 | 96.6886 97.6473 G
86 | 97.6473 98.5592 D
87 | 98.5592 99.5067 E:min/b3
88 | 99.5067 100.3596 E:min
89 | 100.3596 102.1952 C
90 | 102.1952 104.0656 D
91 | 104.0656 105.0011 G
92 | 105.0011 105.9364 D
93 | 105.9364 106.8132 G
94 | 106.8132 107.7602 D
95 | 107.7602 108.6254 G
96 | 108.6254 109.5723 D
97 | 109.5723 110.5193 G
98 | 110.5193 111.4196 D
99 | 111.4196 112.3549 G
100 | 112.3549 113.2434 D
101 | 113.2434 114.1670 G
102 | 114.1670 115.1023 D
103 | 115.1023 116.0142 G
104 | 116.0142 116.9261 D
105 | 116.9261 117.8497 E:min/b3
106 | 117.8497 118.7734 E:min
107 | 118.7734 120.6556 C
108 | 120.6556 122.5146 B:7
109 | 122.5146 124.3501 E:min
110 | 124.3501 126.1739 C
111 | 126.1739 128.0328 G
112 | 128.0328 129.8917 B
113 | 129.8917 131.7974 E:min
114 | 131.7974 133.5979 E:min
115 | 133.5979 135.4801 G
116 | 135.4801 137.3157 G:7
117 | 137.3157 139.1863 C
118 | 139.1863 141.0686 D
119 | 141.0686 142.9041 G
120 | 142.9041 144.7396 E:min
121 | 144.7396 146.6336 C
122 | 146.6336 148.5159 D
123 | 148.5159 149.4395 G
124 | 149.4395 150.4099 D
125 | 150.4099 151.3335 G
126 | 151.3335 152.2922 D
127 | 152.2922 153.2041 G
128 | 153.2041 154.1745 D
129 | 154.1745 155.0981 G
130 | 155.0981 156.0296 D
131 | 156.0296 156.9336 G
132 | 156.9336 157.8806 D
133 | 157.8806 158.7925 G
134 | 158.7925 159.7629 D
135 | 159.7629 160.7099 G
136 | 160.7099 161.6452 D
137 |
--------------------------------------------------------------------------------
/tests/data/transcription/est01.txt:
--------------------------------------------------------------------------------
1 | 0.75 1.00 440.00
2 | 1.08 1.31 440.00
3 | 1.59 1.72 523.25
4 | 1.98 2.51 329.63
5 | 3.14 3.30 349.23
6 | 3.21 3.33 174.61
7 | 3.70 3.81 261.63
8 | 4.16 5.21 220.00
9 | 4.88 4.97 110.00
10 | 5.63 6.72 82.41
11 | 6.70 6.79 164.81
12 | 6.77 6.92 82.41
13 | 6.83 7.39 92.50
14 | 7.02 7.13 164.81
15 | 7.23 7.41 220.00
16 | 7.55 7.88 92.50
17 | 7.95 8.48 103.83
18 | 8.34 9.01 246.94
19 | 8.53 8.69 207.65
20 | 8.67 9.22 103.83
21 | 9.02 9.11 207.65
22 | 9.20 9.36 110.00
23 | 9.27 9.71 523.25
24 | 9.37 9.66 220.00
25 | 9.51 10.13 261.63
26 | 9.71 9.83 329.63
27 | 10.09 10.36 164.81
28 | 10.36 10.55 174.61
29 | 10.57 10.99 87.31
30 | 10.60 11.01 174.61
31 | 10.64 10.94 349.23
32 | 10.97 11.20 110.00
33 | 11.11 11.20 440.00
34 | 11.18 11.29 261.63
35 | 11.27 11.38 130.81
36 | 11.36 11.52 261.63
37 | 11.59 12.24 82.41
38 | 11.66 11.92 329.63
39 | 12.15 12.36 220.00
40 | 12.20 12.33 110.00
41 | 12.34 12.73 261.63
42 | 12.38 12.85 130.81
43 | 12.80 12.92 155.56
44 | 12.83 13.84 77.78
45 | 12.92 13.52 311.13
46 | 13.55 13.73 523.25
47 | 13.71 13.82 369.99
48 | 13.73 14.01 246.94
49 | 13.85 14.10 220.00
50 | 14.08 14.35 440.00
51 | 14.20 15.01 220.00
52 | 14.22 14.80 246.94
53 | 14.40 14.49 440.00
54 | 14.59 14.82 440.00
55 | 15.77 15.98 220.00
56 | 16.19 16.28 466.16
57 | 16.31 16.47 440.00
58 | 16.52 16.72 220.00
59 | 16.52 16.65 392.00
60 | 16.80 16.89 392.00
61 | 16.91 17.14 220.00
62 | 17.05 17.42 293.66
63 | 17.31 17.40 369.99
64 | 17.70 17.88 220.00
65 | 18.96 19.05 349.23
66 | 19.14 19.35 130.81
67 | 19.49 19.74 261.63
68 | 20.33 20.58 103.83
69 | 20.56 20.88 246.94
70 | 20.79 20.88 329.63
71 | 20.91 21.16 349.23
72 | 21.12 21.69 246.94
73 | 21.70 21.99 261.63
74 | 22.14 22.25 415.30
75 | 22.25 22.39 523.25
76 | 22.28 22.44 440.00
77 | 22.44 22.74 261.63
78 | 22.65 23.13 103.83
79 | 22.86 24.04 246.94
80 | 23.07 23.25 293.66
81 | 23.14 23.25 207.65
82 | 23.25 23.36 329.63
83 | 23.30 23.41 207.65
84 | 23.44 23.64 493.88
85 | 23.69 23.78 493.88
86 | 23.79 24.29 110.00
87 | 23.97 24.62 261.63
88 | 24.16 24.76 220.00
89 | 24.16 24.22 523.25
90 | 24.20 24.41 329.63
91 | 24.37 24.55 880.00
92 | 24.55 24.73 523.25
93 | 24.71 25.08 261.63
94 | 24.74 24.83 1046.50
95 | 24.88 25.18 1046.50
96 | 24.92 25.31 146.83
97 | 24.95 25.50 349.23
98 | 24.97 25.76 73.42
99 | 25.04 25.22 220.00
100 | 25.29 25.87 493.88
101 | 25.32 25.48 1046.50
102 | 25.43 25.83 293.66
103 | 25.60 26.20 349.23
104 | 25.67 25.85 698.46
105 | 25.69 25.90 220.00
106 | 25.81 25.90 146.83
107 | 25.88 25.96 73.42
108 | 25.94 26.03 146.83
109 | 26.04 27.13 164.81
110 | 26.06 26.92 82.41
111 | 26.06 26.17 1396.91
112 | 26.11 26.22 246.94
113 | 26.27 26.41 246.94
114 | 26.27 26.36 1318.51
115 | 26.41 26.87 440.00
116 | 26.60 26.89 523.25
117 | 26.80 26.89 987.77
118 | 26.94 27.08 880.00
119 | 26.97 27.13 440.00
120 | 27.08 27.31 830.61
121 | 27.11 27.52 329.63
122 | 27.11 27.20 493.88
123 | 27.15 27.87 82.41
124 | 27.18 27.38 164.81
125 | 27.18 27.27 2489.02
126 | 27.31 28.36 415.30
127 | 27.34 27.43 698.46
128 | 27.34 27.43 1661.22
129 | 27.50 27.61 659.26
130 | 27.52 28.01 493.88
131 | 27.71 28.40 164.81
132 | 27.73 27.82 659.26
133 | 27.85 27.99 523.25
134 | 27.85 28.31 830.61
135 | 27.99 28.08 246.94
136 | 28.27 28.68 220.00
137 | 28.27 29.00 440.00
138 | 28.29 28.98 110.00
139 | 28.92 29.00 220.00
140 |
--------------------------------------------------------------------------------
/tests/data/chord/ref05.lab:
--------------------------------------------------------------------------------
1 | 0.0000 0.3450 N
2 | 0.3450 1.6735 Ab/5
3 | 1.6735 3.0846 Eb
4 | 3.0846 3.7610 Ab
5 | 3.7610 4.4258 Db
6 | 4.4258 5.1372 Ab
7 | 5.1372 5.7902 Db
8 | 5.7902 6.5016 Ab
9 | 6.5016 7.1664 Db
10 | 7.1664 7.9011 Ab
11 | 7.9011 8.5775 Db
12 | 8.5775 10.0003 Bb:min
13 | 10.0003 11.3881 F:min
14 | 11.3881 12.7642 Eb
15 | 12.7642 13.4816 Ab
16 | 13.4816 14.1987 Db
17 | 14.1987 15.5982 Bb:min
18 | 15.5982 16.9860 F:min
19 | 16.9860 18.3854 Eb
20 | 18.3854 19.8082 F:min
21 | 19.8082 21.2194 Bb:min
22 | 21.2194 21.9191 Ab
23 | 21.9191 22.5955 Db
24 | 22.5955 23.9950 Eb
25 | 23.9950 24.6830 Ab
26 | 24.6830 25.4061 Db
27 | 25.4061 26.7939 Bb:min
28 | 26.7939 28.1700 Db
29 | 28.1700 28.8581 Ab
30 | 28.8581 29.5695 Db
31 | 29.5695 30.2809 Ab
32 | 30.2809 30.9573 Db
33 | 30.9573 31.6570 Ab
34 | 31.6570 32.3568 Db
35 | 32.3568 33.0039 Ab
36 | 33.0039 33.6771 Db
37 | 33.6771 35.1557 Bb:min
38 | 35.1557 36.5668 F:min
39 | 36.5668 37.9197 Eb
40 | 37.9197 38.6427 Ab
41 | 38.6427 39.3308 Db
42 | 39.3308 40.7419 Bb:min
43 | 40.7419 42.1064 F:min
44 | 42.1064 43.5292 Eb
45 | 43.5292 44.8937 F:min
46 | 44.8937 46.3165 Bb:min
47 | 46.3165 46.9929 Ab
48 | 46.9929 47.7159 Db
49 | 47.7159 49.1504 Eb
50 | 49.1504 49.8501 Ab
51 | 49.8501 50.5382 Db
52 | 50.5382 51.9260 Bb:min
53 | 51.9260 53.3371 Db
54 | 53.3371 54.0368 Ab
55 | 54.0368 54.7599 Db
56 | 54.7599 55.4596 Ab
57 | 55.4596 56.1594 Db
58 | 56.1594 56.8708 Ab
59 | 56.8708 57.5588 Db
60 | 57.5588 58.9700 Ab
61 | 58.9700 61.8039 Db
62 | 61.8039 64.6261 Ab
63 | 64.6261 67.4134 Db
64 | 67.4134 68.8012 Eb:sus4
65 | 68.8012 70.2124 Eb
66 | 70.2124 70.9587 Ab
67 | 70.9587 71.6701 Db
68 | 71.6701 73.0696 Bb:min
69 | 73.0696 74.4574 F:min
70 | 74.4574 75.8802 Eb
71 | 75.8802 76.6616 Ab
72 | 76.6616 77.3263 Db
73 | 77.3263 78.7258 Bb:min
74 | 78.7258 80.1252 F:min
75 | 80.1252 81.5364 Eb
76 | 81.5364 82.9475 F:min
77 | 82.9475 84.3820 Bb:min
78 | 84.3820 85.0933 Ab
79 | 85.0933 85.7814 Db
80 | 85.7814 87.1809 Eb
81 | 87.1809 87.9039 Ab
82 | 87.9039 88.5920 Db
83 | 88.5920 90.0031 Bb:min
84 | 90.0031 91.4376 Db
85 | 91.4376 92.1257 Ab
86 | 92.1257 92.8837 Db
87 | 92.8837 93.5718 Ab
88 | 93.5718 94.2948 Db
89 | 94.2948 94.9712 Ab
90 | 94.9712 95.6710 Db
91 | 95.6710 97.1171 Ab
92 | 97.1171 99.8927 Db
93 | 99.8927 102.6800 Ab
94 | 102.6800 105.4906 Db
95 | 105.4906 106.8667 Eb:sus4
96 | 106.8667 108.2545 Eb
97 | 108.2545 108.9776 Ab
98 | 108.9776 109.6890 Db
99 | 109.6890 111.1118 Bb:min
100 | 111.1118 112.4996 F:min
101 | 112.4996 113.8757 Eb
102 | 113.8757 114.5988 Ab
103 | 114.5988 115.3102 Db
104 | 115.3102 116.6746 Bb:min
105 | 116.6746 118.0974 F:min
106 | 118.0974 119.5319 Eb
107 | 119.5319 120.9314 F:min
108 | 120.9314 122.3308 Bb:min
109 | 122.3308 123.0655 Ab
110 | 123.0655 123.7536 Db
111 | 123.7536 125.1181 Eb
112 | 125.1181 125.8645 Ab
113 | 125.8645 126.5759 Db
114 | 126.5759 127.9637 Bb:min
115 | 127.9637 129.3748 Db
116 | 129.3748 130.1095 Ab
117 | 130.1095 130.8442 Db
118 | 130.8442 131.5323 Ab
119 | 131.5323 132.2320 Db
120 | 132.2320 132.9085 Ab
121 | 132.9085 133.6548 Db
122 | 133.6548 134.3546 Ab
123 | 134.3546 135.0776 Db
124 | 135.0776 135.7540 Ab
125 | 135.7540 136.4188 Db
126 | 136.4188 137.1418 Ab
127 | 137.1418 137.8299 Db
128 | 137.8299 138.5646 Ab
129 | 138.5646 139.2644 Db
130 | 139.2644 139.9874 Ab
131 | 139.9874 140.6638 Db
132 | 140.6638 141.3986 Ab
133 | 141.3986 142.0633 Db
134 | 142.0633 142.7864 Ab
135 | 142.7864 148.1758 N
136 |
--------------------------------------------------------------------------------
/tests/data/chord/est06.lab:
--------------------------------------------------------------------------------
1 | 0.000000 0.024036 N
2 | 0.024036 2.164082 D:min7
3 | 2.164082 3.844082 F:maj
4 | 3.844082 5.708027 C:maj
5 | 5.708027 7.888073 G:maj
6 | 7.888073 9.316009 D:min
7 | 9.316009 11.464036 G:maj
8 | 11.464036 15.300045 C:maj
9 | 15.300045 16.976054 D:min
10 | 16.976054 18.888073 G:maj
11 | 18.888073 19.852063 C:maj
12 | 19.852063 20.324082 F:maj
13 | 20.324082 23.192018 C:maj
14 | 23.192018 24.628027 D:min
15 | 24.628027 27.028027 G:7
16 | 27.028027 30.636009 C:maj
17 | 30.636009 32.540045 D:min
18 | 32.540045 34.452063 Bb:maj
19 | 34.452063 34.680000 F:maj
20 | 34.680000 37.544036 G:maj
21 | 37.544036 40.176054 D:min7
22 | 40.176054 42.132063 F:maj
23 | 42.132063 43.788027 C:maj
24 | 43.788027 45.440000 G:maj
25 | 45.440000 46.228027 C:maj
26 | 46.228027 47.840000 D:min7
27 | 47.840000 49.760000 F:maj7
28 | 49.760000 51.184036 C:maj
29 | 51.184036 51.660045 D:min7
30 | 51.660045 53.796009 G:maj
31 | 53.796009 55.488073 D:min7
32 | 55.488073 57.408073 F:maj7
33 | 57.408073 57.656054 D:min7
34 | 57.656054 59.328073 C:maj
35 | 59.328073 60.980045 G:maj
36 | 60.980045 63.236009 D:min7
37 | 63.236009 65.048073 Bb:maj
38 | 65.048073 65.284082 F:maj
39 | 65.284082 68.904036 G:maj
40 | 68.904036 70.796009 D:min7
41 | 70.796009 72.956009 G:maj
42 | 72.956009 76.808073 C:maj
43 | 76.808073 78.496054 D:min
44 | 78.496054 80.416054 G:maj
45 | 80.416054 84.432018 C:maj
46 | 84.432018 86.128073 D:min
47 | 86.128073 88.028027 G:maj
48 | 88.028027 92.136054 C:maj
49 | 92.136054 93.568073 D:min
50 | 93.568073 95.684082 Bb:maj
51 | 95.684082 99.508027 G:maj
52 | 99.508027 99.740045 C:maj
53 | 99.740045 101.400000 D:min7
54 | 101.400000 103.320000 F:maj7
55 | 103.320000 105.216054 C:maj
56 | 105.216054 107.364082 G:maj
57 | 107.364082 108.808073 D:min
58 | 108.808073 110.932063 F:maj7
59 | 110.932063 112.396009 C:maj
60 | 112.396009 112.884082 D:min7
61 | 112.884082 114.500045 G:maj
62 | 114.500045 117.164082 D:min7
63 | 117.164082 118.092063 F:maj7
64 | 118.092063 118.564082 D:min7
65 | 118.564082 120.492063 C:maj
66 | 120.492063 122.616054 G:maj
67 | 122.616054 124.048073 D:min
68 | 124.048073 124.288073 C:maj
69 | 124.288073 126.480000 Bb:maj
70 | 126.480000 130.232018 G:maj
71 | 130.232018 131.676009 D:min
72 | 131.676009 134.060045 G:maj
73 | 134.060045 137.896054 C:maj
74 | 137.896054 139.332063 D:min
75 | 139.332063 141.476009 G:maj
76 | 141.476009 145.304036 C:maj
77 | 145.304036 147.228027 D:min7
78 | 147.228027 149.128073 G:maj
79 | 149.128073 149.844082 C:maj
80 | 149.844082 151.028027 A:min7
81 | 151.028027 152.488073 C:maj
82 | 152.488073 153.200000 A:min
83 | 153.200000 154.868027 D:min
84 | 154.868027 156.764082 Bb:maj
85 | 156.764082 160.364082 G:maj
86 | 160.364082 162.528073 D:min7
87 | 162.528073 164.416054 F:maj7
88 | 164.416054 165.852063 C:maj
89 | 165.852063 166.092063 D:min7
90 | 166.092063 167.764082 G:maj
91 | 167.764082 168.468027 C:maj
92 | 168.468027 170.132063 D:min7
93 | 170.132063 172.284082 F:maj7
94 | 172.284082 173.488073 C:maj
95 | 173.488073 173.716009 D:min
96 | 173.716009 176.084082 G:maj
97 | 176.084082 177.784036 D:min7
98 | 177.784036 179.748027 F:maj
99 | 179.748027 181.420045 C:maj
100 | 181.420045 183.276009 G:maj
101 | 183.276009 185.412063 D:min7
102 | 185.412063 187.544036 Bb:maj
103 | 187.544036 191.100045 G:maj
104 | 191.100045 191.348027 C:maj
105 | 191.348027 193.036009 D:min
106 | 193.036009 194.712018 Bb:maj
107 | 194.712018 204.848073 F:maj
108 | 204.848073 204.939320 N
109 |
--------------------------------------------------------------------------------
/tests/data/transcription/ref06.txt:
--------------------------------------------------------------------------------
1 | 0.63 0.77 185.00
2 | 0.66 0.96 587.33
3 | 0.66 5.74 185.00
4 | 0.74 3.04 493.88
5 | 0.86 1.01 207.65
6 | 0.92 1.15 622.25
7 | 1.11 1.24 246.94
8 | 1.13 1.39 932.33
9 | 1.36 1.48 185.00
10 | 1.36 1.65 830.61
11 | 1.58 1.72 207.65
12 | 1.64 1.86 659.26
13 | 1.80 1.93 246.94
14 | 1.88 2.06 622.25
15 | 2.04 2.19 185.00
16 | 2.06 2.43 587.33
17 | 2.26 2.38 207.65
18 | 2.39 2.79 622.25
19 | 2.48 2.61 246.94
20 | 2.73 2.86 185.00
21 | 2.76 3.10 415.30
22 | 2.95 3.07 207.65
23 | 3.05 3.39 369.99
24 | 3.07 3.32 369.99
25 | 3.21 3.32 246.94
26 | 3.29 3.76 587.33
27 | 3.43 3.55 185.00
28 | 3.64 3.74 207.65
29 | 3.72 3.89 622.25
30 | 3.84 3.98 246.94
31 | 3.90 4.12 987.77
32 | 4.05 4.19 185.00
33 | 4.10 4.33 932.33
34 | 4.27 4.39 207.65
35 | 4.32 4.54 830.61
36 | 4.49 4.60 246.94
37 | 4.50 4.69 622.25
38 | 4.72 4.86 185.00
39 | 4.72 5.05 587.33
40 | 4.92 5.04 207.65
41 | 5.02 5.41 622.25
42 | 5.14 5.25 246.94
43 | 5.36 5.49 185.00
44 | 5.38 5.71 415.30
45 | 5.55 5.67 207.65
46 | 5.67 6.07 369.99
47 | 5.76 5.98 369.99
48 | 5.77 5.89 246.94
49 | 5.94 6.12 622.25
50 | 6.00 6.14 103.83
51 | 6.01 6.11 311.13
52 | 6.11 6.28 659.26
53 | 6.26 6.40 415.30
54 | 6.27 6.41 116.54
55 | 6.34 6.56 659.26
56 | 6.51 6.64 622.25
57 | 6.51 6.63 138.59
58 | 6.56 6.72 622.25
59 | 6.73 6.94 622.25
60 | 6.73 6.94 739.99
61 | 6.73 6.86 103.83
62 | 6.74 6.85 554.37
63 | 6.94 7.09 493.88
64 | 6.94 7.08 116.54
65 | 7.00 7.28 739.99
66 | 7.00 7.28 622.25
67 | 7.18 7.29 466.16
68 | 7.19 7.32 138.59
69 | 7.32 7.72 659.26
70 | 7.33 7.71 554.37
71 | 7.42 7.55 103.83
72 | 7.43 7.57 311.13
73 | 7.64 7.74 116.54
74 | 7.68 7.83 466.16
75 | 7.69 8.37 622.25
76 | 7.86 8.00 138.59
77 | 7.95 8.12 277.18
78 | 8.07 8.19 103.83
79 | 8.28 8.39 116.54
80 | 8.31 8.49 246.94
81 | 8.43 8.64 277.18
82 | 8.50 8.59 138.59
83 | 8.62 8.84 311.13
84 | 8.64 10.84 220.00
85 | 8.69 8.81 98.00
86 | 8.78 9.07 329.63
87 | 8.91 9.02 110.00
88 | 9.00 9.23 440.00
89 | 9.13 9.23 138.59
90 | 9.21 9.43 493.88
91 | 9.34 9.60 554.37
92 | 9.34 9.59 659.26
93 | 9.36 9.47 98.00
94 | 9.40 9.62 440.00
95 | 9.57 9.68 110.00
96 | 9.61 9.83 369.99
97 | 9.69 10.07 554.37
98 | 9.79 9.89 138.59
99 | 9.80 10.06 329.63
100 | 10.01 10.12 98.00
101 | 10.03 10.36 311.13
102 | 10.23 10.37 110.00
103 | 10.32 10.70 329.63
104 | 10.44 10.55 138.59
105 | 10.62 10.80 87.31
106 | 10.66 11.01 246.94
107 | 10.84 10.95 110.00
108 | 10.97 11.33 220.00
109 | 11.06 11.18 155.56
110 | 11.19 11.31 220.00
111 | 11.26 11.39 92.50
112 | 11.27 11.44 246.94
113 | 11.29 12.21 185.00
114 | 11.29 12.45 246.94
115 | 11.38 11.63 311.13
116 | 11.45 11.58 103.83
117 | 11.61 11.81 369.99
118 | 11.68 11.79 123.47
119 | 11.78 12.04 554.37
120 | 11.88 12.02 92.50
121 | 12.01 12.22 493.88
122 | 12.08 12.21 103.83
123 | 12.20 12.44 415.30
124 | 12.21 12.44 311.13
125 | 12.28 12.40 123.47
126 | 12.41 12.63 369.99
127 | 12.48 13.18 311.13
128 | 12.52 13.14 311.13
129 | 12.56 13.23 185.00
130 | 12.61 12.81 311.13
131 | 12.78 12.99 369.99
132 | 12.99 13.24 659.26
133 | 13.14 13.88 349.23
134 | 13.20 14.01 103.83
135 | 13.25 13.50 622.25
136 | 13.25 13.39 138.59
137 | 13.45 13.68 466.16
138 | 13.47 13.61 174.61
139 | 13.68 13.82 246.94
140 | 13.68 13.94 415.30
141 | 13.85 14.76 277.18
142 | 13.92 14.08 138.59
143 | 13.94 14.23 349.23
144 | 13.97 14.79 116.54
145 | 14.12 14.24 164.81
146 | 14.28 14.67 369.99
147 | 14.40 14.54 233.08
148 | 14.66 15.13 311.13
149 | 14.66 14.79 138.59
150 | 14.72 15.49 311.13
151 | 14.74 15.44 92.50
152 | 14.93 15.06 164.81
153 | 15.10 15.67 233.08
154 | 15.26 15.40 233.08
155 |
--------------------------------------------------------------------------------
/tests/data/chord/ref07.lab:
--------------------------------------------------------------------------------
1 | 0.000 0.105 N
2 | 0.105 1.923 Eb:maj
3 | 1.923 3.826 Ab:maj/5
4 | 3.826 5.667 Bb:maj(4)/4
5 | 5.667 7.545 Ab:maj/5
6 | 7.545 9.467 Eb:maj
7 | 9.467 11.282 Ab:maj7
8 | 11.282 13.146 Bb:maj/3
9 | 13.146 14.858 G:min
10 | 14.858 16.658 C:min
11 | 16.658 18.458 C:min7/b7
12 | 18.458 20.274 C:min(6)/6
13 | 20.274 22.106 Ab:maj
14 | 22.106 23.906 Eb:maj/5
15 | 23.906 25.746 Bb:maj
16 | 25.746 27.482 G:maj/3
17 | 27.482 28.506 C:min
18 | 28.506 29.170 Bb:maj/3
19 | 29.170 30.970 Eb:maj
20 | 30.970 32.746 F:min7
21 | 32.746 34.522 Ab:maj
22 | 34.522 38.074 Bb:maj/3
23 | 38.074 39.882 Eb:maj
24 | 39.882 41.706 Ab:maj7
25 | 41.706 43.516 Bb:maj/3
26 | 43.516 45.346 G:min
27 | 45.346 47.139 C:min
28 | 47.139 48.907 C:min7/b7
29 | 48.907 50.762 C:min(6)/6
30 | 50.762 52.546 Ab:maj
31 | 52.546 54.330 Eb:maj/5
32 | 54.330 56.106 Bb:maj
33 | 56.106 57.819 G:maj/3
34 | 57.819 58.906 C:min
35 | 58.906 59.560 Bb:maj/3
36 | 59.560 61.386 Eb:maj
37 | 61.386 63.162 F:min7
38 | 63.162 64.938 Ab:maj
39 | 64.938 66.286 Eb:maj
40 | 66.286 67.650 Ab:maj/5
41 | 67.650 68.554 Eb:maj
42 | 68.554 70.382 Bb:maj/3
43 | 70.382 72.203 C:min
44 | 72.203 73.978 F:min7
45 | 73.978 75.762 Ab:maj
46 | 75.762 77.627 Bb:maj/3
47 | 77.627 79.379 C:min
48 | 79.379 81.197 F:min7
49 | 81.197 82.940 Ab:maj
50 | 82.940 84.685 C:min
51 | 84.685 86.540 C:min7/b7
52 | 86.540 88.346 C:min(6)/6
53 | 88.346 91.859 Ab:maj6
54 | 91.859 93.675 Eb:maj/3
55 | 93.675 95.411 Ab:maj6
56 | 95.411 97.187 Ab:maj
57 | 97.187 98.955 Bb:maj
58 | 98.955 99.818 Bb:sus4
59 | 99.818 100.707 Bb:maj
60 | 100.707 102.475 Eb:maj
61 | 102.475 104.233 Ab:maj/5
62 | 104.233 106.001 Bb:maj(4)/4
63 | 106.001 107.827 Ab:maj/5
64 | 107.827 109.643 Eb:maj
65 | 109.643 111.427 Ab:maj7
66 | 111.427 113.230 Bb:maj/3
67 | 113.230 115.065 G:min
68 | 115.065 116.880 C:min
69 | 116.880 118.726 C:min7/b7
70 | 118.726 120.518 C:min(6)/6
71 | 120.518 122.344 Ab:maj
72 | 122.344 124.134 Eb:maj/5
73 | 124.134 125.980 Bb:maj
74 | 125.980 127.751 G:maj/3
75 | 127.751 128.863 C:min
76 | 128.863 129.519 Bb:maj/3
77 | 129.519 131.326 Eb:maj
78 | 131.326 133.119 F:min7
79 | 133.119 134.958 Ab:maj
80 | 134.958 138.567 Bb:maj
81 | 138.567 140.400 Eb:maj
82 | 140.400 142.182 Ab:maj7
83 | 142.182 144.014 Bb:maj/3
84 | 144.014 145.774 G:min
85 | 145.774 147.582 C:min
86 | 147.582 149.383 C:min7/b7
87 | 149.383 151.187 C:min(6)/6
88 | 151.187 152.990 Ab:maj
89 | 152.990 154.758 Eb:maj/5
90 | 154.758 156.591 Bb:maj
91 | 156.591 158.382 G:maj/3
92 | 158.382 159.478 C:min
93 | 159.478 160.134 Bb:maj/3
94 | 160.134 161.958 Eb:maj
95 | 161.958 163.737 F:min7
96 | 163.737 165.454 Ab:maj
97 | 165.454 169.046 Eb:maj
98 | 169.046 170.854 Bb:maj/3
99 | 170.854 172.662 C:min
100 | 172.662 174.406 F:min7
101 | 174.406 176.247 Ab:maj
102 | 176.247 177.991 Bb:maj/3
103 | 177.991 179.830 C:min
104 | 179.830 181.606 F:min7
105 | 181.606 183.414 Ab:maj
106 | 183.414 185.118 C:min
107 | 185.118 186.998 C:min7/b7
108 | 186.998 188.774 C:min(6)/6
109 | 188.774 192.399 Ab:maj6
110 | 192.399 194.166 Eb:maj/3
111 | 194.166 195.862 Ab:maj6
112 | 195.862 197.590 Ab:maj
113 | 197.590 199.391 Bb:maj
114 | 199.391 200.290 Bb:sus4
115 | 200.290 201.142 Bb:maj
116 | 201.142 202.910 C:min
117 | 202.910 204.673 C:min7/b7
118 | 204.673 206.446 C:min(6)/6
119 | 206.446 210.046 Ab:maj6
120 | 210.046 211.774 Eb:maj/3
121 | 211.774 213.622 Ab:maj6
122 | 213.622 215.318 Ab:maj
123 | 215.318 217.130 Eb:maj
124 | 217.130 218.862 Ab:maj/5
125 | 218.862 220.671 Bb:maj(4)/4
126 | 220.671 222.850 Ab:maj/5
127 | 222.850 228.785 Eb:maj
128 | 228.785 245.000 N
129 |
--------------------------------------------------------------------------------
/tests/test_pattern.py:
--------------------------------------------------------------------------------
1 | """
2 | Some unit tests for the pattern discovery task.
3 | """
4 |
5 | import numpy as np
6 | import json
7 | import mir_eval
8 | import glob
9 | import pytest
10 |
11 | A_TOL = 1e-12
12 |
13 | # Path to the fixture files
14 | REF_GLOB = "data/pattern/ref*.txt"
15 | EST_GLOB = "data/pattern/est*.txt"
16 | SCORES_GLOB = "data/pattern/output*.json"
17 |
18 | ref_files = sorted(glob.glob(REF_GLOB))
19 | est_files = sorted(glob.glob(EST_GLOB))
20 | sco_files = sorted(glob.glob(SCORES_GLOB))
21 |
22 | assert len(ref_files) == len(est_files) == len(sco_files) > 0
23 |
24 | file_sets = list(zip(ref_files, est_files, sco_files))
25 |
26 |
27 | @pytest.fixture
28 | def pattern_data(request):
29 | ref_f, est_f, sco_f = request.param
30 | with open(sco_f) as f:
31 | expected_scores = json.load(f)
32 | reference_patterns = mir_eval.io.load_patterns(ref_f)
33 | estimated_patterns = mir_eval.io.load_patterns(est_f)
34 |
35 | return reference_patterns, estimated_patterns, expected_scores
36 |
37 |
38 | @pytest.mark.parametrize(
39 | "metric",
40 | [
41 | mir_eval.pattern.standard_FPR,
42 | mir_eval.pattern.establishment_FPR,
43 | mir_eval.pattern.occurrence_FPR,
44 | mir_eval.pattern.three_layer_FPR,
45 | mir_eval.pattern.first_n_three_layer_P,
46 | mir_eval.pattern.first_n_target_proportion_R,
47 | ],
48 | )
49 | def test_pattern_empty(metric):
50 | # First, test for a warning on empty pattern
51 | with pytest.warns(UserWarning, match="Reference patterns are empty"):
52 | metric([[[]]], [[[(100, 20)]]])
53 |
54 | with pytest.warns(UserWarning, match="Estimated patterns are empty"):
55 | metric([[[(100, 20)]]], [[[]]])
56 |
57 | with pytest.warns(UserWarning, match="patterns are empty"):
58 | # And that the metric is 0
59 | assert np.allclose(metric([[[]]], [[[]]]), 0)
60 |
61 |
62 | @pytest.mark.parametrize(
63 | "metric",
64 | [
65 | mir_eval.pattern.standard_FPR,
66 | mir_eval.pattern.establishment_FPR,
67 | mir_eval.pattern.occurrence_FPR,
68 | mir_eval.pattern.three_layer_FPR,
69 | mir_eval.pattern.first_n_three_layer_P,
70 | mir_eval.pattern.first_n_target_proportion_R,
71 | ],
72 | )
73 | @pytest.mark.parametrize(
74 | "patterns",
75 | [
76 | [[[(100, 20)]], []], # patterns must have at least one occurrence
77 | [[[(100, 20, 3)]]], # (onset, midi) tuple must contain 2 elements
78 | ],
79 | )
80 | @pytest.mark.xfail(raises=ValueError)
81 | def test_pattern_failure(metric, patterns):
82 | metric(patterns, patterns)
83 |
84 |
85 | @pytest.mark.parametrize(
86 | "metric",
87 | [
88 | mir_eval.pattern.standard_FPR,
89 | mir_eval.pattern.establishment_FPR,
90 | mir_eval.pattern.occurrence_FPR,
91 | mir_eval.pattern.three_layer_FPR,
92 | mir_eval.pattern.first_n_three_layer_P,
93 | mir_eval.pattern.first_n_target_proportion_R,
94 | ],
95 | )
96 | def test_pattern_perfect(metric):
97 | # Valid patterns which are the same produce a score of 1 for all metrics
98 | patterns = [[[(100, 20), (200, 30)]]]
99 | assert np.allclose(metric(patterns, patterns), 1)
100 |
101 |
102 | @pytest.mark.parametrize("pattern_data", file_sets, indirect=True)
103 | def test_pattern_functions(pattern_data):
104 | reference_patterns, estimated_patterns, expected_scores = pattern_data
105 | # Compute scores
106 | scores = mir_eval.pattern.evaluate(reference_patterns, estimated_patterns)
107 | # Compare them
108 | assert scores.keys() == expected_scores.keys()
109 | for metric in scores:
110 | assert np.allclose(scores[metric], expected_scores[metric], atol=A_TOL)
111 |
--------------------------------------------------------------------------------
/tests/data/transcription/est04.txt:
--------------------------------------------------------------------------------
1 | 1.98 2.37 523.25
2 | 2.28 2.40 392.00
3 | 2.52 2.91 329.63
4 | 2.77 2.88 392.00
5 | 3.00 3.53 659.26
6 | 3.03 3.19 523.25
7 | 3.51 4.00 783.99
8 | 3.54 3.91 329.63
9 | 4.00 4.53 493.88
10 | 4.51 4.74 349.23
11 | 4.75 5.37 523.25
12 | 4.88 5.07 587.33
13 | 5.28 5.39 392.00
14 | 5.51 5.93 329.63
15 | 6.00 6.11 880.00
16 | 6.02 6.18 523.25
17 | 6.25 6.46 440.00
18 | 6.51 6.76 349.23
19 | 6.77 6.99 440.00
20 | 7.00 7.51 783.99
21 | 7.02 7.13 523.25
22 | 7.30 7.39 392.00
23 | 7.49 7.97 1046.50
24 | 7.55 7.90 329.63
25 | 7.76 7.85 392.00
26 | 8.00 8.50 246.94
27 | 8.00 8.11 783.99
28 | 8.27 8.39 392.00
29 | 8.51 9.20 698.46
30 | 8.60 8.74 783.99
31 | 8.76 9.55 659.26
32 | 9.04 9.13 523.25
33 | 9.53 10.01 329.63
34 | 9.76 9.87 392.00
35 | 9.99 10.38 440.00
36 | 10.02 10.27 349.23
37 | 10.25 10.50 493.88
38 | 10.39 10.62 523.25
39 | 10.50 10.73 587.33
40 | 10.62 10.90 659.26
41 | 10.76 11.03 698.46
42 | 10.88 10.99 783.99
43 | 11.01 11.10 880.00
44 | 11.13 11.24 783.99
45 | 11.25 11.50 698.46
46 | 11.39 11.64 659.26
47 | 11.50 11.73 587.33
48 | 11.53 11.89 174.61
49 | 11.62 11.87 523.25
50 | 11.76 12.01 493.88
51 | 11.87 12.10 440.00
52 | 11.94 12.03 174.61
53 | 12.01 12.27 164.81
54 | 12.01 12.27 392.00
55 | 12.04 12.13 523.25
56 | 12.18 12.33 783.99
57 | 12.25 12.50 440.00
58 | 12.31 12.40 164.81
59 | 12.38 12.61 493.88
60 | 12.50 12.75 523.25
61 | 12.62 12.87 587.33
62 | 12.76 13.01 659.26
63 | 12.87 13.38 698.46
64 | 13.01 13.12 783.99
65 | 13.27 13.52 659.26
66 | 13.38 13.61 587.33
67 | 13.50 14.01 164.81
68 | 13.50 13.77 523.25
69 | 13.64 13.87 493.88
70 | 13.75 14.01 440.00
71 | 13.89 14.05 392.00
72 | 13.89 14.05 783.99
73 | 14.01 14.38 349.23
74 | 14.03 14.12 523.25
75 | 14.06 14.26 146.83
76 | 14.27 14.45 392.00
77 | 14.27 14.45 783.99
78 | 14.38 14.61 440.00
79 | 14.50 14.75 493.88
80 | 14.61 14.89 523.25
81 | 14.75 14.98 587.33
82 | 14.87 15.40 659.26
83 | 15.01 15.26 698.46
84 | 15.24 15.49 587.33
85 | 15.38 15.61 523.25
86 | 15.50 15.63 146.83
87 | 15.50 15.70 493.88
88 | 15.52 15.96 246.94
89 | 15.61 15.84 440.00
90 | 15.77 15.96 392.00
91 | 15.77 15.93 783.99
92 | 15.89 16.14 349.23
93 | 16.01 16.35 130.81
94 | 16.01 16.38 329.63
95 | 16.12 16.26 261.63
96 | 16.26 16.51 349.23
97 | 16.38 16.58 392.00
98 | 16.42 16.54 783.99
99 | 16.49 16.75 440.00
100 | 16.61 16.89 493.88
101 | 16.75 17.00 523.25
102 | 16.87 17.37 587.33
103 | 17.01 17.28 659.26
104 | 17.24 17.49 523.25
105 | 17.38 17.61 493.88
106 | 17.49 17.75 440.00
107 | 17.52 17.91 164.81
108 | 17.54 17.65 130.81
109 | 17.63 17.81 392.00
110 | 17.63 17.84 783.99
111 | 17.75 18.00 349.23
112 | 17.89 18.14 329.63
113 | 18.00 18.37 293.66
114 | 18.03 18.35 174.61
115 | 18.03 18.51 220.00
116 | 18.26 18.51 329.63
117 | 18.38 18.65 349.23
118 | 18.51 18.70 392.00
119 | 18.51 18.67 783.99
120 | 18.63 18.88 440.00
121 | 18.75 19.00 493.88
122 | 18.86 19.12 554.37
123 | 19.00 19.25 587.33
124 | 19.12 19.37 440.00
125 | 19.23 19.51 493.88
126 | 19.37 19.63 554.37
127 | 19.49 19.74 587.33
128 | 19.63 19.90 659.26
129 | 19.75 20.11 698.46
130 | 19.88 20.02 783.99
131 | 19.98 20.79 174.61
132 | 20.00 20.09 880.00
133 | 20.12 20.62 987.77
134 | 20.26 20.49 1046.50
135 | 20.51 20.62 880.00
136 | 20.63 20.74 783.99
137 | 20.74 21.14 196.00
138 | 20.74 21.27 698.46
139 | 20.88 21.09 659.26
140 | 21.00 21.79 220.00
141 | 21.14 21.23 783.99
142 | 21.25 21.37 880.00
143 | 21.37 21.48 783.99
144 | 21.51 21.76 698.46
145 | 21.63 21.90 659.26
146 | 21.74 22.20 185.00
147 | 21.74 21.99 587.33
148 | 21.88 22.25 523.25
149 | 22.00 24.59 98.00
150 | 22.00 22.23 493.88
151 | 22.11 22.57 123.47
152 | 22.25 22.41 146.83
153 | 22.25 22.37 185.00
154 | 22.25 22.60 783.99
155 | 22.32 22.55 440.00
156 | 22.51 22.78 659.26
157 | 22.62 23.11 130.81
158 | 22.74 23.20 164.81
159 | 22.74 23.09 523.25
160 | 23.00 23.29 587.33
161 | 23.04 23.27 293.66
162 | 23.14 23.57 123.47
163 | 23.25 23.60 146.83
164 | 23.25 23.43 783.99
165 | 23.39 23.53 196.00
166 | 23.39 23.50 440.00
167 | 23.51 23.76 659.26
168 | 23.65 23.88 130.81
169 | 23.74 24.25 164.81
170 | 23.74 24.08 523.25
171 | 23.90 24.04 196.00
172 | 23.95 24.04 130.81
173 | 23.99 24.29 587.33
174 | 24.11 24.48 293.66
175 | 24.51 24.90 493.88
176 | 24.51 24.80 587.33
177 | 24.51 24.59 783.99
178 | 24.53 24.99 196.00
179 | 24.99 25.45 783.99
180 | 25.02 25.52 98.00
181 | 25.02 25.36 392.00
182 |
--------------------------------------------------------------------------------
/tests/test_tempo.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | """
3 | Unit tests for mir_eval.tempo
4 | """
5 | import numpy as np
6 | import mir_eval
7 | import json
8 | import glob
9 | import pytest
10 |
11 |
12 | A_TOL = 1e-12
13 |
14 |
15 | REF_GLOB = "data/tempo/ref*.lab"
16 | EST_GLOB = "data/tempo/est*.lab"
17 | SCORES_GLOB = "data/tempo/output*.json"
18 |
19 | ref_files = sorted(glob.glob(REF_GLOB))
20 | est_files = sorted(glob.glob(EST_GLOB))
21 | sco_files = sorted(glob.glob(SCORES_GLOB))
22 |
23 | assert len(ref_files) == len(est_files) == len(sco_files) > 0
24 |
25 | file_sets = list(zip(ref_files, est_files, sco_files))
26 |
27 |
28 | @pytest.fixture
29 | def tempo_data(request):
30 | ref_f, est_f, sco_f = request.param
31 | with open(sco_f) as f:
32 | expected_scores = json.load(f)
33 |
34 | def _load_tempi(filename):
35 | values = mir_eval.io.load_delimited(filename, [float] * 3)
36 | return np.concatenate(values[:2]), values[-1][0]
37 |
38 | reference_tempi, ref_weight = _load_tempi(ref_f)
39 | estimated_tempi, _ = _load_tempi(est_f)
40 |
41 | return reference_tempi, ref_weight, estimated_tempi, expected_scores
42 |
43 |
44 | def test_zero_tolerance_pass():
45 | good_ref = np.array([60, 120])
46 | good_weight = 0.5
47 | good_est = np.array([120, 180])
48 | zero_tol = 0.0
49 |
50 | with pytest.warns(
51 | UserWarning, match="A tolerance of 0.0 may not lead to the results you expect"
52 | ):
53 | mir_eval.tempo.detection(good_ref, good_weight, good_est, tol=zero_tol)
54 |
55 |
56 | def test_tempo_pass():
57 | good_ref = np.array([60, 120])
58 | good_weight = 0.5
59 | good_est = np.array([120, 180])
60 | good_tol = 0.08
61 |
62 | for good_tempo in [np.array([50, 50]), np.array([0, 50]), np.array([50, 0])]:
63 | mir_eval.tempo.detection(good_tempo, good_weight, good_est, good_tol)
64 | mir_eval.tempo.detection(good_ref, good_weight, good_tempo, good_tol)
65 |
66 | # allow both estimates to be zero
67 | mir_eval.tempo.detection(good_ref, good_weight, np.array([0, 0]), good_tol)
68 |
69 |
70 | @pytest.mark.xfail(raises=ValueError)
71 | def test_tempo_zero_ref():
72 | # Both references cannot be zero
73 | mir_eval.tempo.detection(np.array([0.0, 0.0]), 0.5, np.array([60, 120]))
74 |
75 |
76 | @pytest.mark.xfail(raises=ValueError)
77 | @pytest.mark.parametrize("weight", [-1, 1.5])
78 | def test_tempo_weight_range(weight):
79 | # Weight needs to be in the range [0, 1]
80 | mir_eval.tempo.detection(np.array([60, 120]), weight, np.array([120, 180]))
81 |
82 |
83 | @pytest.mark.xfail(raises=ValueError)
84 | @pytest.mark.parametrize("tol", [-1, 1.5])
85 | def test_tempo_tol_range(tol):
86 | # Weight needs to be in the range [0, 1]
87 | mir_eval.tempo.detection(np.array([60, 120]), 0.5, np.array([120, 180]), tol=tol)
88 |
89 |
90 | @pytest.mark.xfail(raises=ValueError)
91 | @pytest.mark.parametrize(
92 | "bad_tempo",
93 | [
94 | np.array([-1, -1]),
95 | np.array([-1, 0]),
96 | np.array([-1, 50]),
97 | np.array([0, 1, 2]),
98 | np.array([0]),
99 | ],
100 | )
101 | def test_tempo_fail_bad_reftempo(bad_tempo):
102 | good_ref = np.array([60, 120])
103 | good_est = np.array([120, 180])
104 |
105 | mir_eval.tempo.detection(bad_tempo, 0.5, good_est, 0.08)
106 |
107 |
108 | @pytest.mark.xfail(raises=ValueError)
109 | @pytest.mark.parametrize(
110 | "bad_tempo",
111 | [
112 | np.array([-1, -1]),
113 | np.array([-1, 0]),
114 | np.array([-1, 50]),
115 | np.array([0, 1, 2]),
116 | np.array([0]),
117 | ],
118 | )
119 | def test_tempo_fail_bad_esttempo(bad_tempo):
120 | good_ref = np.array([60, 120])
121 | good_est = np.array([120, 180])
122 |
123 | mir_eval.tempo.detection(good_ref, 0.5, bad_tempo, 0.08)
124 |
125 |
126 | @pytest.mark.parametrize("tempo_data", file_sets, indirect=True)
127 | def test_tempo_regression(tempo_data):
128 | ref_tempi, ref_weight, est_tempi, expected_scores = tempo_data
129 |
130 | scores = mir_eval.tempo.evaluate(ref_tempi, ref_weight, est_tempi)
131 | assert scores.keys() == expected_scores.keys()
132 | for metric in scores:
133 | assert np.allclose(scores[metric], expected_scores[metric], atol=A_TOL)
134 |
--------------------------------------------------------------------------------
/tests/data/chord/est07.lab:
--------------------------------------------------------------------------------
1 | 0.000000 0.116009 N
2 | 0.116009 1.928073 D#:maj
3 | 1.928073 3.572063 Ab:maj
4 | 3.572063 5.692063 D#:maj
5 | 5.692063 7.572063 Ab:maj
6 | 7.572063 8.280000 D#:maj
7 | 8.280000 10.304036 F:min
8 | 10.304036 11.268027 Ab:maj7
9 | 11.268027 12.608073 D:min7
10 | 12.608073 14.840000 Bb:maj6
11 | 14.840000 16.628027 C:min
12 | 16.628027 16.880000 F:maj
13 | 16.880000 17.112018 D#:maj
14 | 17.112018 18.472018 C:min7
15 | 18.472018 18.920091 A:min7
16 | 18.920091 19.352018 C:min7
17 | 19.352018 20.308027 F:7
18 | 20.308027 21.156009 Ab:maj7
19 | 21.156009 22.044082 Ab:maj6
20 | 22.044082 23.912018 D#:maj
21 | 23.912018 26.120000 Bb:7
22 | 26.120000 27.432018 G:7
23 | 27.432018 28.500045 C:min
24 | 28.500045 29.196009 Bb:maj
25 | 29.196009 30.956009 D#:maj
26 | 30.956009 32.748027 F:min
27 | 32.748027 34.060045 Ab:maj
28 | 34.060045 34.488073 Ab:maj6
29 | 34.488073 35.136054 D:min7
30 | 35.136054 36.668027 Bb:maj
31 | 36.668027 38.036009 D:dim
32 | 38.036009 40.120000 D#:maj
33 | 40.120000 41.740045 Ab:maj7
34 | 41.740045 42.860045 D:min7
35 | 42.860045 43.528073 Bb:maj6
36 | 43.528073 45.084082 G:maj
37 | 45.084082 50.068027 C:min
38 | 50.068027 50.744036 F:maj
39 | 50.744036 51.208073 F:7
40 | 51.208073 51.860045 Ab:maj7
41 | 51.860045 52.608073 Ab:maj
42 | 52.608073 54.484082 D#:maj
43 | 54.484082 56.060045 Bb:maj
44 | 56.060045 57.796009 G:maj
45 | 57.796009 59.116009 C:min
46 | 59.116009 59.604082 Bb:maj
47 | 59.604082 61.368073 D#:maj
48 | 61.368073 62.480000 F:min
49 | 62.480000 64.040091 Ab:maj6
50 | 64.040091 64.956009 Ab:maj
51 | 64.956009 66.764082 D#:maj
52 | 66.764082 67.192018 Ab:maj
53 | 67.192018 68.816054 D#:maj
54 | 68.816054 70.580045 Bb:maj
55 | 70.580045 72.172063 C:min
56 | 72.172063 73.784036 Ab:maj6
57 | 73.784036 75.784036 Ab:maj
58 | 75.784036 77.628027 Bb:maj
59 | 77.628027 78.844082 C:min
60 | 78.844082 81.168073 F:min
61 | 81.168073 83.156009 Ab:maj
62 | 83.156009 86.328073 C:min
63 | 86.328073 88.312018 F:7
64 | 88.312018 91.664036 Ab:maj6
65 | 91.664036 91.860045 C#:maj
66 | 91.860045 93.656054 D#:maj
67 | 93.656054 97.360000 Ab:maj6
68 | 97.360000 98.924082 Bb:maj
69 | 98.924082 100.712018 Bb:7
70 | 100.712018 102.476009 D#:maj
71 | 102.476009 104.016054 Ab:maj
72 | 104.016054 106.016054 D#:maj
73 | 106.016054 107.596009 Ab:maj
74 | 107.596009 109.628027 D#:maj
75 | 109.628027 111.404082 Ab:maj7
76 | 111.404082 112.772063 Bb:maj
77 | 112.772063 115.064036 Bb:maj6
78 | 115.064036 116.172063 C:min
79 | 116.172063 116.872018 F:7
80 | 116.872018 118.712018 Bb:maj
81 | 118.712018 119.848073 A:min
82 | 119.848073 120.736054 F:7
83 | 120.736054 122.340045 Ab:maj6
84 | 122.340045 124.156009 D#:maj
85 | 124.156009 125.956009 Bb:maj
86 | 125.956009 127.740045 G:maj
87 | 127.740045 129.552018 C:min
88 | 129.552018 131.316009 D#:maj
89 | 131.316009 133.128073 Ab:maj6
90 | 133.128073 134.944036 Ab:maj
91 | 134.944036 138.556009 Bb:maj
92 | 138.556009 140.404082 D#:maj
93 | 140.404082 142.200000 Ab:maj
94 | 142.200000 143.760000 Bb:maj
95 | 143.760000 145.812063 G:min
96 | 145.812063 147.596009 C:min
97 | 147.596009 148.500045 Bb:maj
98 | 148.500045 150.492063 C:min7
99 | 150.492063 152.992018 Ab:maj6
100 | 152.992018 154.764082 D#:maj
101 | 154.764082 156.572063 Bb:maj
102 | 156.572063 158.344036 G:maj
103 | 158.344036 160.148027 C:min
104 | 160.148027 161.924082 D#:maj
105 | 161.924082 164.156009 Ab:maj6
106 | 164.156009 165.696054 Ab:maj
107 | 165.696054 169.060045 D#:maj
108 | 169.060045 170.872018 Bb:maj
109 | 170.872018 172.628027 C:min
110 | 172.628027 174.416054 F:min
111 | 174.416054 176.224036 Ab:maj
112 | 176.224036 177.988027 Bb:maj
113 | 177.988027 179.800091 C:min
114 | 179.800091 181.556009 F:min
115 | 181.556009 183.372063 Ab:maj
116 | 183.372063 185.108027 C:min
117 | 185.108027 186.968073 Bb:maj
118 | 186.968073 188.760000 A:min
119 | 188.760000 191.984036 Ab:maj6
120 | 191.984036 192.484082 Ab:maj
121 | 192.484082 193.996009 D#:maj
122 | 193.996009 195.904036 Ab:maj6
123 | 195.904036 197.632018 Ab:maj
124 | 197.632018 201.156009 Bb:maj
125 | 201.156009 202.964082 C:min
126 | 202.964082 204.688073 Bb:maj
127 | 204.688073 206.504036 F:maj
128 | 206.504036 210.008073 Ab:maj6
129 | 210.008073 211.820045 D#:maj
130 | 211.820045 212.916009 Ab:maj7
131 | 212.916009 214.804082 Ab:maj
132 | 214.804082 217.076009 D#:maj
133 | 217.076009 218.632018 Ab:maj
134 | 218.632018 220.660045 D#:maj
135 | 220.660045 222.760000 Ab:maj
136 | 222.760000 228.996009 D#:maj
137 | 228.996009 244.970522 N
138 |
--------------------------------------------------------------------------------