Lurker News
I trained a 125M-parameter transformer to autocomplete piano performances in real time (~108 notes/sec on an iPhone 15).

The idea is basically GitHub Copilot or Tabnine, except instead of prompting it with code, you prompt it by playing a few notes on a MIDI piano. The model then continues what you played, entirely on-device.
The app is free if anyone wants to try it. Happy to answer questions about the model, training, Core ML, or the many things that didn't work.

Comments (117) 65 threads

Earlier comments
devonsolomon2 replies#
This is really fun. Scaler 3 starts with a chord progression and lets you break it down into musical performances and parts. Useful for ideation when producing.

Would be fun to get a midi clock going and play some chords on my piano and have my synth start jamming along with the bass and my keyboard doing some performance. Or any combination of the above.

mh-#
+1 all of this. That would be incredible (this already seems very cool - excited to get home and try it!)
Naitik88#
That would be a really interesting direction. At that point it starts feeling less like autocomplete and more like having another musician reacting to what you're playing in real time.
Tepix#
Oh, a cool idea! I just tried it, works pretty well. Kudos!

One feature request:
Instead of playing the AI-generated audio solely through the iPhone's speakers, add an option to send the audio as midi notes to a device (probably the same one you received the mini notes from).

evalystai1 reply#
The idea is awesome! :) However there's definitely much room for improvement, first of all rythm and composition (so there's some sense of musical form).
simedw#
Thank you.

Yes, I think I’ve gotten it to roughly a GPT-2 level: good enough to share, but with a lot of room left to improve. I think adding some kind of bar/measure token might help with rhythm, and perhaps some form of longer-term planning for the overall composition.

alexandermorgan#
Hey @simedw this is an awesome project! A few quick ideas in case you hadn't tried them yet: 1. Have you considered representing different parts/voices independently? That would be harder to get good data for, but would likely help with voice-leading and phrasing and... 2. ... durational representation -> would it simplify your durational representation system if you modelled ties? E.g., then you wouldn't need a token to represent a duration worth 4 triplet eighth notes because you could model the tie of a quarter and a single triplet eighth. That would greatly reduce your durational vocab, right? 3. I've created a lot of academic tools for musical syntax analysis for humdrum, CRIM, VIS, and also made a couple of minor contributions to music21. I'd be happy to recommend a few automated analyses that might help the model with syntax or phrasing.

Load more comments