mirror of
https://github.com/anomalyco/hex.git
synced 2026-11-28 13:02:21 +01:00
Adds src/sound_synth.rs, a deterministic synth (pitch glide, raised-cosine attack, exponential decay, band-passed noise breath, low-pass, saturation, K-weighted loudness normalization) with six compiled recipes in resources/sounds/presets.json. The feedback loader renders them at startup alongside the bundled classic set, which stays the default. Settings gains a Sound picker next to Sound volume that previews the start tone. prototypes/sound-synth/synth.js is the reference implementation behind the tuning prototype; tests compare Rust renders against its exported fixtures and check onset, length, clipping, loudness and spectral centroid.
158 lines
3 KiB
JSON
158 lines
3 KiB
JSON
[
|
|
{
|
|
"id": "breath_ping",
|
|
"name": "Breath Ping",
|
|
"pitch": 1046.5,
|
|
"interval": 5,
|
|
"attack": 4,
|
|
"decay": 55,
|
|
"breath": 0.45,
|
|
"brightness": 3500,
|
|
"volume": -33,
|
|
"wave": "sine",
|
|
"partials": [[2, 0.08, 20]],
|
|
"startGlide": 0,
|
|
"stopGlide": 0,
|
|
"glideMs": 120,
|
|
"breathCenter": 1.7,
|
|
"breathSweep": -4,
|
|
"breathQ": 1.2,
|
|
"breathDecay": 0.75,
|
|
"cancelDrop": 2,
|
|
"cancelGlide": -3,
|
|
"cancelTaps": 1,
|
|
"tapGap": 70,
|
|
"drive": 1,
|
|
"length": 220
|
|
},
|
|
{
|
|
"id": "soft_sine",
|
|
"name": "Soft Sine",
|
|
"pitch": 880,
|
|
"interval": 5,
|
|
"attack": 5,
|
|
"decay": 50,
|
|
"breath": 0.2,
|
|
"brightness": 3500,
|
|
"volume": -33,
|
|
"wave": "sine",
|
|
"partials": [],
|
|
"startGlide": 0,
|
|
"stopGlide": 0,
|
|
"glideMs": 100,
|
|
"breathCenter": 1.7,
|
|
"breathSweep": 0,
|
|
"breathQ": 1.5,
|
|
"breathDecay": 0.5,
|
|
"cancelDrop": 2,
|
|
"cancelGlide": -2,
|
|
"cancelTaps": 1,
|
|
"tapGap": 70,
|
|
"drive": 1,
|
|
"length": 200
|
|
},
|
|
{
|
|
"id": "felt_marimba",
|
|
"name": "Felt Marimba",
|
|
"pitch": 740,
|
|
"interval": 5,
|
|
"attack": 3,
|
|
"decay": 45,
|
|
"breath": 0.25,
|
|
"brightness": 3500,
|
|
"volume": -33,
|
|
"wave": "sine",
|
|
"partials": [[3.93, 0.12, 120], [9.2, 0.02, 300]],
|
|
"startGlide": 0,
|
|
"stopGlide": 0,
|
|
"glideMs": 100,
|
|
"breathCenter": 1.6,
|
|
"breathSweep": 0,
|
|
"breathQ": 0.9,
|
|
"breathDecay": 0.27,
|
|
"cancelDrop": 1,
|
|
"cancelGlide": -1,
|
|
"cancelTaps": 2,
|
|
"tapGap": 70,
|
|
"drive": 1,
|
|
"length": 200
|
|
},
|
|
{
|
|
"id": "air_bubble",
|
|
"name": "Air Bubble",
|
|
"pitch": 620,
|
|
"interval": -6.4,
|
|
"attack": 5,
|
|
"decay": 45,
|
|
"breath": 0.3,
|
|
"brightness": 3500,
|
|
"volume": -33,
|
|
"wave": "sine",
|
|
"partials": [],
|
|
"startGlide": 8,
|
|
"stopGlide": -7.5,
|
|
"glideMs": 55,
|
|
"breathCenter": 1.5,
|
|
"breathSweep": 0,
|
|
"breathQ": 2,
|
|
"breathDecay": 0.66,
|
|
"cancelDrop": 4.35,
|
|
"cancelGlide": -6.9,
|
|
"cancelTaps": 1,
|
|
"tapGap": 70,
|
|
"drive": 1,
|
|
"length": 200
|
|
},
|
|
{
|
|
"id": "hum_dot",
|
|
"name": "Hum Dot",
|
|
"pitch": 659.3,
|
|
"interval": 4,
|
|
"attack": 5,
|
|
"decay": 40,
|
|
"breath": 0.2,
|
|
"brightness": 1400,
|
|
"volume": -33,
|
|
"wave": "triangle",
|
|
"partials": [],
|
|
"startGlide": 0,
|
|
"stopGlide": 0,
|
|
"glideMs": 80,
|
|
"breathCenter": 1.5,
|
|
"breathSweep": 0,
|
|
"breathQ": 1,
|
|
"breathDecay": 0.5,
|
|
"cancelDrop": 0,
|
|
"cancelGlide": -2,
|
|
"cancelTaps": 1,
|
|
"tapGap": 70,
|
|
"drive": 1.2,
|
|
"length": 180
|
|
},
|
|
{
|
|
"id": "whisper",
|
|
"name": "Whisper",
|
|
"pitch": 1174.7,
|
|
"interval": 5,
|
|
"attack": 6,
|
|
"decay": 50,
|
|
"breath": 2.2,
|
|
"brightness": 3500,
|
|
"volume": -33,
|
|
"wave": "sine",
|
|
"partials": [],
|
|
"startGlide": 0,
|
|
"stopGlide": 0,
|
|
"glideMs": 100,
|
|
"breathCenter": 1.1,
|
|
"breathSweep": -4,
|
|
"breathQ": 4,
|
|
"breathDecay": 1.2,
|
|
"cancelDrop": 3,
|
|
"cancelGlide": -3,
|
|
"cancelTaps": 1,
|
|
"tapGap": 70,
|
|
"drive": 1,
|
|
"length": 220
|
|
}
|
|
]
|