A C++/Python library to manipulate sheet music data
Project description
Maialib - Music Analysis Library {#mainpage}
Official website: Maialib Documentation
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)
You can easily import your sheet music to Python environment using:
from maialib import *
score = Score('examples/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!
Requirements
To run-only
- Python 3.8 (or greater)
To build from source
Applications:
- C++17 compatible compiler
- CMake 3.8
- Python 3.8
- Make
- Doxygen (Optional: To build documentation)
- Buildcache (Optional: To accelerate the build process)
- CppCheck (Optional: C++ Static Analyzer)
Python Dev-only dependencies
pip install pathlib
pip install cpplint
pip install wheel
# To generate Python stubs
pip install coverage
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 | MSVC and GCC 10.3 (MSYS2) |
Linux Ubuntu 20.04 | GCC 9.3 |
Apple OSX 10.15 | XCode (Command Line Tools) 11.5 |
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
- Level 2 - Developer documentation: A deeper information for professional C++ programmers
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 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
If you want...
License
Maialib is licensed under (GPLv3 License) [https://www.gnu.org/licenses/gpl-3.0.html]
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-0.0.18.19-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6749e33c802d0e331a43fdb09e72950f03e7c656004719cd7629a22c69307d2d |
|
MD5 | 97c16cb9f8d75079419eb5f37b06c486 |
|
BLAKE2b-256 | c5c0e600be0e8fc149863ed6fd98a69652c3834a51a9572037ca729b3941dc89 |
Hashes for maialib-0.0.18.19-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 50aae6150a3f87730853c6aee784e241d42e6d4ef44725c176707abeeaa448b0 |
|
MD5 | 4f03649b47a90f3e22c54a38ae022088 |
|
BLAKE2b-256 | 0ad9fb5a522dbf1c8cfdbf9d8f2be1360e296d2fe78008a1358570032e68e888 |
Hashes for maialib-0.0.18.19-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87e78b0e56419945707653783fa52e1bfa7b89bd70295538e8fd81044e665edb |
|
MD5 | ffc68445ab048660c03ffabf90eec13f |
|
BLAKE2b-256 | 46c888299b1fb4a6f0b832dd20c04d748e349a572961f4d7b9a0d360fe1448e5 |
Hashes for maialib-0.0.18.19-cp38-cp38-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 491569165ada5ff472a43c277c4338bcd581fd3289f6697f774fbc161dcd8fad |
|
MD5 | 836633e91d441e52b6530877a4fe9fae |
|
BLAKE2b-256 | 9a634d4cd28f5eb35cfc060ad81fdcc5d67ed273520faab531f17a3a4f19ac60 |
Hashes for maialib-0.0.18.19-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f2158b2117a8e5385974a08de40e54ce21b2f0ec507f964c26bad7350d557e2 |
|
MD5 | d10add03194c1f74caad0091d5b46c8f |
|
BLAKE2b-256 | e9b5b60b8018b2d7010aaac4f50b485d1d9e5101f36096dd8324b51c24719fca |
Hashes for maialib-0.0.18.19-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f04ecd79609ff1f70ce255da5bd948a6b48365e4b3d916045a8dca2f0a0693ec |
|
MD5 | bdc4cd82abcb5a31322155f1edc017e5 |
|
BLAKE2b-256 | bbf477a708caf2db797c3661478363f2ba0114871f847b9c6a902d1ec0dc98f3 |