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.4.8-pp310-pypy310_pp73-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a3771b0fcd92a4ef672a6547bd132c9c91bf284e3f75d86a1dd03f2f944d1bf9 |
|
MD5 | 7c846004c8cd71808206b3ad4edf14bd |
|
BLAKE2b-256 | 8c4593a61a9a31b755a72683fb412c16bdecebb45b4f83466386d4ac62670541 |
Hashes for maialib-1.4.8-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e2865963c34442771d8fdcd045a47868445027480396457419ef6d478870ccc |
|
MD5 | 44909824eeadf433cdb57252d86a0783 |
|
BLAKE2b-256 | 183321b6ada2ff84f6864f0dc3284a344d09f51b64b7dd7e95bf36a464028640 |
Hashes for maialib-1.4.8-pp39-pypy39_pp73-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b88a179fc12bb35b4bc64df8c160ae6f761998e3c1a0afdc32e17b47886e328 |
|
MD5 | 6f45d1efe6a6f77a4e43a9bec4530bdb |
|
BLAKE2b-256 | 8d025f69aeb1882f9a210c5d7f67abd2819b3618e7fe0cc96204be2175f212f7 |
Hashes for maialib-1.4.8-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e1206524fff5c634571d369c659eabfb52c4bcfadcce80362832bc459fc3237 |
|
MD5 | 55e68927d977f8b0cbe0656ed9c39341 |
|
BLAKE2b-256 | 83d507c82584074256786ff9c811546c4c706e33ba40272744884fcf2944e5f4 |
Hashes for maialib-1.4.8-pp38-pypy38_pp73-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47708bb3187509eff26494ecaade00dc1dd8a8836f18822ecf2bc66031ed0ec0 |
|
MD5 | e0148d40a6a0010c921bcd1d306e3a95 |
|
BLAKE2b-256 | f30c13153114de8b7cdcefed112e42fde3ba1e488c654b0dd3d446117b18db72 |
Hashes for maialib-1.4.8-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dcb280e369ef48b6889fdbfd98bf8b98e0fc278c3d4d8868bae952430296c2fb |
|
MD5 | ee8c4b6c3a1bcb7866ef4b0e0f2a05dd |
|
BLAKE2b-256 | 80717756ef19d12de2b2aff1c95710fcb9f9208b99e43994ff1dcb42208ee4fb |
Hashes for maialib-1.4.8-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca2b35d2d914124a6a976a2ab4b25575998f0933d8bab3316052b005be215d92 |
|
MD5 | 4a855b2c22a1a3789a79bb268ad03213 |
|
BLAKE2b-256 | cde52583a53aac1e7b0ad15cde0aa8af258f6e3081976796a918065e50792306 |
Hashes for maialib-1.4.8-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 483f46bb2fcbdfdb32ef4526b8a6e694bcaa6decca97c8d12dabc452a2d945dc |
|
MD5 | c7ba35b6a762229dd53b4a28fe919c42 |
|
BLAKE2b-256 | 1c963ca89c4566c179eeac30b9a8aaf317f6b6330a0983a0e6396916ca9c07ce |
Hashes for maialib-1.4.8-cp312-cp312-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7fc479f0474ef0209993de089379c411647658eceba7b1881109fa6f0a5d20e |
|
MD5 | 7132473bc9e6723d05edf33636622741 |
|
BLAKE2b-256 | ef35a6629c7bfea9d339a442b982182f553cdbc22702dee1e179bb842b8c948b |
Hashes for maialib-1.4.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2f42952114f5588756c6f9686d989965f02c609d483b29c2ae26ae624ee9ff4e |
|
MD5 | e518bdba73ab5735c91f1306f80c78b7 |
|
BLAKE2b-256 | c6c78a5692f798acf0cf8120334e996dcfbdc456267c4d2061cfdb4f7c2dc18f |
Hashes for maialib-1.4.8-cp312-cp312-macosx_10_15_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ccc91eac8d1e911b4112a147da23b70bd433b9b9295828bc547533b470032677 |
|
MD5 | 12b347a6223abb44e683634fff583208 |
|
BLAKE2b-256 | 8d733d728683712234ed5735fd7b179d92b72b411cb4ba623313ddafe0315d85 |
Hashes for maialib-1.4.8-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0dce89e645aded065bbc1a7a7164bda39acf3708796cb85bd9298375d472c7e7 |
|
MD5 | 1200429369206fb5a61a68c167066816 |
|
BLAKE2b-256 | dae3101c4b11fdb696290376b3de81439b453f8009c0e401c2a284d503e68a5c |
Hashes for maialib-1.4.8-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bfb6a0428f0be53094467ecc6e1302fe456bbf00ee627d6ecbc9bb57279fb5c4 |
|
MD5 | c20c37984461ec2388548969177b5c54 |
|
BLAKE2b-256 | fa2d3d2bbb03fd679f83a309263dc65662297f78a90734cb61408ef09f060c49 |
Hashes for maialib-1.4.8-cp311-cp311-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f0cc102eea2db53db828edd7378013df1abc0c0e408854adee7e36cfb28ca59 |
|
MD5 | 13044678454f2fea915fae2706f7f3c8 |
|
BLAKE2b-256 | d5c17ffc1160a48723a8850be32f1e91988ab29cf03f8ff4ae76bea81fbab7d1 |
Hashes for maialib-1.4.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 058808d0d64c6020ae4c221d80c80e5614ea96c590ed508f139ef65338ce8dbf |
|
MD5 | 07e332630ef6bdea769b45cf2b03f808 |
|
BLAKE2b-256 | f41719769b6db0f209a29dd128b2fd776eb6fdfdd77ffa834bd60776158b0446 |
Hashes for maialib-1.4.8-cp311-cp311-macosx_10_15_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 073dafdfc1e1074dc710e630da42a3367469f084942b9fa248ca8856c8795532 |
|
MD5 | 7a50015068aa3cc205d6d63e373ac905 |
|
BLAKE2b-256 | e67f1b1076990571b46eed7e7b85f5250df6d6f7aad37e637e46d4d02402c2bf |
Hashes for maialib-1.4.8-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9fc48fd470b25c5d72192bac6497f22c922d5b20fdba4f5f78493af5f8a9e20 |
|
MD5 | e59a6d56cf9f1952d378048eb1041d76 |
|
BLAKE2b-256 | 860f648185f8f7b6c74516e84b7f5c890a3ac95b6ebd92b3e29bb1442b4b582f |
Hashes for maialib-1.4.8-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e64d4fbeefb87a11847f2366d87ccc77ba966be5e70f8cc3b2dc57642d4325f |
|
MD5 | e27ee4c5218a28b8a91cde8aacbd46f5 |
|
BLAKE2b-256 | 3eb85a424bb0d578754ceae774d7f17131536874b69faa4980a24fe3298eec55 |
Hashes for maialib-1.4.8-cp310-cp310-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62e49465d72c26b07f14cf5380da8e0c9ebebddd99f943d070291bc21ebb5cd8 |
|
MD5 | 9d7e6da8908a96781a6c607edfb4df19 |
|
BLAKE2b-256 | 024088967e9f85c6f32e2190df46e45dde63702ff22f5bff2d90cb25c479d5cc |
Hashes for maialib-1.4.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6597d01dfcad375c8b321839031e4c9fcaed17e62c89e06f69851a5624f63a86 |
|
MD5 | 391d92a73b47190175d6463657f63c0b |
|
BLAKE2b-256 | 1ed05bdc734f1cb057f31691802f8554b7313afc2360c0e19465136e9df6230d |
Hashes for maialib-1.4.8-cp310-cp310-macosx_10_15_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 146523abd1d4d63e08eca4938a378680035c7d43c4d92e479eb1e44829a6d365 |
|
MD5 | b5f942ed150c0b7434e1435250f4364b |
|
BLAKE2b-256 | 7e17e6122702700e1cf9ad3620f083aa7f93bbea6306b57c034cb448dfeb2841 |
Hashes for maialib-1.4.8-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 613e2867ceecada13fb83325327db975d6afd403a32ae3f502c32cc1fc3cd4fb |
|
MD5 | 680ef24dcdc4327acab8fb5be5d23072 |
|
BLAKE2b-256 | 8bd66ef1220672f31ec1efe5dca2a55844aa1b0a9ba8477601c23d24b800d007 |
Hashes for maialib-1.4.8-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f469636b28989b7c4dc425518602ef09ef519591da7b2ac9bc0823aaa4b6743 |
|
MD5 | 83e6de654ea04e06ddbe5c76e7fb0626 |
|
BLAKE2b-256 | 7f4e5dba03e3c3faad2b78c5e888ef8717f6e41c1c9fbeacb0af8c1b96e37fcc |
Hashes for maialib-1.4.8-cp39-cp39-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf148119596654a7870f9b7579b8effdc31a85497ba2e2138524f3c51e8dc92f |
|
MD5 | 60849f58e15a193173b58e040b8fb2a5 |
|
BLAKE2b-256 | a36dffe8874d4428c30d817ab0957e6c9527bccdff770155859e1977418fa822 |
Hashes for maialib-1.4.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a39f5abd0084bae90cb4a16b53b439305013693b6bb708cccd3f9e66e1d102dc |
|
MD5 | 359e0f5fc7c90e00460d9d87ac341ffc |
|
BLAKE2b-256 | 68e1f50a39ae61622c8f99985d66cd50b31f0c9a67c65477eb583e16aa3d8059 |
Hashes for maialib-1.4.8-cp39-cp39-macosx_10_15_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9dafc38d73f8f5f69c80e17880f499ab4b815c017909a2513b60fd3a9d09c5aa |
|
MD5 | c474381caca246acf417784509e19c1e |
|
BLAKE2b-256 | e21b4d6b7d104cd251f19622bb1ca9d2bdb0fafc08a996877f219aaf83d8d6d9 |
Hashes for maialib-1.4.8-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb3ef77420f0416b16233da188ba38546513dc7bdc81b964445b248dfa7e8a4d |
|
MD5 | c2655a16e98ff74f2db55ca7af36f73e |
|
BLAKE2b-256 | 433152956b01c62acc652b469ad3b92398b201d6ccfe75539c35a554424f65f5 |
Hashes for maialib-1.4.8-cp38-cp38-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79bdc8658bb652ff2de3309db1b7086098e41ef8446bd82e7096660944b55fb6 |
|
MD5 | 396170b4b5462a3c3d5d0013520b9d35 |
|
BLAKE2b-256 | e586a3bf1bc6499e3f4d593c5cea6d97c6971c5467058fa43d8188b1552f4fb4 |
Hashes for maialib-1.4.8-cp38-cp38-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9755c1794b603a75f59ffb59aa026d04e8afcca641be170080fa93a6b15a3ad0 |
|
MD5 | 06922d3c55088f13f205a52ff447ab39 |
|
BLAKE2b-256 | bf285b9d03ad117c9a3ce2f980e7a57c01e6ae1d1aac2dc6a8246fdee325f261 |
Hashes for maialib-1.4.8-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f7854227971c8626227defef09d69a46d9ffba7e410b3cb80c170e1835b6494 |
|
MD5 | 29da431eae6d4fd65d9bdfc7a8693efe |
|
BLAKE2b-256 | 9d7457813e3d3ae3405b7c5d0e30ed4bcb9bd751bb09e4014d46e3c7594feaa9 |
Hashes for maialib-1.4.8-cp38-cp38-macosx_10_15_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6326fbfd9c795ddbbd4a06b59580606f39ec7d99eed3a46629b43097b907562e |
|
MD5 | 9e4627d9fbfe6030d9d955a296a2d549 |
|
BLAKE2b-256 | f7cc1ce4cf9f5540e04a7d9db47167d057450d5e27731ccc1ab89d2e63955d09 |