展示HN:ÆTHRA – 将音乐写作成代码

1作者: CzaxTanmay6 天前原帖
嗨,HN 我正在开发ÆTHRA——一种专门用于作曲和创作情感音景的编程语言。 ÆTHRA并不专注于通用编程,而是一个纯粹的领域特定语言(DSL),其代码直接表达音乐意图:节奏、情绪、和弦、进行、动态和乐器。 我们的目标是让音乐创作的过程更像是写故事或表达情感,而不是操作低级音频API。 关键理念: - 基于文本的音乐创作 - 和弦和进行作为一等概念 - 时间、节奏和结构由语言处理 - 设计用于氛围、电影、情感和极简音乐 - 解释器使用C#编写(.NET) 示例ÆTHRA代码(简化版): ``` tempo 60 instrument guitar chord Am for 4 chord F for 4 chord C for 4 chord G for 4 ``` 这段代码生成了一种缓慢、忧郁的和弦进行,适合氛围或电影场景。 ÆTHRA目前: - 生成WAV音频 - 支持音符、和弦、节奏、持续时间、力度 - 使用简单的解释器(无需外部DAW或MIDI工具) - 故意保持极简和可读性 它不是: - 不是DAW的替代品 - 不以MIDI为中心 我为什么要制作它: 我希望有一种语言,使音乐成为主要输出,而不是附带的东西。它介于代码、情感和声音设计之间。 该项目是开源的,处于早期阶段(v0.8)。我主要在寻找: - 对语言设计的反馈 - 值得添加的音乐功能的想法 - 对编程语言设计、音频或生成艺术感兴趣的人的看法 仓库链接:<https://github.com/TanmayCzax/AETHRA> 感谢阅读——欢迎提问或讨论想法。
查看原文
Hi HN<p>I’m building ÆTHRA — a programming language designed specifically for composing music and emotional soundscapes.<p>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.<p>The goal is to make music composition feel closer to writing a story or emotion, rather than manipulating low-level audio APIs.<p>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)<p>Example ÆTHRA code (simplified):<p>tempo 60 instrument guitar<p>chord Am for 4 chord F for 4 chord C for 4 chord G for 4<p>This generates a slow, melancholic progression suitable for ambient or cinematic scenes.<p>Æ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<p>What it is NOT: - Not a DAW replacement - Not MIDI-focused<p>Why I made it: I wanted a language where music is the primary output — not an afterthought. Something between code, emotion, and sound design.<p>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<p>Repo: &lt;<a href="https:&#x2F;&#x2F;github.com&#x2F;TanmayCzax&#x2F;AETHRA" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;TanmayCzax&#x2F;AETHRA</a>&gt;<p>Thanks for reading — happy to answer questions or discuss ideas.