def test_download_partial(httpserver): data_home = "tests/resources/mir_datasets/maestro_download" if os.path.exists(data_home): shutil.rmtree(data_home) httpserver.serve_content( open("tests/resources/download/maestro-v2.0.0.json", "r").read()) remotes = { "all": download_utils.RemoteFileMetadata( filename="1-maestro-v2.0.0.json", url=httpserver.url, checksum=("d41d8cd98f00b204e9800998ecf8427e"), unpack_directories=["maestro-v2.0.0"], ), "midi": download_utils.RemoteFileMetadata( filename="2-maestro-v2.0.0.json", url=httpserver.url, checksum=("d41d8cd98f00b204e9800998ecf8427e"), unpack_directories=["maestro-v2.0.0"], ), "metadata": download_utils.RemoteFileMetadata( filename="3-maestro-v2.0.0.json", url=httpserver.url, checksum=("d41d8cd98f00b204e9800998ecf8427e"), ), } dataset = maestro.Dataset(data_home) dataset.remotes = remotes dataset.download(None, False, False) assert os.path.exists(os.path.join(data_home, "1-maestro-v2.0.0.json")) assert not os.path.exists(os.path.join(data_home, "2-maestro-v2.0.0.json")) assert not os.path.exists(os.path.join(data_home, "3-maestro-v2.0.0.json")) if os.path.exists(data_home): shutil.rmtree(data_home) dataset.download(["all", "midi"], False, False) assert os.path.exists(os.path.join(data_home, "1-maestro-v2.0.0.json")) assert not os.path.exists(os.path.join(data_home, "2-maestro-v2.0.0.json")) assert not os.path.exists(os.path.join(data_home, "3-maestro-v2.0.0.json")) if os.path.exists(data_home): shutil.rmtree(data_home) dataset.download(["metadata", "midi"], False, False) assert not os.path.exists(os.path.join(data_home, "1-maestro-v2.0.0.json")) assert os.path.exists(os.path.join(data_home, "2-maestro-v2.0.0.json")) assert not os.path.exists(os.path.join(data_home, "3-maestro-v2.0.0.json")) if os.path.exists(data_home): shutil.rmtree(data_home) dataset.download(["metadata"], False, False) assert not os.path.exists(os.path.join(data_home, "1-maestro-v2.0.0.json")) assert not os.path.exists(os.path.join(data_home, "2-maestro-v2.0.0.json")) assert os.path.exists(os.path.join(data_home, "3-maestro-v2.0.0.json"))
def test_download_partial(httpserver): data_home = 'tests/resources/mir_datasets/MAESTRO_download' if os.path.exists(data_home): shutil.rmtree(data_home) httpserver.serve_content( open('tests/resources/download/maestro-v2.0.0.json', 'r').read()) maestro.REMOTES = { 'all': download_utils.RemoteFileMetadata( filename='1-maestro-v2.0.0.json', url=httpserver.url, checksum=('d41d8cd98f00b204e9800998ecf8427e'), destination_dir=None, ), 'midi': download_utils.RemoteFileMetadata( filename='2-maestro-v2.0.0.json', url=httpserver.url, checksum=('d41d8cd98f00b204e9800998ecf8427e'), destination_dir=None, ), 'metadata': download_utils.RemoteFileMetadata( filename='3-maestro-v2.0.0.json', url=httpserver.url, checksum=('d41d8cd98f00b204e9800998ecf8427e'), destination_dir='maestro-v2.0.0', ), } maestro.download(data_home=data_home, partial_download=None) assert os.path.exists(os.path.join(data_home, '1-maestro-v2.0.0.json')) assert not os.path.exists(os.path.join(data_home, '2-maestro-v2.0.0.json')) assert not os.path.exists(os.path.join(data_home, '3-maestro-v2.0.0.json')) if os.path.exists(data_home): shutil.rmtree(data_home) maestro.download(data_home=data_home, partial_download=['all', 'midi']) assert os.path.exists(os.path.join(data_home, '1-maestro-v2.0.0.json')) assert not os.path.exists(os.path.join(data_home, '2-maestro-v2.0.0.json')) assert not os.path.exists(os.path.join(data_home, '3-maestro-v2.0.0.json')) if os.path.exists(data_home): shutil.rmtree(data_home) maestro.download(data_home=data_home, partial_download=['metadata', 'midi']) assert not os.path.exists(os.path.join(data_home, '1-maestro-v2.0.0.json')) assert os.path.exists(os.path.join(data_home, '2-maestro-v2.0.0.json')) assert not os.path.exists(os.path.join(data_home, '3-maestro-v2.0.0.json')) if os.path.exists(data_home): shutil.rmtree(data_home) maestro.download(data_home=data_home, partial_download=['metadata']) assert not os.path.exists(os.path.join(data_home, '1-maestro-v2.0.0.json')) assert not os.path.exists(os.path.join(data_home, '2-maestro-v2.0.0.json')) assert os.path.exists(os.path.join(data_home, '3-maestro-v2.0.0.json'))
def test_download(httpserver): data_home = 'tests/resources/mir_datasets/Groove-MIDI_download' if os.path.exists(data_home): shutil.rmtree(data_home) httpserver.serve_content( open('tests/resources/download/groove-v1-0.0.zip', 'rb').read() ) groove_midi.REMOTES = { 'all': download_utils.RemoteFileMetadata( filename='groove-v1-0.0.zip', url=httpserver.url, checksum=('97a9a888d2a65cc87bb26e74df08b011'), destination_dir=None, ) } groove_midi.download(data_home=data_home) assert os.path.exists(data_home) assert not os.path.exists(os.path.join(data_home, 'groove')) assert os.path.exists(os.path.join(data_home, "info.csv")) track = groove_midi.Track('drummer1/eval_session/1', data_home=data_home) assert os.path.exists(track.midi_path) assert os.path.exists(track.audio_path) if os.path.exists(data_home): shutil.rmtree(data_home)
def test_downloader_with_server_tar(httpserver): httpserver.serve_content(open("tests/resources/remote.tar.gz", "rb").read()) TEST_REMOTE = download_utils.RemoteFileMetadata( filename="remote.tar.gz", url=httpserver.url, checksum=("9042f5eebdcd0b94aa7a3c9bf12dc51d"), ) save_dir = "tests/resources/_tmp_test_download_utils" _clean(save_dir) download_utils.downloader(save_dir, remotes={"b": TEST_REMOTE}) # test downloading twice download_utils.downloader(save_dir, remotes={"b": TEST_REMOTE}) _clean(save_dir) download_utils.downloader(save_dir, remotes={"b": TEST_REMOTE}, cleanup=True) # test downloading twice download_utils.downloader(save_dir, remotes={"b": TEST_REMOTE}) _clean(save_dir) download_utils.downloader(save_dir, remotes={"b": TEST_REMOTE}) # test downloading twice download_utils.downloader( save_dir, remotes={"b": TEST_REMOTE}, force_overwrite=True ) _clean(save_dir)
def test_download(httpserver): data_home = "tests/resources/mir_datasets/groove_midi_download" if os.path.exists(data_home): shutil.rmtree(data_home) httpserver.serve_content( open("tests/resources/download/groove-v1-0.0.zip", "rb").read()) remotes = { "all": download_utils.RemoteFileMetadata( filename="groove-v1-0.0.zip", url=httpserver.url, checksum=("97a9a888d2a65cc87bb26e74df08b011"), destination_dir=None, ) } groove_midi._download(data_home, remotes, None, None, False, False) assert os.path.exists(data_home) assert not os.path.exists(os.path.join(data_home, "groove")) assert os.path.exists(os.path.join(data_home, "info.csv")) track = groove_midi.Track("drummer1/eval_session/1", data_home=data_home) assert os.path.exists(track.midi_path) assert os.path.exists(track.audio_path) if os.path.exists(data_home): shutil.rmtree(data_home)
def test_download(httpserver): data_home = "tests/resources/mir_datasets/orchset_download" if os.path.exists(data_home): shutil.rmtree(data_home) httpserver.serve_content( open("tests/resources/download/Orchset_dataset_0.zip", "rb").read()) remotes = { "all": download_utils.RemoteFileMetadata( filename="Orchset_dataset_0.zip", url=httpserver.url, checksum=("4794bc3514f7e8d1727f0d975d6d1ee2"), destination_dir=None, ) } orchset._download(data_home, remotes, None, None, False, True) assert os.path.exists(data_home) assert not os.path.exists(os.path.join(data_home, "Orchset")) assert os.path.exists(os.path.join(data_home, "README.txt")) assert os.path.exists( os.path.join(data_home, "Orchset - Predominant Melodic Instruments.csv")) track = orchset.Track("Beethoven-S3-I-ex1", data_home=data_home) assert os.path.exists(track.audio_path_mono) assert os.path.exists(track.audio_path_stereo) assert os.path.exists(track.melody_path) if os.path.exists(data_home): shutil.rmtree(data_home)
def test_downloader_with_server_file(httpserver): httpserver.serve_content(open("tests/resources/remote.wav").read()) TEST_REMOTE = download_utils.RemoteFileMetadata( filename="remote.wav", url=httpserver.url, checksum=("3f77d0d69dc41b3696f074ad6bf2852f"), ) save_dir = "tests/resources/tmp_download_test" _clean(save_dir) download_utils.downloader(save_dir, remotes={"b": TEST_REMOTE}) # test downloading twice download_utils.downloader(save_dir, remotes={"b": TEST_REMOTE}) _clean(save_dir) download_utils.downloader(save_dir, remotes={"b": TEST_REMOTE}, cleanup=True) # test downloading twice download_utils.downloader(save_dir, remotes={"b": TEST_REMOTE}) _clean(save_dir) download_utils.downloader(save_dir, remotes={"b": TEST_REMOTE}) # test downloading twice download_utils.downloader( save_dir, remotes={"b": TEST_REMOTE}, force_overwrite=True ) _clean(save_dir)
def test_download(httpserver): data_home = "tests/resources/mir_datasets/orchset_download" if os.path.exists(data_home): shutil.rmtree(data_home) httpserver.serve_content( open("tests/resources/download/Orchset_dataset_0.zip", "rb").read() ) remotes = { "all": download_utils.RemoteFileMetadata( filename="Orchset_dataset_0.zip", url=httpserver.url, checksum=("4794bc3514f7e8d1727f0d975d6d1ee2"), unpack_directories=["Orchset"], ) } dataset = orchset.Dataset(data_home) dataset.remotes = remotes dataset.download(None, False, False) assert os.path.exists(data_home) assert not os.path.exists(os.path.join(data_home, "Orchset")) assert os.path.exists(os.path.join(data_home, "README.txt")) assert os.path.exists( os.path.join(data_home, "Orchset - Predominant Melodic Instruments.csv") ) track = dataset.track("Beethoven-S3-I-ex1") assert os.path.exists(track.audio_path_mono) assert os.path.exists(track.audio_path_stereo) assert os.path.exists(track.melody_path) # test downloading again dataset.download(None, False, False) if os.path.exists(data_home): shutil.rmtree(data_home) # test downloading twice with cleanup dataset.download(None, False, True) dataset.download(None, False, False) if os.path.exists(data_home): shutil.rmtree(data_home) # test downloading twice with force overwrite dataset.download(None, False, False) dataset.download(None, True, False) if os.path.exists(data_home): shutil.rmtree(data_home) # test downloading twice with force overwrite and cleanup dataset.download(None, False, True) dataset.download(None, True, False) if os.path.exists(data_home): shutil.rmtree(data_home)
def test_download(httpserver): data_home = "tests/resources/mir_datasets/groove_midi_download" if os.path.exists(data_home): shutil.rmtree(data_home) httpserver.serve_content( open("tests/resources/download/groove-v1-0.0.zip", "rb").read()) remotes = { "all": download_utils.RemoteFileMetadata( filename="groove-v1-0.0.zip", url=httpserver.url, checksum=("97a9a888d2a65cc87bb26e74df08b011"), unpack_directories=["groove"], ) } dataset = groove_midi.Dataset(data_home) dataset.remotes = remotes dataset.download(None, False, False) assert os.path.exists(data_home) assert not os.path.exists(os.path.join(data_home, "groove")) assert os.path.exists(os.path.join(data_home, "info.csv")) track = dataset.track("drummer1/eval_session/1") assert os.path.exists(track.midi_path) assert os.path.exists(track.audio_path) # test downloading again dataset.download(None, False, False) if os.path.exists(data_home): shutil.rmtree(data_home) # test downloading twice with cleanup dataset.download(None, False, True) dataset.download(None, False, False) if os.path.exists(data_home): shutil.rmtree(data_home) # test downloading twice with force overwrite dataset.download(None, False, False) dataset.download(None, True, False) if os.path.exists(data_home): shutil.rmtree(data_home) # test downloading twice with force overwrite and cleanup dataset.download(None, False, True) dataset.download(None, True, False) if os.path.exists(data_home): shutil.rmtree(data_home)
def test_download_from_remote_raises_IOError(httpserver, tmpdir): httpserver.serve_content("File not found!", 404) TEST_REMOTE = download_utils.RemoteFileMetadata( filename="remote.wav", url=httpserver.url, checksum=("1234"), ) with pytest.raises(IOError): download_utils.download_from_remote(TEST_REMOTE, str(tmpdir), False)
def test_download_from_remote(httpserver, tmpdir): httpserver.serve_content(open("tests/resources/remote.wav").read()) TEST_REMOTE = download_utils.RemoteFileMetadata( filename="remote.wav", url=httpserver.url, checksum=("3f77d0d69dc41b3696f074ad6bf2852f"), ) download_path = download_utils.download_from_remote(TEST_REMOTE, str(tmpdir), False)
def test_download_from_remote_raises_IOError(httpserver, tmpdir): httpserver.serve_content('File not found!', 404) TEST_REMOTE = download_utils.RemoteFileMetadata( filename='remote.wav', url=httpserver.url, checksum=('1234'), destination_dir=None, ) with pytest.raises(IOError): download_utils.download_from_remote(TEST_REMOTE, str(tmpdir))
def test_download_from_remote_destdir(httpserver, tmpdir): httpserver.serve_content(open("tests/resources/remote.wav").read()) TEST_REMOTE = download_utils.RemoteFileMetadata( filename="remote.wav", url=httpserver.url, checksum=("3f77d0d69dc41b3696f074ad6bf2852f"), destination_dir="subfolder", ) download_path = download_utils.download_from_remote(TEST_REMOTE, str(tmpdir), False) expected_download_path = os.path.join(str(tmpdir), "subfolder", "remote.wav") assert expected_download_path == download_path
def test_download_from_remote_destdir(httpserver, tmpdir): httpserver.serve_content(open('tests/resources/remote.wav').read()) TEST_REMOTE = download_utils.RemoteFileMetadata( filename='remote.wav', url=httpserver.url, checksum=('3f77d0d69dc41b3696f074ad6bf2852f'), destination_dir='subfolder', ) download_path = download_utils.download_from_remote(TEST_REMOTE, str(tmpdir)) expected_download_path = os.path.join(str(tmpdir), 'subfolder', 'remote.wav') assert expected_download_path == download_path
def create_remote_index(httpserver, dataset_name): httpserver.serve_content( open(REMOTE_DATASETS[dataset_name]["local_index"], "rb").read()) remote_index = { "index": download_utils.RemoteFileMetadata( filename=REMOTE_DATASETS[dataset_name]["remote_filename"], url=httpserver.url, checksum=REMOTE_DATASETS[dataset_name]["remote_checksum"], destination_dir="", ) } data_remote = core.LargeData(REMOTE_DATASETS[dataset_name]["filename"], remote_index=remote_index) return data_remote.index
def test_remote_index(): REMOTE_INDEX = { "remote_index": download_utils.RemoteFileMetadata( filename="acousticbrainz_genre_dataset_little_test.json", url= "https://zenodo.org/record/4274551/files/acousticbrainz_genre_dataset_little_test.json?download=1", checksum="7f256c49438022ab493c88f5a1b43e88", # the md5 checksum destination_dir= ".", # relative path for where to unzip the data, or None ), } DATA = LargeData("acousticbrainz_genre_dataset_little_test.json", remote_index=REMOTE_INDEX) with open("tests/indexes/acousticbrainz_genre_dataset_little_test.json" ) as f: little_index = json.load(f) assert DATA.index == little_index['tracks']
def test_downloader_with_server_zip(httpserver): httpserver.serve_content(open("tests/resources/remote.zip", "rb").read()) TEST_REMOTE = download_utils.RemoteFileMetadata( filename="remote.zip", url=httpserver.url, checksum=("7a31ccfa28bfa3fb112d16c96e9d9a89"), destination_dir=None, ) save_dir = "tests/resources/_tmp_test_download_utils" _clean(save_dir) download_utils.downloader(save_dir, remotes={"b": TEST_REMOTE}) # test downloading twice download_utils.downloader(save_dir, remotes={"b": TEST_REMOTE}) _clean(save_dir) download_utils.downloader(save_dir, remotes={"b": TEST_REMOTE}, cleanup=True) # test downloading twice download_utils.downloader(save_dir, remotes={"b": TEST_REMOTE}) _clean(save_dir) download_utils.downloader(save_dir, remotes={"b": TEST_REMOTE}) # test downloading twice download_utils.downloader(save_dir, remotes={"b": TEST_REMOTE}, force_overwrite=True) _clean(save_dir) download_utils.downloader(save_dir, remotes={"b": TEST_REMOTE}, cleanup=True) # test downloading twice download_utils.downloader(save_dir, remotes={"b": TEST_REMOTE}, force_overwrite=True) _clean(save_dir)
def test_remote_index(httpserver): httpserver.serve_content( open( "tests/resources/download/acousticbrainz_genre_dataset_little_test.json", "rb", ).read()) REMOTE_INDEX = { "remote_index": download_utils.RemoteFileMetadata( filename="acousticbrainz_genre_dataset_little_test.json", url=httpserver.url, checksum="50cf34e2e40e3df4c1cd582d08fa4506", # the md5 checksum destination_dir= ".", # relative path for where to unzip the data, or None ) } DATA = LargeData("acousticbrainz_genre_dataset_little_test.json", remote_index=REMOTE_INDEX) ind = DATA.index assert len(ind["tracks"]) == 16 os.remove( "mirdata/datasets/indexes/acousticbrainz_genre_dataset_little_test.json" )
from __future__ import print_function import csv import librosa import logging import os import mirdata.track as track import mirdata.utils as utils import mirdata.download_utils as download_utils import mirdata.jams_utils as jams_utils DATASET_DIR = "TinySOL" AUDIO_REMOTE = download_utils.RemoteFileMetadata( filename="TinySOL.tar.gz", url="https://zenodo.org/record/3685367/files/TinySOL.tar.gz?download=1", checksum="36030a7fe389da86c3419e5ee48e3b7f", destination_dir="audio", ) ANNOTATION_REMOTE = download_utils.RemoteFileMetadata( filename="TinySOL_metadata.csv", url= "https://zenodo.org/record/3685367/files/TinySOL_metadata.csv?download=1", checksum="a86c9bb115f69e61f2f25872e397fc4a", destination_dir="annotation", ) STRING_ROMAN_NUMERALS = {1: "I", 2: "II", 3: "III", 4: "IV"} def _load_metadata(data_home): metadata_path = os.path.join(data_home, "annotation", "TinySOL_metadata.csv")
author={Hendrik Schreiber and Meinard M{\"u}ller}, title={A Crowdsourced Experiment for Tempo Estimation of Electronic Dance Music}, booktitle={Proceedings of the International Conference on Music Information Retrieval ({ISMIR})}, address={Paris, France}, year={2018}, url-pdf={http://www.tagtraum.com/download/2018_schreiber_tempo_giantsteps.pdf}, }""" DATA = utils.LargeData("giantsteps_tempo_index.json") REMOTES = { "annotations": download_utils.RemoteFileMetadata( filename= "giantsteps-tempo-dataset-0b7d47ba8cae59d3535a02e3db69e2cf6d0af5bb.zip", url= "https://github.com/GiantSteps/giantsteps-tempo-dataset/archive/0b7d47ba8cae59d3535a02e3db69e2cf6d0af5bb.zip", checksum="8fdafbaf505fe3f293bd912c92b72ac8", destination_dir="", ) } DOWNLOAD_INFO = """ Unfortunately the audio files of the Giant Steps Tempo dataset are not available for download. If you have the Giant Steps audio dataset, place the contents into a folder called GiantSteps_tempo with the following structure: > GiantSteps_tempo/ > giantsteps-tempo-dataset-0b7d47ba8cae59d3535a02e3db69e2cf6d0af5bb/ > audio/ and copy the folder to {} """
title = {{otmm_makam_recognition_dataset: Ottoman-Turkish Makam Music Makam Recognition Dataset}}, month = jul, year = 2016, publisher = {Zenodo}, version = {dlfm2016}, doi = {10.5281/zenodo.58413}, url = {https://doi.org/10.5281/zenodo.58413} } """ REMOTES = { "all": download_utils.RemoteFileMetadata( filename="otmm_makam_recognition_dataset-dlfm2016.zip", url= "https://zenodo.org/record/58413/files/otmm_makam_recognition_dataset-dlfm2016.zip?download=1", checksum="c2b9c8bdcbdcf15745b245adfc793145", ) } LICENSE_INFO = ( "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License" ) class Track(core.Track): """OTMM Makam Track class Args: track_id (str): track id of the track data_home (str): Local path where the dataset is stored. default=None
"""RWC Classical Dataset Loader """ import csv import librosa import logging import numpy as np import os import mirdata.utils as utils import mirdata.download_utils as download_utils INDEX = utils.load_json_index('rwc_classical_index.json') METADATA = None METADATA_REMOTE = download_utils.RemoteFileMetadata( filename='rwc-c.csv', url='https://github.com/magdalenafuentes/metadata/archive/master.zip', checksum='7dbe87fedbaaa1f348625a2af1d78030', destination_dir=None, ) DATASET_DIR = 'RWC-Classical' ANNOTATIONS_REMOTE_1 = download_utils.RemoteFileMetadata( filename='AIST.RWC-MDB-C-2001.BEAT.zip', url='https://staff.aist.go.jp/m.goto/RWC-MDB/AIST-Annotation/AIST.RWC-MDB-C-2001.BEAT.zip', checksum='e8ee05854833cbf5eb7280663f71c29b', destination_dir='annotations', ) ANNOTATIONS_REMOTE_2 = download_utils.RemoteFileMetadata( filename='AIST.RWC-MDB-C-2001.CHORUS.zip', url='https://staff.aist.go.jp/m.goto/RWC-MDB/AIST-Annotation/AIST.RWC-MDB-C-2001.CHORUS.zip', checksum='f77bd527510376f59f5a2eed8fd7feb3', destination_dir='annotations', )
journal = {Transactions of the International Society for Music Information Retrieval ({TISMIR})}, volume = {3}, number = {1}, year = {2020}, pages = {98--110}, publisher = {Ubiquity Press}, doi = {10.5334/tismir.48}, url = {http://doi.org/10.5334/tismir.48}, url-demo = {https://www.audiolabs-erlangen.de/resources/MIR/2020-DagstuhlChoirSet} } """ REMOTES = { "full_dataset": download_utils.RemoteFileMetadata( filename="DagstuhlChoirSet_V1.2.3.zip", url="https://zenodo.org/record/4618287/files/DagstuhlChoirSet_V1.2.3.zip?download=1", checksum="82b95faa634d0c9fc05c81e0868f0217", unpack_directories=["DagstuhlChoirSet_V1.2.3"], ), } LICENSE_INFO = """ Creative Commons Attribution 4.0 International """ class Track(core.Track): """Dagstuhl ChoirSet Track class Args: track_id (str): track id of the track
import csv import librosa import logging import os import mirdata.track as track import mirdata.utils as utils import mirdata.download_utils as download_utils import mirdata.jams_utils as jams_utils DATASET_DIR = "Medley-solos-DB" ANNOTATION_REMOTE = download_utils.RemoteFileMetadata( filename="Medley-solos-DB_metadata.csv", url= "https://zenodo.org/record/3464194/files/Medley-solos-DB_metadata.csv?download=1", checksum="fda6a589c56785f2195c9227809c521a", destination_dir="annotation", ) AUDIO_REMOTE = download_utils.RemoteFileMetadata( filename="Medley-solos-DB.tar.gz", url= "https://zenodo.org/record/3464194/files/Medley-solos-DB.tar.gz?download=1", checksum="f5facf398793ef5c1f80c013afdf3e5f", destination_dir="audio", ) def _load_metadata(data_home): metadata_path = os.path.join(data_home, "annotation", "Medley-solos-DB_metadata.csv")
series={ISMIR}, note={Cite this if using chord annotations}, } @inproceedings{mauch2011timbre, title={Timbre and Melody Features for the Recognition of Vocal Activity and Instrumental Solos in Polyphonic Music.}, author={Mauch, Matthias and Fujihara, Hiromasa and Yoshii, Kazuyoshi and Goto, Masataka}, booktitle={ISMIR}, year={2011}, series={ISMIR}, note={Cite this if using vocal-instrumental activity annotations}, }""" REMOTES = { "metadata": download_utils.RemoteFileMetadata( filename="master.zip", url="https://github.com/magdalenafuentes/metadata/archive/master.zip", checksum="7dbe87fedbaaa1f348625a2af1d78030", destination_dir="", ), "annotations_beat": download_utils.RemoteFileMetadata( filename="AIST.RWC-MDB-P-2001.BEAT.zip", url= "https://staff.aist.go.jp/m.goto/RWC-MDB/AIST-Annotation/AIST.RWC-MDB-P-2001.BEAT.zip", checksum="3858aa989535bd7196b3cd07b512b5b6", destination_dir="annotations", ), "annotations_sections": download_utils.RemoteFileMetadata( filename="AIST.RWC-MDB-P-2001.CHORUS.zip", url= "https://staff.aist.go.jp/m.goto/RWC-MDB/AIST-Annotation/AIST.RWC-MDB-P-2001.CHORUS.zip",
title = {Tonality Estimation in Electronic Dance Music: A Computational and Musically Informed Examination}, year = {2018}, month = {03/2018}, pages = {234}, school = {Universitat Pompeu Fabra}, address = {Barcelona}, abstract = {This dissertation revolves around the task of computational key estimation in electronic dance music, upon which three interrelated operations are performed. First, I attempt to detect possible misconceptions within the task, which is typically accomplished with a tonal vocabulary overly centred in Western classical tonality, reduced to a binary major/minor model which might not accomodate popular music styles. Second, I present a study of tonal practises in electronic dance music, developed hand in hand with the curation of a corpus of over 2,000 audio excerpts, including various subgenres and degrees of complexity. Based on this corpus, I propose the creation of more open-ended key labels, accounting for other modal practises and ambivalent tonal configurations. Last, I describe my own key finding methods, adapting existing models to the musical idiosyncrasies and tonal distributions of electronic dance music, with new statistical key profiles derived from the newly created corpus.}, keywords = {EDM, Electronic Dance Music, Key Estimation, mir, music information retrieval, tonality}, url = {https://doi.org/10.5281/zenodo.1154586}, author = {{\'A}ngel Faraldo} }""" REMOTES = { "keys": download_utils.RemoteFileMetadata( filename="keys.zip", url="https://zenodo.org/record/1101082/files/keys.zip?download=1", checksum="939abc05f36121badfac4087241ac172", destination_dir=".", ), "metadata": download_utils.RemoteFileMetadata( filename="original_metadata.zip", url= "https://zenodo.org/record/1101082/files/original_metadata.zip?download=1", checksum="bb3e3ac1fe5dee7600ef2814accdf8f8", destination_dir=".", ), "audio": download_utils.RemoteFileMetadata( filename="audio.zip", url="https://zenodo.org/record/1101082/files/audio.zip?download=1", checksum="f490ee6c23578482d6fcfa11b82636a1",
import glob import librosa import logging import numpy as np import os import shutil import mirdata.track as track import mirdata.utils as utils import mirdata.download_utils as download_utils import mirdata.jams_utils as jams_utils REMOTE = download_utils.RemoteFileMetadata( filename='Orchset_dataset_0.zip', url= 'https://zenodo.org/record/1289786/files/Orchset_dataset_0.zip?download=1', checksum='cf6fe52d64624f61ee116c752fb318ca', destination_dir=None, ) DATASET_DIR = 'Orchset' def _load_metadata(data_home): predominant_inst_path = os.path.join( data_home, 'Orchset - Predominant Melodic Instruments.csv') if not os.path.exists(predominant_inst_path): logging.info( 'Metadata file {} not found.'.format(predominant_inst_path))
@dataset{juan_j_bosch_2014_1290750, author = {Juan J. Bosch and Ferdinand Fuhrmann and Perfecto Herrera}, title = {{IRMAS: a dataset for instrument recognition in musical audio signals}}, month = sep, year = 2014, publisher = {Zenodo}, version = {1.0}, doi = {10.5281/zenodo.1290750}, url = {https://doi.org/10.5281/zenodo.1290750} """ REMOTES = { "training_data": download_utils.RemoteFileMetadata( filename="IRMAS-TrainingData.zip", url= "https://zenodo.org/record/1290750/files/IRMAS-TrainingData.zip?download=1", checksum="4fd9f5ed5a18d8e2687e6360b5f60afe", ), "testing_data_1": download_utils.RemoteFileMetadata( filename="IRMAS-TestingData-Part1.zip", url= "https://zenodo.org/record/1290750/files/IRMAS-TestingData-Part1.zip?download=1", checksum="5a2e65520dcedada565dff2050bb2a56", ), "testing_data_2": download_utils.RemoteFileMetadata( filename="IRMAS-TestingData-Part2.zip", url= "https://zenodo.org/record/1290750/files/IRMAS-TestingData-Part2.zip?download=1", checksum="afb0c8ea92f34ee653693106be95c895",
import csv import os import librosa import logging import numpy as np import mirdata.utils as utils import mirdata.download_utils as download_utils DATASET_DIR = 'iKala' INDEX = utils.load_json_index('ikala_index.json') TIME_STEP = 0.032 # seconds METADATA = None ID_MAPPING_REMOTE = download_utils.RemoteFileMetadata( filename='id_mapping.txt', url='http://mac.citi.sinica.edu.tw/ikala/id_mapping.txt', checksum='81097b587804ce93e56c7a331ba06abc', destination_dir=None, ) class Track(object): """iKala track class Args: track_id (str): track id of the track data_home (str): Local path where the dataset is stored. If `None`, looks for the data in the default directory, `~/mir_datasets` Attributes: track_id (str): track id audio_path (str): track audio path
BIBTEX = """@article{bosch2016evaluation, title={Evaluation and combination of pitch estimation methods for melody extraction in symphonic classical music}, author={Bosch, Juan J and Marxer, Ricard and G{\'o}mez, Emilia}, journal={Journal of New Music Research}, volume={45}, number={2}, pages={101--117}, year={2016}, publisher={Taylor \\& Francis} }""" REMOTES = { "all": download_utils.RemoteFileMetadata( filename="Orchset_dataset_0.zip", url= "https://zenodo.org/record/1289786/files/Orchset_dataset_0.zip?download=1", checksum="cf6fe52d64624f61ee116c752fb318ca", destination_dir=None, ) } LICENSE_INFO = ( "Creative Commons Attribution Non Commercial Share Alike 4.0 International." ) def _load_metadata(data_home): predominant_inst_path = os.path.join( data_home, "Orchset - Predominant Melodic Instruments.csv")