ÆTHRA – 将音乐编写为代码(音符、和弦、情感驱动的音乐)

2作者: CzaxTanmay2 天前原帖
嗨,HN 我创建了ÆTHRA,这是一种用于将音乐编写为代码的编程语言。 与时间线、数字音频工作站(DAW)或复杂的音乐理论不同,ÆTHRA 让你可以使用简单的命令来描述音乐,比如音符、和弦、节奏、乐器、颤音和情感驱动的结构。 示例: ``` @Tempo(128) @Volume(0.9) @Instrument("Saw") @ADSR(0.01, 0.05, 0.7, 0.1) @Loop(4){ @Chord(C4 E4 G4, 1) @Chord(F4 A4 C5, 1) @Chord(G4 B4 D5, 1) @Drum("Kick", 0.5) @Drum("HiHat", 0.25) } ``` 我们的目标不是取代人类,而是让音乐变得可编程、可读和富有表现力——特别是对于开发者来说。 为什么选择 ÆTHRA? - 基于文本的音乐创作 - 跨平台(Windows / Linux / macOS) - 确定性输出(相同的代码 → 相同的音乐) - 设计用于情感驱动的作曲(悲伤、快乐、摇滚、氛围) - 初学者友好的语法 它受到实时编码和音乐领域特定语言(DSL)理念的启发,但更注重简单性和清晰性,而非表演艺术。 GitHub: [https://github.com/TanmayCzax/AETHRA](https://github.com/TanmayCzax/AETHRA) 我希望能收到以下方面的反馈: - 语言设计 - v2 的想法 感谢你的关注!
查看原文
Hi HN<p>I built ÆTHRA, a programming language for writing music as code.<p>Instead of timelines, DAWs, or heavy music theory, ÆTHRA lets you describe music using simple commands like notes, chords, tempo, instruments, vibrato, and emotion-driven structure.<p>Example:<p>@Tempo(128) @Volume(0.9) @Instrument(&quot;Saw&quot;) @ADSR(0.01, 0.05, 0.7, 0.1)<p>@Loop(4){ @Chord(C4 E4 G4, 1) @Chord(F4 A4 C5, 1) @Chord(G4 B4 D5, 1) @Drum(&quot;Kick&quot;, 0.5) @Drum(&quot;HiHat&quot;, 0.25) }<p>The goal is not to replace humans, but to make music programmable, readable, and expressive — especially for developers.<p>Why ÆTHRA? • Text-based music creation • Cross-platform (Windows &#x2F; Linux &#x2F; macOS) • Deterministic output (same code → same music) • Designed for emotion-driven composition (sad, happy, rock, ambient) • Beginner-friendly syntax<p>It’s inspired by ideas from live coding and music DSLs, but focused on simplicity and clarity rather than performance art.<p>GitHub: https:&#x2F;&#x2F;github.com&#x2F;TanmayCzax&#x2F;AETHRA<p>I’d love feedback on: • Language design • Ideas for v2<p>Thanks for checking it out