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.
One idea is to analyze timing as well, and "trigger" things after certain sequences (so play 1-3-5 as say eighth notes and then get an in-rhythm arpeggio one octave higher) or detect the beat and play on the upbeat.
I haven't done any Rust, but this might give me a good reason to give a try.
Have you considered making it a plugin? (makes replay easier in my opinion, but brings other pain like relaunching the DAW between builds...)
waveywaves•6h ago
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.
chrisweekly•4h ago
waveywaves•42m ago
- 128-sample cpal audio buffers (~2.7ms at 48kHz) - Single-cycle pitch detection - 2-frame McLeod pitch voting for confirmation - Entire DSP pipeline is Rust, pre-allocated ring buffers with minimal heap pressure
The e2e from pluck to MIDI "note-on" signal, is under 10ms on an M-series Mac. Hardware matters for sure so an audio interface with low-latency drivers (I use an Audient iD14) helped a lot. The web version (app.contrapunk.com) adds AudioWorklet latency on top, so the native Mac app is noticeably tighter. I am still working on figuring out how to have lesser noise and pitch jitter in the final output. Also this works really well for higher notes, bass not so much right now. Still need to figure out how to handle harmonics better. I have created this issue for you for now, let me know if you would like to add anything else to this as well. https://github.com/contrapunk-audio/contrapunk/issues/6.
Slow_Hand•2h ago
I've got a few thoughts for features, if you're open to them:
1. Ability to specify where your "played" voice resides in the voicing: As the bass note, as an inner voice, or as the top line.
2. Options for first species, second species, third, florid, etc counterpoint for each of the generated voices. Ex: You play a single note and the upper voice plays two notes for every one of yours, etc, etc.
3. If you want to get real fancy, make the generated voices perform a canon of your played notes.
waveywaves•52m ago