--- title: piano categories: - Tools and applications --- **piano** lets you play music from the terminal. At some point I needed to know if it was possible, and now it exists. ![piano](https://raw.githubusercontent.com/hugoocoto/piano/main/image.png) ## Configuration It comes with 89 piano key sounds in `piano_sounds/`, from [piano-mp3](https://github.com/fuhton/piano-mp3). Any format supported by `miniaudio.h` works. Keys are mapped to sounds in `config.h`; the first pair is the leftmost key: ``` #define DIR "piano_sounds/" KEY('a', "C4.mp3") KEY('b', "D4.mp3") ``` Recompile after changing the configuration. Press `ESC` to exit. ## See also - [Source code](https://github.com/hugoocoto/piano)