Softanza
DémarrerEnglish
Softanza
Entrées-sorties, formats, extensibilité, médias

Son

Entièrement livré : un rappel sans verrou, un graphe possédé, une analyse de niveau librosa, la sonification.

5 Strong · 5 Solid · 1 Partial · 1 Emerging

Mesuré contre : miniaudio · Web Audio · JUCE · Dossiers : base/sound(s'ouvre dans un nouvel onglet) · Pour les programmeurs : la référence de ce domaine

une note, telle que le moteur l'entend
une note, telle que le moteur l'entend. dessiné le 2026-10-01 par le script du site tools/areas-figurative.ring, exécuté dans la bibliothèque au commit 0e72e2e2c · la source(s'ouvre dans un nouvel onglet)

Repensé depuis les premiers principes

Ce que Softanza a gardé de ce qui marche, et ce qu'elle a repensé, tel que la bibliothèque l'a écrit dans ses documents de conception et ses narrations.

La manière SoftanzaUn son se décrit, il ne se fabrique pas à la main : on déclare un graphe ou un sens, le moteur le produit, et une oreille humaine juge en dernier.

Gardé des meilleures pratiques

  • Les entrées-sorties audio et le décodage de fichiers viennent de miniaudio : un seul fichier du domaine public, sans dépendance, pour les trois systèmes. Seule la moitié manquante est empruntée. source(s'ouvre dans un nouvel onglet)
  • La règle du temps réel est stricte : le rappel audio n'alloue pas, ne verrouille pas et n'appelle pas le langage de la plateforme ; il lit des tampons déjà prêts. source(s'ouvre dans un nouvel onglet)
  • La musique reprend l'algèbre de partition d'Euterpea : notes et silences enchaînés ou superposés, répétés, transposés. Une partition est une donnée qu'on peut analyser avant de l'entendre. source(s'ouvre dans un nouvel onglet)

Repensé

  • Un même graphe sonore joue sur le haut-parleur ou s'écrit dans un fichier par le même chemin : ce qu'on entend et ce qu'on exporte ne peuvent pas diverger. source(s'ouvre dans un nouvel onglet)
  • Un auteur déclenche un sens, comme « danger », et obtient un son. Une alerte qu'on peut couvrir n'en est pas une : les sons moins importants baissent ou se taisent. source(s'ouvre dans un nouvel onglet)
  • Un univers culturel se déclare comme des données : accordage, règles de mouvement, cycle rythmique, ornements et instruments ; une même phrase peut alors sonner en maqam, en raga ou en gamelan. source(s'ouvre dans un nouvel onglet)
  • L'oreille est le dernier juge : une voix lue deux fois trop vite a passé tous les compteurs et c'est un auditeur qui l'a repérée. Chaque phase note qui a écouté. source(s'ouvre dans un nouvel onglet)

The survey's biggest surprise: memory said 'plan, SN0 next', the code says one of the most fully-realized planes in the library, SN0-SN6 and a sonification series shipped and closed. miniaudio is vendored and split into two DLLs, there is an owned Zig sound graph (Web-Audio-shaped), FFT-backed analysis, and a real lock-free real-time callback that does no allocation, no lock, and never re-enters the Haro VM. What it refuses on purpose: MIDI, spatial/HRTF, plugin hosting, notation; and reverb is absent even from the effect palette.

Ce qu'un artisan en fait, et ce qui se distingue

  • A lock-free real-time callback: no alloc, no lock, no Haro re-entry, guarded down to worst-callback microseconds
  • An owned Zig sound graph, Web-Audio-shaped, not a wrapper
  • librosa-grade analysis: spectrogram, onsets, tempo and LUFS on the shared engine FFT
  • A sonification / earcon / voice layer no mainstream audio library offers

Ce qui est dû

  • Reverb and a fuller effect palette (compressor, chorus, distortion)
  • Richer synthesis (wavetable, FM, additive, granular)
  • MP3 / OGG encode to close the read-broad / write-narrow asymmetry
  • MIDI input, spatial/HRTF and plugin hosting (deliberate non-goals)

La manière Softanza, exécutée

Ce que Softanza fait autrement dans ce domaine, montré par du code tiré de ses narrations et de ses gardes, et exécuté pour cette page.

Pendant qu'une alerte de danger retentit, un signal de succès et un avertissement sont abandonnés ; ensuite tout repasse, et un avertissement ne fait jamais taire le danger.

Softanza
oP = new stzEarcons()
oP.RecordFireAt("Danger.Alert", 10.0)
Chk("a cue under a sounding alert is DROPPED", NOT oP.WouldFireAt(:Success, 10.05))
Chk("and so is a warning -- rank, not recency", NOT oP.WouldFireAt(:Warning, 10.05))
Chk("once the alert is over, a cue passes again", oP.WouldFireAt(:Success, 12.0))
oP2 = new stzEarcons()
oP2.RecordFireAt("Warning.Alert", 10.0)
Chk("a warning alert does NOT pre-empt danger", oP2.WouldFireAt(:Danger, 10.05))
Sortie
  [ok]   a cue under a sounding alert is DROPPED
  [ok]   and so is a warning -- rank, not recency
  [ok]   once the alert is over, a cue passes again
  [ok]   a warning alert does NOT pre-empt danger

exécuté le 2026-10-01 21:18 dans la bibliothèque au commit 0e72e2e2c ; tiré de base/test/sound/sound_semantics_narrated.ring(s'ouvre dans un nouvel onglet)

Une salutation haoussa devient une phrase de tambour qui suit les tons bas et hauts de la langue, comme le fait un tambour parlant.

Softanza
oNig = StzSoundUniverseQ(:niger)
oKal = oNig.SentenceQ("sannu da zuwa")
aK = oNig.PlayedNotes()
cTones = ""
for k in aK  cTones += k[3] + " " next
? "   sannu da zuwa ('welcome'): " + trim(cTones) + "  -- Newman's tones, low-high-low-high-low"
Chk("the declared contour is L H L H L", trim(cTones) = "L H L H L")
Sortie
   sannu da zuwa ('welcome'): L H L H L  -- Newman's tones, low-high-low-high-low
  [ok]   the declared contour is L H L H L

exécuté le 2026-10-01 21:18 dans la bibliothèque au commit 0e72e2e2c ; tiré de base/test/sound/sound_mu4_narrated.ring(s'ouvre dans un nouvel onglet)

Les couloirs, un par un

Les couloirs et leurs notes sont cités tels qu'ils ont été lus à la source, le Read from the source on 2026-09-16, from a read-only main worktree -- base/sound; engine sound.zig, soundgraph.zig, soundanalysis.zig, audiodev.zig, sounddsp.zig, soundring.zig, soundwasm.zig + vendored miniaudio 0.11.25; guards under test/sound (31 files + a web-audio harness).

Real-time callback discipline
Strong
sinkCallback does no allocation, no lock, never re-enters the Haro VM; SPSC lock-free circular buffer, underruns counted, worst-callback microseconds trackedengine audiodev.zig sinkCallback, soundring.zig
Device playback & transport
Strong
Vendored miniaudio backends per OS: open/start/stop/close, a stzSoundTransport face, an honest report when no device; split into decode and device DLLsstz_sound + stz_audiodev DLLs
Sound graph -- mixing & routing
Strong
An owned node graph (miniaudio's own graph disabled): OSC/SOURCE/GAIN/MIX/PAN/FILTER/DELAY/ENVELOPE over planar buses, topological and cycle-freeengine soundgraph.zig
Spectral analysis
Strong
soundanalysis.zig on the shared fft.zig: Hann spectrum, threaded spectrogram, onset detection, tempo estimation, LUFS loudness, dominant frequencyengine soundanalysis.zig, fft.zig
Sonification, earcons & voice
Strong
stzEarcons (66 methods), stzVoice/stzVoicePool, stzListener (closed grammar), and the SS1-SS5 sonification series; no mainstream audio library offers thistest/sound earcon_expect.json, voice_guard.html
File decode / encode
Solid
Decodes WAV/MP3/FLAC/OGG via miniaudio with resample and channel conversion; encode is WAV/FLAC only, MP3/OGG out return UNSUPPORTEDengine sound.zig
Synthesis
Solid
Band-limited oscillators (polyBLEP/polyBLAMP) for sine/square/saw/triangle plus ADSR, f64, unit-tested; no wavetable, FM, additive or granularengine sounddsp.zig
Capture / recording
Solid
Microphone capture through the same device layer and callback discipline; multi-device selection and format negotiation stay basicstzMicrophone; audiodev.zig capture side
Streaming
Solid
A producer thread feeds the lock-free circular buffer the callback drains, bounded at MAX_STREAMS=16, with StreamStart/Stop/Drain; no network streamingengine soundgraph.zig (the stream)
Audio <-> graphics convergence
Solid
stzSoundPlot and stzSoundGrid render waveforms and spectrograms through the library's own graphics plane as SVG/PNG, plus a browser guard harness
DSP effects palette
Partial
RBJ biquad filters (lowpass/highpass/bandpass), a feedback delay, gain and pan; no reverb (absent even as a named node), compressor, chorus or distortion
Pro-audio breadth (MIDI, spatial, plugins)
Emerging
None, stated in writing as deliberate non-goals: MIDI, notation, 3D/HRTF spatial, time-stretching and VST/CLAP hosting are OUT until askedSOFTANZA_SOUND_PLAN.md (non-goals)