-
Couldn't load subscription status.
- Fork 260
Open
Labels
enhancementfeature:midifileStandard MIDI File (SMF) implementationStandard MIDI File (SMF) implementationfeature:protocolMIDI Protocol implementationMIDI Protocol implementationinvestigate
Description
Mido version: 1.2.8
When looping over events after parsing a file, it seems events I expect to be note_off events, are actually typed as 'note_on' events.
from mido import MidiFile
midi_file = MidiFile('some_file.mid')
events = midi_file.tracks[0]
for evt in events:
if evt.type == 'note_on':
# half of these should actually be note_offs
print(evt)I have checked in my DAW and with another midi library, and I'm definitely getting about twice as many notes as I expect from mido. I can seemingly work around this by doing:
events = midi_file.tracks[0]
for evt in events:
if evt.type == 'note_on' and evt.velocity != 0:
# now they are all note ons
print(evt)but this is kinda counter-intuitive, especially since the mido docs make a reference to a note_off type with a non-zero velocity
Metadata
Metadata
Assignees
Labels
enhancementfeature:midifileStandard MIDI File (SMF) implementationStandard MIDI File (SMF) implementationfeature:protocolMIDI Protocol implementationMIDI Protocol implementationinvestigate