Documentation ¶
Index ¶
- func ActionKey(velocity uint8, nt32th uint32, valuer midiline.Valuer) midiline.Action
- func ActionKeyScale(velocity uint8, nt32th uint32, valuer midiline.Valuer, scale func(uint8) uint8) midiline.Action
- func ActionVelocity(key uint8, nt32th uint32, valuer midiline.Valuer) midiline.Action
- func ActionVelocityScale(key uint8, nt32th uint32, valuer midiline.Valuer, scale func(uint8) uint8) midiline.Action
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ActionKey ¶
TransformKey converts the given valuer to a note key with the given velocity. If the valuer return 0, a note off message is sent.
Example:
// To get a transformer that converts cc1 messages on channel2 to note messages of a 8th note length and // and velocity of 100, use var m = midiline.And(typ.Channel2,message.ControlChange(1)) var t = TransformKey(100,4, m, value.ControlChange)
func ActionKeyScale ¶
func ActionKeyScale(velocity uint8, nt32th uint32, valuer midiline.Valuer, scale func(uint8) uint8) midiline.Action
TransformKeyScale is like TransformKey but allows a scaler function to calculate the note key value from the valuer value.
Example:
// To get a transformer that converts cc1 messages on channel2 to note messages of a 8th note length by adding 1, use var m = midiline.And(typ.Channel2,message.ControlChange(1)) var s = func (in uint8) (out uint8) { return in+1 // lib takes care that the value won't get too high (>127) } var t = TransformKeyScale(100,4,m,value.ControlChange,s)
func ActionVelocity ¶
TransformVelocity converts the given valuer to a note velocity with the given key. If the valuer return 0, a note off message is sent.
Example:
// To get a transformer that converts cc1 messages on channel2 to note velocities of key 64 and length 8th note, use var m = midiline.And(typ.Channel2,message.ControlChange(1)) var t = TransformVelocity(64, 4,m, value.ControlChange)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.