-
Notifications
You must be signed in to change notification settings - Fork 3
Parameter Mapping
One core feature of WebAudioXML is the syntax for specifying how external variables can be mapped to a specific parameter in WebAudioXML. The feature applies to <var>
elements. The mapping can be a very straightforward, linear transformation from an incoming range of the external variable to a target range that suits an audio parameter. This makes it possible to map incoming values between e.g. 0 and 100 to a parameter value between 100 and 1000 (that might be useful for the frequency of a filter or an oscillator).
In many cases, the value needs to be transformed in a more complex way. E.g. the frequency value would benefit from an exponential increase rather than a linear and a MIDI note number (values between 0 and 127) needs to be converted to the frequency domain to make musical sense. On the way, the value might need to be snapped to a value in a list of steps to map interpolated values to an asymmetric pattern of values. All this can be done using the mapin, mapout, curve, steps and convert attributes similar to the example below. Please read more about the different attributes for the <var>
-element: var
<!-- The variable "f", stores a transformed value from variable "slider_val".
The slider is supposed to vary between 0 and 1 which is transformed to a
frequency value matching a key in C major by first snapping the float value
to a . -->
<var name="f" default="60" value="$slider_val" mapin="0,1" mapout="60,62,64,65,67,69,71,72" curve="step" convert="MIDI->frequency" />
<OscillatorNode frequency="$f" />
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)