Skip to content

schollz/PIanoAI

b5931ff646
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
ai
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Raspberry Pi Piano Player AI

This is code for providing an augmented piano playing experience. When run, this code will provide computer accompaniment that learns in real-time from the human host pianist. Then the host pianist stops playing for a given amount of time, the computer AI will then improvise in the space using the style learned from the host.

Try it

  1. Get a MIDI-enabled keyboard and two-way MIDI adapter
  2. Get a Raspberry Pi (however, a Windows / Linux / OS X computer should also work) and connect it to the MIDI keyboard.
  3. Build latest version of libportmidi (if your using Mac just do brew install portmidi, if Windows just Download it))
sudo apt-get install cmake-curses-gui libasound2-dev
git clone https://github.com/aoeu/portmidi.git
cd portmidi
ccmake .  # press in sequence: c, e, c, e, g
make
sudo make install
  1. Install Go.
  2. Install rpiai-piano:
go get -v github.com/schollz/rpiai-piano
  1. Add export LD_LIBRARY_PATH=/usr/local/lib to your .bashrc. (Unnessecary if you did not build portmidi). Reload bash source ~/.bashrc if this is the first time.
  2. Play!
rpiai-piano

TODO

Acknowledgements

Thanks to @egonelbre for the Gopher graphic. Thanks to @rakyll for porting libportmidi to Go.

License

portmidi is Licensed under Apache License, Version 2.0.

About

Realtime piano learning and accompaniment from a Pi-powered AI ๐ŸŽน

Resources

License

Stars

Watchers

Forks

Packages

No packages published