https://github.com/kbinani/midi
SMF (Standard MIDI File) parser for Go
https://github.com/kbinani/midi
golang midi
Last synced: about 1 month ago
JSON representation
SMF (Standard MIDI File) parser for Go
- Host: GitHub
- URL: https://github.com/kbinani/midi
- Owner: kbinani
- License: mit
- Created: 2017-01-25T11:58:32.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-27T11:36:46.000Z (over 8 years ago)
- Last Synced: 2025-04-10T07:57:54.280Z (about 1 month ago)
- Topics: golang, midi
- Language: Go
- Size: 9.77 KB
- Stars: 5
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
midi
====[](https://travis-ci.org/kbinani/midi)
[](https://codecov.io/github/kbinani/midi)
[](https://godoc.org/github.com/kbinani/midi)
[](https://github.com/kbinani/midi/blob/master/LICENSE)
[](https://goreportcard.com/report/github.com/kbinani/midi)* Go library to parse Standard MIDI file.
todo
====
- [x] Extract tempo change table
- [ ] Extract time signature table
- [ ] Writing SMF fileexample
=======```go
package mainimport (
"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