-
Notifications
You must be signed in to change notification settings - Fork 13
LuaMidi.get_MIDI_tracks does not set duration on NoteEvents #2
Copy link
Copy link
Open
Description
Example program:
local LuaMidi = require ('LuaMidi');
local tracks = LuaMidi.get_MIDI_tracks("tetris.midi");
events = tracks[2]["events"]
for i=2, #events do
console.log(events[i]:get_duration()); --no return value
end
On line 147 of LuaMidi.lua, the event table created for the new NoteEvent doesn't have duration information. I gave a look at raw_note myself but it was tough to determine how to find a duration from that.
I take it what needs to happen is looking at the difference between a NoteOn and NoteOff event, but I'm not familiar enough with the MIDI spec or how the data is being digested to really discern how to figure that information out.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels