filter

package
v1.20.3 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2020 License: MIT Imports: 2 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filter

type Filter func(msg midi.Message) bool

Filter detects metronome beats on the metronome track. It is a function that returns true when a metronome beat was detected.

func Aftertouch

func Aftertouch() Filter

Aftertouch returns a Filter that triggers only for the aftertouch messages.

func And

func And(filters ...Filter) Filter

And returns a filter that is true if all of the given filters are true

func CC

func CC(controller int8) Filter

CC returns a Filter that triggers only for the given controller. If controller is < 0, any controller will trigger.

func Channel

func Channel(ch int8) Filter

Channel returns a Filter that triggers only for messages on the given MIDI channel. If ch is < 0, any channel will trigger.

func NoteOff

func NoteOff(key int8) Filter

NoteOff returns a Filter that triggers only for the given key. If key is < 0, any key will trigger.

func NoteOffVelocity

func NoteOffVelocity(key int8) Filter

NoteOffVelocity returns a Filter that triggers only for the given key. If key is < 0, any key will trigger.

func NoteOn

func NoteOn(key int8) Filter

NoteOn returns a Filter that triggers only for the given key. If key is < 0, any key will trigger.

func Or

func Or(filters ...Filter) Filter

Or returns a filter that is true if any of the given filters is true

func Pitchbend

func Pitchbend() Filter

Pitchbend returns a Filter that triggers only for the pitchbend messages > 0.

func PolyAftertouch

func PolyAftertouch(key int8) Filter

PolyAftertouch returns a Filter that triggers only for the polyaftertouch messages of the given key. If key is < 0, any key will trigger.

Jump to

Keyboard shortcuts

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