slider32table

slider32table — Stores a bank of 32 different MIDI control messages to a table.

Description

Creates a bank of 32 different MIDI control messages to a table.

Syntax

kflag slider32table ichan, ioutTable, ioffset, ictlnum1, imin1, \
      imax1, init1, ifn1, .... , ictlnum32, imin32, imax32, init32, ifn32

Initialization

ichan -- MIDI channel (1-16)

ioutTable -- number of the table that will contain the output

ioffset -- output table offset. A zero means that the output of the first slider will affect the first table element. A 10 means that the output of the first slider will affect the 11th table element.

ictlnum1 ... ictlnum32 -- MIDI control number (0-127)

imin1 ... imin32 -- minimum values for each controller

imax1 ... imax32 -- maximum values for each controller

init1 ... init32 -- initial value for each controller

ifn1 ... ifn32 -- function table for conversion for each controller

Performance

kflag -- a flag that informs if any control-change message in the bank has been received. In this case kflag is set to 1. Otherwise is set to zero.

slider32table is a bank of MIDI controllers, useful when using MIDI mixer such as Kawai MM-16 or others for changing whatever sound parameter in real-time. The raw MIDI control messages at the input port are converted to agree with iminN and imaxN, and an initial value can be set. Also, an optional non-interpolated function table with a custom translation curve is allowed, useful for enabling exponential response curves.

When no function table translation is required, set the ifnN value to 0, else set ifnN to a valid function table number. When table translation is enabled (i.e. setting ifnN value to a non-zero number referring to an already allocated function table), initN value should be set equal to iminN or imaxN value, else the initial output value will not be the same as specified in initN argument.

slider32table allows a bank of 32 different MIDI control message numbers.

As the input and output arguments are many, you can split the line using '\' (backslash) character (new in 3.47 version) to improve the readability. Using these opcodes is considerably more efficient than using the separate ones (ctrl7 and tonek) when more controllers are required.

slider32table is very similar to slider32 and sliderN family of opcodes (see their manual for more information). The actual difference is that the output is not stored to k-rate variables, but to a table, denoted by the ioutTable argument. It is possible to define a starting index in order to use the same table for more than one slider bank (or other purposes).

It is possible to use this opcode together with FLslidBnk2Setk and FLslidBnk2, so you can synchronize the position of the MIDI values to the position of the FLTK valuator widgets of FLslidBnk2. Notice that you have to specify the same min/max values as well the linear/exponential responses in both sliderNtable(f) and FLslidBnk2. The exception is when using table-indexed response instead of a lin/exp response. In this case, in order to achieve a useful result, the table-indexed response and actual min/max values must be set only in FLslidBnk2, whereas, in sliderNtable(f), you have to set a linear response and a minimum of zero and a maximum of one in all sliders.

See Also

Slider Banks

Credits

Author: Gabriel Maldonado

New in Csound version 5.06