Pymprovisator format is very similar to .ini files. A pymprovisator song starts with a header [SONG]plus several lines to describe the song parameters:
[SONG] # This is an example song id = ThisIsATestSong tempo = 153 n_choruses = 10 title = This is a test song key = C n_bars = 12 active_instruments = piano bass drums style = basic chords = 4c7 4f7 8c7 8f7 8c7 4g7 4f7 4c7 4g7
In this example you can see all the elements that make up a song. By default, Pymprovisator songs are saved with .ymp extension, but you can use another one if you wish to.The elements of a song are as follows:
id Text, without spaces or puctuation signs. It identifies the song and is mainly used when generating the MIDI files.
tempo Indicates the song speed or ticks per minute. It must be a integer numerical value greater than 0.
n_choruses Number of choruses to be generated.Integer numeric value greater than 0.
title Song title
key Song's key. Available values are: C, C#, Db, D, D#, Eb, E, F, F#, Gb, G, G#, Ab, A, A#, Bb, B, Cm, C#m, Dbm, Dm, D#m, Ebm, Em, Fm, F#m, Gbm, Gm, G#m, Abm, Am, A#m, Bbm and Bm
n_bars Number of bars or measures. Integer greater than 0.
active_instruments Indicates which instruments will be used for the song. It should have at least one of these: "piano", "bass" or "drums" (don't type the quotes!).
style Song style. Styles available are: swing, even_eights, jazz_waltz, waltz, five_swing, five, latin1, latin2, bossa, samba1, samba2, ballad, funk, rock y basic. We won't explain them: they're descriptive enough!
All styles are in 4/4 meter, except waltz and jazz_waltz, in 3/4 and five and five_swing, in 5/4.
chordsSong chord sequence, separated with blanks. Chords are written in standard jazz notation, and each one of them has a leading number to indicate the number of beats or the chord duration, even though the chord applies to just one beat.
Warning: the chord sequence must be consistent with the total of measures. In the previous example, we have 12 bars in 'basic' style (4/4). Our song has 48 beats (12x4). Checking: 4 + 4 + 8 + 8 + 8 + 4 + 4 + 4 + 4 = 48 beats. That's OK!