百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
M

midi

> 编程语言
开源

用 Go 读取和写入 MIDI 消息和 MIDI 文件 (SMF) 的库

358 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

用 Go 读取和写入 MIDI 消息和 MIDI 文件 (SMF) 的库

midi

library for reading and writing of MIDI messages and SMF/MIDI files with Go.

Note: If you are reading this on Github, please note that the repo has moved to Gitlab (gitlab.com/gomidi/midi) and this is only a mirror.

  • Go version: >= 1.24.2
  • OS/architectures: everywhere Go runs (tested on Linux and Windows).

Installation

go get gitlab.com/gomidi/midi/v2@latest

Features

This package provides a unified way to read and write "over the wire" MIDI data and MIDI files (SMF).

  • implementation of complete MIDI standard ("cable" and SMF MIDI)
  • unified Driver interface (see below)
  • reading and optional writing with "running status"
  • seamless integration with io.Reader and io.Writer
  • no dependencies outside the standard library
  • low overhead
  • shortcuts for General MIDI, Sysex messages etc.
  • CLI tools that use the library
  • SMF files can be converted back and forth into a human readable JSON format

Drivers

For "cable" communication you need a Driver to connect with the MIDI system of your OS. Currently the following drivers available in the drivers subdirectory (all multi-platform):

  • rtmididrv based on rtmidi (requires CGO)
  • webmididrv based on the Web MIDI standard (produces webassembly)
  • midicatdrv based on the midicat binaries via piping (stdin / stdout) (no CGO needed)
  • testdrv for testing (no CGO needed)

(there used to be a driver, based on portmidi, but this is not supported anymore)

Examples

…
…

Documentation

see https://pkg.go.dev/gitlab.com/gomidi/midi/v2

License

MIT (see LICENSE file)

Credits

Inspiration and low level code for MIDI reading (see internal midilib package) came from the http://github.com/afandian/go-midi package of Joe Wass which also helped as a starting point for the reading of SMF files.

Alternatives

Matt Aimonetti is also working on MIDI inside https://github.com/mattetti/audio but I didn't try it.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Gogogolangmidimidi-files

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言