A node graph for one-shot SFX, written in Odin. The graph is the editor. The Odin it emits is the sound.
Preview in the editor runs the graph through Wirebang's interpreter. Live export writes a play_* procedure that talks to miniaudio — the same vendor package an Odin game already has. The game does not import Wirebang. WAV is a fallback if you would rather ship a sample.
The editor is MIT.
You own what you make. Copied or downloaded Odin and WAV files are yours. You may copyright them, keep them closed-source, and ship them in a commercial game. There is no attribution requirement.
Requires Odin with vendor:miniaudio and vendor:raylib.
odin test wirebang
odin run cmd/sync_sounds
odin build cmd/play -out:bin/play.exe
odin build cmd/editor -out:bin/editor.exebin/editorThe editor draws with raylib and plays through miniaudio. It does not call raylib's InitAudioDevice.
- Add nodes from the left palette (oscillator, noise, filter, gain, shaper, panner).
- Click an output jack, then an input jack, to cable them. Right-click a cable to cut it.
- Select a node and drag its knobs (Shift = fine). Space plays the patch.
- Live writes a
play_*procedure toexport/. Bake writes a WAV if you would rather drop a sample on an existing loader.
The current graph is saved to wirebang-patch.json (editor only). Drop an exported .odin in sounds/ and pick it from the library to reopen the graph from the code.
bin/play zap
bin/play thump
bin/play whoosh
bin/play click
bin/play hit
bin/play pickupCopy the exported file into your tree. It depends on vendor:miniaudio and the Odin core library — not Wirebang.
import ma "vendor:miniaudio"
import sfx "export" // or paste play_zap into your package
eng: ma.engine
ma.engine_init(nil, &eng)
defer ma.engine_uninit(&eng)
sfx.play_zap(&eng)If you already have a ma.engine, pass that. Keep the engine alive until the one-shot finishes; play_* copies PCM into a miniaudio sound and returns.
Handwritten files in the same dialect (ma.waveform_config_init, ma.noise_config_init, biquad_sweep, gain_env, …) reopen as graphs. Arbitrary Odin that wanders off-dialect will not.
sounds/ is the example library (Zap, Thump, Whoosh, Click, Hit, Pickup). Treat those files the same way as anything you export: use them, change them, or ignore them.
WAV is optional. If you do not want to run the DSP, Bake and play the file with whatever you already use (ma_decoder, raylib LoadSound).
In: short procedural SFX, live preview, miniaudio play-proc export, optional WAV bake.
Out: a DAW, sample playback engine, or a shipped mixer.