展示HN:Contrapunk – 基于吉他输入进行实时对位和声,使用Rust编写。
Show HN: Contrapunk – Real-time counterpoint harmony from guitar input, in Rust

原始链接: https://contrapunk.com/

## Contrapunk:实时和声生成 Contrapunk是一个用Rust构建的免费开源工具,用于实时生成和声,专为吉他手和音乐家设计。它既是一个MIDI和声生成器,也是一个具有低于10毫秒延迟的吉他转MIDI转换器——足够快以用于现场表演。 用户可以选择8种和声模式(Palestrina、Bach、Jazz等)和28种音阶,受益于基于既定复调规则的确定性布声(防止平行和交叉)。 Contrapunk提供灵活的输入:可以通过MIDI控制器直接演奏,或插入吉他进行实时音高检测和和声化。它原生运行于桌面(Tauri),通过WebAssembly在浏览器中运行,或作为服务器应用程序运行,所有这些都共享相同的Rust核心引擎。其MIT许可证确保所有音乐家的可访问性。

## Contrapunk:实时和声生成 开发者 waveywaves 发布了 Contrapunk,一款使用 Rust 构建的 macOS 应用程序,可以从音频输入实时生成复调和声。用户可以连接吉他、MIDI 设备,甚至使用电脑键盘进行演奏,Contrapunk 将根据所选调性、声部进行风格和所选和声角色创建伴随和声。 该项目是开源的,可在 GitHub 上找到,开发者正在积极寻求关于数字信号处理 (DSP) 和和声算法的反馈。未来的开发计划包括利用机器学习来改进实时吉他到 MIDI 的转换。 Contrapunk 旨在为音乐家提供一个工具,以便轻松探索和即兴创作复杂的和声。可以在原始 Hacker News 帖子中提供的链接处找到 DMG 文件和源代码。
相关文章

原文
Contrapunk

let harmony = Engine.new(Palestrina);

fn detect_pitch(buf) -> Note

const MAX_VOICES: usize = 4;

voice_leading.reject_parallels()

struct GuitarInput { onset }

engine.harmonize(note, scale)

Real-time MIDI harmony generator and guitar-to-MIDI converter. Proper counterpoint rules. Sub-10ms latency. Built in Rust.

Free. No login. Browser works in Chrome with any MIDI controller.

CONTRAPUNK WITH A GUITAR

🎹 HARMONY ENGINE

8 harmony modes with real counterpoint rules. Palestrina, Bach, Jazz, Free. 28 scale modes. Deterministic voicing.

🎸 GUITAR INPUT

Plug in your guitar. Real-time pitch detection, onset tracking, auto-calibration. Play guitar, hear counterpoint.

⚡ SUB-10MS LATENCY

Single-cycle detection, 2-frame voting, 128-sample buffers. Fast enough for live performance.

🌐 RUNS EVERYWHERE

Native desktop via Tauri. Browser via WebAssembly. Server mode for studios. Same Rust core everywhere.

🎼 VOICE LEADING

Parallel fifths rejection. Voice crossing prevention. Spacing rules. Centuries of music theory, in code.

🔓 OPEN SOURCE

MIT licensed. Counterpoint rules are centuries of human knowledge. They should be accessible to every musician.

联系我们 contact @ memedata.com