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
VS Code Users
- You can write your Python scripts using
*.py
or*.ipynb
file extensions. - If you decide to use
*.ipynb
extension, make shure to installnbformat
Python package to enable visualize maialib graphs on VS Code editor. To do that:pip install nbformat --upgrade
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 18.0 |
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
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.6.1-pp310-pypy310_pp73-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a1dfcde32ced47f00922c9da354cc922cccaad9b3e133b602096265eb3e241a |
|
MD5 | 17e0821bf6978bfac6078cfbc57fdd47 |
|
BLAKE2b-256 | 9b94756f2e384a1949830feebb0b53ceace700ff2155a3e73b2a8051231ef1aa |
Hashes for maialib-1.6.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d2a9818f067ab8bc169a32f09c564f3c9c214291483a0b60148967d928044041 |
|
MD5 | 7d201b84abd8dadada7ff3e31e1cfdd4 |
|
BLAKE2b-256 | 7ad9bf2f8a2a413241d0c6891a8f5b2bc4a70984be281410ec653f19a359551c |
Hashes for maialib-1.6.1-pp39-pypy39_pp73-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d3e055ac01e462438776101c3d7e2724f9e09e1b3f2686db0790d7c9eadc859 |
|
MD5 | f4b225b1ba403d3574a96ea8ce5bedc4 |
|
BLAKE2b-256 | 3c5285b6a58fecc77b1420a617653818aadb3e7c8d8618ef823bae062af7c4aa |
Hashes for maialib-1.6.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 31a910ebaa0ab05eb4399638b8d6573470441feb62d0b40f86bccd56943c61c1 |
|
MD5 | f283a7dc164b6a671837c170a569d10a |
|
BLAKE2b-256 | 23a0a7c0e68d36beecc33639575eede09d1c3c877ea75b2c89cb34f5ea95bd34 |
Hashes for maialib-1.6.1-pp38-pypy38_pp73-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 865e9885e76fa10479e137c32fcd2dd26cf86609b41c67a173b48cef80765ea0 |
|
MD5 | 3cef1ccf73dc280cf956fbf43b60a52e |
|
BLAKE2b-256 | a7692260120404f694a14ecd5307f2af5dee4185eaf8939d1569c7d109f721b5 |
Hashes for maialib-1.6.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a4a7f9e6f49108311dc01ae41a4081c6bf17a3ac07a5e1ae7cdedb07fece1c1 |
|
MD5 | 7aaa323f769602f6f4522f7aa65d0329 |
|
BLAKE2b-256 | a2a635751010ffd0ea9839dd2351c3cb46a2017ffd596ab925f11dbebef404fc |
Hashes for maialib-1.6.1-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 31d9aa8f260ce0ecb59145cc67af0b1e6ce392d29e8ac768e27881d6334c35d2 |
|
MD5 | b3c0421ac1dc20dea302596be55d6ea2 |
|
BLAKE2b-256 | 4f0e2f41c916ba2549c98a6904182aed9ba0e01a8a83696a18bd86c215611170 |
Hashes for maialib-1.6.1-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2f751267e07ed7a4dfbb26fa0dac9c5bb0a710616c6a1c8c6a169ab02f3ca1d |
|
MD5 | 7c271881e67c9a79b5599d8c253ba457 |
|
BLAKE2b-256 | 71cc4c002a7181ae071953022c08c217f345e38a5a7e7464a89e1fafb2581175 |
Hashes for maialib-1.6.1-cp312-cp312-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5ecea8144b4337eea72748c327cdb6cd8611675979f314a6172fdc195c30cc36 |
|
MD5 | a2b620cbc88cc4353c80db1e35d33e80 |
|
BLAKE2b-256 | 92e2a16939207cc9f3cb8d8e21dbdaeb901c7b8f6a9a15ed334de645c09db94c |
Hashes for maialib-1.6.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 489d661a3f64e8ad836c095bf207cb0337a4d029fc4ebccbd6ea9c0cf2e80dc9 |
|
MD5 | 9ad410961103189c20d888543638adb8 |
|
BLAKE2b-256 | 6d0d2bdba8087b2fed9039f83c3970ec13610c0f659e18f76d9333609847752f |
Hashes for maialib-1.6.1-cp312-cp312-macosx_10_15_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f58ad539343242f6982d5f024ed729e72a99f3651a6239a5b901bea3b3629213 |
|
MD5 | a437020d57a9219fbef547d0efe7cc12 |
|
BLAKE2b-256 | 632142804427be465b8b02691de4a3c00caaeea12597d9f27f68509d0ae05a7d |
Hashes for maialib-1.6.1-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c85f2ceddf7de6891b706703c1d2a0b74d161d02a566fa5b101a78b074cc88c5 |
|
MD5 | e22f547ff9fa0af48d9292955a41a750 |
|
BLAKE2b-256 | 045f6741b69730ee01253602db9adefcf683d309afeae45cb5ba65b0e8c5fabc |
Hashes for maialib-1.6.1-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22a7518be5d77a30e1ff74f274065395299c1ecb161c97d4bc9f8391a105e871 |
|
MD5 | 027d854a3e0df83c9147d5685e610f88 |
|
BLAKE2b-256 | da7494e238891f2d9a4446f127220fc63b950c7dc67df912349ec27a71d53417 |
Hashes for maialib-1.6.1-cp311-cp311-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba7bfe779f78bd566667046aeda7377064c729820e66607d63ddf963afd54183 |
|
MD5 | 5c3d9a62745eac6d5ef20f822672ccfd |
|
BLAKE2b-256 | a0a36c8537d950d17346086ca84a642c3924d0fcb28f2dbc10d2fdb69c25a73b |
Hashes for maialib-1.6.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f857dd72888eb050a581abbd694c851e187aa28299ba587e60ebb8966ab3aa6 |
|
MD5 | bb103789a825cff50be294295831e705 |
|
BLAKE2b-256 | 8d8757da5a6fc71de751daa6f773f25259faefc32cac9615432bf722cd4f9675 |
Hashes for maialib-1.6.1-cp311-cp311-macosx_10_15_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60009a9a37e52aa71951e324e1e5391eb810fdf4b0080dfa0d05783e404bd806 |
|
MD5 | 5dc3d9357f04a3b0f5fd164b0a33d9bc |
|
BLAKE2b-256 | 966bedfce3c65d66995d481e58968c3b0563f65e1ee108a0201bdd9b3abaf9a4 |
Hashes for maialib-1.6.1-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6274a7051f850bbca8c49bf8656a3f71d0f7476fe0f46a4443302e297936c533 |
|
MD5 | bf71b3fde4c960dba498d802026ced39 |
|
BLAKE2b-256 | 533e24907092cbb7d0fc25d68d328b8326588cc2e19fb7bf2362932edd297bbc |
Hashes for maialib-1.6.1-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67b7a428e1b09d0dd6cb80295898e4b437bef203e6173bf89a2229c5376021cc |
|
MD5 | bb743902efe5c58b97d58510a7c45624 |
|
BLAKE2b-256 | f0d899f706172f4da3596b1b1c014b201dddb293927d421e116131729928075a |
Hashes for maialib-1.6.1-cp310-cp310-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54e1687411b86fcbdcbb39467264a2564f568e1e141eba781f1bcb92778af1d0 |
|
MD5 | ee2116f5280f732bfd022d25b22b49fb |
|
BLAKE2b-256 | d0a45eb59c9d8f1ae6e658f9ccdb48b64417662543bc83119f0616105fed929e |
Hashes for maialib-1.6.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1bab98baf189638bd06a3a99e03eb852fa613f87d09fcc9fd2f5a8d052613746 |
|
MD5 | 9915560d4bbdd9a10216dcc36f09c8cd |
|
BLAKE2b-256 | 96fa3e5ba26be1fd7fa7388042ca67c8b4f4ee41f9775fa1bd9572c2264ee086 |
Hashes for maialib-1.6.1-cp310-cp310-macosx_10_15_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64c122ecfa107a9d9ca98a8bc00be095d2fa6a9bc3cca13575162e3d0255defb |
|
MD5 | 8daf8967c74843e59cf655ef69dce4a7 |
|
BLAKE2b-256 | 8ecf1df84aeae32a656547a9c0fddc9f79c42ec9d99f3de48e9dc1be659d37ee |
Hashes for maialib-1.6.1-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0db0001ce4b3181d28c55fbe105c041078f728714e2ea75239b6eed0c78ebf8 |
|
MD5 | 9fc7eda2ee5f0d680715ffcee51ced22 |
|
BLAKE2b-256 | d4f9a2f9904dbb13fafd1662ebd9188e6544510f4b9647665b4d07281d0b38bc |
Hashes for maialib-1.6.1-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56cfbfd8c13768228c65d73e10e25bdc6ca8b593a5335373017f69d9d6ec2fc9 |
|
MD5 | 140151dd9d3bb95ea0eafc509b215c55 |
|
BLAKE2b-256 | 5012fe0bddfa0638865c7630c3ba81eaf1961069348f6e4d19b68ab949c870cd |
Hashes for maialib-1.6.1-cp39-cp39-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ca0fd3e6a07debf29f3596528baf53ac8b1a14e6908ee0abfadb43f9a3abdf2 |
|
MD5 | 7b607fe1004440aacb6d96f1015cbc52 |
|
BLAKE2b-256 | 4b5a5c950522ccf53bdc00c36b867bc62f9b35d3e304624c9d3661ef4a1a3ba2 |
Hashes for maialib-1.6.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51c799fb3e8fe1b27d3405a22aa74e6e35fb364793850c939c4a801561d70bdd |
|
MD5 | 2dba0ea7673aefee32dd72afa308a3cd |
|
BLAKE2b-256 | 9457a0fbbf35604cef2846d491097edadb1ee653281d5a79c36a90828963515c |
Hashes for maialib-1.6.1-cp39-cp39-macosx_10_15_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa7e24f66f5c150b3f4048c9d93ad24eff20b97859d67c59089f560edc39a1fe |
|
MD5 | 7e2cfb7fac59e98af3e3e40708727a3a |
|
BLAKE2b-256 | 70f27b2becc055dd197711a249b07deee86c2a2207109764d99680473068840b |
Hashes for maialib-1.6.1-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d81a1411b42e1bd7afa84393fda45354baaa3d0b87dca6e2e018ca8d4e5e967 |
|
MD5 | 7e395e151aa1040a1d476d261f6fe2b0 |
|
BLAKE2b-256 | 23a0104b7376c3b21b937d7ceaf9ceaaa66028fe24ef2117154565acb60af17b |
Hashes for maialib-1.6.1-cp38-cp38-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 46de5b8b624506d1d7847b146c4ce86a3a25e22934f2f76aabd554344ed14392 |
|
MD5 | 17c8ae89362f495dd53f7d2a559a5eb3 |
|
BLAKE2b-256 | cb3147008632e54ac2c92c8c3ce7cebf8605ccb9aeebc134e9f22497d6a2599e |
Hashes for maialib-1.6.1-cp38-cp38-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 700621e7d425bc28a525f3023522a6318144ac8f4ca64390ad72ffd8dec185ce |
|
MD5 | 23398df983388e751e1a69b0c57fb8d7 |
|
BLAKE2b-256 | 1014adc3ab3b58a5bdc83a252bcbe236442a95868c60a19d7f18e4a17a4e23e5 |
Hashes for maialib-1.6.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c0980adba025431dba1c58bbfba36ebe91db09cdb190305eeae5cfb2278ab10d |
|
MD5 | 1b4fba9b027811e96486cc20da5c76ed |
|
BLAKE2b-256 | d5df687943da63caf8feaf3eedddccb6c7e9da01410a28277d8363dfa23ecb3a |
Hashes for maialib-1.6.1-cp38-cp38-macosx_10_15_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8490b898f665b66306aedcda7f9605bb3307570930978e61ee6e01c28d79a05b |
|
MD5 | 8bb8d81cfab517b510309791d2be4492 |
|
BLAKE2b-256 | 6ad3faf9eea3da966005c70cf060c802dd6d17240a4a6b39d7952840ac86d9bc |