Harmonic random walk in major

Alright then! :blush:

Here’s the most recent best recording of my polyphony project:

And here’s a recording from the latest and possibly last iteration:

The source code is fully documented and organised into files and modules:

I’m bringing everything I’ve learnt to work on a new EDM project at the moment. Hoping that goes well :sweat_smile:

3 Likes

Finally, an arrangement of the random walk using string synths:

It would go on for days without ever repeating and walking through all major keys and diatonic chords.

1 Like

Hi everyone

just want to say that there’re some great ideas here. In keeping with some of my other posts, generally late to the party. I sort of wished I’d been there when the first post went up.

@d0lfyn some amazing work there. I’ve had a look at some of the code on github and it’s going to take a while to comprehend how all of the modules link. Out of curiosity, partly because I’ve not downloaded the code yet, is a new piece generated every time or is it a composition expressed in code or…?

@Nechoj thank you for starting this post and your code examples. There’s a lot there and I’d like to offer the following as observation and perhaps assist.

In CPE Bach’s Essay on the True Art of Playing Keyboard Instruments published in 1764, there is small passage where he says that his father (JSB) only used two scales. These were Major and Natural Minor.
In 1700, FE Neidt published volume one of his three volume set, with the third published posthumously. The reason why Niedt is important is because he was taught by JS Bach’s uncle Nicklaus who lived in Jena. The reason why this is significant is because Neidt’s three volume set appears to be a written description, with examples, of the Bach family’s teaching approach. Remember that they all taught each other, none went to study music, composition etc. The significance here is that Neidt also confirms the use of only two scales, Major and Minor.

Most of the time, many believe that the Major/Minor is basically a relative major/minor relationship i.e. C and Am. However the Bach approach was for tonic major and tonic minor, so C and Cm. What is also apparent from Neidt is that both scales are accessed as simultaneous possibilities rather than as exclusive sets. The implication is that Bach may start on C major and progress to F minor, leaving many to ponder how, leading to theories of borrowing etc. Bassline wise it’s still the movement of 1 - 4 (I - iv) but to minor rather than major. So this results in a opening up of possibilities to turn ideas around.

C     Dm     Em    F     G       Am       Bdim  C
Cm    Ddim   Eb    Fm    Gm   Ab      Bb        Cm

The above then represent these simultaneous possibilities in the universe of C. For each transfer of tonicness, then the model is transposed with the same relationships. Note that the minor scale is neither harmonic nor melodic. And yet by ‘bouncing’ between the various notes you can create both harmonic and melodic minor scales from these two. As a side note the Harmonic minor was not ratified until 1770-ish, which means that it was probably played widely in practice but had not been named yet.

Perhaps for your project you might want to consider the above as a potential avenue for development.

The second observation I have is to point out that chord vii is not really used in the major. it tends to always be used either in the minor or as part of a modulation to either a minor or Major resolution. So a song like Night and Day is a good example of this shift i.e. Dm7b5, G7, Cmaj7. So in this instance Dm7b5 is not chord vii in Eb but chord ii in Cm. So for your code you might consider when a vii is selected to set this within a following sequence of ii V i or I. George Pratt’s book has lots on this.

I’ll make some other recommendations if that’s OK. You might want to look at the practice of Partimento. The composition sketch frameworks that they have might be useful for you shaping the random walks. I find partimento a fascinating improvisation and composition practice. if you do look at these then you will probably encounter the practice, known in English as, the Rule of the Octave. Whilst CPE Bach was adamant that his father did not use the Rule for his compositions, instead preferring a different method i.e. simultaneous tonic major/minor, you will find some correspondences.

Robert Gjerdingen’s book is full of composition schemata, including partimento, that will keep anyone occupied for a long time. It’s a rabbit hole worth going down, and some, not all, forms are still in use to this day. When I hear certain Muse recordings they are in the form of La Folia. Green Day’s Basket Case and Jesse J’s Price Tag are La Romanesca. Or the continuing use of the Lamento which started its life in the 14thC and continues to this day, as a viable song form.

So the last suggestion is species counterpoint. Fux’s Gradus is always a good, light read in comparison to the heavier texts out there. In particular I would direct you to fourth species counterpoint, resulting in the delayed resolution of a voice. You can also consider a type of voice movement described as Oblique motion to reduce block movement.

So, I hope you don’t mind the observations. I recognise how much work it takes to get a working system in place whether as a performer, composer or coder!

Cheers
Hussein

1 Like

This is the beginning of something wonderful! :smiley: Performance is another world entirely! I find it difficult to control MIDI CC parameters on long duration articulations (which give a piece expression), so I often just use the short duration articulations, which can be controlled using velocity alone.

Thanks for taking a listen! I haven’t worked on the project in a couple months, and there are some loose ends. I hope to return to it with a renewed perspective on randomness. To answer your question: a new piece is indeed generated every time. The settings file should contain a line where Time.new.to_i is used as a random seed, but you can easily substitute this with any seed you like.

Very interesting insights on the Bach approach by the way! I have never come across these observations before, and it may prove fruitful for both my manual compositions as well as my automatic systems. Currently, the key switches in Polyphony are random, and the musical ideas are expressed via diatonic scales.

Thank you for sharing this read! I’ve sought to understand compositional form for application in all my work. Hopefully an author of a compendium will have gleaned insights into the timeless art of balance above all. A lot of my thinking nowadays is influenced by EDM forms, which emphasise the flow of energy.

Haydn’s century was a time of so much experimentation in form, from the old Baroque dances to the Classical and early Romantic sonata.

My project Polyphony has been an attempt at improvisational counterpoint. I have knowingly and ignorantly disregarded many of the book rules, sometimes because I don’t know how to implement them, and sometimes because I think I understand why the rules exist. The complementary independence of voices is twofold: I believe independence can be achieved by reducing melody purely to recognisable and thereby distinguishable motifs; and I believe complementing can be achieved with consonance in the vertical placement of said motifs.

The resulting counterpoint is a texture which can be complicated or simplified by adjusting appropriate settings. The feedback I’ve gotten is that when complicated, the music sounds overly busy and diffuse. That kind of feedback was what led me to take a dissatisfied step back from my project.

Hi @Hussein,
thanks for sharing your comments and insights. Actually my intention never was to do a piece for traditional classics or even Bach, as my background is Jazz. I focussed on major scales mainly because it seemed easier to achieve something valuable within a given timeframe. Only later we realized that the parameters in the Markov matrix could be set to achieve something similar to what Bach presumably would have written. Setting the probabilities differently, however, the key changes are getting quite wild and expressive. And this is finally what I am after and am since thinking on how to extend this work to more rich versions covering more of the possibilities used in modern Jazz music. I extended to possible key changes already beyond what is teached in standard books on Jazz harmonies. I guess there are some new things already in there, but still within the framewok of major keys.

Interesting your observation on how Bach used C along with Cm. To a Jazz musician this sounds quite natural and useful. They would call it a parallel key modulation and build the piece upon changes between the chords involved (see e.g. some introduction on that topic here).

In Jazz, the diminished vii chord is used a lot, it’s hard to find a standard’s piece without it. It can be used to create a certain mood also without having the function of resolution. Generally, I like progressions that just sound good as they are without the functional burden that stems from the musical heritage. But that’s just philosophy, there are many ways to create nice music.

1 Like

@Nechoj sure,

I understand but we need to make sure that we are discussing the same diminished chord. A half diminished is different to a diminished/dim7. They behave differently and function differently. So I would say a bit more work to get it to Jazz levels. For Jazz the diminished functioning on step 7 is generally avoided. It’s more preferable as a superimposition on the dominant or as a linking/passing chord between chords that are a tone apart.

There is a Java library called Impro-visor that you might be interested in looking at their processes. It’s been around since 2008.

Hal Galper’s book , Forward Motion, is a good one that reconnects the fundamentals of jazz lines and alignment to harmony, coupled with rhythmic placement. His is a definite antidote to the over used Berklee chord/scale approach. Likewise if you want to capture a bit mroe then Barry Harris is going to really assist. The Bach method makes sense because it is so. it is the line of common practice that was wiped out to elevate the composer as the source of music. In England between 1600-1800-ish there was a culture of improvisation that has been wiped out.

I understand the functional burden, but I’m not sure I was discussing a musical heritage. There are many ways to create the sorts of movements you’re looking for that do not have to adhere to the Major set. Yes, I know parallel modulations, my music and playing is full of them. Have fun and enjoy.

Hi @Hussein ,
sorry, apparentyl I misinterpreted your first comment on the Vii chord

is a very nice tool, thanks for the link to it.

That sounds really interesting. Could you share some of your music and SPI programs here in the forum?