It uses what it has learned from a ton of other tunes to complement what you play on a virtual (or real) keyboard with something that sounds quite decent, even if you play something rubbish. There's a bit more explanation at the "How it works" page.

I wonder if there's a way to get Duet to save the melodies to a JSON file or even output the resulting MIDI.

posted by user-inactivated: 159 days ago