Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def to_jams(self):
"""Jams: the track's data in jams format"""
return jams_utils.jams_converter(
beat_data=[(self.beats, None)],
section_data=[(self.sections, None)],
chord_data=[(self.chords, None)],
key_data=[(self.key, None)],
metadata={
'artist': 'The Beatles',
'title': self.title,
'duration': librosa.get_duration(self.audio[0], self.audio[1]),
},
def to_jams(self):
"""Jams: the track's data in jams format"""
return jams_utils.jams_converter(
audio_path=self.audio_path,
beat_data=[(self.beats, None)],
section_data=[(self.sections, None)],
chord_data=[(self.chords, None)],
metadata=self._track_metadata,
)
def to_jams(self):
return jams_utils.jams_converter(
beat_data=[(self.beats, None)],
section_data=[(self.sections, None)],
metadata=self._track_metadata,
)
def to_jams(self):
"""Jams: the track's data in jams format"""
return jams_utils.jams_converter(
audio_path=self.audio_path,
note_data=[(self.notes, None)],
metadata=self._metadata,
)
def to_jams(self):
# Initialize top-level JAMS container
return jams_utils.jams_converter(
beat_data=[(self.beats, 'midi beats')],
tempo_data=[(self.tempo, 'midi tempo')],
event_data=[(self.drum_events, 'annotated drum patterns')],
metadata=self._track_metadata,
)
def to_jams(self):
"""Jams: the track's data in jams format"""
return jams_utils.jams_converter(
audio_path=self.audio_path,
beat_data=[(self.beats, None)],
section_data=[(self.sections, None)],
metadata=self._track_metadata,
)
def to_jams(self):
"""Jams: the track's data in jams format"""
# jams does not support multipitch, so we skip melody3
return jams_utils.jams_converter(
audio_path=self.audio_path,
f0_data=[(self.melody1, 'melody1'), (self.melody2, 'melody2')],
metadata=self._track_metadata,
)
def to_jams(self):
"""Jams: the track's data in jams format"""
metadata = {'duration': librosa.get_duration(self.audio[0], self.audio[1])}
metadata.update(self._track_metadata)
return jams_utils.jams_converter(metadata=metadata)
def to_jams(self):
"""Jams: the track's data in jams format"""
return jams_utils.jams_converter(
audio_path=self.audio_path,
f0_data=[(self.f0, None)],
lyrics_data=[(self.lyrics, None)],
metadata={
'section': self.section,
'singer_id': self.singer_id,
'track_id': self.track_id,
'song_id': self.song_id,
},
def to_jams(self):
"""Jams: the track's data in jams format"""
return jams_utils.jams_converter(
tags_gtzan_data=[(self.genre, 'gtzan-genre')],
metadata={
'title': "Unknown track",
'artist': "Unknown artist",
'release': "Unknown album",
'duration': 30.0,
'curator': 'George Tzanetakis',
},