Skip to content
/ midi Public

SMF (Standard MIDI File) parser for Go

License

Notifications You must be signed in to change notification settings

kbinani/midi

Repository files navigation

midi

Build Status codecov.io Go Report Card

  • Go library to parse Standard MIDI file.

todo

  • Extract tempo change table
  • Extract time signature table
  • Writing SMF file

example

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

license

MIT License

About

SMF (Standard MIDI File) parser for Go

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages