Show HN: Contrapunk – Real-time counterpoint harmony from guitar input, in Rust
waveywaves
34 points
5 comments
April 05, 2026
Related Discussions
Found 5 related stories in 68.0ms across 3,558 title embeddings via pgvector HNSW
- Show HN: Demucs music stem separator rewritten in Rust – runs in the browser nikhilunni · 12 pts · March 03, 2026 · 60% similar
- Show HN: Horizon – GPU-accelerated infinite-canvas terminal in Rust petersunde · 60 pts · March 17, 2026 · 55% similar
- Show HN: Han – A Korean programming language written in Rust xodn348 · 141 pts · March 14, 2026 · 53% similar
- Show HN: Termcraft – terminal-first 2D sandbox survival in Rust sebosch · 105 pts · March 21, 2026 · 52% similar
- Show HN: What if your synthesizer was powered by APL (or a dumb K clone)? octetta · 78 pts · March 15, 2026 · 52% similar
Discussion Highlights (3 comments)
waveywaves
Hi HN, I built Contrapunk because I wanted to play guitar and hear counterpoint harmonies generated in real-time. It takes audio from your guitar, MIDI player or your computer keyboard and generates harmony voices that follow counterpoint rules to generate harmonies. You can choose the key you would like to improvise/play in and the voice leading style and which part of the harmony you would like to play as, as well. macOS DMG: https://github.com/contrapunk-audio/contrapunk/releases/tag/... Source: https://github.com/contrapunk-audio/contrapunk (do open any issues if you have any) Would love feedback on the DSP approach and the harmony algorithms. I am also looking at training a ML model for better realtime guitar to midi detection. I believe that will take some time.
marssaxman
What a cool idea. I don't have a music setup capable of running this right now - perhaps in a couple of months - but if you were to post some sample recordings, I'd gladly listen to them. How do you generate velocity values for the accompaniment notes? Given that you already have a pitch tracker, it could be interesting to add key detection; just start playing, instead of telling the machine what key you're in, and it starts following along as soon as it catches on.
r2ob
Wow that's is really cool! Thanks for sharing! I will definitely take a look