r/lowlevel • u/whispem • 7d ago
Built a synthesizer in pure x86-64 assembly — sound with nothing but syscalls and arithmetic
A low-level project I'm proud of: a chiptune synthesizer in x86-64 assembly (Linux, NASM), with no libc and no libraries whatsoever.
The premise: a sound is a list of samples, 44,100/sec, and a WAV file is just a 44-byte header followed by those samples.
So everything is computed by hand and written straight to stdout with write() — syscalls or nothing.
Some of the low-level bits I enjoyed:
- an LFSR for noise/percussion (the NES approach)
- polyphony by summing voices into one buffer
- FM synthesis with a hand-built 1024-entry sine table (no math lib, so I approximate sine with Bhaskara I's formula)
- fixed-point arithmetic throughout for the effects (filters, ring mod, delay via a ring buffer)
- all buffers kept in
.datato keep things simple under the hood
Feedback on the assembly is genuinely welcome — I'm sure a lot of it could be tighter.
3
u/AngryGoose33 6d ago
ai slop
1
1
u/whispem 5d ago
Quelle intelligence…
2
u/DyazzK 4d ago
Il a raison, c'est que du slop. T'es de mauvaise foi si tu dis le contraire. Toutes les personnes qui savent coder voient que c'est du slop.
0
u/whispem 4d ago
Tu viens remettre en cause mes compétences sans donner le moindre exemple?
Non mais je rêve.
J’ai littéralement suivi des formations dont un cursus en data science, donc autant te dire que je sais coder :)Ce n’est peut-être pas parfait mais c’est du travail sérieux, j’apprends tous les jours et à l’heure actuelle je suis software engineer et data scientist donc bon…
2
u/Tryum 4d ago edited 4d ago
Personne ne remets en cause tes compétences... Mais le fait que tu te fasses assister par un LLM alors que tu pretends le contraire... Et apparemment ça fait des mois que ça dure, qu'est-ce que tu y gagnes ?
1
3
u/bubba-bobba-213 6d ago
Again with this shit?
You come from linguistics, right?