Show HN: ÆTHRA – Writing Music as Code

98 points by CzaxTanmay 4 days ago


Hi HN

I’m building ÆTHRA — a programming language designed specifically for composing music and emotional soundscapes.

Instead of focusing on general-purpose programming, ÆTHRA is a pure DSL where code directly represents musical intent: tempo, mood, chords, progression, dynamics, and instruments.

The goal is to make music composition feel closer to writing a story or emotion, rather than manipulating low-level audio APIs.

Key ideas: - Text-based music composition - Chords and progressions as first-class concepts - Time, tempo, and structure handled by the language - Designed for ambient, cinematic, emotional, and minimal music - Interpreter written in C# (.NET)

Example ÆTHRA code (simplified):

tempo 60 instrument guitar

chord Am for 4 chord F for 4 chord C for 4 chord G for 4

This generates a slow, melancholic progression suitable for ambient or cinematic scenes.

ÆTHRA currently: - Generates WAV audio - Supports notes, chords, tempo, duration, velocity - Uses a simple interpreter (no external DAWs or MIDI tools) - Is intentionally minimal and readable

What it is NOT: - Not a DAW replacement - Not MIDI-focused

Why I made it: I wanted a language where music is the primary output — not an afterthought. Something between code, emotion, and sound design.

The project is open-source and early-stage (v0.8). I’m mainly looking for: - Feedback on the language design - Ideas for musical features worth adding - Thoughts from people into PL design, audio, or generative art

Repo: <https://github.com/TanmayCzax/AETHRA>

Thanks for reading — happy to answer questions or discuss ideas.

sumul - 2 days ago

Thanks for sharing. I’m a musician and programmer, so I’m squarely in what I’d expect is your target audience. Since you’re posting an early version for feedback, here are some of my broadest initial thoughts.

From your README’s philosophy section: “You describe what you want to feel — ÆTHRA handles how it sounds.” But the rest of the documentation doesn’t yet feel aligned to that vision. The closest you get to that is when you describe your example chord progression as melancholic, but you as the composer already happened to know that this particular progression provides the feeling you have in mind.

I love the idea of a high level way to programmatically or idiomatically describe how music should feel, especially how the composition should evolve over time (perhaps even in surprising ways that are beyond current tools). I hope as you progress that you’re able to find innovative ways to build toward that vision.

The current feature set feels like it would be considerably more convenient in a GUI environment. Again, I hope that as you continue to build, it becomes more obvious why this is a language and not a visual synthesis/composition tool.

A little audio output demo would go a very long way in potentially getting me interested in playing around with this.

Good luck!

CzaxTanmay - a day ago

People have been comparing it to Strudel, so I wanted to clearly explain the difference.

ÆTHRA vs Strudel (in short):

ÆTHRA is output-oriented: you write a script → run it → get a WAV file.

Strudel is performance-oriented: it’s browser-based live coding focused on real-time pattern manipulation.

Key differences:

Export

ÆTHRA has built-in WAV export (one click).

Strudel doesn’t natively export audio files; users usually record output manually.

Execution model

ÆTHRA renders audio offline (deterministic, no glitches).

Strudel runs in real time via the Web Audio API.

Use cases

ÆTHRA: game music, background scores, generative assets, scripting music like code.

Strudel: live coding, experimentation, performance.

Environment

ÆTHRA runs locally (currently Windows).

Strudel runs entirely in the browser.

Both tools are free, and they’re not trying to solve the same problem. ÆTHRA is meant to feel closer to a music compiler, while Strudel feels closer to a live instrument.

ÆTHRA is early (v0.8), but it already supports tempo, ADSR, chords, scales, loops, echo/reverb, live preview, and WAV export. I will update AETHRA soon and make it very powerful to reach v1.0

Apreche - 2 days ago

How does this compare to https://strudel.cc/ ?

playlistwhisper - 21 hours ago

The main challenge lies in helping someone articulate their own emotions, feelings, and musical intentions. Personally, I find this difficult to achieve on my own. Structured dimensions can certainly support a music project, but they may lack effectiveness if there is no clear understanding of the intended objective from the outset.

Nice project! Thanks for sharing. I would say that a robust qualification process may constitutes the primary added value of your project. Much like a sales representative who can methodically understand a prospect’s needs, it may be worth helping users clarify their internal feelings first.

Exploring how other scientific or artistic disciplines address this challenge could also be valuable.

jesuslop - 2 days ago

I loved to build backing tracks for guitar in Band-in-a-box, just from the chord progression and some settings. Leveraged little effort to interesting results. And the idea of a DSL is super. But I dunno how would you stand comparisons with audio rendered by pro DAW software loaded with a production quality sound library such as Hollywood Strings or similar if you render the audio yourself.

mellosouls - 2 days ago

Cool project. There are people making a living streaming live-coded music, eg:

DJ Dave

Making dance music with code

https://youtube.com/shorts/5OYiOGxHxTQ

Perhaps you could reach out to some of them if you feel yours adds something they might find useful.

1718627440 - a day ago

Are you aware of SonicPi? Are you aware of Lilypond?

CzaxTanmay - a day ago

Example music (very basic, you can make way better) made using AETHRA -- https://audio.com/czax-studio/audio/aethra-example

CzaxTanmay - a day ago

Example code --

@Tempo(60)

@Scale("Minor")

@Reverb(0.7, 0.5)

@Chord("A3 C4 E4", 4, 0.6)

@FadeOut(5)

Official Website -- https://aethralang.pages.dev/

ThinkBeat - a day ago

Some samples of the DSL code and what they sound like would be a good addition. (Or it is already there and I could not find it)

joshcsimmons - 20 hours ago

biggest pet-peeve on strudel - no "type"checking for chord names, like what if I write "Xm" as a chord - I should be aware of this in the REPL. Does AETHRA solve?

Nekorosu - 2 days ago

I clicked the link but missed the show. I'd like to revisit the project when there is something to look at and listen to.

worik - 2 days ago

How does this relate to existing systems?

E.g. Csound

- 2 days ago
[deleted]
acron0 - 4 days ago

Please can you link to a video of it being used?

rudderdev - a day ago

How to use it? Why does it not have any guide on how to use it?

auchester - 4 days ago

[dead]