https://audio.dev/ -- @audiodevcon​
---

Contrapunk - From Palestrina's Rules to Real-Time MIDI Harmony - Vibhav Bobade - ADCx India 2026
---

Contrapunk started as a 48-hour hackathon project at ADCx India 2025 Music Hack Day, where it won by turning a MIDI keyboard into a real-time counterpoint partner. What began as a Python prototype quickly hit a wall and scaling from simple diatonic intervals to full voice leading demanded performance, type safety that led to a complete rewrite in Rust.

Today Contrapunk encodes centuries of harmony rules into a constraint scoring engine that evaluates hundreds of candidate notes per incoming MIDI event with zero-allocation hot paths. The system spans Palestrina-era strict counterpoint, Bach chorale voice leading to Jazz harmony, all switchable in real time. A type-driven scale and mode system covers 28+ modes, while the counterpoint engine tracks interval history, melodic contour, and suspension state to enforce rules that took composers lifetimes to codify.

This talk walks through the journey from hackathon win to a harmony engine. How voice leading becomes constraint scoring, how Rust's ownership model maps naturally onto music theory invariants, and what audio developers can take from this approach when encoding domain-specific rules into real-time systems. Live MIDI demos throughout.
---

Slides: https://data.audio.dev/talks/ADCxIndia/2026/contrapunk-from-palestrinas-rules-to-real-time-midi-harmony/slides.pdf
---

Vibhav Bobade

I am an open-source developer who enjoys containers, audio, and running. I work at Red Hat as a Senior Software Engineer.
---

ADC is an annual event celebrating all audio development technologies, from music applications and game audio to audio processing and embedded systems. ADC’s mission is to help attendees acquire and develop new audio development skills, and build a network that will support their audio developer career.
Annual ADC Conference - https://audio.dev/
https://www.linkedin.com/company/audiodevcon

https://facebook.com/audiodevcon
https://instagram.com/audiodevcon
https://www.reddit.com/r/audiodevcon/
https://mastodon.social/@audiodevcon
---

Streamed & Edited by Digital Medium Ltd: https://online.digital-medium.co.uk
---

Organized and produced by JUCE: https://juce.com/
---

Special thanks to the ADC team:

Sophie Carus
Derek Heimlich
Andrew Kirk
Bobby Lombardi
Tom Poole
Ralph Richbourg
Jim Roper
Jonathan Roper
Prashant Mishra

#adc #audiodev #dsp #audio #conferenceaudio #audioprocessing #audioproduction #audioprogramming #sound #music #musictech #soundtech #audiotech #audiotechnology