I've been working on duetto, a real-time jazz partner for a MIDI keyboard: it plays a standard with you as a small band (solo, comping, walking bass), comps while you play and takes a solo when you stop.
Demo (Autumn Leaves, 160 bpm): https://youtu.be/8zIAzVY8O6w
Code (free for noncommercial use): https://github.com/RiccardoCataldi/duetto
Approach. Instead of fine-tuning, it uses the pretrained Anticipatory Music Transformer (Thickstun et al., 2023) as-is and does all the control at sampling time:
The player's notes and the model's are one event sequence the model continues, one note (onset, duration, pitch) at a time.
Before each sample, a rule layer edits the logits: it masks what is not allowed (a hand that must wait, a pitch out of register, a bass note off the beat) and biases what should be likely (the current chord's tones, a guide tone on the downbeat, the next note of a phrase being quoted).
Phrases come from the Weimar Jazz Database (transcribed solos), segmented where the soloists actually…