CHASP (Composing Harmonies with ASP) generates chord progressions and uses them as a basis to create simple accompanying pieces of different genres.

Requirements
============
- Python 2.7
- gringo version 4.4.0 (http://sourceforge.net/projects/potassco/files/gringo/4.4.0/)
	- make sure to install the pyclingo target (i.e. python "gringo" module)
- lilypond version 2.16.2 (http://www.lilypond.org/download.de.html) or higher


Using music.py
--------------

To generate chord progressions in the form given below use:

$ python music.py

<command line output sample>

key: c major
cadenza length: 4 chords
found 4 chord progression(s)

models: 
[cadenza(4,(1,0)), cadenza(3,(5,0)), cadenza(2,(6,0)), cadenza(1,(1,0)), thiskey(c,maj), cadenza_chord(3,g,maj,0), cadenza_chord(1,c,maj,0), cadenza_chord(4,c,maj,0), cadenza_chord(2,a,min,0), cadenza_notes(3,g,b,d,g), cadenza_notes(1,c,e,g,c), cadenza_notes(4,c,e,g,c), cadenza_notes(2,a,c,e,a)]

...

---------------------------

To create PDF an MIDI output of a chord sequence in a specific style use

$ python music.py -i tango

Instead of tango you may choose between chords, bach, pop, foxtrot, raggae, rumba, tango and voices.
chord creates a simple score containing the chords of the given chord progression.
bach creates a piece in the style of the Prelude No. 1 in C major, BWV 846, from Bach's Well-tempered Clavier.
voices creats a 4-voices homophnic choral.
All other options create simple accompanying pieces in the corresponding genre.
The output files can be found in ./out

---------------------------

To change the length of the generated progression you can use this command line flag:

$ python music.py -l 8

---------------------------

To change the key of the output, use:

$ python music.py -k g -m min

-k changes the root of the key (default c)
-m changes the mode (min or maj - default maj) of the key

---------------------------

To see a list of all available options, use:

$ python music.py --help


Contents
--------
./
|- music.py    : main script
|- asp/        : asp music model
|- lilystyles/ : lilypond code generators for multiple genres
|- out/        : generated (example) output (lilypond, PDF and MIDI)
