Xenwolf
Joined 17 September 2018
→In-browser sound generation: new section |
m P.S. semisine has been added as well |
||
Line 972: | Line 972: | ||
* It reacts to clicks on HTML elements with class <code>sequence-audio</code>. When one is clicked, it reads its <code>data-sequence</code> attribute and plays the encoded pattern. | * It reacts to clicks on HTML elements with class <code>sequence-audio</code>. When one is clicked, it reads its <code>data-sequence</code> attribute and plays the encoded pattern. | ||
* If <code>data-lock</code> attribute is set, it also adds the <code>sequence-audio-playing</code> class and ignores further clicks for the duration of the sequence. | * If <code>data-lock</code> attribute is set, it also adds the <code>sequence-audio-playing</code> class and ignores further clicks for the duration of the sequence. | ||
* Timbres defined by their harmonic spectra are supported. Builtins are <code>sine</code>, <code>flute</code>, <code>violin</code>; you can supply custom ones using <code>data-timbre-X</code> attributes. | * Timbres defined by their harmonic spectra are supported. Builtins are <code>sine</code>, <code>semisine</code>, <code>flute</code>, <code>violin</code>; you can supply custom ones using <code>data-timbre-X</code> attributes. | ||
* A sequence consists of the following elements, separated by whitespaces: | * A sequence consists of the following elements, separated by whitespaces: | ||
** <code>wait:DURATION</code> - adds DURATION ms to the global time shift, which starts at 0. | ** <code>wait:DURATION</code> - adds DURATION ms to the global time shift, which starts at 0. |