FLxyinFLTK:OtherFLxyinFLxyin
Senses the mouse cursor position in a user-defined area inside an FLpanel.
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
Similar to xyin, sense the mouse cursor position in a user-defined area inside an FLpanel.
Syntaxkoutx, kouty, kinside FLxyin ioutx_min, ioutx_max, iouty_min, iouty_max, \
iwindx_min, iwindx_max, iwindy_min, iwindy_max [, iexpx, iexpy, ioutx, iouty]Initializationioutx_min, ioutx_max - the minimum and maximum limits of the interval to be output (X or horizontal axis).
iouty_min, iouty_max - the minimum and maximum limits of the interval to be output (Y or vertical axis).
iwindx_min, iwindx_max - the X coordinate of the horizontal edges of the sensible area, relative to the FLpanel ,in pixels.
iwindy_min, iwindy_max - the Y coordinates of the vertical edges of the sensible area, relative to the FLpanel, in pixels.
iexpx, iexpy - (optional) integer numbers denoting the behavior of the x or y output: 0 -> output is linear; -1 -> output is exponential; any other number indicates the number of an existing table that is used for indexing. With a positive value for table number, linear interpolation is provided in table indexing. A negative table number suppresses interpolation. Notice that in normal operations, the table should be normalized and unipolar (i.e. all table elements should be in the zero to one range). In this case all table elements will be rescaled according to imax and imin. Anyway, it is possible to use non-normalized tables (created with a negative table number, that can contain elements of any value), in order to access the actual values of table elements, without rescaling, by assigning 0 to iout_min and 1 to iout_max.
ioutx, iouty – (optional) initial output values.
Performancekoutx, kouty - output values, scaled according to user choices.
kinside - a flag that informs if the mouse cursor falls out of the rectangle of the user-defined area. If it is out of the area, kinside is set to zero.
FLxyin senses the mouse cursor position in a user-defined area inside an FLpanel. When FLxyin is called, the position of the mouse within the chosen area is returned at k-rate. It is possible to define the sensible area, as well the minimum and maximum values corresponding to the minimum and maximum mouse positions. Mouse buttons don’t need to be pressed to make FLxyin to operate. It is able to function correctly even if other widgets (present in the FLpanel) overlap the sensible area.
FLxyin unlike most other FLTK opcodes cannot be used inside the header, since it is not a widget. It is just a definition of an area for mouse sensing within an FLTK panel.
Examples
Here is an example of the FLxyin opcode. It uses the file FLxyin.csd.
Example of the FLxyin opcode.See the sections Real-time Audio and Command Line Flags for more information on using command line flags.
Here is another example of the FLxyin opcode. It uses the file FLxyin-2.csd.
Example of the FLxyin opcode.See AlsoFLpanelCreditsAuthor: &namegabriel;New in version 5.06