Skip to content

"Audio": Chapbook (v1.0.0)#


This examples uses two additional files, testpattern.ogg and testpattern.wav. Both files need to be downloaded and placed in the same folder as the HTML file in order to work as designed.


Chapbook supports both looping sounds (which it calls ambient) and one-off sound (which it calls effects). It only allows playing one sound at a time.



Twee Code#

:: Start
sound.ambient.test.url: 'testpattern.ogg'
sound.ambient.test.description: 'An audio test pattern'

> [[Play sound]]
> [[Stop the sound]]

:: Play sound
{ambient sound: 'test'}


:: Stop the sound
sound.ambient.test.playing: false


Twee Download