GitXplorerGitXplorer
l

fhmm_bach

public
5 stars
1 forks
0 issues

Commits

List of commits on branch master.
Unverified
40bf10d9b5b0a045d91844f51a0fe81f88596530

Import files to public repository

llucach committed 6 years ago

README

The README file for this repository.

Bach HMM

Install

pip install -r requirements.txt

If you want to see and play music sheets generated from our scripts you have to install musescore

sudo apt install musescore

and uncomment following line in music21_helpers.py

music21.environment.set('musicxmlPath', '/usr/bin/musescore')

Usage

See the detailed help from argparse:

> python3 main.py --help
usage: main.py [-h] [--skip-hmmlearn] [--skip-fhmm] [--do-generation] [-K K]
               [-M M] [-max-iter MAX_ITER] [-training-size TRAINING_SIZE]

HMM / FHMM on Bach music.

optional arguments:
  -h, --help            show this help message and exit
  --skip-hmmlearn
  --skip-fhmm
  --do-generation
  -K K                  Size of hidden state alphabet.
  -M M                  Number of markov chains (for FHMM).
  -max-iter MAX_ITER    Maximum number of iterations during training.
  -training-size TRAINING_SIZE
                        Number of songs (absolute value) to use in the
                        training set, the remaining ones will be included in
                        the test set

There is also a demo you can run issuing python3 demo.py, after un-zipping songs.zip.