to_cc

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2018 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Action

func Action(controller uint8, valuer midiline.Valuer) midiline.Action

Transform converts the given valuer to a control change if the given matcher matches.

Example:

// To get a transformer that converts MIDI notes between 40 and 50 on channel2 to cc1 messages, use
var m = midiline.And(typ.Channel2,message.NoteKeyRange(40,50,true))
var t = Transform(1, m, value.NoteKey)

func ActionScale

func ActionScale(controller uint8, valuer midiline.Valuer, scaler func(uint8) uint8) midiline.Action

TransformScale is like Transform but allows a scaler function to calculate the controller value from the valuer value.

Example:

// To get a transformer that converts MIDI note 64 on channel2 to cc1 message with value of 76, use
var m = midiline.And(typ.Channel2,message.NoteKey(64,true))
var t = TransformScale(1, m, value.NoteKey, func (in uint8) (out uint8){ return in+12 })

Types

This section is empty.

Jump to

Keyboard shortcuts

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