Pre-defined global values, Debugging, Mac os x – Expert Sleepers Augustus Loop v2.4.1 User Manual

Page 66

Advertising
background image

The OSC packet should include a float value after the path, which will be the value for the
parameter. E.g.

registerOSCPathForParameter( "/1/fader1", "Env 1 Scale" )

registerOSCPathForParameterNormalized( path, param )

As registerOSCPathForParameter() except that incoming OSC values in the range 0-1 are
renormalized to control the full parameter range between its minimum and maximum
values.

Pre-defined Global Values

The system defines some values before calling your script, which you can use to make the
script’s behaviour dependent on, for example, what kind of computer you’re using. These
values (which are pretty self-explanatory) are:

isMac

isWin

isVST

isAU

majorVersion

minorVersion

dotVersion

version

The plug-in’s version number is of the form x.y.z (e.g. 2.1.4) where x is the major version
number, y is the minor version number, and z is the dot version. The ‘version’ global vari-
able contains a single value combining all three e.g. for version 2.1.4, ‘version’ is 20104.
This is useful for making your scripts backwardly compatible - by testing for the version
number and not trying to use features that were not present in a version of the plug-in
older than the version you’re testing for.

Debugging

You can use Lua’s ‘print’ function to write out information to help you track what’s going
on (or what’s not going on) in your script. Also any run-time errors, or errors in loading
the script in the first place, are reported. In both cases, the output goes to:

Mac OS X

The system console.log. Use the standard Console utility (located in

Applications/

Utilities

) to view it.

Advertising