Skip to content

Library for manipulating and sequencing Midi files, tracks, events

License

Notifications You must be signed in to change notification settings

tekartik/midi.dart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tekartik_midi.dart

Library for parsing, manipulation Midi files and for sequencing midi event

Build Status

API subject to change

Setup

Note about versioning.

pubspec.yaml:

dependencies:
  tekartik_midi:
    git:
      url: https://github.com/tekartik/midi.dart
      ref: dart3a

Usage example

Creating a midi file

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);

Parsing a midi file

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;

About

Library for manipulating and sequencing Midi files, tracks, events

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •