Apres
Installation
In Cargo.toml
[]
= "^0.2.6"
Usage Examples
Load a Song
use MIDI;
Create a MIDI from a file
let midi = MIDI from_path.ok.unwrap;
Create a new MIDI
use MIDI;
// Create an empty MIDI file.
let midi = MIDI new;
Creating a song
use MIDI;
use ;
// Create an empty MIDI file.
let mut midi = MIDI new;
// Using channel 0, press midi note 64 (Middle E) on the first track (0) at the first position (0 ticks)
midi.insert_event;
// Still on channel 0, release midi note 64 (Middle E) on the first track (0) one beat later (120 ticks)
midi.push_event;
// Save it to a file
midi.save;