-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Description
I'm trying to write events, coming from jack midi input port, to a mid file. I guess I could say I'm trying to record a midi sequence. The documentation doesn't really have much info nor any examples on how to write live event sequences to mid files.
I still tried and couldn't figure out how to convert LiveEvent to TrackEvent, so I could write it.
I've set up an SMF:
let header = midly::Header {
format: midly::Format::SingleTrack, // Replace with the desired format
timing: midly::Timing::Metrical(480.into()), // Replace with the desired timing information
};
let smf = midly::Smf::new(header);
and then tried to push an event to the first track:
let arena = midly::Arena::new();
...
let live_event = LiveEvent::parse(data).unwrap();
smf.tracks[0].push(live_event.as_track_event(&arena));
But as_track_event returns TrackEventKind and I can't find no way to convert that.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels