Create

Sign in to ReadmeX

or

How we handle your data: Privacy Policy

ReadmeX

Your AI reading companion

What would you like to catch up on?

Pick a briefing, or ask your own question.

Your community and people briefings stay personal to you.

Story

duetto steers a pretrained music transformer for real-time jazz

AI summary

Developer Riccardo Cataldi introduced duetto, a real-time jazz partner for MIDI keyboards that can provide solos, comping, and walking bass without fine-tuning the pretrained Anticipatory Music Transformer. The system controls generation during sampling by masking or biasing note logits, while musical phrases are drawn from transcribed solos in the Weimar Jazz Database. Cataldi reported real-time performance, released the code for free noncommercial use, and acknowledged that the system can drift and is difficult to balance between free ideas and rule-based constraints.

In-depth insight

duetto demonstrates a concrete approach to steering a pretrained symbolic-music model through constrained decoding rather than fine-tuning, a directly relevant method for controllable real-time AI performance.

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 breathed, transposed to the tune's chords and developed over a chorus. In the demo, about 61% of solo notes come from quoted phrases or the theme; the rest is the model.
  • The server keeps ~1 s of music sampled ahead and resamples the unplayed part whenever the player plays, which keeps latency low while the model "plans".

Speed. About 12 ms/note (medium) and 18 ms/note (large) on a 3080 Ti; the large model runs at ~90 ms/note on a Jetson Orin Nano, which is still enough to play live.

What doesn't work well yet. It can drift away from the player, its responses are hard to predict, and the balance between the model's own ideas and the rules is fragile: too much bias and it sounds like a phrase book, too little and it stops sounding like jazz.

I'd love feedback on the approach, especially from anyone who has tried constrained or guided decoding for symbolic music: is sampling-time steering a reasonable alternative to fine-tuning here, or does it hit a ceiling?

submitted by /u/GGAllin43 [link] [comments]

#duetto#Anticipatory Music Transformer#Weimar Jazz Database#Riccardo Cataldi#MIDI

Original · 2 min readRead the original
Group chat

No comments yet. Start the conversation.