This tutorial goes with the example file “music_player.grapycal”. To open the file, you need the following extension installed:

Download a piano roll dataset

This program downloads the dataset we need and store it into ds . The dataset contains music scores (similar to midi) collected from YouTube channels featuring piano covers of pop music.

If your RAM is small, keep segnent_len small.

Play the Music

Run this program. It’s expected to play the music to your computer’s audio output.

To see how it works, attach some PrintNodes to the program. The PianoRollPlayerNode outputs note on and note off signals one by one. The InstrumentNode converts them into audio samples.