necroquote for this one - time to break out the CVPal…

1 Like

What finite state automata and grammars have in common is that they describe languages — which are finite or infinite sets of strings composed of symbols taken from some alphabet, such as letters, or notes in our case.

Finite state automata is useful when you want to determine if a string belongs to a language, but they don’t explicitly provide a way to generate a string belonging to that language. Loosely speaking, they are made up of a collection of states linked together by transitions — a transition gets you from one state to another when a certain symbol is read the string you feed it. You start at a unique initial state, and each symbol consumed takes you to a new state, some of which may be final states, in which case the automaton indicates the string belongs to the language.

The caveat is that finite state automaton can only recognize a small subset of all possible languages, as they have very low computing power. A grammar allows you to extend the span of languages you can reach, as they are more computationally powerful. They also provide a direct way of deriving strings belonging to their language, and have a more intuitively understandable structure, which is why they seem fitter for music pattern generation.

They are made up of a set of production rules, where each production rule is identified by a variable, and where each one leads to a combination of other variables or terminals, which are just elements of the alphabet. For example, if we want a very simple definition of a sentence, we could have this (anything beginning with a capital letter is a variable, while lowercase is a terminal, with the character | signifying or):

Sentence -> NounPhrase VerbPhrase
NounPhrase -> Determiner Noun
VerbPhrase -> Verb NounPhrase
Determiner -> the | a
Noun -> cat | dog
Verb -> saw | chased

Here, «the dog chased the cat» is a derivation of the language described by the example grammar.

Derivation Tree
               Sentence
               /      \
              /        \
             /          \
            /            \
           /              \
          /                \
         V                  V
     NounPhrase         VerbPhrase
       /    \           /       \
      /      \         /         \
     V        V       V           V
Determiner   Noun   Verb       NounPhrase
     |        |       |          /    \
     |        |       |         /      \
     V        V       V        V        V
    the      dog   chased  Determiner  Noun
                               |        |
                               |        |
                               V        V
                              the      cat

Furthermore, you can extend grammars to support more features, such as probabilistic rules (which allow the introduction of Markov chains), at the cost of it becoming much harder to parse it — reversing the creation process of a string belonging to the language to uncover the way it was derived from the grammar, which we don’t care too much about if we just want to generate music.

Now, backing off from this field — abstract algebra seems to be a fascinating area of mathematics which I am not familiar with. I’d be intrigued to see how they can be applied to music.

And about set theory — or actually not set theory but the representation of notes it uses — modulo 12 arithmetic notation seems like a convenient way to notate music as it makes intervals obvious. However, it seems like one of it’s drawbacks is that it discards information about the absolute pitch value and it’s overall height relative to other notes, which is an important characteristic of melodies, and also has a large effect on how we perceive chords. If you build a complex chord by chaining different intervals, you can get a pleasant, harmonious result if you spread the voicing effectively across octaves, while it is very likely to sound like horribly dissonant if condensed within an octave. Our sense of harmony also fades away as we reach higher frequencies. But still, modulo 12 arithmetic is much easier to work with as a human.

1 Like

A very good book is “Self-Similar Melodies” by Tom Johnson


6 Likes

one thing i find fascinating about generative systems is that while we have the tech now to do some pretty incredible things (AI based etc) you could get some pretty interesting results with something super simple. there is so much to explore (bytebeats, for instance, which you could see as generating both sound and composition).

this is pretty much the concept behind orca and make noise rene, among other things. both deal with a set of 16 preselected notes, it’s the order in which they are played that generates the actual sequences. rene does it by allowing you to control the x/y coordinates within a 4x4 block, orca combines 4 tracks to get a note number, and you control clocking parameters for those 4 tracks.

in both cases you have control over the rules but it doesn’t translate directly into what is played. what i found with orca is that i never really think in terms of “if i change the clock divider for this track to 4 it will change the sequence this way…”, i just change things randomly until i get something that sounds good. going back to the OP what is the degree of my participation here?

as i spent more time i did notice how certain changes had a certain effect on the melody produced, so i do have some control - but it feels more like trying to steer it a certain way without having full control. it’s an interesting way to interact with a sequencer, as you feel certain “stubbornness” that you learn to respect and play along with (as a side note, it can be super interesting to develop a feel for that particular character even if frustrating sometimes).

another interesting example is various conway’s game of life implementations. i did a version that allowed CV control over the rules. cross patching it to itself (and some noise on the inputs…) created some very interesting behaviours, and i noticed the same thing, you could “play” it but it felt like dealing with a living thing that has a mind of its own, so you don’t play it as much as steer it a certain way:

(another interesting aspect of the above for me is using automata but sorta in a granular synthesis way. you don’t generate sequences, you generate these sequence clusters)

another thing i learned from game of life and orca is that often it’s the meta rules that make for a more interesting results musically. apply some rules to the rules.

in a generative system using automata it’s the state itself that is the musical result, no? the string being parsed is the user input (or you could just have a system that transitions without any additional input).

9 Likes

Agreed. I often find simple systems more interesting. Reminds me of Autechre talking about their generative system in RA a few years back:

Sean Booth : I wouldn’t say it’s a living entity, really. It’s about as much like as an entity as a shit AI in a game is. That’s how intelligent it is, which is not intelligent at all, but it might at least resemble the way a person thinks. It’s funny, I’ve been reading about Markov models and Markov chains recently, the results from Markov Chains are remarkably similar to what you get out of Watson or DeepMind, these super advanced language modelling things. And this article was about how unwieldy that kind of mega-gigantic, expensive AI is, because you can actually achieve very close results using Markov chains, and they’re really fucking simple, they’re computationally really easy to deal with, they’re what people use for Twitterbots and things like that. So in some ways these simple conditional responses can resemble very high-end AI. Even though it’s very simple, the result is close enough not to matter.

9 Likes

that’s great - could you post a link to the article? i kinda disagree it’s not a living entity though :slight_smile: definitely not in the proper sense (AI etc) but the original game of life is amazing precisely because such a simple set of rules can generate such complex things like the puffer train that resemble the complexity of living things. and then there is that intangible feel of working with something that has a mind of its own and can respond not in a way you expect.

(a side comment for automata - they could be interacted with in 2 different ways, changing the rules or messing with the state - which is more like circuit bending it…)

interesting variation of automata, lenia (claiming continuous states and continuous space-time, haven’t looked closely to see how they achieve that in discrete systems):

6 Likes
4 Likes

Frankly I am not aware of how automata has been used in music, this is just based on the simple definition of DFAs and NFAs. You could certainly extend them, for example by associating a musical output value to each state.

I find this to be a very interesting question in generative art. This also ties in with the Is it enough? thread, and in general, the topic of «is X cheating?». Part of me knows it doesn’t make sense to discard some composition method in virtue of narrow definition of what a «true» composer. Part of me is also unsatisfied when I see that my actions have a limited impact on the output (which really isn’t quite true if I am the one defining the system). Some systems also seem to give more control to the performer than others. I am guessing that coming to enjoy generative systems is a combination of the right mindset and the right system.

What are your thoughts on intent in generative art?

2 Likes

C&G have a few fun Cellular Automata patches:

2 Likes

Check out David Burraston (aka Noyzelab)'s work:


http://noyzelab.com/research/Burraston-HCI.pdf

Also, Bill Vorn’s old Max externals, which I’m pretty sure don’t work anymore, but still (I wish they did):
http://billvorn.concordia.ca/research/software/lifetools.html

3 Likes

upon re-reading your post i think we were talking about 2 different things, and i responded to just one specific point you made which i understood as automata being useful for analyzing a language but not generating it. i guess there could be many ways to use automata to generate something, whether it’s the state itself or the transitions taken or some byproduct of transitions etc.

so many different aspects (as evidenced by the linked threads), so i’ll just touch on this: as somebody who now realizes i crippled my music output by having the impostor syndrome for many years i am much less concerned about just how much my personal intent went into creating art.

if i created a generative system that is completely automatic with no user input, does it reflect my intent? of course it does! what if i created it by accident, just by implementing an automaton with some random rules? i still participated by recognizing something in its output that spoke to me and helping with shaping it into a coherent piece (or maybe consciously NOT getting in the way of what it produces). or if i create a guitar piece, how much of it was my intent and how much of it was shaped by the techniques the instrument itself suggests? (there is also an interesting aspect of similarities between what we define as an instrument and what we define as a generative system).

8 Likes

@simondemeule Xenakis did some great early work with musical automata. As one example, Horos is amazing… you can really hear when the automata spring into action (in my opinion):

I found a nice paper a month or so back that analyzes his use of automata:

cicm.mshparisnord.org/ColloqueXenakis/papers/Solomos.pdf

3 Likes

One other reference I forgot to mention… for a very (very) thorough discussion of L-systems in music, see the dissertation of Luke Dubois “Applications of Generative String-Substitution Systems in Computer Music”:

http://sites.bxmc.poly.edu/~lukedubois/dissertation/dissertation.pdf

4 Likes

Thank you! I’ll look into it!

We were indeed talking about different flavours of automata.

On the topic of intent, I wholeheartedly agree and can absolutely relate to your experience. I am slowly learning to accept my own art.

1 Like

How Generative Music Works. A fantastic interactive audio experience in your browser. Best use a computer to explore this:
https://teropa.info/loop/#/title

Love it like I do and share it with friends.

7 Likes

Inspired by @lijnenspel generated conference talk (https://github.com/jellea/20-minutes-for-a-clojure-speaker) I decided to use similiar generator to generate compositions based on Sometimes [harmony series no. 1] by Michael Pisaro and I think that text based compositions might be a very nice subject for “generative” treatment.
The live demo is here:
http://firmanty.com/harmony/ - on every refresh new composition is generated. You can also click “Start playing” to hear it played by simple sine tones, but I need to debug it because it doesn’t currently work on Safari (Firefox and Chrome plays fine).
And if somebody would like to mess with code (which is rather hacky as I wrote this today):
https://github.com/kfirmanty/harmony-series-no-1-generator
I enjoyed writing this small generator so if anyone knows of any text based compositions which would be a good basis for similiar generator please let me know.

5 Likes

Anyone know if there is any concrete difference between algorithmic and generative music? Are these terms interchangeable?

I have a habit of using them interchangeably, but I suppose the difference might be that “algorithmic” might be “always repeatable” and generative might mean “unique every time”. But then again, I’m certainly not strict about those notions in my use of the words.

3 Likes