How to use the mirdata.jams_utils function in mirdata

To help you get started, we’ve selected a few mirdata examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mir-dataset-loaders / mirdata / mirdata / beatles.py View on Github external
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]),
            },
github mir-dataset-loaders / mirdata / mirdata / rwc_popular.py View on Github external
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,
        )
github mir-dataset-loaders / mirdata / mirdata / rwc_genre.py View on Github external
def to_jams(self):
        return jams_utils.jams_converter(
            beat_data=[(self.beats, None)],
            section_data=[(self.sections, None)],
            metadata=self._track_metadata,
        )
github mir-dataset-loaders / mirdata / mirdata / maestro.py View on Github external
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,
        )
github mir-dataset-loaders / mirdata / mirdata / groove_midi.py View on Github external
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,
        )
github mir-dataset-loaders / mirdata / mirdata / rwc_jazz.py View on Github external
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,
        )
github mir-dataset-loaders / mirdata / mirdata / medleydb_melody.py View on Github external
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,
        )
github mir-dataset-loaders / mirdata / mirdata / medley_solos_db.py View on Github external
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)
github mir-dataset-loaders / mirdata / mirdata / ikala.py View on Github external
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,
            },
github mir-dataset-loaders / mirdata / mirdata / gtzan_genre.py View on Github external
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',
            },