Regolith Highfield · SONA

Turning data into sound, with method.

Sonification isn't an effect: it's a mapping. This wiki explains what SONA does behind the scenes, the math that makes it rigorous, and how to get a pleasant melody without ever distorting the data. All offline, all reproducible.

What sonification is

Sonification is the representation of data through non-vocal sound: instead of drawing a curve, you make it heard. It's used in astronomy (light curves, gravitational waves), medicine (the pulse oximeter's "beep" is pure sonification), finance, and accessibility for those who can't see a chart.

Its strength is temporal perception: the ear catches rhythm, trends, peaks and periodicity with a sensitivity the eye struggles to match over long sequences. Its weakness is that sound is ephemeral and culturally loaded — which is why a method is needed: declare the mapping, keep it consistent, and be able to reproduce it identically.

SONA's master rule

There's no "absolutely best" mapping: there's the one consistent with the question you ask. SONA gives you explicit control over every step and records your choices, so your sonification is a defensible statement, not a lucky accident.

The two paths

Each SONA module starts from one of two different questions.

📊→🎵 Data mapping

You have a table of numbers and want to explore or present them as sound, with traceability. One column drives the pitch; pan, volume and duration can map other columns. Priority: fidelity to the data.

🌌→🌧 Immagine → soundscape

You start from a photo (a galaxy, an X-ray, a map) and want a soundscape that follows its shape: bright pixels become grains flowing over time. Priority: the perceived shape.

The choice isn't aesthetic but epistemic: the first path preserves the precision of each value; the second preserves the gestalt of the image at the expense of the individual pixel. Declare which one you're using.

The three principles of mapping

Whichever path you take, SONA relies on three intuitive, universal associations:

  1. Intensity → volume. The "stronger" a value (or a pixel), the more audible the note. It's the least ambiguous mapping there is.
  2. Value / color → note. The measured magnitude determines the pitch. The higher the number, the higher the note — a convention almost no one misreads.
  3. Position → space. Where the data sits (the image's X axis, a pan column) becomes stereo position: left/right. It adds structure without adding words.

Keeping these three channels separate avoids sonification's most common trap: overloading a single sound dimension with too many meanings.

Pitch, MIDI and frequency — the math

A note's pitch is a frequency in hertz (Hz). The ear perceives pitch logarithmically: doubling the frequency raises it by an octave, always, everywhere. That's why SONA works in MIDI note numbers, where each whole step is a semitone and every 12 steps is an octave.

The exact conversion used in the core (midiToFreq) is:

f(m) = 440 · 2^((m − 69) / 12)

where m is the MIDI number and 69 is the central A (A4 = 440 Hz, the tuning standard). From here: C4 (middle C) = MIDI 60 ≈ 261.63 Hz; every +12 to m doubles f.

MIDI 60 · C4 · 261.63 Hz
Move the slider: see how one MIDI step (a semitone) changes the frequency non-linearly. Same formula as SONA's engine.

Why MIDI and not raw Hz? Because quantizing, transposing and writing a file for a DAW are all natural operations on whole semitones, not on hertz. And because a MIDI export speaks the language of every music software.

Normalization & response curves

Your data can range from 3 to 4000; useful notes live in a few octaves. SONA normalizes each value into the [0,1] range relative to the column's min and max (normalize), then stretches it over the chosen register (the "covered octaves"). The base formula is linear:

t = (v − min) / (max − min) → midi = base + t · (octaves · 12)

But linearity isn't always perceptually honest. SONA offers response curves to decide what you want to emphasize:

CurveFormula on t∈[0,1]When to use it
LineartNeutral default: every unit counts equally.
Logarithmiclog(1+9t)/log(10)Emphasizes small values (useful for long-tail data, price tails, intensities).
Exponential(10^t − 1)/9Emphasizes large values: peaks "explode", the floor stays low.
Square root√tA soft compromise between linear and log.

Data honesty: the curve is a legitimate interpretive choice, but it must be declared. SONA saves it in the events JSON. A sonification with an undeclared log curve can mislead as much as a truncated Y axis on a chart.

Scales & quantization

After obtaining a continuous MIDI value (e.g. 63.7), SONA can quantize it to the nearest degree of a scale (quantizeToScale). It's the single control that most affects catchiness: constraining notes to a scale removes the "out-of-tune" intervals without shifting the value much.

Scales are sets of semitones relative to the root, within an octave:

ScaleDegrees (semitones)Character
Chromatic0 1 2 3 4 5 6 7 8 9 10 11No filter — maximum fidelity, can sound harsh.
Major0 2 4 5 7 9 11Bright, resolved.
Natural minor0 2 3 5 7 8 10Melancholic.
Pentatonic0 2 4 7 9Five notes that never go wrong: the safe choice.
Minor pentatonic0 3 5 7 10Warm, "blues" without the blue note.
Whole-tone0 2 4 6 8 10Suspended, ethereal (no tonal center).
Blues0 3 5 6 7 10Expressive, with the "blue note".
Dorian / Lydian / PhrygianmodesModal colors for those who want a precise tint.

↑ Major pentatonic highlighted over one octave: the lit degrees are the only allowed notes.

The fidelity ↔ catchiness trade-off

The "narrower" the scale (pentatonic), the more pleasant the result but the more two different values can fall on the same note (loss of resolution). The chromatic preserves every difference but gives up pleasantness. Publishing raw data? Chromatic. Presenting or hunting for patterns? Pentatonic. Either way, declare the choice.

Instruments & timbres

SONA synthesizes sounds in real time with the Web Audio API — no external samples, all offline. The shared library (SONA.INSTRUMENTS) has 23 timbres built from a few building blocks:

Each instrument carries a General MIDI (GM) program number: when you export to MIDI, SONA writes a program change so your DAW opens the correct instrument instead of a generic piano. A few examples:

SONA instrumentGM programSynthesis
Piano0 — Acoustic Grandtriangle + partial, long pluck
Marimba12 — Marimbapercussive sine
Bell14 — Tubular BellsFM ratio 3.5
Organ16 — Drawbar Organsine + two sustained partials
Strings48 — String Ensemblesustained sawtooth
Flute73 — Flutesine with a little partial
Warm pad89 — Warm Padsawtooth, slow attack
Kalimba108 — Kalimbasoft FM, short pluck

SONA's synthesis is an approximation of the GM timbre, not a sample: in the app it sounds "SONA-style", in the DAW it sounds like the sound bank you have installed.

Making the melody catchy — without betraying the data

This is the project's key question. SONA's answer is a clear principle: pitch always stays mapped 1:1 to the data. The catchiness aids don't touch which notes play, but when and with what. They are opt-in, off by default, and each one ends up in the JSON.

Three levers, three levels of "invasiveness":

1 · Rhythmic grid & swing touches the timing

Quantizes the note attacks to a musical grid (1/4, 1/8, 1/16, triplets). The notes don't change pitch or order: they're just aligned to a beat, and that's enough to convey a rhythm. Swing slightly delays the even beats for that jazz "sway". preserves the pitch What it does not preserve: the exact time spacing between samples (if you need that, leave the grid Off).

2 · Humanization micro-variation

Adds tiny random imperfections to the timing (±milliseconds) and dynamics (±volume), so the result doesn't sound "robotic". preserves the pitch The effect is purely aesthetic and limited to a few ms: it doesn't move the patterns, it makes them alive.

3 · Background harmony adds voices

Adds diatonic chords (pad) and/or a bass, but — and this is the crucial point — derived from your own melody: for each time window SONA counts the most present notes and lays the triad of the most coherent scale underneath (harmonize). It's music drawn from the data, not invented from scratch. the data's pitch stays intact The accompaniment lives on separate tracks (you see it in the multi-track MIDI) and in the JSON, so it's always distinguishable from the primary signal.

The distinction that matters

There's a difference between distorting the data (changing which notes represent which values) and presenting it better (rhythm, timbre, accompaniment). SONA never does the first. When you want maximum transparency, keep everything Off, chromatic scale, linear curve: you get the most "bare" sonification possible. When you communicate, turn on the levers — and say so.

Export: WAV · MIDI · JSON · PNG

SONA is peak-coherent: the file you export is generated from the same audio graph you hear in real time, from the same events. What you hear is what you get.

FormatWhat it's for
WAVThe finished audio, rendered offline at 44.1 kHz. For listening, video, archiving.
MIDITo reopen the sonification in any DAW. Carries the General MIDI program of the chosen instrument. With harmony on it becomes Type 1 multi-track (Melody · Harmony · Bass on separate channels), so you can dress each voice with your own instruments.
Events JSONThe traceability: every note (time, duration, frequency, MIDI, volume, pan) plus all the parameters (scale, curve, instrument, groove, harmony). It's the document that makes the render reproducible.
PNG(image modules) The piano-roll or grid as an image, for figures and papers.

SONA's MIDI is a regular Standard MIDI File: an MThd header, tempo meta-event, program change, and note-on/note-off pairs in ticks at 480 PPQ. It opens in Ableton, Logic, FL Studio, MuseScore, anything.

Reproducibility & method

A sonification only counts as evidence if someone else can regenerate it identically. The recommended flow:

  1. Declare first the question and the mapping: which column → pitch, which scale, which curve, which channels for pan/volume/duration.
  2. Generate with those parameters.
  3. Export the JSON together with the WAV/MIDI: it's the "method" of your sound experiment.
  4. If you turn on the catchiness aids, note that grid/swing/humanize/harmony are presentation, not data — the JSON does it for you.

Think of the JSON as a chart's caption: without it, the image is suggestive but not verifiable. With it, it's science.

Ready-made recipes

📑 Publishing raw data

Chromatic scale, linear curve, catchiness all Off, neutral instrument (sine or pluck). Export WAV + JSON. Maximum fidelity, zero embellishments.

🎤 Presentation / outreach

Pentatonic scale, 1/8 grid, swing 0.2, humanize 10 ms, pad harmony, marimba or e-piano instrument. Pleasant but honest.

🌌 Astronomical image

Soundscape path, background drone Yes, medium-high density, whole-tone scale for the "deep space" effect. Emphasizes the shape, not the pixel.

🎬 Soundtrack of a trend

Suite, pad or strings instrument, log curve if peaks are rare, pad+bass harmony, export multi-track MIDI and finish in a DAW.

FAQ

If I quantize to a scale, am I cheating?

No, as long as you declare it. Quantization moves each note to the nearest scale degree: it's an explicit transformation, reversible in intent, like rounding an axis's values. It only becomes unfair if hidden. For zero compromises, use the chromatic.

Doesn't harmony add information that isn't in the data?

SONA's harmony is derived from notes already present in your melody, not from external sources: it reflects the content, it doesn't invent it. It lives on separate tracks and is labeled in the JSON, so it's always distinguishable from the primary signal. If you want only the data, leave it Off.

Why does the MIDI sound different in a DAW than in the app?

Because SONA synthesizes the timbres itself, while the DAW uses its own sound bank for the indicated General MIDI program. The notes, timing and dynamics are identical; only the timbral "dress" changes.

How much data can I sonify?

Thousands of events. For huge sequences the modules lighten the real-time synthesis to avoid saturating the audio, but the export stays complete.

Do my files go anywhere?

No. SONA is entirely offline: your data and images never leave your computer.

Glossary

PitchThe perceived height of a sound; in SONA, a MIDI number.
MIDINote numbering (60 = C4) and a file format for DAWs.
General MIDI (GM)A convention that assigns a number to 128 standard instruments.
QuantizationForcing a continuous value to the nearest step (of a scale or grid).
Envelope (ADSR)How a note's volume evolves over time: attack, decay, sustain, release.
FMFrequency-modulation synthesis: one oscillator bends another's pitch.
GrainA micro-note; in soundscapes each bright pixel is a grain.
Peak-coherentThe export is produced from the same graph as playback: hear = get.
DiatonicBelonging to the chosen scale (vs. chromatic = all 12 notes).
SONA Wiki · Regolith Highfield · ↩ Hub · Open the Suite · all offline, peak-coherent export