The instruction:
All the parameters except the first are optional. Their interpretation is as follows:
The instruction is:
Examples:
The input is always named inin.txt, and contains a score in my notation, somewhat simplified. Besides chords, tones and durations
it may have key instructions and names instructions . There are also comments in braces, but the comments must fit on one line and the braces don't nest.
Some comments are meaningful, e.g. the first one shows that the music following is the ground, called "All hail".
clevercad
Generates notes from text. However, instead of taking a standard letter-to-note function, such as
a,e,i,o,u → FA/LA,RE,MI,SOL,UT
or the plain
a,b,c,d,e,f,g,h → LA,SIb,DO,RE,MI,FA,SOL,LA,SI,
the letters are arbitrarily assigned to notes, under the
following constraints:
The end product is a melody built of all the translated letters, plus supporting chords for the cadences.
enigma
Given a melody, it builds several voices based on a harmoniztion of the melody. When music plays, the melody may be omitted – a true enigma.
will produce a score named enig345 and the corresponding midi file enig345.mid.
perl drenig.pl
file_lhom
rand_345
dur_100
with orc
The driver program executes two other programs:
The piano score may be unplayable by one pianist – then assume a player piano, or piano four hands, or two pianos.
This reads a score and prepares the input for
enig.pl , the file scorenamen0 (attach "n0" to scorename ).
It takes one obligatory parameter, the name of the input score.
perl tondur.pl
file_scorename
The input score may contain key instructions (in this case key specifies 1 flat) and names instructions ( in this case, d r m ...
= Do Re Mi ... = C D E ... ;
rest is p).
The program also recognizes comments: text in braces, both braces on the same line, text may not contain braces.
Tones and duration may be specified as in my usual music editor, except that + and – are not available for octave,
and fractions cannot be written as numerator only.
{L'Homme Arme}
key 1b
names drm
s5 /2 s/4 d/2 d/4 i l/2 s 3/4 r5 /4 r s5 p r6 r r d/2 i/4 l/2
s 3/4 r6 /4 r r s5 3/4 s6 /2 s/4 f/2 f/4 s/2 s/4 r 3/4 s6 /2 s/4 f/2 f/4
s/2 s/4 r/2 s/4 l/2 s/4 f m/2 r 3/4 p s5 /2 s/4 d/2 d/4
i l/2 s 3/4 r5 /4 r s5 p r6 r r d/2 i/4 l/2 s 3/4
67 1/2
67 1/4
72 1/2
72 1/4
70 1/4
69 1/2
67 3/4
62 1/4
62 1/4
67 1/4
-1 1/4
74 1/4
.
.
74 1/4
74 1/4
72 1/2
70 1/4
69 1/2
67 3/4
chordur
Reads chords, and writes several output files. The files contain notes (as midi numbers) and durations as fractions,
plus comments in braces.
names abhc means I use the German notation for pitches, B is B flat and H is B natural.
The output files are ground-identifier or filler-identifier, ideally one ground and several fillers.
{ground all-hail}
names abhc
key 0b
p 7/4 p/8 a5 /8 b 3/8 a/8 e6 3/4
a5 /4 c bb
key 2#
e6 /2 b/4 p/8 a/8 {line 1}
b5 /4 a,c a# e6 g5 /2 a
.
.
.
inin.txt | ground-allhail | filler1 | filler2 |
{ground all-hail} names abhc key 0b p 7/4 p/8 a5 /8 b 3/8 a/8 e6 3/4 a5 /4 c bb key 2# e6 /2 b/4 p/8 a/8 {line 1} b5 /4 a,c a# e6 g5 /2 a key 3# e5 /2 p 3/8 a5 /8 b 3/8 a/8 a,c,e 3/4 f6 /4 c6 a# {line 2} e5 /4 b4 b/6 f5 d key 2b g5 /2 p 3/8 a4,a4 /8 b,b 3/8 a,a/8 e5,e 3/4 a5 /4 c b e6 /2 g5 /4 p e/4 g/2 a5 /4 g/2 f/2 {filler} names abhc key 0b f5 /4 c b d h4 f d b 1/4 f 3/16 c 1/16 g 1/2 {filler} names abhc key 0b a4 /4 c b e h a d b 1/4 f 1/8 c 1/8 g 1/2 |
{ground all-hail} -1 7/4 -1 1/8 69 1/8 70 3/8 69 1/8 76 3/4 69 1/4 72 1/4 69 1/4 76 1/2 70 1/4 -1 1/8 69 1/8 {line 1} 70 1/4 69 73 1/4 70 1/4 76 1/4 67 1/2 69 1/2 64 1/2 -1 3/8 69 1/8 70 3/8 69 1/8 69 73 76 3/4 78 1/4 73 1/4 70 1/4 {line 2} 64 1/4 58 1/4 58 1/6 66 1/6 62 1/6 67 1/2 -1 3/8 57 57 1/8 58 58 3/8 57 57 1/8 63 63 3/4 69 1/4 72 1/4 70 1/4 75 1/2 67 1/4 -1 1/4 63 1/4 67 1/2 69 1/4 67 1/2 65 1/2 |
{filler} 65 1/4 60 1/4 58 1/4 62 1/4 59 1/4 53 1/4 50 1/4 46 1/4 41 3/16 36 1/16 31 1/2 |
{filler} 57 1/4 60 1/4 58 1/4 52 1/4 47 1/4 45 1/4 50 1/4 46 1/4 41 1/8 36 1/8 31 1/2 |
Like chordur, but cannot read chords, just single notes. Does not produce multiple outputs.
Actually, a subprogram of enigma.
Reads the ground... and filler... files prepared by chordur, and adds fillers over the ground, transposed for optimized harmony.
not quite ready
- input not ready for several files, names must be passed from chordur
- works with only one filler
- does not understand chords at all, not in ground, nor in fillers
- needs clever count to decide how many voices are filled and how many empty ( routine gap )
Reads somethind like this:
METER 4 RHY /u dou`ble| bub`ble| FINIS RHY /u An`gus| Ban`quo| Ban`quo pro`ge`ny| . . .
and outputs something like this:
double bubble trouble cauldron
INITIALLY
do u
- b l e |,
b u b
- b l e |,
domaj
do do
- sib la mi*re |,
sib do sib
- sib la mi*re |
_dou
- ble|,
_trou
- ble|,
There are syllable separators and feet separators (these are sprung rhythm feet). If the program were really automatic, it would use the table to set pitch and durations so the stressed syllables (with underscores) fall on strong beats, and the feet (separated by pipes) have the same length. For now, nothing really matters, just the translation:
A to FA/LA E RE I MI O SOL U UT
A to LA B SI bemol C DO D RE E MI F FA G SOL H SI plus a few German curios: CIS to C sharp ES E flat etc...
It was supposed to turn text into motifs... not very successful
Without syllable separators and feet separators. It just performs letter to note translation. Typical input (always called inin ) :
Typical output:METER 6 RHY u/ Macbethes doom FINIS
The notes appear as solmization syllables do re mi fa sol la si, with sharps and flats (b) as needed. The brackets, underscores and semicolons indicate admissible variations:(fa,la);(fa;la) do sib mi;re si mib (re_sol);do sol
The silly spelling 'Macbethes' generates an E flat (mib) from 'es'.
- the letter a may be A, F (fa), or the chord F,A. The name falaltr is from the solmization fa, la.
- the letter e may be E, or D (re)
- the combination do may be C (do) or D followed by G ( d=re followed by sol )
Alas! the resulting music has nothing to do with doom.
perl xcab.pl
file_falaname
rand_345
n9_10
The first parameter is obligatory, it specifies
that falaname or falaname.txt is the file prepared by falaltr. The other parameters are optional; the parameter
n9_sizespecifies the size of a random sample of all the possible variations that may be generated from falaname.
See (actually hear) music made from the text "Macbeth's doom" .
to do: maybe I don't really need a random canon as end result