Skip to content

Commit

Permalink
Merge branch 'WindowsCompatibility' of https://github.com/harshpalan/…
Browse files Browse the repository at this point in the history
…mirdata into WindowsCompatibility
  • Loading branch information
harshpalan committed Mar 31, 2023
2 parents 027d0b7 + 6bed139 commit 2437f48
Show file tree
Hide file tree
Showing 87 changed files with 23,580 additions and 1,199 deletions.
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"scipy",
"smart_open",
"openpyxl",
"pandas",
]

# # -- General configuration ---------------------------------------------------
Expand Down
8 changes: 8 additions & 0 deletions docs/source/mirdata.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ acousticbrainz_genre
:inherited-members:


baf
^^^

.. automodule:: mirdata.datasets.baf
:members:
:inherited-members:


beatles
^^^^^^^

Expand Down
10 changes: 9 additions & 1 deletion docs/source/quick_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,18 @@ Lyrics corresponding to the singing voice of the audio. These may be raw text wi
or they may be time-aligned events. They may have varying levels of granularity (paragraph, line, word,
phoneme, character) depending on the dataset.

.. _matches:

Matches
^^^^^^^
Music identifications in a query audio. This term is used in Audio Fingerprinting to refer to
identifications of music from a reference database. Matches include information about which reference
audio has been identified and the start and end times of the query match.

.. _meter:

Meter
^^^^^^
^^^^^
Rhythmic meter for each measure. A classical example of meter in Western music would be 4/4. Details how
many subdivisions and the length of this subdivisions that we do have per each measure.

Expand Down
8 changes: 8 additions & 0 deletions docs/source/table.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@
:target: https://creativecommons.org/licenses/by-sa/4.0
- :acousticbrainz:`\ `

* - BAF
- - audio: 🔑
- annotations: 🔑
- - :ref:`matches`
- 3425
- - .. image:: https://img.shields.io/badge/license-custom-orange
:target: https://zenodo.org/record/6868083

* - Beatles
- - audio: ❌
- annotations: ✅
Expand Down
4 changes: 3 additions & 1 deletion mirdata/annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -1286,7 +1286,9 @@ def _from_hz(pitches_hz, target_pitch_unit):
return pitches_midi

if target_pitch_unit == "note_name":
return librosa.hz_to_note(pitches_hz)
# cast to np.array for compatibility with legacy python3.6 and
# librosa 0.9.2. It is redundant for librosa 0.10
return np.array(librosa.hz_to_note(pitches_hz))

raise NotImplementedError

Expand Down
17 changes: 2 additions & 15 deletions mirdata/datasets/acousticbrainz_genre.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,21 +189,8 @@ class Track(core.Track):
"""

def __init__(
self,
track_id,
data_home,
dataset_name,
index,
metadata,
):
super().__init__(
track_id,
data_home,
dataset_name,
index,
metadata,
)
def __init__(self, track_id, data_home, dataset_name, index, metadata):
super().__init__(track_id, data_home, dataset_name, index, metadata)

self.path = os.path.normpath(self.get_path("data"))
self.genre = [genre for genre in self.track_id.split("#")[4:] if genre != ""]
Expand Down
Loading

0 comments on commit 2437f48

Please sign in to comment.