Table of Contents

Scripting

[Graphic]

Scripting lets you extend jambient by programming scripts that do things at certain times or that respond to events in the user interface, such as changes to knobs or to the position of LoopTracks. Your scripts can automate many parts of jambient, from pitches, to LoopTrack positions, to the Blender on the Mix Pad, to opening and saving jam files.

For full details, see jambientscript.htm.

Using Scripts

To use a script, open the Scripting Window by clicking on the Script Button. Click on Open in the menu, and choose a script file. Try "ExampleScript.jms", for example. jambient loads the script, interprets the code, and builds whatever user interface is specified in the script. (Scripts can add buttons, checkboxes, sliders and dropdowns to the Scripting Window.) Once a script is loaded, you can interact with it through the controls it has created, although scripts don't need to define controls--a script might just get LoopTrack B to dog LoopTrack A and dodge LoopTrack C when you move them around in the 3d Map. You'll have to refer to the documentation provided with or within the scripts to see how to use them.

Disabling Events and Script Options

Scripts can respond to events such as changes to knob, for example by propagating changes to other knobs. If you want to stop these behaviours, click on the events menu and uncheck the events that correspond to the behaviour you want to disable. For example, unchecking OnPitchScroll disables events that change something as you move pitch knobs, unchecking OnPanChange disables events that do something when you finish changing a pan knob (i.e., release the mouse button).

Running scripts can be CPU intensive. If you are getting performance hits, try moving the frequency update sliders on scripts subtab in the Options Tab to the right. jambient will call the scripts events handlers less frequently, cutting down on CPU load. If that doesn't work, either hack out the boggy parts of the script, or disable events, or close the script window.

Developing Scripts

See jambientscript.htm for full details about jambient script, which extends Microsoft's VBScript by adding an object, called jam, that is an interface to the jambient engine, and by defining protocols for interaction between subroutines and jambient, and protocols for having scripts build a user interface in jambient.

Developing scripts is a matter of writing and testing them. jambient reports errors by line and column number in your script, so you'll need an editor that can give you these numbers. ConTEXT is a freeware editor that isn't bad and that can highlight VBScript syntax. Use the reload command in the menu to reload your script after you have corrected an error and resaved the script.





last modified 10-29-200