Library for parsing, manipulation Midi files and for sequencing midi event
API subject to change
pubspec.yaml
:
dependencies:
tekartik_midi:
git:
url: https://github.com/tekartik/midi.dart
ref: dart3a
var file = MidiFile();
file.fileFormat = MidiFile.formatMultiTrack;
file.ppq = 240;
var track = MidiTrack();
track.addEvent(0, TimeSigEvent(4, 4));
track.addEvent(0, TempoEvent.bpm(120));
track.addEvent(0, EndOfTrackEvent());
file.addTrack(track);
Uint8List data; // the file binary data
// ... fill the data from a midi file
var midiParser = MidiParser(data);
var parser = FileParser(midiParser);
parser.parseFile();
// Resulting midi file
var file = parser.file;