How to Set Up and Use PianoFingering.jl: Your Guide to Automatic Fingerings

May 13, 2022 | Data Science

PianoFingering.jl is an innovative automatic fingering generator designed for piano scores using the Julia programming language. While it offers helpful suggestions on fingering, it’s important to note that these are for reference only, and there is no one-size-fits-all solution. This article will guide you through the installation and usage of PianoFingering.jl, along with troubleshooting tips for any bumps along the way.

Pre-requisites: Setting Up the Environment

Before diving into the main features of PianoFingering.jl, you need to prepare your system. Here are the steps:

  • Copy and run the following commands to ensure you have the necessary software:
  • Install Python (3.11) and Julia (1.9):
  • shell
    python -V
    julia -v
  • Install the music21 library:
  • shell
    pip3 install music21
  • Clone the PianoFingering.jl repository to your computer and change the directory:
  • shell
    cd PianoFingering.jl
    julia
    using Pkg
    Pkg.activate(.)
    Pkg.instantiate()

Congratulations! You have installed all the dependencies. You can now close your terminal.

Running the Program

Now that your environment is set up, let’s get to the fun part: running the program.

  1. Place your .musicxml file into the musicxml folder. For example, let’s say you have a file called example.musicxml.
  2. Change the directory back to the PianoFingering.jl folder:
  3. shell
    cd PianoFingering.jl
    julia -t auto
    using Pkg
    Pkg.activate(.)
    using PianoFingering
    fingering(example.musicxml)
  4. Wait for the program to finish processing. Your annotated piano score example_output.musicxml will be saved in the output folder. Note that this might take a few minutes.

Working with PIG Dataset

The Piano Fingering (PIG) dataset is a publicly available resource that can be leveraged for academic research. If you have a PIG format .txt file, place it in the pig folder and run the following command:

shell
fingering(pig_example.txt)

Converting MusicXML to PIG Format

To convert a .musicxml file to PIG format, use the command:

shell
xml_to_pig(example.musicxml)

Troubleshooting: Common Issues and Solutions

If you encounter any errors, here are some steps to troubleshoot:

  • Make sure you have the correct versions of Python and Julia installed (Python 3.11 and Julia 1.9).
  • If your .musicxml file does not produce any fingering, ensure it is correctly formatted and adheres to the specifications required by the program.
  • For any specific issues, consider opening an issue on the repository and uploading your .musicxml file for further assistance.

For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.

Conclusion

At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.

Stay Informed with the Newest F(x) Insights and Blogs

Tech News and Blog Highlights, Straight to Your Inbox