---
title: On-Device Wavetable Sonification
url: https://www.emergentmind.com/topics/on-device-wavetable-sonification
type: topic
---

# On-Device Wavetable Sonification

Searching arXiv for the specified paper and closely related work on sonification, IoS, and wavetable synthesis.
On-device wavetable sonification is a device-level sonification approach in which sensor data are mapped directly to acoustic parameters and rendered locally on embedded hardware, rather than being transmitted to cloud services for later auditory display. In the Internet of Sounds (IoS), this positions synthesis at the network edge and makes audible feedback available during the sensing task itself. A representative implementation is described for soil moisture monitoring in water-scarcity contexts, where immediate, local feedback is intended to support irrigation decisions by encoding dryness and moisture through pitch, timbre, and temporal structure [2509.19097].

## 1. Scope, motivation, and IoS context

Sonification is defined as “the mapping of data to sound to communicate information about the original data source.” In the cited implementation, the target domain is soil moisture monitoring within the broader context of globally increasing water scarcity. The motivating use case is practical and local: during watering, stakeholders often need immediate feedback to avoid overwatering and to optimize irrigation [2509.19097].

The device-level placement is central. Earlier work is described as focusing on sonifications operating on the applications and services level of the IoS network infrastructure, whereas the present approach explores on-device sonification. The reported advantages over cloud-level sonification are lower latency, higher reliability, lower power and bandwidth demand, privacy and data minimization, and robustness to environmental constraints. Audible feedback is generated within the device’s audio buffer, “typically a few milliseconds,” enabling real-time response while watering. Sonification also remains available without network connectivity, because there is no dependency on gateways or back-end services. Only sensor polling and local audio are required, and data can be logged locally with only summary statistics sent when needed. Headphone output is specifically identified as a way to avoid acoustic masking by ambient noise and to remove the need for external speakers or remote audio endpoints [2509.19097].

Within this framing, on-device wavetable sonification is not merely a synthesis choice but an edge-computing strategy for IoS. A plausible implication is that the method is best understood as an “edge-first” auditory display architecture: sensing, mapping, and rendering are co-located, while uplink is optional and summary-oriented rather than central to operation.

## 2. Edge architecture and operating modes

The prototype implements on-device wavetable sonification at the IoS network edge. The sensor is an MH-series soil moisture hygrometer, characterized as a resistive voltage-divider probe for which increased moisture reduces resistivity and increases sensed voltage. Its typical probe length is approximately \(6\ \mathrm{cm}\), which is described as suitable for shallow-rooting plants. The signal chain in the second prototype is:

Sensor probe \(\rightarrow\) ADC (RP2040 analog input) \(\rightarrow\) MCU/DSP (Raspberry Pi Pico) \(\rightarrow\) wavetable engine (CircuitPython synthio; ulab-backed arrays) \(\rightarrow\) I2S \(\rightarrow\) DAC (PCM5100A on Pimoroni Pico Audio Pack) \(\rightarrow\) headphone amplifier (PAM8908JER) \(\rightarrow\) headphones [2509.19097].

The microcontroller is a Raspberry Pi Pico with RP2040, dual-core ARM Cortex-M0+ at \(133\ \mathrm{MHz}\), approximately \(264\ \mathrm{KB}\) SRAM, and approximately \(2\ \mathrm{MB}\) on-board flash, expandable via SD. Audio is rendered through a PCM5100A DAC, with stereo 16-bit at \(48\ \mathrm{kHz}\) in practice, and a PAM8908JER headphone amplifier. The software environment is CircuitPython 9.2.7 with synthio for audio synthesis and ulab for vectorized numeric arrays. Although interpreted Python is slower than C/C++, the synthio and ulab cores are described as compiled for performance.

Three operating modes are defined. In datalogging mode, the device performs \(1\ \mathrm{Hz}\) sensor logging to flash as a text file. In live sonification mode, the current readings are mapped in real time while a button is pressed. In historical sonification mode, the logged time series is replayed as impulses at \(1\ \mathrm{Hz}\). Mode selection occurs via boot script, and switching modes requires reboot to change file access between read and write. Scheduling is cooperative rather than RTOS-based: audio runs as a continuous stereo I2S stream from synthio with internal buffering, while the application loop updates oscillator parameters and mappings. With typical audio buffer sizes such as 128 samples, output latency at \(48\ \mathrm{kHz}\) is approximately \(2.67\ \mathrm{ms}\). Sensor polling is \(1\ \mathrm{Hz}\) for logging, and faster polling is described as possible for live mode, such as tens of hertz, with smoothing to reduce jitter [2509.19097].

The IoS communication layer is intentionally secondary. The prototype emphasizes local operation and logging, while noting that integration with MQTT, CoAP, or HTTP can be added to publish aggregated statistics or threshold events. The on-device sonification remains primary, and example uplink content includes daily minimum and maximum moisture values and watering events.

## 3. Wavetable synthesis implementation

The synthesis engine uses single-cycle waveforms of length \(N = 512\) samples stored in ulab arrays as signed 16-bit integers. Two tables are used: sine and falling sawtooth. The storage format is 16-bit fixed-point samples, and oscillator math can use fixed-point phase for efficiency. The oscillator core is described by the phase increment

$$
\mathrm{inc} = \frac{f\,N}{f_s}
$$

and the phase update

$$
\phi_{n+1} = (\phi_n + \mathrm{inc}) \bmod N.
$$

Linear interpolation is used within a table, with \(k = \lfloor \phi \rfloor\) and \(\lambda = \phi - k\):

$$
y[n] = (1 - \lambda)\,W[k] + \lambda\,W[k+1].
$$

Timbre morphing is achieved by linear interpolation between the sine and saw tables, controlled by the normalized or filtered moisture value \(d \in [0,1]\):

$$
y_{\mathrm{mix}}[n] = (1 - d)\,y_{\mathrm{sine}}[n] + d\,y_{\mathrm{saw}}[n].
$$

The sawtooth table is anti-aliased through additive construction with a controlled number of harmonics \(N_p\):

$$
W_{\mathrm{saw}}[k] = \sum_{n=1}^{N_p} \frac{1}{n}\,\sin\!\left(2\pi n\,\frac{k}{N}\right).
$$

The design rule is to choose \(N_p\) such that the highest partial remains below Nyquist. With \(f_{\max} \approx 587.33\ \mathrm{Hz}\) for D5 and \(N_p = 17\), the highest partial is approximately \(9.98\ \mathrm{kHz}\), which is below \(24\ \mathrm{kHz}\) at a \(48\ \mathrm{kHz}\) sampling rate, thereby avoiding aliasing while retaining brightness [2509.19097].

Amplitude and spectral shaping are intentionally conservative. The system applies a gentle amplitude envelope with approximately \(200\ \mathrm{ms}\) attack and \(800\ \mathrm{ms}\) decay, used per-note impulse in historical mode and sustained while the button is held in live mode. A resonant low-pass filter with cutoff approximately \(4\ \mathrm{kHz}\) and \(Q \approx 0.5\) is used to reduce harshness and alias-prone energy. Stereo panning assigns the root to center, the third to approximately \(45^\circ\) left, and the fifth to approximately \(45^\circ\) right. Polyphony consists of a three-voice chord—root, third, and fifth—whose pitch relationships are musical and MIDI-coded before conversion to frequency, with the stated purpose of aiding perceptual discrimination.

The implementation details reinforce the embedded orientation of the method. The sample rate is \(f_s = 48\ \mathrm{kHz}\), output is stereo 16-bit, and the memory footprint for the two core tables is approximately \(2\ \mathrm{KB}\). CPU utilization is described as bounded by synthio’s C-coded engine, with adequate headroom on RP2040 for a 3-voice chord and simple filtering at \(48\ \mathrm{kHz}\). The paper also recommends a 32-bit fixed-point phase accumulator, for example Q16.16 format, to minimize floating-point overhead and maintain precision. Application-loop parameter updates occur at a control rate such as \(50\)–\(100\ \mathrm{Hz}\), relying on I2S clocking and synthio to maintain the continuous stream.

## 4. Soil-moisture mapping strategy

The sensor measurement \(m\) may be ADC counts or voltage. The normalization procedure uses calibration bounds \(m_{\min}\) and \(m_{\max}\):

$$
\hat{m} = \frac{m - m_{\min}}{m_{\max} - m_{\min}}
\quad \text{clamped to } [0,1].
$$

To reduce jitter, smoothing is recommended through an exponential moving average:

$$
\hat{m}_n = (1 - \alpha)\,\hat{m}_{n-1} + \alpha\,\hat{m}^{\mathrm{raw}}_n
\quad \text{with } \alpha \in (0,1].
$$

Pitch mapping uses inverse polarity, so higher moisture yields lower pitch. For the three chord tones, the low-frequency set associated with moist conditions is G3 \(\approx 195\ \mathrm{Hz}\), B3 \(\approx 246.94\ \mathrm{Hz}\), and D4 \(\approx 293.66\ \mathrm{Hz}\); the high-frequency set associated with dry conditions is G4 \(\approx 392\ \mathrm{Hz}\), B4 \(\approx 493.88\ \mathrm{Hz}\), and D5 \(\approx 587.33\ \mathrm{Hz}\). The per-voice mapping is

$$
f(\hat{m}) = f_{\mathrm{high}} - (f_{\mathrm{high}} - f_{\mathrm{low}})\,\hat{m}.
$$

This produces a one-octave span per voice. Dry soils therefore produce brighter, higher chords, while moist soils produce lower, smoother chords [2509.19097].

Amplitude mapping is optional:

$$
A(\hat{m}) = A_{\min} + (A_{\max} - A_{\min})\,\hat{m}.
$$

Timbre selection uses the moisture-dependent wavetable index. With \(T = 2\) tables, sine and saw, the system can use

\[
\mathrm{index} = \mathrm{round}(\hat{m}\cdot(T-1)),
\]

or continuously interpolate with \(d = \hat{m}\) for smoother timbre transitions. In live mode, timbre morphs as watering changes moisture, while the initial chord encodes baseline moisture. In historical mode, each data point is rendered as an impulse at \(1\ \mathrm{Hz}\), making trend perception possible over time; the paper reports that participants recognized decreasing moisture. The design also proposes threshold earcons for crossing dry or moist thresholds and trend earcons for rapid change as an extension rather than a completed part of the prototype.

Calibration is treated as site-specific. The paper advocates observing minimum and maximum sensor values for the relevant soil composition and remapping accordingly. If a voltage-to-volumetric water content model is required, the standard forms given are

$$
\mathrm{VWC} = aV + b
\quad \text{or} \quad
\mathrm{VWC} = a_0 + a_1 V + a_2 V^2.
$$

No coefficients are provided for the MH-series probe, and the dependence on sensor and soil type is stated explicitly.

A worked example in the paper fixes \(f_s = 48{,}000\ \mathrm{Hz}\), \(N = 512\), \(m_{\min} = 250\) counts, \(m_{\max} = 800\) counts, and a measured value \(m = 600\) counts. The raw normalization is approximately \(0.636\); with \(\alpha = 0.2\) and previous smoothed \(\hat{m}_{n-1} = 0.50\), the updated smoothed value is approximately \(0.527\). That value is also used as the timbre factor \(d\), placing the sound midway between sine and saw. For the root voice, the mapped frequency is approximately \(288.2\ \mathrm{Hz}\), with a phase increment of approximately \(3.073\) samples per audio sample. The resulting chord is described as lying in the middle of the specified octave span with a moderately bright timbre.

## 5. Evaluation and perceptual interpretation

The evaluation is a preliminary user study with \(n = 9\). In live discrimination, 6 users correctly identified the more moist plant, and the Likert moisture rating mean for the wet soil was \(u = 3.44\) with \(SD = 1.5\). The same number, 6 users, correctly identified the drier plant, and the Likert moisture rating mean for the dry soil was \(u = 2.44\) with \(SD = 1.74\). In historical mode, 6 users correctly identified that moisture levels were falling; perceived rate of change was \(u = 2.77\) with \(SD = 1.09\) on a 1–5 scale. On the BUZZ scale for auditory interface user experience, the mean was \(u = 52.66\) with \(SD = 3.04\), corresponding to approximately \(68.39\%\) effectiveness with moderate inter-user disagreement [2509.19097].

The stated interpretation is cautious. While preliminary, users generally distinguished moisture differences and recognized decreasing trends. The sonification is said to support decision-making by encoding dryness as higher, brighter, rougher timbres and moisture as lower, smoother timbres, allowing listeners to gauge when to stop watering and to perceive short-term trends. Because the study is explicitly preliminary and because the BUZZ result indicates moderate inter-user disagreement, the evidence supports feasibility rather than definitive generalization.

A common misconception in this area is that increased synthesis complexity necessarily improves perceptual clarity. The prototype history points in the opposite direction for this task. The first prototype used FM synthesis, but audio fidelity and the need to discriminate sidebands were reported as mismatched for single-variable moisture sonification on minimal hardware. Wavetable synthesis was then selected because it provided efficient timbral control at low CPU cost, a direct mapping between data and spectral brightness via table morphing, and alignment with auditory display literature emphasizing parametric mappings and timbre control. This does not imply that FM is categorically unsuitable; it indicates that, in this particular single-variable embedded monitoring context, wavetable synthesis was judged more appropriate.

## 6. Trade-offs, constraints, and deployment practice

The design trade-offs are presented explicitly. Table size trades timbral richness against memory consumption: larger tables reduce interpolation error but increase memory usage, and \(512\) samples is described as a good compromise. Interpolation method trades CPU cost against refinement: linear interpolation is inexpensive and perceptually adequate, while cubic interpolation is heavier and “rarely necessary on RP2040.” Anti-aliasing strategy trades memory against spectrum management: a bandlimited saw created additively avoids aliasing without multiple sub-tables, whereas multi-band tables would increase memory use [2509.19097].

Several limitations and risks are identified. Sensor reliability and calibration drift are important because resistive probes can corrode, and calibration must be revisited for each soil type due to large variability in wilting point, field capacity, and available water across textures such as clay and sand. Environmental noise remains a concern despite the mitigation provided by headphones; in communal settings, speaker-based diffusion may require louder output or earcons. The energy budget constrains long-term battery operation, which requires careful duty-cycling and low control-rate polling, and the headphone amplifier adds power draw. Scalability across many nodes is limited by the local nature of on-device sonification, although fleet management can publish summaries via MQTT or CoAP, with TLS or DTLS required for secure uplink. Accessibility is also identified as a design consideration: mappings should be perceptually informed, and alternative cues such as earcons or haptics should be considered for users with hearing differences. Future work is expected to refine mappings in order to improve inter-user agreement, a need suggested by the BUZZ scores.

The deployment guidance consolidates these constraints into practice. The paper recommends modular separation of sensing, calibration, mapping, synthesis, and logging, with clear interfaces and isolated testing. Calibration should be performed per soil and site by recording minimum and maximum values under known wet and dry conditions, and, if VWC is needed, fitting a linear or quadratic model with site-specific coefficients. Perceptually informed mappings are emphasized: inverse pitch mapping with dry mapped higher, and timbre brightness with dry mapped toward saw, are recommended because they align with listener expectations summarized in the text as “rough/bright \(\approx\) dry; smooth/dark \(\approx\) moist.” The octave span should remain limited to one octave, and overcomplicated timbres should be avoided. Audio hygiene involves bandlimiting the saw content through additive construction and keeping the filter and envelope gentle. Scheduling guidance is to keep audio buffers short for low latency, poll sensors at a reasonable control rate with exponential moving average smoothing, and avoid blocking I/O in the audio loop. Field maintainability includes preference for headphone output, protection of probes from corrosion, documentation of calibration steps, SD-based logging, and choosing probe depth consistent with the root zone, with the given prototype being suited to shallow-root plants.

Taken together, these design choices define on-device wavetable sonification as a lightweight, perceptually structured, and edge-resident auditory display method for soil moisture monitoring. In the reported IoS implementation, its technical identity is determined by local synthesis, low-latency buffered audio, site-specific calibration, and a tightly constrained mapping from moisture to pitch and spectral brightness, all directed toward immediate irrigation feedback under water-scarcity conditions [2509.19097].

Source: https://www.emergentmind.com/topics/on-device-wavetable-sonification