5 ms·
Making a Raspberry Pi-Powered AI to Play Piano
- felispamukis 9y agoamazing work and great documentation OP. thank you. consider emulations of your piano playing on two interconnected systems, each conceiving themselves as the AI and the other player as you. initiate one of the AI using a masterpiece of yours, unknown to either. would that be considered putting your current state of pianoplayership into silicone?
- qrv3w 9y agoOh this is a neat idea, thanks! I may have to try this too.
- dnautics 9y agoI wonder if the author has considered connecting it to more sophisticated models. Carykh, for example trained a lexical RNN to read transcribed MIDI, specifically training it to learn jazz.
- qrv3w 9y agoYes, I plan on adding something like this in the future! However, my goal is to do learning in real-time in the style of the current pianist. NNs need quite a lot of data to train correctly so it might be hard to do in realtime. Although there could be a neat hybrid (some kind of iterative NN...).
- metafunctor 9y agoYou could pre-train the network to understand a multitude of styles. It should then be able to pick up and continue a particular style very quickly.
- qrv3w 9y agoOh, that's a neat idea! To classify the style and then choose the corresponding emulation... I'll think about it.
- dnautics 9y agoThere's probably a reasonably easy way to do style transfer by running a few moments of play by the player and watching which activations light up and putting it through the generative model.
- dharma1 9y agoYou could try this - it has online/realtime learning and runs on little resources (including raspberry pi) https://github.com/ogmacorp/EOgmaNeo https://github.com/ogmacorp/EOgmaNeo
- fefb 9y agoCan't you use the generative adversarial networks? Where the discriminator IA would learn to identify good melodies from real data. After that, the generator would try to make a good melodie to be approve for the discriminator IA. Thus you could play the generator melodie .
- qrv3w 9y agoYeah, I'm thinking about trying this too. I think this is like Google's approach for A.I. Duet.
- SOLAR_FIELDS 9y agoNext step is to rig up some mechanisms to pull the keys down and we have a modern day pianola that can improvise. Fascinating. Should be not too difficult to play blues or other pentatonic melodies, since they lend themselves well to improvisation. Using tabs or music from blues legends such as Stevie Ray or BB King would likely yield some very interesting results. I find it interesting that we start with teaching AI music the same way we oftentimes start with children, the pentatonic scale, because it's simple and more difficult to play the "wrong" notes.
- SunChrono 9y agoThose interested in computer generated music may find some pragmatic ideas in this paper from 1989: http://peterlangston.com/Papers/amc.pdf http://peterlangston.com/Papers/amc.pdf
- qrv3w 9y agoThanks this is wonderful! I think my implementation is very close to the "riffology" described in the paper. Lots of other great ideas in this to pursue!
- dri_ft 9y agoThe author may have been led down a blind alley when he (?) infers from a screenshot that Dan Tepfer is using Processing for this. You can also see that he's running SuperCollider (the icon on the right-hand side of the list of apps), a programming language oriented around procedural music composition and sound synthesis, which is to my mind a much more natural fit for this kind of work.
- qrv3w 9y agoThanks! I didn't know about that! I will update the article and check out SuperCollider :)
- ultrasounder 9y agoThe best part of this whole post was the approach the OP took to actually design this. A methodical process of writing the design document, Prototyping with Python and then rewriting the application in Golang to take advantage of speed. Which begs my question to the Sw folks in this thread, why is Golang faster than Python?. I didn't realize that Golang compiler was available for ARMV7 devices such as RPi.
- Strang 9y agoThat's not "begging the question," it's "raising the question." https://afterdeadline.blogs.nytimes.com/2008/09/25/begging-the-question-again/ https://afterdeadline.blogs.nytimes.com/2008/09/25/begging-t...
- syntaxing 9y agoThe method of paper to code is really interesting. Does anyone have additional articles or books about this method?
- qrv3w 9y agoI do not know of any formal methodology. Personally I just feel like I can think better when I draw things out.