Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using pianoplayer inside Jupyter notebooks #10

Open
psychemedia opened this issue Jan 19, 2019 · 5 comments
Open

Using pianoplayer inside Jupyter notebooks #10

psychemedia opened this issue Jan 19, 2019 · 5 comments

Comments

@psychemedia
Copy link

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
Copy link

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

@marcomusy
Copy link
Owner

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

@Alia-morsi
Copy link

Alia-morsi commented May 6, 2020

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
Copy link
Owner

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants