Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 0 additions & 38 deletions ariautils/config/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,44 +22,6 @@
"sfx": true
}
}
},
"metadata": {
"functions": {
"composer_filename": {
"run": false,
"args": {
"composer_names": ["bach", "beethoven", "mozart", "chopin", "rachmaninoff", "liszt", "debussy", "schubert", "brahms", "ravel", "satie", "scarlatti"]
}
},
"composer_metamsg": {
"run": false,
"args": {
"composer_names": ["bach", "beethoven", "mozart", "chopin", "rachmaninoff", "liszt", "debussy", "schubert", "brahms", "ravel", "satie", "scarlatti"]
}
},
"form_filename": {
"run": false,
"args": {
"form_names": ["sonata", "prelude", "nocturne", "etude", "waltz", "mazurka", "impromptu", "fugue"]
}
},
"maestro_json": {
"run": false,
"args": {
"composer_names": ["bach", "beethoven", "mozart", "chopin", "rachmaninoff", "liszt", "debussy", "schubert", "brahms", "ravel", "satie", "scarlatti"],
"form_names": ["sonata", "prelude", "nocturne", "étude", "waltz", "mazurka", "impromptu", "fugue"]
}
},
"abs_path": {
"run": true,
"args": {}
}
},
"manual": {
"genre": ["classical", "jazz"],
"form": ["sonata", "prelude", "nocturne", "étude", "waltz", "mazurka", "impromptu", "fugue"],
"composer": ["bach", "beethoven", "mozart", "chopin", "rachmaninoff", "liszt", "debussy", "schubert", "brahms", "ravel", "satie", "scarlatti"]
}
}
},
"tokenizer": {
Expand Down
15 changes: 0 additions & 15 deletions ariautils/midi.py
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,6 @@ def midi_to_dict(mid: mido.MidiFile) -> MidiDictData:
time signatures, key signatures, and other musical events.
"""

metadata_config = load_config()["data"]["metadata"]
# Convert time in mid to absolute
for track in mid.tracks:
curr_tick = 0
Expand Down Expand Up @@ -686,20 +685,6 @@ def midi_to_dict(mid: mido.MidiFile) -> MidiDictData:
midi_dict_data["note_msgs"], key=lambda x: x["tick"]
)

for metadata_process_name, metadata_process_config in metadata_config[
"functions"
].items():
if metadata_process_config["run"] is True:
metadata_fn = get_metadata_fn(
metadata_process_name=metadata_process_name
)
fn_args: dict = metadata_process_config["args"]

collected_metadata = metadata_fn(mid, midi_dict_data, **fn_args)
if collected_metadata:
for k, v in collected_metadata.items():
midi_dict_data["metadata"][k] = v

return midi_dict_data


Expand Down
Loading