subject, answer, stretto, and counterpoint

Roman Thilenius's icon

i am currently experimenting with computer aided fugal composition methods.

when i brake things down to subject (theme/given sequence), answer (transposed version of the original), stretto (faster or slower version with minor changes to the original) and counterpoint (different theme which is only partially, mainly rythmically, based on the original), i run into big trouble with the counterpoint part, because the computer usually spits out something which i could do better by improvising on the keyboard.

which is no wonder, because the counterpoint part must of course (fat least or the most part) fit harmonically to the other, already existing voice which is stll playing (and which is, say, the subject or a continued repetition the subject)

it is clear that it will never work to find a instantly nice sounding counterpoint, an instantly nice sounding second voice for a random melody.

instead of trusting in random (or composing it without the help of max/msp) it is clear that am supposed to already compose the subject sequence in a way so that it already contains a working rule set which will make sure that it later will sound good to add a (computer generated) counterpoint or an answer or stretto derived from the original sequence to it.

example:

a subject plays 16 1/16 notes plus 2 extra 1/32 notes,

an answer will be added by starting in the second half,

the answer consists of the theme transposed for 7 halftones (and a few minor changes such as one note left out or sth. like that)

the rules requried to make this stuff matching all the time seem to be sheer endless. and it seems it would also involve to check for the tonal system and other complicated stuff.

does anyone have an idea how to generate simple monophonic sequences which are kind of self-similar so that they have a good chance of matching to transposed and time-shifted versions of it?

johann sebastian if you are here...

Alby's icon

You could store some chords from the same tonality somewhere (a matrix, or a list of lists or wherever); then extract one chord from a probabilistic correct way (possibly I is more probable than a VII in the beginning) , and make the subject with those notes, adding some that doesn't belongs to the chord. At the same time, with the same notes from the chord you could start a bit later and generate an answer. Then, each x miliseconds (using [metro] to control that) extract a new chord, and both the subject and the answer read from their notes and adapt.

The best way (I think) to match another monophonic sequence is that both squences read from the same set of notes to be generated, adding some additional. Then they can change dinamically from one set of notes to another as the tempo goes on.

Roman Thilenius's icon

right, that might fit into my concept that there will be a little generator which suggests the user some themes.

you´d set ostinato lenght and some chords or you let a probabilistic algorithm choose from the biult-in database like you said. then select one note of each chord and the sequence is done.

but now the hard part. :) the first half of the sequence should "somehow" fit to the second part, which will, for example, mean that the chance for intervals of 1, 8,10,11, 13,14, and 16 should be less than 5%.

then there must be a similar scheme for the first quarter to all other quarters.

and of course, for the stretto, the theme musts somehow fit into its 50% and 200% versions.

the more rules i set up, the less possible melodies are left over, and the less lively they are (i think - maybe i need to experiment more with longer notes and rests?)

Roman Thilenius's icon

and no, i dont want to create a master markov chain machine from all bach fugues, i need to find my own way of generating this stuff. :)

Mitch Turner's icon

Not sure you are looking for a critique of your definitions above, but if you are...

Stretto is really overlapping two subjects (a bit like in canon). So, for example, assume you have a subject that is 2 measures long. You start the subject and begin a second subject after 1 measure. So, for some amount of time, the two subjects overlap. In other words, the subject is counterpointed against itself. This overlap may use two subjects that are transposionally related, they may be inversionaly related, etc., but there is going to be a time delay between their entries.

Your definition of stretto seems more related to augmentation and diminution of the subject, which, to be sure, may happen in a stretto. However, the essence of stretto (in my opinion) is the overlapping of two subjects (or answers) rather than their relative speed. For me, augmentation (doubling durational values) and diminution (halving duration values) is a technique of motivic development, rather than a necessary and defining part of stretto.

When you say "counterpoint" above, do you mean countersubject? A countersubject is generaly understood as a figure, or melody, that consistenly accompanies the subject.

Here is what Kennan's Counterpoint, 4th edition says:

  1. " ... stretto is a passage in which the musical idea in one voice is overlapped by the same idea ... in another voice" (p. 99).

  2. "A countersubject is a melodic idea that appears consistenly along with the subject in the exposition..." (p. 207).

Not sure this really helps in your search, but hope it does.

-- Mitch

Roman Thilenius's icon

thanks for clarification, i was aware that faster/slower is not conditional, but i guess i overrated its use(fulness) and therefore how often its been used this way.

so allright, "augmentation" will be only an optional setting for "stretto".

i do not require to be 100% academic exact with my terminology, if required for the context i am willing to abuse these names and implement functions differently from classical music.

but of course it is good to know how it would be "right" before inventing my custom thing of the same name.

i played a few hours with the idea last night and switch back and fort between making a generator and a processor ("midi effect"), both have certain disadvantes as it seems.

and i guess i overrated the importance of fitting parts together harmonically on a per-note basis.

the direction of the interval is far more interesting than matching chords of the curretn tonality. i have my "parsons encoder" for such tasks.

i was probably too much thinking of JHB or techno, where rests are very rare events. but more rests and rythm can make the whole fugue generation quite interesting...

Mitch Turner's icon

Glad to help a bit. Look forward to hearing your project.

andrea agostini's icon

Hi Roman,

there is a pretty impressive book about J. S. Bach's contrapuntal techniques, "Specchi invisibili dei suoni" by Giancarlo Bizzi — it sort of reverse-engineers the highly formalised mechanisms Bach used for building musical materials with some specific combinatorial properties allowing them to be used in very complex canonic structures. I'm not sure whether it has ever been translated, but most of it is tables (possibly quite similar to the ones Bach itself employed), so even if you can't read Italian I think you might be able to get some useful information out of it if you can get your hands on a copy.

For what is worth, I have tried to implement a simple but significant subset of the traditional rules of tonal harmony and voice leading in a bach-powered Max patch (bach with a lowercase b, of course...), which can write simple 4-part homorhythmic, chorale-like “compositions” through a backtracking combinatorial search engine. It works, it’s fun and my students totally love it ;), but it is also clear that each degree of complexity that one might want to add (say, modulations or non-harmonic notes, let alone imitation) would make the system exponentially more complex, and I have the feeling that this complexity growth would not be sustainable.

As a side note, the answer to a fugal subject is something a bit more complex than what you describe — there are quite strict rules for when and how and why the answer should deviate from being a simple transposition of the subject, but that’s yet another story, and if what you’re looking for is not something 100% accurate with respect to the historical models you probably won’t care.

Anyway, I’d be very interested in knowing how far you manage to reach… Looking forward to some results!

aa

Roman Thilenius's icon

but it is also clear that each degree of complexity that one might want to add (say, modulations or non-harmonic notes, let alone imitation

yeah, or chords... :)

would make the system exponentially more complex

that is like 70% of the job, finding out where the module ends and the interface begins.

some of the things you mention above can be done later (i.e. elsewhere) - simple techiques like randomly shifting single pitch events for one octave do not need to be there from the beginning, because it is easy to process, say 4 parts ("channels") together in a later process.

it is interesting that you say that JSB would be on a very formalistic level - maybe that is why it is so hard to put it on a (even higher) formalistic level? :)

unlike you, i mostly work with single floats describing note-on events, and the lack of meta data with thzese events makes things really hard sometimes.

i´d be very interested in these rules for answers you are talking about, i dont need to copy things, but it cant harm to know them.

andrea agostini's icon

unlike you, i mostly work with single floats describing note-on events, and the lack of meta data with thzese events makes things really hard sometimes.

Yes, I see. In fact, you might want to switch to a more expressive musical representation at some point.

i´d be very interested in these rules for answers you are talking about, i dont need to copy things, but it cant harm to know them.

Well, that's stuff I studied some 20 years ago, and it's not part of my everyday workflow so my recollections are a bit vague. Basically, if you skim through the wtc (or whatever else collection of fugues from JSB's era) you'll find that there are two kind of answers: "real" answers, which are just plain transpositions, and "tonal" answers, which change some intervals. First, you have to figure out which answer your subject needs (the rules are quite strict, but, roughly speaking, you usually choose the tonal one, unless the subject is extremely chromatic or doesn't have explicit tonic/dominant oppositions). If it's a tonal one, then you have to find where the mutations (that is, the modified intervals) are: you basically find what areas of the subject are in the tonic area, and transpose them to the dominant, that is one perfect fifth above or one fourth down; and viceversa (areas of the subject that are in the dominant area get transposed to the tonic, that is one fourth above or one fifth down).

At one point, I had a teacher who had a very deep knowledge of this theoretically aspects, and I might still have some notes of her lessons, and possibly some of her analyses. Let me have a look on some old bookshelf ;)

Anyway, for a not-too-inaccurate introduction, you might want to have a look at one of the classic French textbooks about fugue, such as the ones by Gedalge or Dubois. They describe an standardised, academic form of fugue, slightly different from everything you'll actually find in the actual works by Bach or anyone else (except perhaps Saint-Saëns...), but I think they're still quite used in introductory courses.

There is also a great book in Italian, "La tecnica del contrappunto strumentale nell'epoca di Bach" by Bruno Zanolini (imho it's much better than the French ones, and — believe me — I'm not a nationalist!), but I'm afraid it hasn't been translated in any language. And I'm pretty sure there's plenty of great textbooks in German around.

Well... have fun, and if at some point you'll feel like sharing some results I'll be extremely curious to see them (as you can see, I have a soft spot for this stuff...)

aa

Roman Thilenius's icon

ok i understand (or should i say i guess?) that there is for example a rule which says "usually you transpose to keys in the circle of fifth" and maybe also "and if not, then you dont transpose all keys, you shift for a number of keys but stay modally in C minor"...

i just wonder now what happens when i ignore this ruleset and leave it to my ear / to the user to find out what works good and what not.

however, next step will be to try to generate themes offline somehow. more testing material might help to build algos for it.

Roman Thilenius's icon

mabye the form scheme ist all i am after.

i need to have an extra scheme composer module anyway i think. it should be similar to a DAW or a little grid with parts to choose from (first subject, second subject, countersubjects, variations (algo based?) and then allow inversion, trasposition, mode changes, tempi change and eventually a delay and so on.) and all that for up to 4 parts.

andrea what do you think about a form scheme with no free composed parts at all? can it make a "fugue" or should the result be called differently.