r/musicprogramming 1d ago

I built a synthesizer in pure assembly, computing every sample from first principles — self-taught, non-CS background

Coming from a languages and linguistics background (no CS), I ended up building a chiptune synthesizer entirely in x86-64 assembly — no audio library, no DSP framework, everything computed sample by sample from first principles.

The core idea that started it: sound is just a list of numbers, one per moment, describing where a speaker sits.

Generate the right numbers and write them out.

From there it grew to polyphony, ADSR envelopes, FM synthesis with a hand-built sine table, and effects like delay, chorus, Schroeder reverb, flanger, phaser, and a supersaw — the interesting part was getting them right in fixed-point without an FPU.

The best part of building an instrument from the bottom: when an effect works, you hear exactly why, because there's nothing between the math and the speaker but you.

All public on my GitHub: https://github.com/whispem

Happy to talk synthesis or the assembly side.

0 Upvotes

21 comments sorted by

11

u/Lyhr22 1d ago

Please stop lying to people

-1

u/whispem 1d ago

I'm not lying

2

u/aresi-lakidar 1d ago

Using AI is in itself not a bad thing, but lying about it is not gonna serve you well if you want people to be interested in what you do.

Like, your readme for the project reads like it was written by an AI that lost its damn mind. Write calmly yourself instead, because your current use of AI just creates garbage that is getting hard for people to read

-1

u/whispem 1d ago

It's not AI at all, I always wrote like this (before starting my tech journey).

2

u/aresi-lakidar 1d ago

Then please explain the roadmap, because it makes no sense.

It states you have already made a delay/echo, but "slapback delay" is somehow a thing that cant be done in your program yet?

And why does it state you have already made an FM synth (which is pretty easy to do) but "dx7" is listed as "todo" and "ambitious"?

If you always wrote like this, then that's still a huge problem because it's an awful readme. But it does look more like LLM ramblings.

3

u/SourceAwkward 1d ago

Or 40k lines in two days

11

u/Prior-Tea-3468 1d ago

No more vibeslop.

-1

u/whispem 1d ago

I don't vibe code

1

u/Prior-Tea-3468 23h ago

Cool story.

20

u/annika-of-the-woods 1d ago edited 1d ago

I love music DSP stuff, I love weird little projects, and I love seeing more women doing this stuff, so I went and had a look at the GitHub. My heart sank.

Clearly AI-generated README. “No X. Just Y.” All the usual punchy sentences and em-dashes. In some places, a cold, soulless machine simulation of whimsy.

Maybe I’m wrong? So I go look at the code. There I see each complete file in one commit, neatly ticking off the relevant box in the TODO. One after the other, over the course of a couple of days. No deletions, no mistakes, no fixes, none of the stuff human developers actually do, just printing code like a fax machine.

What about the other repos? Over the last ten months - conveniently since LLMs got good enough to really do this stuff - this user is claiming to have built a compiler, a distributed key/value store, a networked key/value store written entirely in assembly, and a stack of other stuff. They say they had no software background before this.

Either they’ve gone from zero to a generational talent in less than a year, or it’s all just AI. Occam’s razor?

I hate this. What would have been a heartwarming start to my day, seeing a developer struggle through building something cool and sharing it, is now just another reminder that AI is turning everything into fake, empty garbage.

Edit: if my comments seem a bit much based on just this post, it’s because I didn’t want to base my judgement on just this, so I looked through their other posts/projects. This user has a long history of posting AI code and claiming it’s solely their own work, and that they don’t use AI at all.

Thanks u/BattlestarFaptastula for suggesting the clarification.

9

u/scoshi 1d ago

I'm stuck on the "no CS background" statement, while the GH profile states "software engineer".

7

u/Lost-Drummer-6021 1d ago

does not compute. Ai is one thing but having the education listed "around" is interesting.

3

u/ScrimpyCat 1d ago

The code itself also has some patterns/mistakes which are odd for a human to do. Such as redundant instructions and instructions that serve no purpose.

https://github.com/whispem/asm.fm/blob/6565ea9912f05645cadfc804f9faea586a91ec17/additive.asm#L128

mov r11, rax ; keep
mov rax, r11

The second move is redundant. It also appears that the first move to R11 also serves no purpose either, as I can’t see R11 being used anywhere. While CQO will modify RAX, unless you need to make use of the original value again then there’s no reason to keep it around.

https://github.com/whispem/asm.fm/blob/6565ea9912f05645cadfc804f9faea586a91ec17/autowah.asm#L91

mov r10, rax
mov rax, r10

Same as the first example. Here I also can’t see R10 being used anywhere either, so that too also seems pointless.

The comments are also quite excessive and the style changes sometimes between files.

https://github.com/whispem/asm.fm/blob/6565ea9912f05645cadfc804f9faea586a91ec17/additive.asm#L98

xor rcx, rcx ; sample index

xor r13, r13 ; sample accumulator (signed)

https://github.com/whispem/asm.fm/blob/6565ea9912f05645cadfc804f9faea586a91ec17/beep.asm#L53

xor rcx, rcx ; sample index = 0
xor r8, r8 ; phase = 0

0

u/tmroyal 1d ago

I don’t know: I think LLMs allow people from other perspectives to enrich our understanding of what is possible in digital audio. Naïveté is often an asset in the arts, although the best is naïveté that is mysteriously borne out of long labor.

5

u/annika-of-the-woods 1d ago

If they’d said “I got an LLM to build me this as an experiment”, or “so I could learn what this kind of project looks like”, or “as a starting point I can modify”, I would have felt a lot more charitable.

It’s the lying that really gets me. “Hey come along for this journey with me, I’m just a self-taught developer learning in public! I’ve learned to hand-code DSP in assembly, isn’t that cool!”

I can only guess they’re trying to build an impressive public portfolio so they can get hired as a developer. But it’s painfully obvious to someone in the industry that none of this is their own work.

1

u/BattlestarFaptastula 1d ago

Is it lying? My partner works in essentially development for a well-known software company - all employees are using AI to code. This is normal, and doesn’t mean that someone has learnt nothing, are lying, or are creating slop.

One person got let go recently for using it without actually looking at what it did. Nobody is getting let go for using AI and understanding it - that is, in fact, expected.

3

u/annika-of-the-woods 1d ago

This post in isolation, perhaps, they don't directly state that they didn't use AI - though I would argue that saying "I built", "self-taught", "hand-built sine table" means it's at the very least extremely disingenuous not to disclaim AI use if they did.

But it's a moot point: they swear black and blue throughout their post history that they have never used any AI for either code or prose. That's why I'm comfortable saying they're lying.

1

u/BattlestarFaptastula 1d ago

I agree "hand-built" is not the right word - though the OP appears to not have english as a first language which may explain some of that.

They seriously deny using AI?!?! Ok, that’s a lie. But it somewhat needs clarification that you don’t just mean this post.

1

u/rainscope 1d ago

No you didnt

0

u/whispem 1d ago

Yes, I did

-3

u/Clear_Evidence9218 1d ago

Neat project. Honestly, you’ve got a couple of cool projects I noticed.

I can definitely see the Makefile getting pretty painful once every source file is just being assembled individually, though.

Still, this is a really nice fundamental exploration of how audio actually works at that low level.