Documentation
¶
Overview ¶
Package midi writes a score (tracks of notes, placed by bar and beat) as a standard MIDI file that any DAW opens. A score is cleaned first: what can't be played is dropped and the rest kept inside the piece.
Index ¶
- Variables
- func Drums() []string
- func Instruments() []string
- func Render(title string, score []byte) ([]byte, error)
- type Format
- func (Format) CleanData(raw json.RawMessage) (json.RawMessage, error)
- func (Format) DataHelp() string
- func (Format) DataSchema() map[string]any
- func (Format) Describe() string
- func (Format) Ext() string
- func (Format) MediaType() string
- func (Format) Name() string
- func (Format) Needs() string
- func (Format) Render(w memory.Work, _ string) ([]byte, error)
- func (Format) WriteHelp() string
- type Note
- type Score
- type Track
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrEmpty = errors.New("midi: the score has no notes that can be played")
Functions ¶
Types ¶
type Format ¶
type Format struct{}
func (Format) CleanData ¶
func (Format) CleanData(raw json.RawMessage) (json.RawMessage, error)
func (Format) DataSchema ¶
Click to show internal directories.
Click to hide internal directories.