Skip to content
Hans Lindetorp edited this page Oct 25, 2023 · 1 revision

Experimental (not available in public release)

Some elements, like the <ObjectBasedAudio> or the <Envelope> can be triggered by events. These events can be triggered by an event in the hosting web page or by a logical condition for variables that is met. The event is triggered once and is not triggered again until the condition has become false and then evaluates true again. To receive and distribute events, WAXML uses the <Event> element with the ‘trig’, and ‘target’ attributes where ‘trig’ can be either a name or a logical expression. Target is a string that is specified for the trig-attribute in the target node.

ex:

XML
<Chain>
  <Event trig="$variable1>100" target="trigger1" />
  <Envelope name="env1" trig="trigger1" ADSR="0, 20, 50, 30" max="1" />
  <OscillatorNode />
  <GainNode gain="€env1" />
</Chain>
Clone this wiki locally