You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How can i get actually note duration from midi_obj( midi_obj = miditoolkit.midi.parser.MidiFile() ), thanks? I find it's not right to get duration by codes fellow:
`
notes = midi_obj.instruments[0].notes
durations = []
pitchs = []
print(notes)
for n in notes:
pit = n.pitch
note = librosa.midi_to_note(pit)
pitchs.append(note)
offset = (n.end - n.start) / (1.0 * 1000)
durations.append(offset)
`
The text was updated successfully, but these errors were encountered:
How can i get actually note duration from midi_obj( midi_obj = miditoolkit.midi.parser.MidiFile() ), thanks? I find it's not right to get duration by codes fellow:
`
notes = midi_obj.instruments[0].notes
durations = []
pitchs = []
print(notes)
`
The text was updated successfully, but these errors were encountered: