typ

package
v0.16.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2020 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// ChannelMsg will include all channel messages. However it must be used in conjunction with a
	// channel message filter, you are interested in, e.g. Channel1 and AllChannelMsg will include
	// all channel messages with midi channel 2 (channels are starting from 0 here)
	ChannelMsg = NoteMsg |
		PitchbendMsg |
		AftertouchMsg |
		PolyAftertouchMsg |
		ProgramChangeMsg |
		ControlChangeMsg
)

Variables

This section is empty.

Functions

func LineTick

func LineTick() midiline.Condition

LineTick returns a matcher that matches if msg is a LineTick.

Types

type Type

type Type int

Type is a flag that indicates interest in certain types of midi messages

const (

	// All will include every midi message
	All Type = 1 << iota

	// SysExclusiveMsg will include system exclusive messages
	SysExMsg

	// MetaMsg will include meta messages
	MetaMsg

	// SysCommonMsg will include system common messages
	SysCommonMsg

	// RealtimeMsg will include realtime messages
	RealtimeMsg

	// NoteMsg will include note on and note off messages. Must be used in conjunction with a channel filter
	NoteMsg

	// PitchbendMsg will include pitch bend messages. Must be used in conjunction with a channel filter
	PitchbendMsg

	// AftertouchMsg will include after touch messages. Must be used in conjunction with a channel filter
	AftertouchMsg

	// PolyAftertouchMsg will include polyphinc after touch messages. Must be used in conjunction with a channel filter
	PolyAftertouchMsg

	// ProgramChangeMsg will include program change messages. Must be used in conjunction with a channel filter
	ProgramChangeMsg

	// ControlChangeMsg will include control messages. Must be used in conjunction with a channel filter
	ControlChangeMsg

	// ChannelAny will any midi channel pass through
	ChannelAny

	// Channel0 will let messages of channel 0 pass through etc.
	Channel0
	Channel1
	Channel2
	Channel3
	Channel4
	Channel5
	Channel6
	Channel7
	Channel8
	Channel9
	Channel10
	Channel11
	Channel12
	Channel13
	Channel14
	Channel15
)

func Channel

func Channel(no uint8) Type

Channel returns the Type for the given channel number. It panics for channel numbers outside the valid range 0-15

func Join

func Join(f ...Type) (combined Type)

Join joins several filters and returnes the joined filter

func (Type) Condition

func (t Type) Condition(c config.Configuration, args []interface{}) (midiline.Condition, error)

func (Type) Includes

func (f Type) Includes(o Type) bool

Includes returns whether o is included in f

func (Type) IsMet

func (t Type) IsMet(msg midi.Message) bool

Matches return wether the given midi.Message matches the Filter.

func (Type) Name

func (t Type) Name() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL