IanniX Notes See http://iannix.org for application.
(Notes last updated September 14, 2011)
Iannix Document Management
Scores are files of type *.ncxscore
Scripts are files of type *.ncxscript
On app open:
- all score files in the "Project" folder are loaded. These appear in Scores section in
the Score Center in the Inspector.
- All scripts in the "Project", "Tools" and "Examples" folders are loaded`. These appear
in Styles and Scripts section in the Score Center in the Inspector.
When a score is saved using the file menu, everything you see in the score is saved.
This could have been constructed by some combination of manual editing and scripts.
The file menu is used to rename, save or remove scores from the current project.
The file menu is used to open a different project folder
To create a new script double click on the "New Script" item in the "Scripts & Styles"
list (this acts as a template.)
Its not clear how to create a new project folder. At present Im not sure this is possible
directly from IanniX. I think it would need to be done in the file system.
In general, scripts are used to construct or make bulk changes to scores
Apparently scripts have no further effect after a score is playing (I need to verify this)
IanniX Scripting
Notes:
The following notes on scripting commands partly duplicate the documentation
available by clicking on the ? in the IanniX application. That would be a better place
to learn about command parameters. I didnt find the in-app documentation for a
while. As far as I know its not available directly from the IanniX web site.) My
documentation covers a bunch of useful things not mentioned in the official
documentation: as script events, global properties and the commands to prompt for
parameters from the user.
The ALL-CAPS words below are the symbolic names of the commands in the IanniX
source code (mainly for my own reference). Probably only of interest to C++
developers.
All commands are methods of the IanniX object and thus are accessed with the
syntax:
run(<command-name> param1 param2 ,,, )
The command and parameters are passed to execute as a single string delimited by
spaces, with the first field of the string being the command name and subsequent
fields are parameters to the command. In the case of commands that act on objects
the first parameter after the command name is the id ob the object.
I assume that none but the last parameter can contain spaces, since spaces are
delimiters.
See the setMessage object for an example of a command that has spaces in its last
parameter. (I need to confirm the correctness of this assumption)
Command to Create Objects
run("add <curve | cursor | trigger> id);
- COMMAND_ADD
- Adds a curve, cursor or trigger to the score
- id is an integer identification number for this object
- examples:
run("add curve 1100");
run("add trigger " + (2000 + index));
run("add cursor 100");
Commands That Act on Objects
(first parameter is the object to operate on)
(all these commands take the target object as first parameter)
(most take additional parameters, TBD)
The first parameter of all object commands is object:
- the integer id assigned to the object when it was created. or
- current, to cause the command to act on the object in the the previous object
command.
run("remove object ...");
- COMMAND_REMOVE
run("setgroup object groupName");
- COMMAND_GROUP
- groupName is the text name of a group to which this object should be assigned
run("settriggeroff object ...");
- COMMAND_TRIGGER_OFF
run("setcurve object ...");
- COMMAND_CURSOR_CURVE
run("setwidth object ...");
- COMMAND_CURSOR_WIDTH
run("setpattern object ...");
- COMMAND_CURSOR_START
run("setspeed object );
- COMMAND_CURSOR_SPEED
run("setspeedf object ...");
- COMMAND_CURSOR_SPEEDF
run("setoffset object ...");
- COMMAND_CURSOR_OFFSET
run("setboundssource object ...");
- COMMAND_CURSOR_BOUNDS_SOURCE
run("setboundstarget object ...");
- COMMAND_CURSOR_BOUNDS_TARGET
run("settime object ...");
- COMMAND_CURSOR_TIME
run("setpointat object pointIndex xCoord yCoord <zCoord>");
- COMMAND_CURVE_POINT
- Add or modify a point on a curve
- Currently only curves made of straight line segments are supported)
- pointIndex is the position of the point in the curve, counting from the beginning.
- If pointIndex is beyond the number of points in the curve, a line segment is added from the
position of the last point on the curve to position (xCoord yCoord), which becomes the last
point.
- If pointIndex is the position of an existing point, the point position is changed to (xCoord
yCoord).
- zCoord is optional
run("setpointstxt object ...");
- COMMAND_CURVE_TXT
run("setpointssvg object ...");
- COMMAND_CURVE_SVG
run("setpointssvg2 object ...");
- COMMAND_CURVE_SVG2
run("setpointsimg object ...");
- COMMAND_CURVE_IMG
run("setpointsellipse object );
- COMMAND_CURVE_ELL
run("setsize object ...");
- COMMAND_SIZE
run("setresize object ...");
- COMMAND_RESIZE
run("setresizef object ...");
- COMMAND_RESIZEF
run("setline object ...");
- COMMAND_LINE
run("setpos object xPos yPos <zPos>");
- COMMAND_POS
- Set the position of an object
- xPos, yPos are the desired position. zPos is optional.
- example
run("setPos current " + (indexMax/5) + " 0 0");
run("setactive object ...");
- COMMAND_ACTIVE
run("setlabel object object ...");
- COMMAND_LABEL
run("setmessage object message");
- COMMAND_MESSAGE
- Set the OSC message of an object. Format of message depends on the type of message.
- Example
run("setMessage current 100, midi://loopMIDI2/cc 0 0 cursor_value_y");
Non-Object Commands
run("clear");
- COMMAND_CLEAR
- Clear current document.
run("sendosc");
- COMMAND_MESSAGE_SEND
- Send an OSC message from a script?
run("registertexture 6-arguments");
- COMMAND_TEXTURE
run("registercolor 5-arguments");
- COMMAND_GLOBAL_COLOR
run("registercolor2 5-arguments");
- COMMAND_GLOBAL_COLOR2
run("settextureactive");
- COMMAND_TEXTURE_ACTIVE
run("settextureinactive");
- COMMAND_TEXTURE_INACTIVE
run( "settextureactivemessage");
- COMMAND_TEXTURE_ACTIVE_MESSAGE
run("settextureinactivemessage");
- COMMAND_TEXTURE_INACTIVE_MESSAGE
run("setcoloractive object ...");
- COMMAND_COLOR_ACTIVE
run("setcolorinactive object ...");
- COMMAND_COLOR_INACTIVE
run("setcoloractivemessage object ...");
- COMMAND_COLOR_ACTIVE_MESSAGE
run("setcolorinactivemessage object ...";
- COMMAND_COLOR_INACTIVE_MESSAGE
run("setcoloractive2 object ...");
- COMMAND_COLOR_ACTIVE2
run("setcolorinactive object ...2");
- COMMAND_COLOR_INACTIVE2
run("setcoloractivemessage2 object ...");
- COMMAND_COLOR_ACTIVE_MESSAGE2
run("setcolorinactivemessage2 object ...");
- COMMAND_COLOR_INACTIVE_MESSAGE2
run("autosize");
- COMMAND_AUTOSIZE
run("zoom percent");
- COMMAND_ZOOM
- percent is the percent to zoom (100 = normal size)
run("center x-coordiniate y-coordinate");
- COMMAND_CENTER
-x-coordinate, y-coordinate are coordinates to centre in the display
run("play play-status");
- COMMAND_PLAY
- Start or stop transport playing
play-status = 0 starts transport;
= non-zero stops transport
run("stop");
- COMMAND_STOP
- Stops transport
run("fastrewind");
- COMMAND_FF
- Reset transport to start
run("speed");
- COMMAND_SPEED
run("pushsnapshot");
- COMMAND_SNAP_PUSH
- Save state for undo
run("popsnapshot");
- COMMAND_SNAP_POP
- Restore previous state
run("log message");
- COMMAND_LOG
- Sends message text to log
Commands to Prompt for Data Prior to Running a Script
(These commands are called in a scripts onConfigure() procedure.)
iannix.meta("Title");
- Sets the title of the prompt window.
iannix.ask("GroupName", "Prompt", "VariableName", DefaultValue);
- GroupName is the text string that is the name of a grouping of data requests. All
prompts with the same GroupName listed under that heading.
- Prompt is text string used to prompt for this data item.
- VariableName is the text string that becomes the name of the variable that will hold the
value of this item for use in the script.
- DefaultValue is the default value that will be shown and used if the user does not enter a
value.
Script Global Properties
iannix
- The applications command execution object. The execute method of this object is called
to execute commands (see above command reference). Examples:
- run("clear");
- run("setPointAt current 1 " + x1 + " " + y1);
- See sample scripts for more examples.
mouseX
- continually updated with the current mouse X position?
mouseX
- continually updated with the current mouse Y position?
objectId
- Is this the currently selected object? Just a guess.
Script Events
function onConfigure()
- In this event, user can be prompted for parameters for the script.
function onCreate()
- In this event goes all the code to build the score
function onMessage()
- Called in each active script when an OSC message arrives?
function onDraw()
- Called in each active script upon each score paint event.
IanniX Notes See http://iannix.org for application.
(Notes last updated September 14, 2011)
Iannix Document Management
Scores are files of type *.ncxscore
Scripts are files of type *.ncxscript
On app open:
- all score files in the "Project" folder are loaded. These appear in Scores section in
the Score Center in the Inspector.
- All scripts in the "Project", "Tools" and "Examples" folders are loaded`. These appear
in Styles and Scripts section in the Score Center in the Inspector.
When a score is saved using the file menu, everything you see in the score is saved.
This could have been constructed by some combination of manual editing and scripts.
The file menu is used to rename, save or remove scores from the current project.
The file menu is used to open a different project folder
To create a new script double click on the "New Script" item in the "Scripts & Styles"
list (this acts as a template.)
Its not clear how to create a new project folder. At present Im not sure this is possible
directly from IanniX. I think it would need to be done in the file system.
In general, scripts are used to construct or make bulk changes to scores
Apparently scripts have no further effect after a score is playing (I need to verify this)
IanniX Scripting
Notes:
The following notes on scripting commands partly duplicate the documentation
available by clicking on the ? in the IanniX application. That would be a better place
to learn about command parameters. I didnt find the in-app documentation for a
while. As far as I know its not available directly from the IanniX web site.) My
documentation covers a bunch of useful things not mentioned in the official
documentation: as script events, global properties and the commands to prompt for
parameters from the user.
The ALL-CAPS words below are the symbolic names of the commands in the IanniX
source code (mainly for my own reference). Probably only of interest to C++
developers.
All commands are methods of the IanniX object and thus are accessed with the
syntax:
run(<command-name> param1 param2 ,,, )
The command and parameters are passed to execute as a single string delimited by