pinout-wave - osc:wave pinout-freq - osc:freq osc:out - merge:l pinout-out - merge:out
Preface
To hear is not to listen
The human`s hearing|> has a remarkable low perception latency|>, considering the senses|> of skin|>, mouth|>, nose|>, eye|>, and ear|>.
Both ears are connected to the "thumb-sized" brainstem|> near between them, with only a few centimeters of vestibulocochlear nerve|> [what a word!].
- Distance between both eardrums|>: about 14cm
- Outer head distance: about 17.5-20cm
- Maximal interaural time difference|>: about 0.63ms,
this is with the speed of sound|>
343m/s * 0.63ms ~ 21.6cm. - The time discrimination|>Hearing#Time_discrimination is better than the upper limit of the heard frequencies suggests: 10µs ≙ 100kHz.
- The human hearing range|> is commonly given as 20Hz to 20kHz. But: young people typically can hear grasshoppers|>, Bats|> and even dog whistles|>, the older rather not.
Sound localization|> is very precise and fast. The reaction time ear to skeletal muscle|> is mainly limited by the nerve conduction velocity|>: 50-60m/s brain to muscle, 33-120m/s muscle to brain for e.g. tension feedback.
Modular Audio Synthesizer Construction Set
Using: Web Audio API, JS Module /e/appetizer.jsThis is a JavaScript|> digital breadboard|>, coming with a set of primary modules, to build modular synthesizers|> from JSON|>-style descriptions or even a set of schematic diagrams|> the sketch-board-style.
The primary modules create or modify digital signals|>, typically represented in single-precision floating-point format|> (32bit) at 48kHz in continuous blocks of 128 samples|>Sampling (signal processing).
- create: waves from sine to sample play and envelopes
- modify: gain, delay, biquad filters|>Electronic_filter_topology#Biquad_filter_topology, convolution|>, dynamics processing, wave shaping
About
Using the common browser standards
Notes on the Web Audio API|m>Web/API/Web_Audio_API, the Web MIDI API|m>Web/API/Web_MIDI_API and the Media Capture and Streams API|m>Web/API/MediaDevices/enumerateDevices:
- An AudioNode|m>Web/API/AudioNode is tied to the AudioContext|m>Web/API/BaseAudioContext constructed with, which is currently not available in Web Workers|m>Web/API/Web_Workers_API.
- The only way to create a custom AudioNode or
AudioParam|m>Web/API/AudioParam is a
AudioWorkletNode|m>Web/API/AudioWorkletNode:
awn:AudioWorkletNode [t inputs|parameters][b outputs] +AudioWorkletNode()|m>Web/API/AudioWorkletNode/AudioWorkletNode
awp:AudioWorkletProcessor +process(inputs|m>Web/API/AudioWorkletProcessor/process#inputs,
outputs|m>Web/API/AudioWorkletProcessor/process#outputs,
parameters|m>Web/API/AudioWorkletProcessor/process#parameters_2)|m>Web/API/AudioWorkletProcessor/process// Load WorkletProcessor code from separate file: await audioContext.audioWorklet.addModule("some-processor.js"); // The WorkletModule registers at least one processor: registerProcessor(name, processorCtor) - An "a-rate" AudioParam value is calculated for each sample, while a "k-rate" is calculated for sample blocks, currently fixed to 128 samples. With 48000Hz sampling rate this a 375Hz block rate.
- The standard audio nodes don`t offer a parameter description, e.g. "a-rate" or "k-rate".
- OscillatorNode|m>Web/API/OscillatorNode, GainNode|m>Web/API/GainNode and DelayNode|m>Web/API/DelayNode have "a-rate" parameters.
- AudioBufferSourceNode|m>Web/API/AudioBufferSourceNode or DynamicsCompressorNode|m>Web/API/DynamicsCompressorNode have "k-rate" parameters.
- currentTime|m>Web/API/BaseAudioContext/currentTime unprecise because of security.
- Cannot restart an AudioBufferSourceNode|m>Web/API/AudioBufferSourceNode or OscillatorNode|m>Web/API/OscillatorNode.
- AudioParam to audio signal: ConstantSourceNode|m>Web/API/Web_Audio_API/Controlling_multiple_parameters_with_ConstantSourceNode
- Audio nodes can have multiple inputs and outputs with different channel configurations. Standard nodes have none or one input and none or one output, except the ChannelSplitterNode|m>Web/API/ChannelSplitterNode and ChannelMergerNode|m>Web/API/ChannelMergerNode.
TODO
- default parameters
- audio input
- restartable Oscillator / SampleNode
- OT: toggle button (checkbox replacement)
- better value inputs