Documentation ¶
Index ¶
- Constants
- Variables
- type AllNotesOff
- type AllSoundOff
- type Channel
- type ChannelCount
- type ChannelPressure
- func (self *ChannelPressure) Channel() Channel
- func (self *ChannelPressure) MarshalBinary() ([]byte, error)
- func (self *ChannelPressure) Pressure() Pressure
- func (self *ChannelPressure) SetChannel(channel Channel) bool
- func (self *ChannelPressure) SetPressure(pressure Pressure) bool
- func (self *ChannelPressure) UnmarshalBinary(data []byte) error
- type Local
- type LocalControl
- func (self *LocalControl) Channel() Channel
- func (self *LocalControl) MarshalBinary() ([]byte, error)
- func (self *LocalControl) SetChannel(channel Channel) bool
- func (self *LocalControl) SetValue(value Local) bool
- func (self *LocalControl) UnmarshalBinary(data []byte) error
- func (self *LocalControl) Value() Local
- type MonoModeOn
- func (self *MonoModeOn) Channel() Channel
- func (self *MonoModeOn) ChannelCount() ChannelCount
- func (self *MonoModeOn) MarshalBinary() ([]byte, error)
- func (self *MonoModeOn) SetChannel(channel Channel) bool
- func (self *MonoModeOn) SetChannelCount(channelCount ChannelCount) bool
- func (self *MonoModeOn) UnmarshalBinary(data []byte) error
- type Note
- type NoteOff
- func (self *NoteOff) Channel() Channel
- func (self *NoteOff) MarshalBinary() ([]byte, error)
- func (self *NoteOff) Note() Note
- func (self *NoteOff) SetChannel(channel Channel) bool
- func (self *NoteOff) SetNote(note Note) bool
- func (self *NoteOff) SetVelocity(velocity Velocity) bool
- func (self *NoteOff) UnmarshalBinary(data []byte) error
- func (self *NoteOff) Velocity() Velocity
- type NoteOn
- func (self *NoteOn) Channel() Channel
- func (self *NoteOn) MarshalBinary() ([]byte, error)
- func (self *NoteOn) Note() Note
- func (self *NoteOn) SetChannel(channel Channel) bool
- func (self *NoteOn) SetNote(note Note) bool
- func (self *NoteOn) SetVelocity(velocity Velocity) bool
- func (self *NoteOn) UnmarshalBinary(data []byte) error
- func (self *NoteOn) Velocity() Velocity
- type OmniModeOff
- type OmniModeOn
- type PitchBend
- type PitchBendChange
- func (self *PitchBendChange) Channel() Channel
- func (self *PitchBendChange) MarshalBinary() ([]byte, error)
- func (self *PitchBendChange) PitchBend() PitchBend
- func (self *PitchBendChange) SetChannel(channel Channel) bool
- func (self *PitchBendChange) SetPitchBend(pitchBend PitchBend) bool
- func (self *PitchBendChange) UnmarshalBinary(data []byte) error
- type PolyModeOn
- type PolyphonicKeyPressure
- func (self *PolyphonicKeyPressure) Channel() Channel
- func (self *PolyphonicKeyPressure) MarshalBinary() ([]byte, error)
- func (self *PolyphonicKeyPressure) Note() Note
- func (self *PolyphonicKeyPressure) Pressure() Pressure
- func (self *PolyphonicKeyPressure) SetChannel(channel Channel) bool
- func (self *PolyphonicKeyPressure) SetNote(note Note) bool
- func (self *PolyphonicKeyPressure) SetPressure(pressure Pressure) bool
- func (self *PolyphonicKeyPressure) UnmarshalBinary(data []byte) error
- type Pressure
- type Program
- type ProgramChange
- func (self *ProgramChange) Channel() Channel
- func (self *ProgramChange) MarshalBinary() ([]byte, error)
- func (self *ProgramChange) Program() Program
- func (self *ProgramChange) SetChannel(channel Channel) bool
- func (self *ProgramChange) SetProgram(program Program) bool
- func (self *ProgramChange) UnmarshalBinary(data []byte) error
- type ResetAllControllers
- type SingleByteControlChange
- func (self *SingleByteControlChange) Channel() Channel
- func (self *SingleByteControlChange) Controller() SingleByteController
- func (self *SingleByteControlChange) MarshalBinary() ([]byte, error)
- func (self *SingleByteControlChange) SetChannel(channel Channel) bool
- func (self *SingleByteControlChange) SetController(controller SingleByteController) bool
- func (self *SingleByteControlChange) SetValue(value SingleByteControllerValue) bool
- func (self *SingleByteControlChange) UnmarshalBinary(data []byte) error
- func (self *SingleByteControlChange) Value() SingleByteControllerValue
- type SingleByteController
- type SingleByteControllerValue
- type TwoByteControlChange
- func (self *TwoByteControlChange) Channel() Channel
- func (self *TwoByteControlChange) Controller() TwoByteController
- func (self *TwoByteControlChange) MarshalBinary() ([]byte, error)
- func (self *TwoByteControlChange) SetChannel(channel Channel) bool
- func (self *TwoByteControlChange) SetController(controller TwoByteController) bool
- func (self *TwoByteControlChange) SetValue(value TwoByteControllerValue) bool
- func (self *TwoByteControlChange) UnmarshalBinary(data []byte) error
- func (self *TwoByteControlChange) Value() TwoByteControllerValue
- type TwoByteController
- type TwoByteControllerValue
- type Velocity
Constants ¶
View Source
const ( MinChannel = Channel(0) MaxChannel = Channel(15) )
View Source
const ( LocalOff = Local(false) LocalOn = Local(true) MinChannelCount = ChannelCount(0) MaxChannelCount = ChannelCount(16) )
View Source
const ( MinNote = Note(0) MaxNote = Note(127) MinVelocity = Velocity(0) MaxVelocity = Velocity(127) DefaultVelocity = Velocity(64) MinPressure = Pressure(0) MaxPressure = Pressure(127) MinSingleByteController = SingleByteController(64) MaxSingleByteController = SingleByteController(119) MinSingleByteControllerValue = SingleByteControllerValue(0) MaxSingleByteControllerValue = SingleByteControllerValue(127) MinTwoByteController = TwoByteController(0) MaxTwoByteController = TwoByteController(31) MinTwoByteControllerValue = TwoByteControllerValue(0) MaxTwoByteControllerValue = TwoByteControllerValue(16383) MinProgram = Program(0) MaxProgram = Program(127) MinPitchBend = PitchBend(-8192) MaxPitchBend = PitchBend(8191) DefaultPitchBend = PitchBend(0) )
Variables ¶
View Source
var ( ErrInvalidLength = errors.New("invalid length") ErrInvalidChannel = errors.New("invalid channel") ErrInvalidChannelCount = errors.New("invalid channelCount") ErrInvalidController = errors.New("invalid controller") ErrInvalidNote = errors.New("invalid note") ErrInvalidPitchBend = errors.New("invalid pitchBend") ErrInvalidPressure = errors.New("invalid pressure") ErrInvalidProgram = errors.New("invalid program") ErrInvalidValue = errors.New("invalid value") ErrInvalidVelocity = errors.New("invalid velocity") )
View Source
var ( ErrInvalidStatus = errors.New("invalid status") ErrInvalidData = errors.New("invalid data") )
Functions ¶
This section is empty.
Types ¶
type AllNotesOff ¶
type AllNotesOff [3]byte
func NewAllNotesOff ¶
func NewAllNotesOff( channel Channel, ) (msg AllNotesOff, err error)
func (*AllNotesOff) Channel ¶
func (self *AllNotesOff) Channel() Channel
func (*AllNotesOff) MarshalBinary ¶
func (self *AllNotesOff) MarshalBinary() ([]byte, error)
func (*AllNotesOff) SetChannel ¶
func (self *AllNotesOff) SetChannel(channel Channel) bool
func (*AllNotesOff) UnmarshalBinary ¶
func (self *AllNotesOff) UnmarshalBinary(data []byte) error
type AllSoundOff ¶
type AllSoundOff [3]byte
func NewAllSoundOff ¶
func NewAllSoundOff( channel Channel, ) (msg AllSoundOff, err error)
func (*AllSoundOff) Channel ¶
func (self *AllSoundOff) Channel() Channel
func (*AllSoundOff) MarshalBinary ¶
func (self *AllSoundOff) MarshalBinary() ([]byte, error)
func (*AllSoundOff) SetChannel ¶
func (self *AllSoundOff) SetChannel(channel Channel) bool
func (*AllSoundOff) UnmarshalBinary ¶
func (self *AllSoundOff) UnmarshalBinary(data []byte) error
type ChannelCount ¶
type ChannelCount uint8
func (ChannelCount) GoString ¶
func (self ChannelCount) GoString() string
func (ChannelCount) IsValid ¶
func (self ChannelCount) IsValid() bool
func (ChannelCount) Truncated ¶
func (self ChannelCount) Truncated() ChannelCount
type ChannelPressure ¶
type ChannelPressure [2]byte
func NewChannelPressure ¶
func NewChannelPressure( channel Channel, pressure Pressure, ) (msg ChannelPressure, err error)
func (*ChannelPressure) Channel ¶
func (self *ChannelPressure) Channel() Channel
func (*ChannelPressure) MarshalBinary ¶
func (self *ChannelPressure) MarshalBinary() ([]byte, error)
func (*ChannelPressure) Pressure ¶
func (self *ChannelPressure) Pressure() Pressure
func (*ChannelPressure) SetChannel ¶
func (self *ChannelPressure) SetChannel(channel Channel) bool
func (*ChannelPressure) SetPressure ¶
func (self *ChannelPressure) SetPressure(pressure Pressure) bool
func (*ChannelPressure) UnmarshalBinary ¶
func (self *ChannelPressure) UnmarshalBinary(data []byte) error
type LocalControl ¶
type LocalControl [3]byte
func NewLocalControl ¶
func NewLocalControl( channel Channel, value Local, ) (msg LocalControl, err error)
func (*LocalControl) Channel ¶
func (self *LocalControl) Channel() Channel
func (*LocalControl) MarshalBinary ¶
func (self *LocalControl) MarshalBinary() ([]byte, error)
func (*LocalControl) SetChannel ¶
func (self *LocalControl) SetChannel(channel Channel) bool
func (*LocalControl) SetValue ¶
func (self *LocalControl) SetValue(value Local) bool
func (*LocalControl) UnmarshalBinary ¶
func (self *LocalControl) UnmarshalBinary(data []byte) error
func (*LocalControl) Value ¶
func (self *LocalControl) Value() Local
type MonoModeOn ¶
type MonoModeOn [3]byte
func NewMonoModeOn ¶
func NewMonoModeOn( channel Channel, channelCount ChannelCount, ) (msg MonoModeOn, err error)
func (*MonoModeOn) Channel ¶
func (self *MonoModeOn) Channel() Channel
func (*MonoModeOn) ChannelCount ¶
func (self *MonoModeOn) ChannelCount() ChannelCount
func (*MonoModeOn) MarshalBinary ¶
func (self *MonoModeOn) MarshalBinary() ([]byte, error)
func (*MonoModeOn) SetChannel ¶
func (self *MonoModeOn) SetChannel(channel Channel) bool
func (*MonoModeOn) SetChannelCount ¶
func (self *MonoModeOn) SetChannelCount(channelCount ChannelCount) bool
func (*MonoModeOn) UnmarshalBinary ¶
func (self *MonoModeOn) UnmarshalBinary(data []byte) error
type NoteOff ¶
type NoteOff [3]byte
func NewNoteOff ¶
func (*NoteOff) MarshalBinary ¶
func (*NoteOff) SetChannel ¶
func (*NoteOff) SetVelocity ¶
func (*NoteOff) UnmarshalBinary ¶
type NoteOn ¶
type NoteOn [3]byte
func (*NoteOn) MarshalBinary ¶
func (*NoteOn) SetChannel ¶
func (*NoteOn) SetVelocity ¶
func (*NoteOn) UnmarshalBinary ¶
type OmniModeOff ¶
type OmniModeOff [3]byte
func NewOmniModeOff ¶
func NewOmniModeOff( channel Channel, ) (msg OmniModeOff, err error)
func (*OmniModeOff) Channel ¶
func (self *OmniModeOff) Channel() Channel
func (*OmniModeOff) MarshalBinary ¶
func (self *OmniModeOff) MarshalBinary() ([]byte, error)
func (*OmniModeOff) SetChannel ¶
func (self *OmniModeOff) SetChannel(channel Channel) bool
func (*OmniModeOff) UnmarshalBinary ¶
func (self *OmniModeOff) UnmarshalBinary(data []byte) error
type OmniModeOn ¶
type OmniModeOn [3]byte
func NewOmniModeOn ¶
func NewOmniModeOn( channel Channel, ) (msg OmniModeOn, err error)
func (*OmniModeOn) Channel ¶
func (self *OmniModeOn) Channel() Channel
func (*OmniModeOn) MarshalBinary ¶
func (self *OmniModeOn) MarshalBinary() ([]byte, error)
func (*OmniModeOn) SetChannel ¶
func (self *OmniModeOn) SetChannel(channel Channel) bool
func (*OmniModeOn) UnmarshalBinary ¶
func (self *OmniModeOn) UnmarshalBinary(data []byte) error
type PitchBendChange ¶
type PitchBendChange [3]byte
func NewPitchBendChange ¶
func NewPitchBendChange( channel Channel, pitchBend PitchBend, ) (msg PitchBendChange, err error)
func (*PitchBendChange) Channel ¶
func (self *PitchBendChange) Channel() Channel
func (*PitchBendChange) MarshalBinary ¶
func (self *PitchBendChange) MarshalBinary() ([]byte, error)
func (*PitchBendChange) PitchBend ¶
func (self *PitchBendChange) PitchBend() PitchBend
func (*PitchBendChange) SetChannel ¶
func (self *PitchBendChange) SetChannel(channel Channel) bool
func (*PitchBendChange) SetPitchBend ¶
func (self *PitchBendChange) SetPitchBend(pitchBend PitchBend) bool
func (*PitchBendChange) UnmarshalBinary ¶
func (self *PitchBendChange) UnmarshalBinary(data []byte) error
type PolyModeOn ¶
type PolyModeOn [3]byte
func NewPolyModeOn ¶
func NewPolyModeOn( channel Channel, ) (msg PolyModeOn, err error)
func (*PolyModeOn) Channel ¶
func (self *PolyModeOn) Channel() Channel
func (*PolyModeOn) MarshalBinary ¶
func (self *PolyModeOn) MarshalBinary() ([]byte, error)
func (*PolyModeOn) SetChannel ¶
func (self *PolyModeOn) SetChannel(channel Channel) bool
func (*PolyModeOn) UnmarshalBinary ¶
func (self *PolyModeOn) UnmarshalBinary(data []byte) error
type PolyphonicKeyPressure ¶
type PolyphonicKeyPressure [3]byte
func NewPolyphonicKeyPressure ¶
func NewPolyphonicKeyPressure( channel Channel, note Note, pressure Pressure, ) (msg PolyphonicKeyPressure, err error)
func (*PolyphonicKeyPressure) Channel ¶
func (self *PolyphonicKeyPressure) Channel() Channel
func (*PolyphonicKeyPressure) MarshalBinary ¶
func (self *PolyphonicKeyPressure) MarshalBinary() ([]byte, error)
func (*PolyphonicKeyPressure) Note ¶
func (self *PolyphonicKeyPressure) Note() Note
func (*PolyphonicKeyPressure) Pressure ¶
func (self *PolyphonicKeyPressure) Pressure() Pressure
func (*PolyphonicKeyPressure) SetChannel ¶
func (self *PolyphonicKeyPressure) SetChannel(channel Channel) bool
func (*PolyphonicKeyPressure) SetNote ¶
func (self *PolyphonicKeyPressure) SetNote(note Note) bool
func (*PolyphonicKeyPressure) SetPressure ¶
func (self *PolyphonicKeyPressure) SetPressure(pressure Pressure) bool
func (*PolyphonicKeyPressure) UnmarshalBinary ¶
func (self *PolyphonicKeyPressure) UnmarshalBinary(data []byte) error
type ProgramChange ¶
type ProgramChange [2]byte
func NewProgramChange ¶
func NewProgramChange( channel Channel, program Program, ) (msg ProgramChange, err error)
func (*ProgramChange) Channel ¶
func (self *ProgramChange) Channel() Channel
func (*ProgramChange) MarshalBinary ¶
func (self *ProgramChange) MarshalBinary() ([]byte, error)
func (*ProgramChange) Program ¶
func (self *ProgramChange) Program() Program
func (*ProgramChange) SetChannel ¶
func (self *ProgramChange) SetChannel(channel Channel) bool
func (*ProgramChange) SetProgram ¶
func (self *ProgramChange) SetProgram(program Program) bool
func (*ProgramChange) UnmarshalBinary ¶
func (self *ProgramChange) UnmarshalBinary(data []byte) error
type ResetAllControllers ¶
type ResetAllControllers [3]byte
func NewResetAllControllers ¶
func NewResetAllControllers( channel Channel, ) (msg ResetAllControllers, err error)
func (*ResetAllControllers) Channel ¶
func (self *ResetAllControllers) Channel() Channel
func (*ResetAllControllers) MarshalBinary ¶
func (self *ResetAllControllers) MarshalBinary() ([]byte, error)
func (*ResetAllControllers) SetChannel ¶
func (self *ResetAllControllers) SetChannel(channel Channel) bool
func (*ResetAllControllers) UnmarshalBinary ¶
func (self *ResetAllControllers) UnmarshalBinary(data []byte) error
type SingleByteControlChange ¶
type SingleByteControlChange [3]byte
func NewSingleByteControlChange ¶
func NewSingleByteControlChange( channel Channel, controller SingleByteController, value SingleByteControllerValue, ) (msg SingleByteControlChange, err error)
func (*SingleByteControlChange) Channel ¶
func (self *SingleByteControlChange) Channel() Channel
func (*SingleByteControlChange) Controller ¶
func (self *SingleByteControlChange) Controller() SingleByteController
func (*SingleByteControlChange) MarshalBinary ¶
func (self *SingleByteControlChange) MarshalBinary() ([]byte, error)
func (*SingleByteControlChange) SetChannel ¶
func (self *SingleByteControlChange) SetChannel(channel Channel) bool
func (*SingleByteControlChange) SetController ¶
func (self *SingleByteControlChange) SetController(controller SingleByteController) bool
func (*SingleByteControlChange) SetValue ¶
func (self *SingleByteControlChange) SetValue(value SingleByteControllerValue) bool
func (*SingleByteControlChange) UnmarshalBinary ¶
func (self *SingleByteControlChange) UnmarshalBinary(data []byte) error
func (*SingleByteControlChange) Value ¶
func (self *SingleByteControlChange) Value() SingleByteControllerValue
type SingleByteController ¶
type SingleByteController uint8
func (SingleByteController) GoString ¶
func (self SingleByteController) GoString() string
func (SingleByteController) IsValid ¶
func (self SingleByteController) IsValid() bool
type SingleByteControllerValue ¶
type SingleByteControllerValue uint8
func (SingleByteControllerValue) GoString ¶
func (self SingleByteControllerValue) GoString() string
func (SingleByteControllerValue) IsValid ¶
func (self SingleByteControllerValue) IsValid() bool
func (SingleByteControllerValue) Truncated ¶
func (self SingleByteControllerValue) Truncated() SingleByteControllerValue
type TwoByteControlChange ¶
type TwoByteControlChange [6]byte
func NewTwoByteControlChange ¶
func NewTwoByteControlChange( channel Channel, controller TwoByteController, value TwoByteControllerValue, ) (msg TwoByteControlChange, err error)
func (*TwoByteControlChange) Channel ¶
func (self *TwoByteControlChange) Channel() Channel
func (*TwoByteControlChange) Controller ¶
func (self *TwoByteControlChange) Controller() TwoByteController
func (*TwoByteControlChange) MarshalBinary ¶
func (self *TwoByteControlChange) MarshalBinary() ([]byte, error)
func (*TwoByteControlChange) SetChannel ¶
func (self *TwoByteControlChange) SetChannel(channel Channel) bool
func (*TwoByteControlChange) SetController ¶
func (self *TwoByteControlChange) SetController(controller TwoByteController) bool
func (*TwoByteControlChange) SetValue ¶
func (self *TwoByteControlChange) SetValue(value TwoByteControllerValue) bool
func (*TwoByteControlChange) UnmarshalBinary ¶
func (self *TwoByteControlChange) UnmarshalBinary(data []byte) error
func (*TwoByteControlChange) Value ¶
func (self *TwoByteControlChange) Value() TwoByteControllerValue
type TwoByteController ¶
type TwoByteController uint8
func (TwoByteController) GoString ¶
func (self TwoByteController) GoString() string
func (TwoByteController) IsValid ¶
func (self TwoByteController) IsValid() bool
type TwoByteControllerValue ¶
type TwoByteControllerValue uint16
func (TwoByteControllerValue) GoString ¶
func (self TwoByteControllerValue) GoString() string
func (TwoByteControllerValue) IsValid ¶
func (self TwoByteControllerValue) IsValid() bool
func (TwoByteControllerValue) Truncated ¶
func (self TwoByteControllerValue) Truncated() TwoByteControllerValue
Click to show internal directories.
Click to hide internal directories.