nx_audio_synth.nx
buildroot/runtime/nx_audio_synth.nx
about
nx_audio_synth.nx -- SOVEREIGN AUDIO ENGINE rung R3b: sine + ADSR envelope.
osc_sine: a clickless tone via a sovereign PARABOLIC sine approximation (no trig
lib) -- exact at 0/peak/trough, smooth between; a higher-precision table is a
later refinement (honest: ~few% THD, not a pure sinusoid).
adsr_apply: Attack/Decay/Sustain/Release amplitude shaping (Q8 gain) so notes
fade in/out instead of clicking -- what makes synths musical.
Reuses ae_clamp (R0). license_tier: ORIGINAL.
dependencies 2 imports · 8 importers
imports: nx_syscalls.nxnx_audio_mix.nx
imported by: nx_audio_sfx.nxnx_audio_sfx_test.nxnx_audio_sfx_web.nxnx_audio_sfx_web_test.nxnx_audio_song_test.nxnx_audio_synth_test.nxnx_audio_web.nxnx_audio_web_test.nx
structs
| none |
consts
| 13 | const SY_PHASE: i64 = 65536 // one cycle (Q16) |
functions
| 16 | func osc_sine(out: *i64, n: i64, freq: i64, rate: i64, amp: i64) -> i64 |
| 37 | func adsr_apply(buf: *i64, n: i64, a: i64, d: i64, sl: i64, slen: i64, r: i64) -> i64 |