Skip to main content

A C++/Python library to manipulate sheet music data

Project description

Maialib - Music Analysis Library {#mainpage}

Maialib CI/CD

This library is a multiplatform set of musical tools that enable musical score analisys and composition in a easy and fast way.
The project core was wrote in C++17, but it also has a Python wrapper that allows a greater number of people (ie musicians not trained in IT) to also have in their hands the same power and musical tools available in maialib.

Advantages

  • Easy to use to musicians and musical researchers
  • High computer perfomance and fast calculations
  • Read and write musical scores (MusicXML file format)

Get Python Package

pip install maialib

Get Started

You can easily import your sheet music (*.xml file) to Python environment using:

import maialib as ml

myScore = ml.Score('./Beethoven/Symphony_9th.xml')

Now you can explore some maialib features like:

  • Find musical patterns
  • Write your own scores from your custom algorithms
  • Analyse scores in a musical statistical data perspective
  • And much more!

Documentation (in development)

Maialib Documentation WebSite

Are you a C++ developer?

Requirements to build from C++ sources:

  • C++17 compatible compiler
  • CMake 3.26
  • Python 3.8
  • Make
  • Doxygen (Optional: To build documentation)
  • Buildcache (Optional: To accelerate the build process)
  • CppCheck (Optional: C++ Static Analyzer)

Are you a Python developer?

Python Dev-only dependencies

pip install pathlib
pip install cpplint
pip install wheel
pip install mypy

# To generate Python stubs
pip install pybind11-stubgen
# Mac users: May be you have to add the coverage and pybind11-stubgen on your `PATH` - /etc/paths

pybind11_mkdoc (github)
sudo apt install clang (pybind11_mkdoc dependency) - Linux/Mac Only

Tested Environments

Operational System Compilers
Windows 10 x64 Clang 15.0 (MSYS2)
Linux Ubuntu 20.04 GCC 9.3
Apple OSX 10.15 XCode 11.5 (Command Line Tools)

Documentation

This project have 2 documentation levels. One for each user type:

  • Level 1 - User documentation: for musicians, musical researchers and non-professional IT people (help me to do that!)
  • Level 2 - Developer documentation: A deeper information for professional C++ programmers (Doxygen)

Code Coverage

Click here to check the maiacore C++ code coverage

Level 1: Python Tutorial

You can explore maialib features looking at python-tutorial folder.
There you will learn how to use and mix maialib classes and functions to reach your musical goals

Level 2: Developer Documentation

You can browse the compiled doxygen documentation opening docs/index.html.

Quick Start

Build Python module from C++ source

Open a terminal (or CMD in Windows), enter inside of the maialib folder.
Type: make to build the Python module
When the build process finishes, type: make install
Done!

Frequent Asked Questions

1) Where can I find the XML file of a specific musical score?

To import musical scores the file extensions must be: *.xml, *.mxl or *.musicxml
You can easily export your music files to these file formats above from score editors, like:

  • MuseScore (free!)
  • Sibelius
  • Finale
  • Others

Many MusicXML files are avaliable for free in the internet for download. But if you don't have a specific MusicXML file, you can import the MIDI file in a score editor (like MuseScore) and then export the MusicXML file from it.

Known issues to build from source

All Platforms

  • Multiple Python versions installed, like: Official Python, Microsoft Python, MSYS2 Python and others can direct the build system to choose a wrong version to build and install the library.
    To check all Python versions installed on your system, open the Terminal (or CMD on Windows) and type: - Linux or Mac: - which python - which python3 - Windows: - where.exe python - where.exe python3

Windows-Only

  • Disable your antivirus or create a exception (CMake permissions)

Contact

Nycholas Maia - nyckmaia@gmail.com

Contributing

  • Fork this project
  • Make your custumizations and improvments
  • Please, send me a pull request

License

Maialib is licensed under (GPLv3 License) [https://www.gnu.org/licenses/gpl-3.0.html]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

maialib-1.4.4-pp39-pypy39_pp73-win_amd64.whl (2.5 MB view hashes)

Uploaded PyPy Windows x86-64

maialib-1.4.4-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.6 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

maialib-1.4.4-pp39-pypy39_pp73-macosx_10_15_x86_64.whl (2.4 MB view hashes)

Uploaded PyPy macOS 10.15+ x86-64

maialib-1.4.4-pp38-pypy38_pp73-win_amd64.whl (2.5 MB view hashes)

Uploaded PyPy Windows x86-64

maialib-1.4.4-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.6 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

maialib-1.4.4-pp38-pypy38_pp73-macosx_10_15_x86_64.whl (2.4 MB view hashes)

Uploaded PyPy macOS 10.15+ x86-64

maialib-1.4.4-cp311-cp311-win_amd64.whl (2.5 MB view hashes)

Uploaded CPython 3.11 Windows x86-64

maialib-1.4.4-cp311-cp311-musllinux_1_1_x86_64.whl (3.0 MB view hashes)

Uploaded CPython 3.11 musllinux: musl 1.1+ x86-64

maialib-1.4.4-cp311-cp311-musllinux_1_1_i686.whl (3.1 MB view hashes)

Uploaded CPython 3.11 musllinux: musl 1.1+ i686

maialib-1.4.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.6 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

maialib-1.4.4-cp311-cp311-macosx_10_15_x86_64.whl (2.4 MB view hashes)

Uploaded CPython 3.11 macOS 10.15+ x86-64

maialib-1.4.4-cp311-cp311-macosx_10_15_universal2.whl (3.8 MB view hashes)

Uploaded CPython 3.11 macOS 10.15+ universal2 (ARM64, x86-64)

maialib-1.4.4-cp310-cp310-win_amd64.whl (2.5 MB view hashes)

Uploaded CPython 3.10 Windows x86-64

maialib-1.4.4-cp310-cp310-musllinux_1_1_x86_64.whl (3.0 MB view hashes)

Uploaded CPython 3.10 musllinux: musl 1.1+ x86-64

maialib-1.4.4-cp310-cp310-musllinux_1_1_i686.whl (3.1 MB view hashes)

Uploaded CPython 3.10 musllinux: musl 1.1+ i686

maialib-1.4.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.6 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

maialib-1.4.4-cp310-cp310-macosx_10_15_x86_64.whl (2.4 MB view hashes)

Uploaded CPython 3.10 macOS 10.15+ x86-64

maialib-1.4.4-cp310-cp310-macosx_10_15_universal2.whl (3.8 MB view hashes)

Uploaded CPython 3.10 macOS 10.15+ universal2 (ARM64, x86-64)

maialib-1.4.4-cp39-cp39-win_amd64.whl (2.5 MB view hashes)

Uploaded CPython 3.9 Windows x86-64

maialib-1.4.4-cp39-cp39-musllinux_1_1_x86_64.whl (3.0 MB view hashes)

Uploaded CPython 3.9 musllinux: musl 1.1+ x86-64

maialib-1.4.4-cp39-cp39-musllinux_1_1_i686.whl (3.1 MB view hashes)

Uploaded CPython 3.9 musllinux: musl 1.1+ i686

maialib-1.4.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.6 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

maialib-1.4.4-cp39-cp39-macosx_10_15_x86_64.whl (2.4 MB view hashes)

Uploaded CPython 3.9 macOS 10.15+ x86-64

maialib-1.4.4-cp39-cp39-macosx_10_15_universal2.whl (3.8 MB view hashes)

Uploaded CPython 3.9 macOS 10.15+ universal2 (ARM64, x86-64)

maialib-1.4.4-cp38-cp38-win_amd64.whl (2.5 MB view hashes)

Uploaded CPython 3.8 Windows x86-64

maialib-1.4.4-cp38-cp38-musllinux_1_1_x86_64.whl (3.0 MB view hashes)

Uploaded CPython 3.8 musllinux: musl 1.1+ x86-64

maialib-1.4.4-cp38-cp38-musllinux_1_1_i686.whl (3.1 MB view hashes)

Uploaded CPython 3.8 musllinux: musl 1.1+ i686

maialib-1.4.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.6 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

maialib-1.4.4-cp38-cp38-macosx_10_15_x86_64.whl (2.4 MB view hashes)

Uploaded CPython 3.8 macOS 10.15+ x86-64

maialib-1.4.4-cp38-cp38-macosx_10_15_universal2.whl (3.8 MB view hashes)

Uploaded CPython 3.8 macOS 10.15+ universal2 (ARM64, x86-64)

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page