Documentation
¶
Index ¶
- func FailOnWriteErrorAdapter(write func(b []byte) (int, error)) func(data []byte)
- func RawMessageToChannelMessageAdapter(in midi.In, consumers ...ChannelMessageConsumer)
- type Arpegiator
- type ChannelMessageConsumer
- type INotesInDevice
- type MessageConsumer
- type NoteSet
- func (s NoteSet) Add(e m.RichNote) NoteSet
- func (s NoteSet) At(i int) m.RichNote
- func (s NoteSet) Compare(s2 NoteSet) (added NoteSet, removed NoteSet)
- func (s NoteSet) Count(condition func(message m.RichNote) bool) int
- func (s NoteSet) Delete(e m.Note) NoteSet
- func (s NoteSet) Iterate(cb func(e m.RichNote))
- type NoteSetConsumer
- type NotesInDevice
- type NotesOutDevice
- type Pattern
- type PatternItem
- func (a PatternItem) GetChannel() byte
- func (a PatternItem) GetIndex() byte
- func (a PatternItem) GetOctave() int8
- func (a PatternItem) GetVelocity() byte
- func (a PatternItem) Less(element set.Element) bool
- func (a PatternItem) String() string
- func (a PatternItem) Transpose(note m.RichNote) (m.RichNote, error)
- type PitchBendMessageConsumer
- type PressureMessageConsumer
- type StickyNotesInDevice
- type TransposeError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FailOnWriteErrorAdapter ¶
func RawMessageToChannelMessageAdapter ¶
func RawMessageToChannelMessageAdapter(in midi.In, consumers ...ChannelMessageConsumer)
Types ¶
type Arpegiator ¶
type Arpegiator struct {
// contains filtered or unexported fields
}
func NewArpegiator ¶
func NewArpegiator(noteIn INotesInDevice, arpIn INotesInDevice, consumers ...NoteSetConsumer) *Arpegiator
type ChannelMessageConsumer ¶
type ChannelMessageConsumer func(message m.ChannelMessage)
func PitchBendFilter ¶
func PitchBendFilter(consumers ...PitchBendMessageConsumer) ChannelMessageConsumer
func PressureFilter ¶
func PressureFilter(consumers ...PressureMessageConsumer) ChannelMessageConsumer
type INotesInDevice ¶
type INotesInDevice interface {
AddNoteSetConsumer(consumer NoteSetConsumer)
}
type MessageConsumer ¶
type MessageConsumer func(data []byte)
func FailOnPrintErrorAdapter ¶
func FailOnPrintErrorAdapter(cb func(a ...interface{}) (n int, err error)) MessageConsumer
type NoteSet ¶
func NewNoteSet ¶
type NoteSetConsumer ¶
type NoteSetConsumer func(notes NoteSet)
type NotesInDevice ¶
type NotesInDevice struct { NoteSet // contains filtered or unexported fields }
func NewNoteInDevice ¶
func NewNoteInDevice() *NotesInDevice
func (*NotesInDevice) AddNoteSetConsumer ¶
func (device *NotesInDevice) AddNoteSetConsumer(consumer NoteSetConsumer)
func (*NotesInDevice) ConsumeMessage ¶
func (device *NotesInDevice) ConsumeMessage(channelMessage d.ChannelMessage)
type NotesOutDevice ¶
type NotesOutDevice struct {
// contains filtered or unexported fields
}
func NewNoteOutDevice ¶
func NewNoteOutDevice(messageConsumers ...MessageConsumer) *NotesOutDevice
func (*NotesOutDevice) ConsumeNoteSet ¶
func (device *NotesOutDevice) ConsumeNoteSet(noteSet NoteSet)
type Pattern ¶
func NewPattern ¶
func (Pattern) Compare ¶
func (s Pattern) Compare(s2 Pattern) ([]PatternItem, []PatternItem)
func (Pattern) Iterate ¶
func (s Pattern) Iterate(cb func(e PatternItem))
type PatternItem ¶
func (PatternItem) GetChannel ¶
func (a PatternItem) GetChannel() byte
func (PatternItem) GetIndex ¶
func (a PatternItem) GetIndex() byte
func (PatternItem) GetOctave ¶
func (a PatternItem) GetOctave() int8
func (PatternItem) GetVelocity ¶
func (a PatternItem) GetVelocity() byte
func (PatternItem) String ¶
func (a PatternItem) String() string
type PitchBendMessageConsumer ¶
type PitchBendMessageConsumer func(message m.PitchBendMessage)
type PressureMessageConsumer ¶
type PressureMessageConsumer func(message m.PressureMessage)
func FailOnWritePressureAdapter ¶
func FailOnWritePressureAdapter(write func(b []byte) (int, error)) PressureMessageConsumer
type StickyNotesInDevice ¶
type StickyNotesInDevice struct {
*NotesInDevice
}
func (*StickyNotesInDevice) ConsumeMessage ¶
func (device *StickyNotesInDevice) ConsumeMessage(channelMessage m.ChannelMessage)
type TransposeError ¶
type TransposeError string
func (TransposeError) Error ¶
func (e TransposeError) Error() string
Click to show internal directories.
Click to hide internal directories.