-
Notifications
You must be signed in to change notification settings - Fork 4
AmbientAudio
The AmbientAudio element simplifies the implementation of background sounds. It loads a sound file and takes care of smooth crossfading. The sound file itself should not have any fade-ins our fade-outs to work well. To make the loop perfect, please allow for some overlapping. 1s is default, but it can be set with the attribute "crossFade" and is expressed in seconds or milliseconds depending on the value set by "timeUnit" (default is seconds). It inherits attributes from the AudioBufferSourceNode. If the length of the loop is set to a short value, the AmbientAudio element can be used to create a granular synth. Se example 2.
-
src
-
loop
-
loopStart
-
loopEnd
-
trig
-
release
-
playbackRate
-
crossFade
<?xml version="1.0" encoding="UTF-8"?>
<Audio version="1.0" timeUnit="ms">
<AmbientAudio id="ambience1" src="audio/ambience1.mp3" crossFade="2000"></AmbientAudio>
</Audio>
<AmbientAudio
src="audio/granular.mp3"
start="auto"
loopStart="$loopStart"
loopLength="$loopLength"
fadeTime="250"
detune="$detune"
randomPosition="0"
randomDuration="0"
randomDetune="0"
/>
Read more: https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode
Please follow my research journey at http://hans.arapoviclindetorp.se and https://www.facebook.com/hanslindetorpresearch/
- Collaborative music-making: special educational needs school assistants as facilitators in performances with accessible digital musical instruments (Frontiers in Computer Science 2023)
- Playing the Design: Creating Soundscapes through Playful Interaction (SMC2023)
- Accessible sonification of movement: A case in Swedish folk dance (SMC2023)
- Evaluating Web Audio for Learning, Accessibility, and Distribution (JAES2022)
- Audio Parameter Mapping Made Explicit Using WebAudioXML (SMC2021)
- Putting Web Audio API To The Test: Introducing WebAudioXML As A Pedagogical Platform (WAC2021)
- Sonification for everyone everywhere – Evaluating the WebAudioXML Sonification Toolkit for browsers (ICAD2021)
- WebAudioXML: Proposing a new standard for structuring web audio (SMC2020)