Package: maialib
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 projectcorewas wrote inC++17, but it also has aPythonwrapper 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 inmaialib.AdvantagesEasy to use to musicians and musical researchersHigh computer perfomance and fast calculationsRead and write musical scores (MusicXML file format)Get Python PackagepipinstallmaialibGet StartedYou can easily import your sheet music (*.xmlfile) to Python environment using:importmaialibasmlmyScore=ml.Score('./Beethoven/Symphony_9th.xml')Now you can explore somemaialibfeatures like:Find musical patternsWrite your own scores from your custom algorithmsAnalyse scores in a musical statistical data perspectiveAnd much more!Documentation (in development)Maialib Documentation WebSiteAre you a C++ developer?Requirements to build from C++ sources:C++17 compatible compilerCMake 3.26Python 3.8MakeDoxygen (Optional: To build documentation)Buildcache (Optional: To accelerate the build process)CppCheck (Optional: C++ Static Analyzer)Are you a Python developer?Python Dev-only dependenciespip 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 OnlyTested EnvironmentsOperational SystemCompilersWindows 10 x64Clang 15.0 (MSYS2)Linux Ubuntu 20.04GCC 9.3Apple OSX 10.15XCode 11.5 (Command Line Tools)DocumentationThis 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)Code CoverageClickhereto check themaiacoreC++ code coverageLevel 1: Python TutorialYou can exploremaialibfeatures looking atpython-tutorialfolder.There you will learn how to use and mixmaialibclasses and functions to reach your musical goalsLevel 2: Developer DocumentationYou can browse the compileddoxygendocumentation openingdocs/index.html.Quick StartBuild Python module from C++ sourceOpen a terminal (or CMD in Windows), enter inside of themaialibfolder.Type:maketo build the Python moduleWhen the build process finishes, type:make installDone!Frequent Asked Questions1) Where can I find the XML file of a specific musical score?To import musical scores the file extensions must be:*.xml,*.mxlor*.musicxmlYou can easily export your music files to these file formats above from score editors, like:MuseScore (free!)SibeliusFinaleOthersManyMusicXMLfiles 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 theMusicXMLfile from it.Known issues to build from sourceAll PlatformsMultiple Python versions installed, like:Official Python,Microsoft Python,MSYS2 Pythonand 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(orCMDon Windows) and type: - Linux or Mac: -which python-which python3- Windows: -where.exe python-where.exe python3Windows-OnlyDisable your antivirus or create a exception (CMake permissions)ContactNycholas Maia -nyckmaia@gmail.comContributingFork this projectMake your custumizations and improvmentsPlease, send me a pull requestLicenseMaialib is licensed under (GPLv3 License) [https://www.gnu.org/licenses/gpl-3.0.html]