autoplay
is a simple C++
library of a combination of some music composition
algorithms. The target of this project is to create music software that can
automatically generate good melodies in a lovely rhythm with a gentle dynamic,
using advanced programming techniques.
For more information on how this project works, please take a look at the docs
folder.
I'm sure you'll find what you're looking for there.
The current functionality is almost nonexistant. It nowadays only plays the Ode to Joy from Beethoven.
The installation of the project is rather simple. Just clone this repository and compile
via cmake
. That's all there is to it. Oh, don't forget to clone the dependencies (
submodules) as well.
This project makes use of the RtMidi library,
current version 3.0.0
.
This library allows for real-time playback of the music. Maybe this dependency will be
removed later on.
To install this dependency, you have to install and update the submodules of this repo. The necessary files will be linked automatically during compilation.
RtMidi itself comes with a few dependencies, as can be found here.
Boost is definitely a powerful library that can handle a lot of different things. In the
scope of this project, Boost
is used for easy JSON
and XML
parsing and generation.
You must have Boost
installed on your system for this to work.
The Google Testing Framework is a useful tool for writing and testing unit tests. Of course randomization is difficult to test, but a series of algorithms can be tested anyways.
You must have gtest
installed.
sudo apt-get install libgtest-dev cmake
cd /usr/src/gtest
sudo cmake CMakeLists.txt
sudo make
sudo cp *.a /usr/lib
sudo wget https://github.com/google/googletest/archive/release-1.7.0.tar.gz
sudo tar xf release-1.7.0.tar.gz
cd googletest-release-1.7.0
sudo cmake -DBUILD_SHARED_LIBS=ON .
sudo make
sudo cp -a include/gtest /usr/include
sudo cp -a libgtest_main.so libgtest.so /usr/lib/
Due to the random nature of the results of autoplay
, trng
was added. This library will
handle all random actions that happen during the music generation.
After painstakingly trying to install trng
similarly to how RtMidi
was installed,
the decision was made to keep it as a submodule, but describe how to install the library
into the opt
folder.
For a detailed description, please read the trng.pdf
in the trng/doc
folder (page 96).
- Install and Update the submodule
- Make sure
autoconf
,automake
andlibtool
are installed. This can be done withsudo apt-get install autotools-dev autoconf libtool-bin
. - Run
autoreconf
on thetrng
folder to make sure everything works as desired. - Configure
trng
in theopt
directory with your preferred compiler (e.g. GNU C++ 7) using the following command:sudo CXX=g++-7 ./configure --prefix=/opt/trng
. - Run
sudo make
andsudo make install
.
If you don't want to use /opt/trng
as the folder for trng
, you can do so, but must
compile cmake
of this project with the flag -DTRNG_LOC
set to your home directory of
trng
.
TODO: Add scripts for this, so it will work easily on travis and possibly other OS.
Date | Update |
---|---|
07-11-2018 | Added RtMidi library for easy playback. |
13-10-2018 | Started looking at different file formats to export to: - MIDI (might have issues with the non-generality) - MusicXML (standard open format for exchanging digital sheet music) |
13-10-2018 | Added TRNG as a pseudo-random number generator. |
14-10-2018 | Added Boost and started the concept of the RPG . |
14-10-2018 | Did some research on different music generation algorithms |
14-10-2018 | Added Travis CI |
14-10-2018 | Created the Randomizer class to handle all randomization without the need to keep on using the same code over and over again. |
15-10-2018 | Added gtest . |
20-10-2018 | Added tests for Note class. |
21-10-2018 | Added Clef and Measure class and added tests for the latter. |
23-10-2018 | Added zupply for logging. |
24-10-2018 | Started work on Instrument class, by using a very basic implementation. Currently, only piano instruments are implemented in the music::instruments namespace, but this is enough for the current working version.Also added a music::instruments::findByName(const std::string&) function to find an instrument by name (precursor to config file support). |
27-10-2018 | Added Part , Score and MIDIPlayer classes. |