The basic xml tag is
<event type=“event” length=“1000”></event>
Basic text directive
<event type=“text” length=“1000”>the text to display</event>'
Graphic image display
<event type=“image” length=“1000”>imageFileName.jpg</event>
Vextab / Vexflow notation
<event type=“score” length=“1000”>stave … etc… [vextab definition]</event>
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>
<event type=“script” length=“1000”>context.text('the event');</event>
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.
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>
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>
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>