FLvslidBnk2
Prev | Orchestra Opcodes and Operators | Next

## FLvslidBnk2

FLvslidBnk2 — A FLTK widget containing a bank of vertical sliders.

## Description

Plugin opcode in widgets. This opcode is part of the plugin repository and has to be installed separately. These FLTK widgets do not work on the Mac. The plugin repository can be found here: https://github.com/csound/plugins

FLvslidBnk2 is a widget containing a bank of vertical sliders.

## Syntax

    FLvslidBnk2 "names", inumsliders, ioutable, iconfigtable [,iwidth, iheight, ix, iy, istart_index]

## Initialization

“names” -- a double-quoted string containing the names of each slider. Each slider can have a different name. Separate each name with “@” character, for example: “frequency@amplitude@cutoff”. It is possible to not provide any name by giving a single space “ ”. In this case, the opcode will automatically assign a progressive number as a label for each slider.

inumsliders -- the number of sliders.

ioutable (optional, default=0) -- number of a previously-allocated table in which to store output values of each slider. The user must be sure that table size is large enough to contain all output cells, otherwise a segfault will crash Csound. By assigning zero to this argument, the output will be directed to the zak space in the k-rate zone. In this case, the zak space must be previously allocated with the zakinit opcode and the user must be sure that the allocation size is big enough to cover all sliders. The default value is zero (i.e. store output in zak space).

iconfigtable -- in the FLslidBnk2 and FLvslidBnk2 opcodes, this table replaces iminmaxtable, iexptable and istyletable, all these parameters being placed into a single table. This table has to be filled with a group of 4 parameters for each slider in this way:

min1, max1, exp1, style1, min2, max2, exp2, style2, min3, max3, exp3, style3 etc.

for example using GEN02 you can type:

inum ftgen 1,0,256, -2, 0,1,0,1, 100, 5000, -1, 3, 50, 200, -1, 5,….. [etcetera]

In this example the first slider will be affected by the [0,1,0,1] parameters (the range will be 0 to 1, it will have linear response, and its aspect will be a fill slider), the second slider will be affected by the [100,5000,-1,3] parameters (the range is 100 to 5000, the response is exponential and the aspect is a normal slider), the third slider will be affected by the [50,200,-1,5] parameters (the range is 50 to 200, the behavior exponential, and the aspect is a nice slider), and so on.

iwidth (optional) -- width of the rectangular area containing all sliders of the bank, excluding text labels, that are placed below that area.

iheight (optional) -- height of the rectangular area containing all sliders of the bank, excluding text labels, that are placed below that area.

ix (optional) -- horizontal position of the upper left corner of the rectangular area containing all sliders belonging to the bank. You have to leave enough space, below that rectangle, in order to make sure labels of sliders to be visible. This is because the labels themselves are external to the rectangular area.

iy (optional) -- vertical position of the upper left corner of the rectangular area containing all sliders belonging to the bank. You have to leave enough space, below that rectangle, in order to make sure labels of sliders to be visible. This is because the labels themselves are external to the rectangular area.

istart_index (optional, default=0) -- an integer number referring to a starting offset of output cell locations. It can be positive to allow multiple banks of sliders to output in the same table or in the zak space. The default value is zero (no offset).

## Performance

There are no k-rate arguments, even if cells of the output table (or the zak space) are updated at k-rate.

FLvslidBnk2 is a widget containing a bank of vertical sliders. Any number of sliders can be placed into the bank (inumsliders argument). The output of all sliders is stored into a previously allocated table or into the zak space (ioutable argument). It is possible to determine the first location of the table (or of the zak space) in which to store the output of the first slider by means of istart_index argument.

Each slider can have an individual label that is placed below it. Labels are defined by the “names” argument. The output range of each slider can be individually set by means of the min and max values inside the iconfigtable table. The curve response of each slider can be set individually, by means of a list of identifiers placed in the iconfigtable table (exp argument). It is possible to define the aspect of each slider independently or to make all sliders have the same aspect (style argument in the iconfigtable table).

The iwidth, iheight, ix, and iy arguments determine width, height, horizontal and vertical position of the rectangular area containing sliders. Notice that the label of each slider is placed below them and is not included in the rectangular area containing sliders. So the user should leave enough space below the bank by assigning a proper iy value in order to leave labels visible.

FLvslidBnk2 is identical to FLslidBnk2 except it contains vertical sliders instead of horizontal. Since the width of each single slider is often small, it is recommended to leave only a single space in the names string (“ “), in this case each slider will be automatically numbered.

| IMPORTANT!
Notice that the tables used by FLvslidBnk2 must be created with the ftgen opcode and placed in the orchestra before the corresponding valuator. They can not placed in the score. This is because tables placed in the score are created later than the initialization of the opcodes placed in the header section of the orchestra.

## See Also

FLslider, FLslidBnk, FLslidBnk2, FLvslidBnk2

## Credits

Author: Gabriel Maldonado

New in version 5.06

Prev | Up | Next
FLvslidBnk | Home | FLxyin