Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@utils.cached_property
def pitch(self):
"""F0Data: The human-annotated pitch"""
return load_pitch(self.pitch_path)
@utils.cached_property
def beats(self):
"""BeatData: the track's beat positions"""
return load_beats(self.jams_path)
@utils.cached_property
def notes(self):
"""dict: a dict that contains 6 NoteData.
From Low E string to high e string.
{
'E': NoteData(...),
'A': NoteData(...),
...
'e': NoteData(...)
}
"""
notes = {}
# iterate over 6 strings
for i in range(6):
notes[_GUITAR_STRINGS[i]] = _load_note_ann(self.jams_path, i)
return notes
@utils.cached_property
def lyrics(self):
"""LyricData: The human-annotated lyrics"""
return load_lyrics(self.lyrics_path)
@utils.cached_property
def melody2(self):
"""F0Data: The pitch of the predominant source for each point in time"""
return load_melody(self.melody2_path)
@utils.cached_property
def beats(self):
"""BeatData: human-labeled beat data"""
return load_beats(self.beats_path)
@utils.cached_property
def notes(self):
"""NoteData: annotated piano notes"""
return load_notes(self.midi_path, self.midi)
@utils.cached_property
def key(self):
"""KeyData: key annotation"""
return load_key(self.keys_path)
@utils.cached_property
def sections_annotator_2_uppercase(self):
"""SectionData: annotations in hierarchy level 0 from annotator 2"""
if self.sections_annotator2_uppercase_path is None:
return None
return load_sections(self.sections_annotator2_uppercase_path)
@utils.cached_property
def sections(self):
"""SectionData: section annotation"""
return load_sections(self.sections_path)