Sample MIDI project demonstrating MIDI operations in Go.
- Send MIDI messages in real-time to MIDI output ports
- Generate MIDI files (.mid format) with custom melodies
- Play MIDI files by sending them to MIDI output ports
- Open Audio MIDI Setup
- Window → Show MIDI Studio
- Double-click IAC Driver icon
- Check "Device is online"
- Create a port named "GoMIDI"
cd cmd/send_midi
make runOptions:
--port: MIDI port name (default: "IAC Driver GoMIDI")
cd cmd/generate_midi_file
make runOptions:
--output: Output file path (default: "output.mid")
cd cmd/send_midi_file
make run --input output.midOptions:
--port: MIDI port name (default: "IAC Driver GoMIDI")--input: Input MIDI file path (required)
make precommit # Run all checks
make test # Run tests
make format # Format code