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
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.6.0-pp310-pypy310_pp73-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4ab97adc8e2fd0088314c4156e13e6d0f9ba6ab194ac0daf9a46750a1cefe35 |
|
MD5 | 03d6b485cc980b2f52f9ee496dfa76c4 |
|
BLAKE2b-256 | c3b8a3546afe5779ed8aa6acd328c74af6c05fe17cc815e3b7e5e4330a915696 |
Hashes for maialib-1.6.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 573529f87856132834b61f996d28a23e7ccd9c5088e56cba37193d082a1e3626 |
|
MD5 | 41abd3c768042f552139f187441fea03 |
|
BLAKE2b-256 | 110d343ab7736ec7a3703f4c7c7f85106dc25ce3787573666d6b2c5be49f5fad |
Hashes for maialib-1.6.0-pp39-pypy39_pp73-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5927050a57ba378322e4730e687b9208c762aa6101b082b187f48f96d5a19179 |
|
MD5 | 6b0745362961c5ec78aad7a6c7f6976a |
|
BLAKE2b-256 | a98ba5dfbdc396ca7a13ad0702143e0385d95626ea6a614962929c2d0ad3fa7e |
Hashes for maialib-1.6.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 006ff873e74c8f0dcbe15bbdf15e33c9b5965a4a33c9db7bfa11415846bb1b1f |
|
MD5 | c82f89d8c182b2fcd3a468d1484f03d4 |
|
BLAKE2b-256 | 6ff9f6e969aed9947aed159cf38fe84992b2020156e79e4703a9451f675cf4ea |
Hashes for maialib-1.6.0-pp38-pypy38_pp73-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 34dd2cca970b48cf22ea5fb7d820cd3e4f58a5a15306b8743e7be8f81599b711 |
|
MD5 | 6c5103e2694d555e399666d82124bfdd |
|
BLAKE2b-256 | 1b8e4a413d1f86cc514d11b7292b351ad9a5b28b7b19d0ec834f04d6439c6f9c |
Hashes for maialib-1.6.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 443c73d1d6bf711959af4d82e4631131def55ecca72cf346c964b20a5bb782e9 |
|
MD5 | 70824e62c15d0b90b5bf8545bb7d96dc |
|
BLAKE2b-256 | 43192164752a3c9e10f7e85ba1325c42ab96a66bd3e6db52dcedb26b80ba1d15 |
Hashes for maialib-1.6.0-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc1435b76797dba0d4a8b61e1a410a11371dbd255a6e5ed69db91a0e8d143c1e |
|
MD5 | 17f050e63ed03d2f4a31e747b5596ac3 |
|
BLAKE2b-256 | 353d304320460d3f48bfbf1d165fd85e378a6f9b92a15393bf5ef6dd2dbbd059 |
Hashes for maialib-1.6.0-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d07343fb6e01a0e55378d2de338aaf0dc184a09aa294633b4075bc91fba34b0 |
|
MD5 | 1cfc0a670940283bc3f69903a475b5c5 |
|
BLAKE2b-256 | 0ca82da3533da3b788a4c318a075cfa92fc2d47f558dd055497e28e7c9ce42a7 |
Hashes for maialib-1.6.0-cp312-cp312-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5ce57f18b661174e52724a732dfdd8722bce54bd295bd7e926d1a17ebb42174b |
|
MD5 | 4eb844321e11fc6c4c437b1edef2ad80 |
|
BLAKE2b-256 | fdb74f561abb048af96c2199938216c3da7938651e525deff3b998b9184a67d1 |
Hashes for maialib-1.6.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70ccca7a3e59e72f8529aa2b6fa5b2e770f847777ded2278c5c06d11a1ca045b |
|
MD5 | c8e1ace02c26523bdc5cd75f31cb17dd |
|
BLAKE2b-256 | 6d784dec72a60f59c07412ab8a5d253a252b80892a31f5ffe2ab818302bdd796 |
Hashes for maialib-1.6.0-cp312-cp312-macosx_10_15_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 090d34b101d0a6281cfbfa4d259c146c617504d604dcb12b66171db4f6c98e70 |
|
MD5 | a0ea8c0ffa52deddd5551da0f1cc70fc |
|
BLAKE2b-256 | ec3177acb3b6d19c956cb20fa80a95db68b39074c19325d401e8732d56b734a9 |
Hashes for maialib-1.6.0-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e48628048a68bbb1d5e3e109067e9b48c2e3e81439df5d9d2e72aa36f363101e |
|
MD5 | c36ad52c7eef63dbee0ff4231d0147b8 |
|
BLAKE2b-256 | c4ad4db772bad3b3bf3c8038d23f57bc82b7f1fad71f7d1e2d22af7e2290efc3 |
Hashes for maialib-1.6.0-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e770457826f8320e2b3de615dd8e819e70ac4e4f6728ae0c1169f8e360c284f0 |
|
MD5 | 1f8b74dae209bce13f17874b7c0a027f |
|
BLAKE2b-256 | d39aa70a54dbf53ac22a58ae8adca082979f818ab3a91672690355b73d0003b7 |
Hashes for maialib-1.6.0-cp311-cp311-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39ad5c972d40f1ede11f2b89f0dac7e7c77204b2abac7c97df7d892424a2c0dc |
|
MD5 | d3109570704beffcabe0ab64975ee7f5 |
|
BLAKE2b-256 | d2eff1b2a23bee42705e7b696341ff414243c1b411dc78cb04410003567b79fd |
Hashes for maialib-1.6.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e9dc9bf89d929c1573b7a44aabb296a9e83ac961bb757b6e3a105cbf3be20e4 |
|
MD5 | 397ed44d4c389f8434b8df9275d2e58e |
|
BLAKE2b-256 | ad8f662d9a864afee966ed9d1363c97991ce6610eed39d2102fd8458b74ac379 |
Hashes for maialib-1.6.0-cp311-cp311-macosx_10_15_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d7f765791a63e57e6c204c5042813396931ca0b38f3f86dfb8164092b355a82 |
|
MD5 | e3e6c4ac423c64be627577629f70ca6c |
|
BLAKE2b-256 | 18647121350c4f6b7b94d9b749684713c20621005d81361b1e04f1f2fc9cda70 |
Hashes for maialib-1.6.0-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23491eb2c5a97968960300ff170ad06f7309141766d30dcb7335d3e534148049 |
|
MD5 | 4375dd6286dce7947a249ecaae93d6b4 |
|
BLAKE2b-256 | 2dbe0cb69061198e8679adccb022eb779838a4681f956e49afd6b81451d40e67 |
Hashes for maialib-1.6.0-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c67b1e3c44cc466fd49447b81e32e371932caf492ac1c056c116a5fe46d31508 |
|
MD5 | 610cd4398b64dcf32ed5b2a5e987ea98 |
|
BLAKE2b-256 | 83aa1d6cb05e146b2e0d70c0a2681f0e00554a1843ed6ee55efeadd1d4f9f21d |
Hashes for maialib-1.6.0-cp310-cp310-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9dd79c73ddf9c27921deaa487002fe6afda8c0b779c216674b2938930ec95395 |
|
MD5 | 7f68cc90272a0b0a6f57b307692c9ade |
|
BLAKE2b-256 | d378925f2b7bdd3c4d95f9564c6d5fbeddd9114504ed405965aa246f663df7f8 |
Hashes for maialib-1.6.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa8f5080f68d68878ef12bc8e960c11a1ca850916ce141fc76a80a30d43907f0 |
|
MD5 | 8acdd193e5fa7b3f0c1e83b7e8d29199 |
|
BLAKE2b-256 | 8abf1556d5840de68e96bca8ff12c2cff66f72ed8260da459f155763e35a2628 |
Hashes for maialib-1.6.0-cp310-cp310-macosx_10_15_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5b1ee9cd9fdebedf74f52157bc6c614ca715442c0c6337bb4d87a0af412f92b |
|
MD5 | 7729da06a5a79deafb40793855949bfb |
|
BLAKE2b-256 | 0f8d37e61f4ee656059825975bef8692097f8d6bd79d20ecb25ce702e9cfa661 |
Hashes for maialib-1.6.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac164898411e20401654263156dce1b5c05bb54ed4f8776c196b8a0c4a4682ba |
|
MD5 | 56f48a3a2c11157de6cb99cbdb7feb17 |
|
BLAKE2b-256 | 4dedaae2c3e16a2a23c5e7657dcfefb3148a796ef413e011b3c6b10da7be55a7 |
Hashes for maialib-1.6.0-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4286d18d1fae4e006085df6c24cf5abc5ee6c492bd507fad1632f8059869a6d7 |
|
MD5 | 5d5c06d882a8e9f38419593c40110fb5 |
|
BLAKE2b-256 | 061fa1e4616a70b898f1e0e5794c61d60055d6f0e52549422b4c4874c975bf7a |
Hashes for maialib-1.6.0-cp39-cp39-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11185c96c946b80226dc85d58ddc6070110bd2ed4c116871c57473b40901a4db |
|
MD5 | 7c7a94eb891c6d6f862fe7b36cc4ad82 |
|
BLAKE2b-256 | dd9a81580d6adc3af44d8c9b306d9ee514f6a7cc1b50fdcce744baf73945bc9c |
Hashes for maialib-1.6.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 882abae09a365d4a13c40a7cffdffa9bf10f1c5c5f92f1ddc2bc827b22ce61b8 |
|
MD5 | 6c7442d75854d43d48921292c4df5410 |
|
BLAKE2b-256 | cfa30f8784ffbb491eb317d16d1b036dc8eb418fcbd09dfeec066005f5b96eea |
Hashes for maialib-1.6.0-cp39-cp39-macosx_10_15_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06104e4af1e529457d34a4095dc28a64a07fcded69faa1f6113deed84ae4ec01 |
|
MD5 | af993652baa70383a64d0e08a981cf59 |
|
BLAKE2b-256 | fce6bff61adb8116b504872178bb2d11aa1e550b5217f7c9a57f3f0aaec1ac93 |
Hashes for maialib-1.6.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a862bee30b880692dbbe0cb3a59ac3c57cb05c3f68769a53a78f41c553b039a |
|
MD5 | c27105c3e4ac1f9d10bd009cc8ef7e47 |
|
BLAKE2b-256 | a11ad83543813c96a01483e6fc9350a803f0ae91875207b2dc594ba31ada5e30 |
Hashes for maialib-1.6.0-cp38-cp38-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab62710996bd613ea3ee6aa026b6295fff9c732527272e7476da26acbb6c0520 |
|
MD5 | 327f25002fce0fbdea71e555c6098dd6 |
|
BLAKE2b-256 | 0d0d48367dcda0262cb1c5a4bf12a0b3aa47601a69e55b1e21012096a46ec2eb |
Hashes for maialib-1.6.0-cp38-cp38-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef07dbc97c08f36aeb9b2ce3aadd078c1f16d264c5d65200ae4f6bf966d9eaec |
|
MD5 | 01142b6657875e855013a23784d36fc6 |
|
BLAKE2b-256 | cbb13c4bee3b8eeaaa39b4fad44219e47d12d79bd2db92b70208f4331f45b88f |
Hashes for maialib-1.6.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac5ebed8b22060e11e671131d03db9795b7baff8d0847336ab68624c29a4d423 |
|
MD5 | 9df47584f2de8f938da22076e045aaa0 |
|
BLAKE2b-256 | bb3cfa44ad0424faa20ca2e754ebb1f55aa7dd30d2c9f3dbb990c3c0d132b969 |
Hashes for maialib-1.6.0-cp38-cp38-macosx_10_15_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58e5b2db0a88f960eaa9910ab2365ad3e479ebcde7c360b0c30a6a9f2cba2780 |
|
MD5 | 0d99a1ee827917254e74a706ec4f5fef |
|
BLAKE2b-256 | febbf994c7a655d920d827d7b516ab856cbb42a9f72bee15f0f6cf4a7b8ef1ee |