basic_pitch/data/datasets/ikala.py [93:109]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                tfm.channels(AUDIO_N_CHANNELS)
                tfm.build(track_local.audio_path, local_wav_path)

                duration = sox.file_info.duration(local_wav_path)
                time_scale = np.arange(0, duration + ANNOTATION_HOP, ANNOTATION_HOP)
                n_time_frames = len(time_scale)

                if track_local.notes_pyin is not None:
                    note_indices, note_values = track_local.notes_pyin.to_sparse_index(
                        time_scale, "s", FREQ_BINS_NOTES, "hz"
                    )
                    onset_indices, onset_values = track_local.notes_pyin.to_sparse_index(
                        time_scale, "s", FREQ_BINS_NOTES, "hz", onsets_only=True
                    )
                    note_shape = (n_time_frames, N_FREQ_BINS_NOTES)
                # if there are no notes, return empty note indices
                else:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



basic_pitch/data/datasets/medleydb_pitch.py [91:107]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                tfm.channels(AUDIO_N_CHANNELS)
                tfm.build(track_local.audio_path, local_wav_path)

                duration = sox.file_info.duration(local_wav_path)
                time_scale = np.arange(0, duration + ANNOTATION_HOP, ANNOTATION_HOP)
                n_time_frames = len(time_scale)

                if track_local.notes_pyin is not None:
                    note_indices, note_values = track_local.notes_pyin.to_sparse_index(
                        time_scale, "s", FREQ_BINS_NOTES, "hz"
                    )
                    onset_indices, onset_values = track_local.notes_pyin.to_sparse_index(
                        time_scale, "s", FREQ_BINS_NOTES, "hz", onsets_only=True
                    )
                    note_shape = (n_time_frames, N_FREQ_BINS_NOTES)
                # if there are no notes, return empty note indices
                else:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



