The instruction:
perl drivath.pl parameters...produces a dodecaphonic and athematic piano concerto. Athematic more or less means that there are no exact repetitions, and no recognizable melodic motifs. The rhythms, on the other hand, are rather tame (that could be changed)
The concerto consists of:
| 1. | First part: | (no title) |
| 2. | Second part: | Tema con concertini |
| This is evidently lifted from Mossolov's 1st piano concerto, part two,
but, of course, no tema. Then I got the conceit that it could be a Romanze, maybe Elvira Madigan –
K467, Andante. As the saying goes, ... if I could only find a comfortable chair I would rival Mozart ... The Gods have not struck yet. More prosaically, the 2nd part is made by two programs, actino.pl and bctino.pl . Both are much more complex than anything I wrote yet. So maybe there are some useful new techniques, maybe not. | ||
| 3. | Third part: | Toccata |
Uses a parameter (all items optional)
rand_666 tritone_1 noise_self/default/default7/triadic/345 bridge_30 hocket_10,15,25 size_70 ser_8b09a3241567Calls athni.pl, newathnj.pl, brig.pl, hea.pl actino.pl bctino.pl and toca.pl via system() in perl.BECAUSE OF ANTIQUATED .bat USAGE AND DOS QUIRKS, USE UNDERSCORE, NOT EQUAL !!
athni.pl, newathnj.pl and bridge.pl construct the basic material, a list of phrases. Then:
- hea.pl produces the first part of the concerto,
- actino.pl and bctino.pl produce the second part,
- toca.pl produces the third part.
If any of these fails, drivath.pl increases random seed and restarts
Details (what the system sees):
perl athni.pl @ARGV > ifile.txt
perl newathnj.pl > jfile.txt
perl brig.pl , ## no std output
perl hea.pl > kfile.txt
copy PARM.txt+atheader.txt+scora.txt atha$ID
midi atha$ID
perl actino.pl > lafile.txt ,
perl bctino.pl > lbfile.txt ,
copy PARM.txt+atheader.txt+scorb.txt athb$ID
midi athb$ID
perl toca.pl > mfile.txt ,
copy PARM.txt+atheader.txt+scorc.txt athc$ID
midi athc$IDIn this list, @ARGV is the parameter and $ID is the seed for random number generation. midi is my instruction for making a .mid file from a score, atheader.txt the top of the score, which defines instruments, etc.
The final results are the scores atha$ID, athb$ID, athc$ID and the midi files atha$ID.mid, athb$ID.mid, athc$ID.mid
All items are optional.
For instance, if the series is:
If ser is missing, the series is generated at random.
Defines the series
writes PARM.txt which contains the input parameters and the series, e.g.:
Creates SIZE phrases, then adds the same phrases in reverse order, some cancrizans.
E.g., if SIZE = 50,
the program will generate 50 phrases (numbered 0 to 49); then
Contains routines: MAIN paralel adentry enlistphr stdphr
Writes and reads noizez.txt : grades for all combinations of <= 12 distinct tones
There is no HARMONY OPTIMIZATION, a chord is either consonant or dissonant
The results are written to STANDARD OUTPUT
Modifies the phrases generated by newathnj by bridging notes over rests
Definitely spoils harmony (creates suspensions)
The results are written on three files:
The format is identical to the output of newathnj.pl, omitting the
phrases creation log.
The program produces the same result as athno.pl
from the "Athematic Konzertstuck".
This will serve as first movement in the concerto.
Reads PARM.txt
Reads noizez.txt : grades for all combinations of <= 12 distinct tones
Reads and uses the phrases in head.txt
Writes the score file scora.txt.
Program structure:
The program uses cadences to subdivide the movement. Longer subdivisions (at least two of them) will become concertinos, i.e.
one of the following instruments
"Romanze" means I tried to get a smooth, dreamy melody by using patterns. Did not particularly succeed, although the movement has a character of its own.
Implemented via two programs actino.pl, bctino.pl .
Reads files PARM.txt tail.txt
Writes file pass.txt
Program structure:
Reads files PARM.txt, pass.txt
Writes score file scorb.txt
Program structure:
Reads files PARM.txt, mid.txt
Writes score file scorc.txt
Program structure:
The routines embelish, nearenough, patmach, rewrite in bctino.pl analyse each phrase,
to find groups of notes near enough to (a transposition of) the notes in a pattern,
and apply the pattern rhythm to them. That may scramble the notes somewhat; there may also be notes
left over, which
will serve as ostinato bass for the melody in the pattern.
So the five patterns are heard many times, usually slightly modified,
during the whole second movement.
The coda, however, does not use embelish, so its rhythms are much simpler an non-distinctive. Eventually it ends with no rhythm at all:
the series played in equal durations, molto rallentando.
An example of notes rearrangement, when a pattern is created in actino.pl:
Notice that the notes in pattern more or less fit the order in the rows 6..8, but not exactly.
The note 7 (g or sol) in row 6 has disappeared from the pattern. It is still saved, in row 6, in the table BYTON.
Also notice the "romanze rhythm"
athni.pl
Uses a parameter of the form:
rand_666 tritone_1
noise_self/default/default7/triadic/345 bridge_30
hocket_10,15,25 size_70 ser_8b09a3241567
This is an approximation to basic triadic harmony. Thirds and sixths get very high grades, fifth and octaves somewhat
lower grades, major seconds are bad, minor seconds worst... Chords are graded by averaging all the intervals they contain.
Only triads and their subsets are consonant.
Like triadic, but V7 and some of its subsets are consonant.
This means that only groups of 1,2,3 and 4 notes from the series, transposed or inverted
will be considered consonant.
it should be harmonized only by the chords:
with their transpositions and inversions.
A code like this means that the intervals of 3,4 and 5 semitones and their inversions are consonant.
Unisons/octaves are always consonant (according to Schoenberg they should be dissonant) .
All the other intervals are dissonant.
8
11
0
9
10
3
2
4
1
5
6
7
( in the parameter ser, a=10 and b=11 )
i.e.
A♭
B
C
A
B♭
E♭
D
E
C#
F
F#
G
{
SRAND 666
SER 8 3 1 6 7 4 10 2 9 5 11 0 0 11 5 9 2 10 4 7 6 1 3 8 4 9 11 6 5 8 2 10 3 7 1 0 0 1 7 3 10 2 8 5 6 11 9 4
NOISE SELF
BRIDGE 30
HOCKET 10,15,25
SIZE 70
}
newathnj.pl
Athematic perpetual development, IGNORING DURATIONS
The probability of having a cancrizans phrase increases with phrase number, and is one near the end.
In total, 100 phrases numbered 0 to 99 (twice SIZE)
phrase 50 is the same as phrase 49 (or phrase 49 played backwards)
phrase 51 is the same as phrase 48 (or phrase 48 played backwards)
.
.
phrase 98 is the same as phrase 1 played backwards
phrase 99 is the same as phrase 0 played backwards
brig.pl
Reads PARM.txt and the output of newathnj.pl
head.txt:
phrases n0 to SIZE*0.6 (n0 at random, between 7 and 15.
head.txt does not start with first phrase.)
tail.txt:
phrases SIZE*1.2 to SIZE*2.
mid.txt:
phrases SIZE*0.6 to SIZE*1.2
First movement: program hea.pl
The routine readphr reads the input, then analyzes the phrases for cadences.
The routine codaindex sets the position near the end of the score after which
cadential phrases are allowed.
makescore calls:
one midi channel = one voice = one sound.
Chords are, of course, natural for piano. Same results as genscor.
Second movement: Tema con Concertini, Romanze
will play solo, virtuoso music. The rest will have the piano as soloist, as the rest of the concerto; the piano is also active
as an accompanist or participant in the concertino.
actino.pl
This is, basically, a preprocessor for bctino.pl. Based on cadences, it defines concertinos and selects phrases to be played.
It may fail, if there are not enough cadences or concertinos.
mvfr (i.e. most voices to fast rhythms )
looks for 3..5 distinct notes sounding simultaneously
– in the same row – in the phrase. That row and its neighbors are converted to patterns by
makepat, makepat2, then the pattern situation is encoded in the phrase by clober
– a few rows won't contain notes, but just references to the pattern.
bctino.pl
For each one of the selected phrases:
The rhythm is some relatively simple subdivision of the 3/4 measure.
It will be used outside of patterns and cadences,
and is the same for the whole phrase.
For each segment, emit using one of:
Third movement – program toca.pl
Each phrase gets analyzed for cadences, and two versions are saved: @ASIS (phrase as is) and @BYTON (phrase
scrambled so identical tones appear in the same voice )
Phrases which are allowed by the routine accephr are emitted using one of:
toxcor:
toccata score; piano toccata, accompanied
orxtyp:
pure orchestral, no piano, smooth rhythm, voices in counterpoint
tortyp:
orchestral toccata – the various instruments play toccata rhythms. Uses percussion, which I cannot
otherwise fit in my dodecaphony: there are no tones for drums and such.
cad:
cadential phrases
coda:
the final, "most definitive" cadence
Patterns
The patterns are melodies, i.e. tones with rhythms, where the rhythms are chosen from a set I think fits a Romanze.
All are based on a 3/4 time signature, and take a few complete measures. There are just five of those, defined in actino.pl
by the routines mvfr, makepat, makepat2.Rearrangement
phrase 54 before storing
pattern 54,6,8 in PATS: phrase 54: tones without duration,
tones with durations in pattern phrase 54 after clober:
K54,6,8 identifies the pattern, all the plain 'K' ignored
0 4 .. ..
1 5 8 ..
2 8 11 ..
3 2 .. ..
4 4 9 ..
5 3 6 ..
6 6 7 ..
7 1 5 10
8 1 6 9
9 1 .. ..
10 1 2 7
11 1 4 ..
12 5 .. ..
13 3 8 11
14 2 .. ..
15 7 .. ..
16 1 .. ..
17 1 10 ..
18 1 10 ..
19 9 .. ..
20 9 .. ..
21 3 6 11
0 4 .. ..
1 5 8 ..
2 8 11 ..
3 2 .. ..
4 4 9 ..
5 3 6 ..
54,6,8, 6 5/16 1 1/16 5 1/16 10 1/16
6 1/4 9 1/4 1 1/4 1 1/4
9 1 .. ..
10 1 2 7
11 1 4 ..
12 5 .. ..
13 3 8 11
14 2 .. ..
15 7 .. ..
16 1 .. ..
17 1 10 ..
18 1 10 ..
19 9 .. ..
20 9 .. ..
21 3 6 11
phrase 54
0 4 .. ..
1 5 8 ..
2 8 11 ..
3 2 .. ..
4 4 9 ..
5 3 6 ..
6 K54,6,8 K K
7 K K K
8 K K K
9 1 .. ..
10 1 2 7
11 1 4 ..
12 5 .. ..
13 3 8 11
14 2 .. ..
15 7 .. ..
16 1 .. ..
17 1 10 ..
18 1 10 ..
19 9 .. ..
20 9 .. ..
21 3 6 11
Pattern: melody and bass in bctino.pl
For instance, the routines embelish and patmatch might find the following three chords in a phrase:
.
.
15 0 3 8
16 0 9 ..
17 0 9 4
.
.
and match the notes to the pattern K54,6,8:
6 5/16 1 1/16 5 1/16 10 1/16 6 1/4 9 1/4 1 1/4 1 1/4
after transposing up by 3 (or 2) semitones. The resulting melody is:
9 5/16 4 1/16 8 1/16 0 1/16 9 1/4 0 1/4 4 1/4 4 1/4
and the note 3 ( e flat, mi bemol ) is missing in it. It will be used as bass (rather dissonant) for the melody above.
The order of the notes in the melody is quite different from their order in the chords.
| phrase 62 | embellished 62: |
0 2 .. .. 1 3 .. .. 2 3 8 .. 3 11 .. .. 4 5 .. .. 5 1 4 .. 6 2 7 .. 7 2 7 .. 8 .. .. .. 9 6 9 .. 10 6 10 .. 11 6 .. .. 12 6 .. .. 13 .. .. .. 14 5 10 .. 15 8 11 .. 16 8 .. .. 17 K62,17,19 K K 18 K K K 19 K K K |
0 2 -1 -1 2 2 2 2 1 3 -1 -1 3 3 3 3 2 Kaby,2,5 Baby,2,5 K K K K K 3 K K K K K K K 4 K K K K K K K 5 K K K K K K K 6 2 7 -1 2 2 2 2 7 2 7 -1 7 2 7 2 8 -1 -1 -1 -1 -1 -1 -1 9 6 9 -1 6 6 9 6 10 6 10 -1 6 10 6 6 11 6 -1 -1 6 6 6 6 12 Kaca,12,15Baca,12,15 K K K K K 13 K K K K K K K 14 K K K K K K K 15 K K K K K K K 16 8 -1 -1 8 8 8 8 17 K62,17,19 K K -1 -1 -1 -1 18 K K K -1 -1 -1 -1 19 K K K -1 -1 -1 -1 |
There is a quirk in the written score:
routine cadseg
Emit a cadence segment: just 2 or 3 chords under SI DO or LA SI DO (or such), nothing in front;
guaranteed to be the last segment in phrase.
All nine voices play, usually at reduced volume.
routine patseg
This emits a pattern segment, either one of the original five created in actino.pl, or one "matched" in bctino.pl.
The problem here is to maintain enough independent voices in the score, because the actino patterns are pure melody (monophonic)
and the bctino patterns have 2 voices, more or less: melody + bass, if bass is available.
On the other hand, piano should be polyphonic, at least two hands, and violin can play chords. The other solo instruments
will manage with a monophonic melody, but all need accompaniment.
distinguishes a type, which may be:
piano the usual situation, piano soloist
back the coda, "inverse development" to the plainest series statement, phrase 0 cancrizans
solocl concertino, clarinet solo
solofl concertino, flute solo
solocello concertino, cello solo
solotp concertino, trumpet solo
solobn concertino, bassoon solo
solovn concertino, violin solo
pattern, e.g.: 0 1/8 -1 1/8 9 1/4 8 1/4 2 3/8 7 1/8 5 -1/4
duration ALWAYS int*3/4
bass, e.g.: 3,5
the chord (eflat,f). The bass may be missing (undefined)
solo voices :
piano: several, may play distinct melodies, or chords
violin: 4 voices, may play ONE melody, or chords
all others: 1 voice, single melody
tutti voices :
several, whatever is left besides the solo voices, playing :
distinct melodies if bass is undefined
chords if bass defined
uses routines:
patsolo: the solo voice(s)
bastuti: use the bass for additional voices in tutti
bytuti: there is no bass, use @byton for additional voices in tutti
routine precadseg
Will treat a regular segment and the cadential segment following. If possible, modifies the rhythm of the regular segment, so the
music slows down at the cadence. Calls three specific subroutines:
precadry:
rhythm modification
preregscor:
emit the regular segment (similar to regseg )
precadscor:
emit the cadential segment (similar to cadseg )
routine regseg
Emits any segment that is not pattern or cadential. In particular gets called
during the "inverse development" and
has a switch $pecial, to deal with tha last phrase: rallentando, equal durations.
routine cad (hea.pl)
Plays cadential phrases. The rhythm slows at the cadence, then continues at the previous pace. Cadences are played by all nine voices.
routine coda (hea.pl)
Similar to the usual cadential phrase routine, plus big rallentando to end conclusively.
routine genscor
"Generic score" routine, the same for all voices, accompaniment or soloist. The voices move independently, and long durations may
be played as a series of shorter notes and rests.
Uses subroutine genemit, which actually makes the decisions about splitting long notes.
routine cad (toca.pl)
Plays cadential phrases. The rhythm slows at the cadence, then continues at the previous pace. Cadences are played by all nine voices.
durmod=0
which is my instruction to play
doppio tempo; the comment {HALVE DURATIONS} also appears. Otherwise, the cadential phrases get unbearably long;
even so, they are boring and selected too often.
routine coda (toca.pl)
Played doppio tempo, like all the cadential phrases. Big rallentando to end conclusively.
routine orxtyp
The same orchestral style as in the first movement. Various instruments play contrapunctally based on a tame rhythm.
These phrases do contrast with the toccata style, but are boring and selected too often.
routine tortyp
Orchestral instruments play toccata rhythms, each in its own range. All voices often change instrumentation (the
usual style is one voice = one instrument in each phrase).