A C++/Python library to manipulate sheet music data
Project description
Maialib - Music Analysis Library {#mainpage}
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
Or, if you have a older maialib
version installed on your system, please get the latest version running: pip install maialib --upgrade
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!
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.
2) What can I do if I don't have a *.xml
file of my target music?
- First, make shure and look at different websites and online repositories trying to find the
*.xml
file - You can find on the internet the desired MIDI file and import it in a score editor (like MuseScore, Sibelius, Finale, etc.) and then export the
MusicXML
file from it - You can use scan the sheet music paper and get a PDF version of it, so:
- You can use a OMR software to try to convert the PDF file into a
*.xml
file - You can pay for other people to type manually note-by-note the PDF into a musical software (link MuseScore, Sibelius, Finale, etc.)
- You can use a OMR software to try to convert the PDF file into a
- You can type manually note-by-note the music paper into a musical software (link MuseScore, Sibelius, Finale, etc.)
Documentation (in development)
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)
Level 1: Python Tutorial
You can explore maialib
features looking at python-tutorial
folder (link here).
There you will learn how to use and mix maialib
classes and functions to reach your musical goals
If you are starting, please check these 3 basic maialib
Python tutorials:
Level 2: Developer Documentation
Would you like to improve any maialib function?
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) |
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!
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 theTerminal
(orCMD
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for maialib-1.5.0-pp310-pypy310_pp73-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56ae651ae00fb19e7f2159e1992206804c12dfaab41865c18aafa3d5f5ee0f47 |
|
MD5 | c00bec9894a3977b8996f9987e3d47e9 |
|
BLAKE2b-256 | ef5e973f811f8476a5557ac1d56ccb2776651afb1612ed2c24011b594025825b |
Hashes for maialib-1.5.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 50ea426e3711ac342ebab8ca1733a1fcbdbf01040644a394cd67b104f002f35f |
|
MD5 | c008c6578c3fe6d4c7af2f247239d1a9 |
|
BLAKE2b-256 | b62b0a91223d7b1ab3301cd69824b8674b43af020df7e115321a624e2578c80b |
Hashes for maialib-1.5.0-pp39-pypy39_pp73-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | caf0251e18b4c770785a0197ec0359315b2271e47e0d931cc2b0900b82c7a504 |
|
MD5 | e862eff110e8e8448956cc91ef44c3e3 |
|
BLAKE2b-256 | 97fdbca7d9874109efacf9d7596a1b81f9498e0867021d7bb0ac110fc6ecca44 |
Hashes for maialib-1.5.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5071de3e112ba69ecd5e4e189895fd7d055401c36acd7636cc83f3543602f29 |
|
MD5 | ebacbd036b55173d411ff14e0583d9fc |
|
BLAKE2b-256 | bb29c5529b013210ad028c31bcf9f40e478f6d19df8ff55c2a171ce747d16acf |
Hashes for maialib-1.5.0-pp38-pypy38_pp73-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3cea1ddc1be3417ce781fd678fb209b03216387c4ede66ffe55d8dd1cd9b9fec |
|
MD5 | 558c7a7ce88c4d6e5be90d2cd5ecf459 |
|
BLAKE2b-256 | b16bf7b9d5581b1f5136d84bb2b24d713ef34909d5817078081d1d1b26e97348 |
Hashes for maialib-1.5.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0b866b7dde262d4aa326238c89e9e599ec0726a48a03bf6ae4b64c048036075 |
|
MD5 | 55f2f6b02874ce44e94d88ff4082f6e4 |
|
BLAKE2b-256 | 507bef6a20c0aebdb9ce73edb121568bb75eeb8e871d575be7187362ff19686e |
Hashes for maialib-1.5.0-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 610507f13f16d05380d7cea61ee075f38290b5609dfe3d144aca3d9897165533 |
|
MD5 | 9bb7dbaa19b2eff513d4871a74c35437 |
|
BLAKE2b-256 | e921ee802a7b50eb66d6ac0c31f97423e9851db09d41652bdd0f24bc9edf8c1e |
Hashes for maialib-1.5.0-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47e1297b6199844f65eee1ae8c3331bd8cd2384ecd488c4be8106eb4eeefd3a0 |
|
MD5 | 372855fbc9dee54b51b35e741beba9ef |
|
BLAKE2b-256 | 2ce2132623787797b6a8cb6d42fc7f0400b501cfdb54510e4c5847283ee82902 |
Hashes for maialib-1.5.0-cp312-cp312-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ead128eb6b45cf0b16c2f98b4d327e6e2411b4d6ab46fa58db43eaab20c79884 |
|
MD5 | 261fe4b7d2861c3822644d3a038a822b |
|
BLAKE2b-256 | 43c398c06879c1912cd3b604026eab5eedd37c23c5dcd79141eb465ee8611c59 |
Hashes for maialib-1.5.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d2086ea7b04a668a4b348d953bc7b8ba715ca14eb679e2bda2a9d3e009bf1fa |
|
MD5 | f42314bb1e953801c394b4a27afeee40 |
|
BLAKE2b-256 | 0215300ecefa8761fa9227dee0c47b2a86f874135784aace970089fbcb9e9dcc |
Hashes for maialib-1.5.0-cp312-cp312-macosx_10_15_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ebf712e28ea732b78b3b17171d32fb2136d6a5d3924d82f940cb27e87369c62 |
|
MD5 | 4cfd93bbe2158960125f6691bc9d0837 |
|
BLAKE2b-256 | fe73cd93791f992ceb3abc01241c3f9ced8d8e1f46c2c2e618529eeee1e6ab51 |
Hashes for maialib-1.5.0-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f828949302c9016b341d7f2965fd3c66f9216258eb6522e7bffaa3a8cb721369 |
|
MD5 | a0481b7b608d146de0afd02a1706a312 |
|
BLAKE2b-256 | b9ce754db05329b0076ca1496aa91810671b6dafec9cfe1958b74393c210cc63 |
Hashes for maialib-1.5.0-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8092a77462597e73fadb63ba6b8a9cbfcb3fb6c99fdfca015f65ee195ffd8683 |
|
MD5 | 5758dff700016cde83a179854ba926ec |
|
BLAKE2b-256 | d68486aa8f27be260063b30377d321cac7ff4b420cea05a8da29f30c91cea606 |
Hashes for maialib-1.5.0-cp311-cp311-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3c7bc8086b8e2a69644b2e040cea957a7ae57254120bb7903564ff5ca5a08d46 |
|
MD5 | f3d8a357f1ddbb0c0fc04ec444917a9d |
|
BLAKE2b-256 | 60ce7bc37d1df031d2033530e65d972b31d5efde68e7ab9108907baa53e0fd73 |
Hashes for maialib-1.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 786d91c2f4cea2f7e11c97363c6c42329c3fdabdd05ce9e5190bcdf226f77f52 |
|
MD5 | f96f83dbdce79bb4829181993662735a |
|
BLAKE2b-256 | a5bf76268cbb6a64c0db8facadda2edd2a550ba658a45da46334a34d6181d6c6 |
Hashes for maialib-1.5.0-cp311-cp311-macosx_10_15_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 578e1724da0cb6d07e28712b44bd9bab867502e773015c9702c1498e271a4b69 |
|
MD5 | 47bf5cb862fb8c97a08292e670ba7c42 |
|
BLAKE2b-256 | 0527a8796c88006126996bce9d5f62858da22e8c87dcd4b0a71f026f72843fcc |
Hashes for maialib-1.5.0-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 352319344a850e0e12d1da426fd3bca829fa86e77e498e1e8f7c7f2d33c78e8b |
|
MD5 | 48b8b3f82705b8abccb31a6d69f1bb9c |
|
BLAKE2b-256 | 7ba5dfba45e130b4d2e70cedc844bad237991b61b86b6a4d83685d0dc758db71 |
Hashes for maialib-1.5.0-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8fb7a872618160436567e28b7f6b44674cd95cba6f9ae09f51afa7bb6d31b82 |
|
MD5 | 7efd3b9b191eed597744eaa5edaccb0c |
|
BLAKE2b-256 | 94f72bc65983ce798acc767b25d8106d416cdf902450e111dd99d649ae296ec7 |
Hashes for maialib-1.5.0-cp310-cp310-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a40a0d81c38b3f803a9dccc53d4d9b4d3539dfde2cb42243d36d5ed7ad0db9e |
|
MD5 | 63f978b25fcdc4816e530954e9aaf50f |
|
BLAKE2b-256 | 5cd2e3b0d860776f5b6c4bc33136af2b57792b706ca46c8f358e04514459ca1f |
Hashes for maialib-1.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c7585a967259c05bd6932ffa3050f813e01e3794e1a867d6688cfcda7994aea |
|
MD5 | 19caee9fa1491c582bcbe9e52e0ee9cf |
|
BLAKE2b-256 | 977ad46e18a7d5175a70abc1c65955c2925bd01d3a82a44adf2c01c6fceeefae |
Hashes for maialib-1.5.0-cp310-cp310-macosx_10_15_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f277760d2bf292bdc0f65fae1d47bd35cd776a4d60d424f709af9bbc15431c4 |
|
MD5 | de4e45828d0f342711ab6530114c19d7 |
|
BLAKE2b-256 | 486cd0f875e9ed17c831f46dbc3df9196f3cbb7372167b6bf4decca27fb3c406 |
Hashes for maialib-1.5.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a917aaf65ae9f5726070702ff1d3900645b837bcebfc4085fca3e688676374d |
|
MD5 | 29ae5db97aba313f935c9189e0c0089a |
|
BLAKE2b-256 | d58104a28bb9d32906ed628100f9af76ed503284761370be6bfa36e576175b3d |
Hashes for maialib-1.5.0-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d075eee9659c29459f739cfab3d7989c1a784bbd299fd8d129aff1a4c846d0f |
|
MD5 | 9b2bcbdfab915beb2145916b6786c8f0 |
|
BLAKE2b-256 | b737a42be3ce556f2aca5997a37c14d476b329e4d95db56e3a064075b04ec1ac |
Hashes for maialib-1.5.0-cp39-cp39-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73f1f3dff41fb540174837125fc2057446144ab2fe1a0ec79b3477dbc9b3472b |
|
MD5 | 95003fa939f13897baab7d5d3e3f2441 |
|
BLAKE2b-256 | 9cc785040f8d9a3e71e8cd4657a56afaa34d28aa42c58f7314d031bca1c3c80b |
Hashes for maialib-1.5.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | baeebf8ec47a08f016b256ef485c1abe018a6e7b8c50a52f77bc267bb3bb133f |
|
MD5 | 8f2859e426d9faf93906eb1ab8e8681a |
|
BLAKE2b-256 | f084573d6fa9744f4ac4de110f8cdd0f07ebb50e05c711b1859827c0fea0e244 |
Hashes for maialib-1.5.0-cp39-cp39-macosx_10_15_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5476fef18818ec76a860024adf07083b7fd7e0098290cd9033fde68522217d78 |
|
MD5 | 98187e43c92f0cd522d42cea77bb328e |
|
BLAKE2b-256 | 50372f387cd03b523b4edd6d9b2c360c69f66f395063ec2c31bf16e045d1372b |
Hashes for maialib-1.5.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0269bf20d4d5d97fc420723fcd390538b8b36e0beb30e1f733bc9ac9deacc018 |
|
MD5 | fa2ab0a76a78137b02daddb2123b4110 |
|
BLAKE2b-256 | 0e61e0a72784fd57d532b157e9b64dad1daf21647c8bccecf1d2e422f2bdcdae |
Hashes for maialib-1.5.0-cp38-cp38-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd9a699129f55288b138df8908fee5e4783a0f1677fc62af85fc52e86bb373c8 |
|
MD5 | f4887fff93b875da11c8a1c2d1776994 |
|
BLAKE2b-256 | cc2b1ae5690007e17379a50469f89f8e000b449f443fc5bfd15bd89a90477cb2 |
Hashes for maialib-1.5.0-cp38-cp38-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99cebededf543f3ea367d6a7cc5253b6b410283a5b8091600fb3cc834b142889 |
|
MD5 | 8a9aa31744fc89aaeed40b250bdc0458 |
|
BLAKE2b-256 | c81cf7e1f335182da044def46df87acc4a4b31a6107ebe0c731c90b4d4bc3953 |
Hashes for maialib-1.5.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5424bb771ccc985ad3380f4c3e6285772e6ec1eb5607edebbf650bc03dc47a5c |
|
MD5 | f0c8e26f8b06cd7d8cb15d2d845f4ab6 |
|
BLAKE2b-256 | 291ab5bc56c707175c1748521e3dd90da57eeca4d65d3d17dfbc29a2433dcbd8 |
Hashes for maialib-1.5.0-cp38-cp38-macosx_10_15_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd1683957ef8de2261f936d79f9146deb377387f1803aabe2224d2c287509afa |
|
MD5 | a5a4bfc6d00bbfea929e0620e9895090 |
|
BLAKE2b-256 | e4ac402dc45cffa23a3dcca009716649001e7fb6ff91334546c7db91f2dcf777 |