- Go library to parse Standard MIDI file.
- Extract tempo change table
- Extract time signature table
- Writing SMF file
package main
import (
"fmt"
"os"
"github.com/kbinani/midi"
)
func main() {
f, err := os.Open("test.mid")
if err != nil {
panic(err)
}
defer f.Close()
file, err := midi.Read(f)
if err != nil {
panic(err)
}
for i, track := range file.Tracks {
fmt.Printf("track#%d: %5d events\n", i, len(track.Events))
}
}
MIT License