Audio Source
Shippingaudio_sourceLive mic capture as continuous L/R Signals
Signature
Outputs
leftSignalrightSignalsignalSignal— alias for first non-empty
Description
Audio Source captures live microphone / input audio and exposes it as continuous Signals. It is a pure source node: it has no inputs and no user-facing parameters. On each evaluation it reads per-channel capture handles from the engine's MEMORY_REGISTRY and emits the most recent trailing samples as the left, right, and signal outputs.
The node is non-blocking and never errors. If a capture handle is missing, idle, or has not yet produced samples, the corresponding output is simply an empty Signal (length 0). The signal output is an alias for the first non-empty channel, giving a convenient mono tap that works whether the device is mono or stereo. The optional window_size runtime parameter, when bound by capture control, limits each output to the last samples of the ring buffer.
Sample values are dimensionless normalized audio amplitudes (typically ); they carry no physical unit and no uncertainty (), since the samples are raw device readings rather than derived quantities. Attach scale_offset downstream to map to volts or pascals with an explicit unit.
Although it draws from an external, time-varying capture buffer, the node itself declared as stateless: it holds no internal accumulator between evaluations. All persistence lives in the shared capture ring buffer referenced by the runtime handle IDs (left_handle_id, right_handle_id, handle_id).
Mathematics
Examples
Live spectrum of the microphone
Wire audio_source.signal into an fft node to view the running frequency content of the input. Because the source emits an empty Signal until capture starts, the FFT stage safely produces nothing until real samples arrive.
audio_source.signal -> fft.signal -> sinkStereo level metering
Feed left and right separately into statistics (or envelope) to compute per-channel RMS / peak levels. The signal alias is ignored here so that a silent-but-present right channel still reports its own level rather than borrowing the left.
Applications
- Real-time acoustic measurement and monitoring pipelines (level meters, VU / RMS displays) built from live mic input.
- Live spectral analysis and machine-condition monitoring, feeding captured audio into `fft` and `peak_detection` for tonal fault signatures.
- Voice / speech front-ends where the mono `signal` tap drives filtering (`iir_filter`), windowing, and feature extraction.
- Educational demonstrations of sampling, aliasing, and windowing using a student's own microphone as the signal source.
Neat
The three outputs are not independent captures: `signal` is a zero-copy alias that resolves to whichever of `left`/`right` is first non-empty, so a mono device transparently populates the stereo-named `left` port.
Despite reading from a mutating external ring buffer, the node is declared `stateful: false` — the engine treats the capture buffer, not the node, as the stateful resource, which keeps graph re-evaluation deterministic.
Known issues
Because idle/unbound handles yield an empty Signal rather than an error, a mistyped or unassigned capture handle fails silently — downstream nodes just see length-0 input, which can be mistaken for genuine silence.
The `window_size` trailing-sample limit reflects only what is currently in the ring buffer; if the buffer has not yet filled, outputs are shorter than the requested window and their lengths can vary between successive evaluations.