marcomusy / pianoplayer

Automatic fingering generator for piano scores
MIT License
715 stars 81 forks source link

Using pianoplayer inside Jupyter notebooks #10

Open psychemedia opened 5 years ago

psychemedia commented 5 years ago

Have you looked at integrating pianoplayer with Jupyter notebooks?

I have a demo repository here which includes requirements to run the repo interactively on MyBinder.

To display the score should be simple if, if there's a pianoplayer function available that returns the score as a PNG or SVG image file.

mhoangvslev commented 5 years ago

This is going to be the efficient way for researches and education in musical field.

marcomusy commented 5 years ago

Unfortunately I'm not very familiar with jupiter notebooks.. at the moment the program writes to output a music21 stream.

Alia-morsi commented 4 years ago

The tool can be used from any python code (including jupyter notebooks) by instantiating a Hand object, setting the parameters, and then calling the generate method of Hand objects. The python code in bin/pianoplayer (after line 118) can give a good indication on how to do so.

The finger labels are written to a music21 stream (the one passed as an argument to the reader function that's used to instantiate the noteseq attribute of the Hand instance), so by using the .show method of music21 streams, you can generate several formats to see the labelled score.

marcomusy commented 4 years ago

Thanks Alia for your comments, lately i've been quite busy and could not dedicate time to this project.. if you have some working notebook it would be great to add it as an example of usage!

Alia-morsi commented 4 years ago

Ok i'll let you know when I have one ready :))