User Tools

Site Tools


event_reference

The basic xml tag is

<event type=“event” length=“1000”></event>

Event Types

TextEvent

Basic text directive

<event type=“text” length=“1000”>the text to display</event>'

ImageEvent

Graphic image display

<event type=“image” length=“1000”>imageFileName.jpg</event>

ScoreEvent

Vextab / Vexflow notation

<event type=“score” length=“1000”>stave … etc… [vextab definition]</event>

HtmlEvent

Static html elements. have to be wrapped in html tags, slightly unlike the other event types

<event type=“html” length=“1000”><html><p>the html</p></html></event>

ScriptEvent

Arbritrary javascript component. context references the current display div. The jQuery lib is available, and other libraries (and eventually a full scripting API) are to be implemented.

<event type=“script” length=“1000”>context.text('the event');</event>

Event Timing

The length attribute of events is mandatory and can either be a static value expressed in ms <event length=“3142” type=“text”>slice</event>

or as a scripted value as described in the three attribute types below.

Scriptable Timing

Initialisation Script

Evaluated once at the time of XML parsing, by setting the length attribute to staticScript. Produces a result which is unique to the performance instance but otherwise static.

<event type=“text” length=“staticScript”>hello time<length>return int(Math.random()*5000);</length></event>

Performer Script

Evaluated at the time of event call by the performer.Length attribute should be performerScript. Produces a result which is unique upon each call of the event, and unique to the client. Potentially unpredictable and asynchronous to any other event timing.

<event type=“text” length=“performerScript”>hello thyme<length>return int(Math.random()*7000);</length></event>

Conductor Script

Evaluated on demand by the server. Length attribute is conductorScript.

<event type=“text” length=“conductorScript”>unfortunate rhyme<length>return int(Math.random()*3000);</length></event>

Loop

TimeGroup

event_reference.txt · Last modified: 2015/05/26 16:37 by richard