Module Duplex.Globals

Various global constants, functions and methods

Functions

split_filename (filename) split_filename TODO use cLib/cFileSystem methods
note_pitch_to_value (val) convert note-column pitch number into string value
value_to_midi_pitch (str_val) interpret note-string some examples of input: C#5 C--1 C-1 C#-1 note that wildcard will return a fixed octave (1)
extract_cc_num (str_val) extract cc number from a parameter
is_monochrome (colorspace) check if colorspace is monochromatic
strip_channel_info (str) remove channel info from value-string
strip_note_info (str) remove note info from value-string
has_note_info (str) remove note info from value-string

Tables

ORIENTATION (Enum) used for layout purposes
NOTE_ARRAY Table of note names
DEVICE_PROTOCOL (Enum)
DEVICE_MESSAGE (Enum)
DEVICE_EVENT (Enum) the type of event (pressed, held etc.)
PARAM_MODE (Enum) valid mode attributes for nodes
INPUT_TYPE (Enum) valid type attributes for nodes

Fields

MODULE_PATH The main folder
LOWER_NOTE Lowest possible note
UPPER_NOTE Highest possible note
RENOISE_DECIBEL Decibel constant


Functions

split_filename (filename)
split_filename TODO use cLib/cFileSystem methods

Parameters:

  • filename
note_pitch_to_value (val)
convert note-column pitch number into string value

Parameters:

  • val
    • NoteColumn note-value, e.g. 120

Returns:

    nil or NoteColumn note-string, e.g. "OFF"
value_to_midi_pitch (str_val)
interpret note-string some examples of input: C#5 C--1 C-1 C#-1 note that wildcard will return a fixed octave (1)

Parameters:

  • str_val

Returns:

    int
extract_cc_num (str_val)
extract cc number from a parameter

Parameters:

  • str_val
is_monochrome (colorspace)
check if colorspace is monochromatic

Parameters:

  • colorspace
strip_channel_info (str)
remove channel info from value-string

Parameters:

  • str
strip_note_info (str)
remove note info from value-string

Parameters:

  • str
has_note_info (str)
remove note info from value-string

Parameters:

  • str

Tables

ORIENTATION
(Enum) used for layout purposes

Fields:

  • VERTICAL
  • HORIZONTAL
  • NONE
NOTE_ARRAY
Table of note names

Fields:

  • C-
  • C#
  • D-
  • D#
  • E-
  • F-
  • F#
  • G-
  • G#
  • A-
  • A#
  • B-
DEVICE_PROTOCOL
(Enum)

Fields:

  • OSC
  • MIDI
DEVICE_MESSAGE
(Enum)

Fields:

  • OSC Osc Message
  • MIDI_CC Midi CC Message
  • MIDI_NOTE Midi Note Message
  • MIDI_PITCH_BEND Midi Pitch Bend Message
  • MIDI_CHANNEL_PRESSURE Midi Channel Pressure
  • MIDI_KEY Midi Note Message (unspecific)
  • MIDI_PROGRAM_CHANGE Midi Program Change Event
  • MIDI_NRPN Midi Non-Registered Parameter Number
DEVICE_EVENT
(Enum) the type of event (pressed, held etc.)

Fields:

  • BUTTON_PRESSED button event
  • BUTTON_RELEASED button event
  • BUTTON_HELD button event
  • VALUE_CHANGED slider, encoder event
  • KEY_PRESSED key event
  • KEY_RELEASED key event
  • KEY_HELD key event
  • PITCH_CHANGED key event
  • CHANNEL_PRESSURE key event
PARAM_MODE
(Enum) valid mode attributes for nodes

Fields:

  • abs 14 bit relative value CC absolute value (the default, will accept floating point values)
  • abs_7 14 bit relative value CC 7 bit absolute value (quantize to 7 bit range before output)
  • abs_14 14 bit relative value CC 14 bit absolute value
  • rel_7_signed 7 bit relative signed value Increase at [065 - 127], decrease at [001 - 063]
  • rel_7_signed2 7 bit relative signed value Increase at [001 - 063], decrease at [065 - 127] (known as "Relative 3" in the Behringer B-Control series)
  • rel_7_offset 7 bit relative value Increase at [065 - 127], decrease at [063 - 000] (known as "Relative 2" in the Behringer B-Control series)
  • rel_7_twos_comp 7 bit relative value Increase at [001 - 64], decrease at [127 - 065] (known as "Relative 1" in the Behringer B-Control series)
  • rel_14_msb increase at [0x01 - 0x7F] when MSB is 0x00, decrease at [0x7F - 0x01] when MSB is 0x7F NRPN: increase at [0x01 - 0x7F] when MSB is 0x00, decrease at [0x01 - 0x7F] when MSB is 0x40 (known as "Relative 1" in the Behringer B-Control series)
  • rel_14_offset increase at [0x01 - 0x7F] when MSB is 0x40, decrease at [0x7F - 0x01] when MSB is 0x3F NRPN: increase at [0x01 - 0x7F] when MSB is 0x40, decrease at [0x7F - 0x00] when MSB is 0x3F (known as "Relative 2" in the Behringer B-Control series)
  • rel_14_twos_comp increase at [0x01 - 0x7F] when MSB is 0x00, decrease at [0x01 - 0x7F] when MSB is 0x40 NRPN: increase at [0x01 - 0x7F] when MSB is 0x00, decrease at [0x7F - 0x00] when MSB is 0x7F (known as "Relative 3" in the Behringer B-Control series)
INPUT_TYPE
(Enum) valid type attributes for nodes

Fields:

  • button standard bidirectional button which output a value on press and release, but does not control it's internal state
  • togglebutton bidirectional button which toggles the state internally - this type of control does not support release and hold events (examples are buttons on the BCF/BCR controller)
  • pushbutton bidirectional button which will output values on press and release while controlling it's state internally. Some examples are Automap "momentary" buttons, or TouchOSC pushbuttons
  • fader manual fader
  • dial basic rotary encoder
  • xypad XY pad
  • keyboard keyboard
  • key key (drum-pad)
  • label text display

Fields

MODULE_PATH
The main folder
LOWER_NOTE
Lowest possible note
UPPER_NOTE
Highest possible note
RENOISE_DECIBEL
Decibel constant
generated by LDoc 1.4.2