CC14:
Filter:
CC14/Classes (extension) | Midi

CC14
ExtensionExtension

14 bit midi functionality and helper functions

Description

This class represents a responder for a 14 bit midi signal.

A 14 bit midi signal is comprised of two 7 bit midi cc signals. These two cc numbers are combined to create a 14 bit number which is why this class takes two CC numbers, as opposed to the singular CC number of a 7 bit responder.

This responder also features a couple of nice side effects:

It is possible to register a single function in the responder or a collection of functions. The latter is useful if you want to easily create different responders for one 14 bit midi cc value, either using it for different things or creating different transformations of the incoming signal.

A built in pattern is available as well by calling the .pattern method.

Optionally, you can choose to transform the raw midi data to a normalized value in the range of 0.0 to 1.0.

Class Methods

.new

Arguments:

cc1

Lower midi cc number

cc2

Upper midi cc number

chan

Midi channel

fix

If set to false, the responder will stop responding when the user causes a hard stop.

normalizeValues

Setting this to true transforms all values passed to the responder function to the range 0.0 to 1.0, if set to false it will be the raw 14 bit value in the range 0 to 16383.

Returns:

a CC14

Instance Methods

.func

Sets the responder function - a function which is passed |val, chan, cc1, cc2| as arguments.

The function may be either a single function or a collection of functions. If the latter, all the functions in the collection are called each time data flows into the responder. The latter is useful for creating derivations and transformations of the midi value.

Arguments:

inFunction

.pattern

This returns a pattern proxy which contains the normal value of the responder (0.0 to 1.0 if normalized, 0 to 16383 if not).

Returns:

a PatternProxy

Examples