• Zenpho

I've been getting into writing patches that generate music all by themselves, using mathematical
rules that apply quite nicely to music theory. I've made a few rhythm patches that make nice cross
rhythms using metronome division and delays (with values derived from multiples of the master
metronome), and i'll post these too if anyone is interested.

In this thread I'm showing off my "Mauritz Escher like Chord progressions" patch.
Screenshot:

First some basic music theory:
(skip this if you're comfortable with chords, 7ths, and inversions)

A major scale is constructed of 8 notes, with the "root" note doubled at the 8th note.
For the key of C major (all the "white" notes on a piano) the names and numbers of the notes in
the scale of C-major are:

Name, Number:
C, 1st (root)
D, 2nd
E, 3rd
F, 4th
G, 5th
A, 6th
B, 7th
C, 8th (remember the root is doubled at the octave)

A triad is constructed of the 1st, the 3rd, and the 5th notes in the scale.
A SEVENTH chord is constructed of a triad (notes 1,3 and 5) PLUS the 7th note in the
scale. So a C major 7th is note 1,3,5,7 or C,E,G,B.

Up until now we've been describing "standard" voicings of the chords, in other words, the notes
are played so that the root is the lowest pitched note, the 3rd is higher, the 5th is higher
still, and the 7th is the note just below the octave of the root.

At the risk of sounding redundant, "octave numbers" after the note name help clarify which octave
the note is to be played in. To play a C major 7th on the third octave, we would write:
C3,E3,G3,B3. To play it an octave higher we would write: C4,E4,G4,B4.

"Inversions" of chords re-order the pitches of the notes, but still play notes with the same
"name" as the 3rd, 5th, 7th etc. For example:

C3,E3,G3,B3 is a standard C major 7th...

...and G2,C3,E3,B3 is an inversion. All the notes are there (C,E,G,B) but they are in a different
order to the normal "Root, Third, Fifth, Seventh" arrangement. In this case, we say that "the
fifth is in the root".

Okay so now we know what a major 7th chord is. Lets deal with chord progressions.

Now imagine playing C3,E3,G3,B3 and removing the "root" (the C3) from the notes played,
we have a chord that reads "E3,G3,B3" - we were playing C major 7th and now we're playing E minor.

*THIS IS A VERY IMPORTANT STEP* Moving from C major 7 to E minor sounds "natrual" because the
notes that occour in C major 7 ALSO occour in the E minor.

Now lets make this E minor chord a 7th...

We've said before that a 7th chord can be constructed by playing the 1st, 3rd, and 5th notes, PLUS
the 7th note in the scale.

The scale of E minor (a flavour of minor) is:

Name, Number
E, 1st (root)
F#, 2nd
G, 3rd
E, 4th
B, 5th
C, 6th
D, 7th
E, 8th (octave)

The 7th note is "D" so we add the D note to our E minor triad to make E minor 7th.
E minor 7th is therefore: "E3,G3,B3,D4".

We can extend this E minor again, removing the root, working out the new scale for G major, adding
the 7th to make G major 7th, and again, and again, and again... but if we do - we keep moving
*UP IN PITCH* and spiral off the end of the keyboard.

HOW THE PATCH WORKS

Okay, so what my patch does is to take the idea of generating new 7th chords over and over,
but to play inversions of these chords so that the notes stay inside a single octave. If the
"root" note is in the 3rd octave, C3 for example. Then when I move to E minor, the D4 is
transposed to be a D3, to keep within this octave range.

Due to the fact that there are 12 semitones in an octave, and notes that fall outside the octave
range will wrap around to be an octave lower. The maths for generating the new chords basically
involves taking each note in the current major 7th chord and adding two semitones to each note in
turn.

Now our terminology could cause confusion here, because there are "notes in a scale" and "notes in a chord"... So I'm going to define some notation to show when i'm talking about the notes in a
chord.

For example:

A C major 7th has the notes C3,E3,G3,B3.
Note-1-in-the-chord is to be defined as chord_note_1.
Note-2-in-the-chord is defined as chord_note_2.
Note-3-in-the-chord is defined as chord_note_3.
Note-4-in-the-chord is defined as chord_note_4.

chord_note_1 has the pitch C3.
chord_note_2 has the pitch E3.
chord_note_3 has the pitch G3.
chord_note_4 has the pitch B3.

It is important to be clear about the idea of "pitch", "chord_notes" and "scale_notes" because
because chord_note_3 has the pitch "G3" and scale_note_3 of C major which is the pitch "E3".

Back to the procedure for generating new seventh chords.

We generate a major 7th to begin with.
C3,E3,G3,B3.

We add 2 semitones to chord_note_1 to get "D3", and we leave the other notes alone.
Which is an "inversion" of E minor 7th.

This time we add 2 semitones to chord_note_2 to get "F#3", and we leave the other notes alone as
before.
This is an inversion of G major 7th.

This time we add 2 semitones to chord_note_3 to get "A3", we leave the other notes.
This is an inversion of B minor 7th.

This time we add 2 semitones to chord_note_4 to get C#4...

*BUT C#4 IS OUTSIDE THE OCTAVE 3! So we TRANSPOSE it down to C#3*
This is an inversion of D major 7th.

After my patch modifies all 4 chord_notes, it moves back to chord_note_1, and adds another
2 semitones... over and over.

Eventually we get back to C major 7th again, but on the way we move through a variety of different
chords that evokes very interesting changes of moods.

Want to try playing with it?

• Zenpho

Hi there,

PD is amazing it can do almost anything. If I sit down and think about it, I can work out a way to build almost any machine I want, its the perfect piece of software for a power-hungry control-freak audio nut like myself who (during the early 90's) was dreaming up all kinds of impossible audio ideas (back then I knew nothing about computer programming, and even if I did the ideas would still have taken a very long time to implement)...

as soon as someone showed me MAX/MSP and PD I was over the moon!

Over the past few months i've been slowly implementing some of my "dream, impossible audio ideas" but this one still eludes me.

Imagine this scenario:

I have a harddisk full of audio recordings, I wish PD to play a random selection of these, a bit like a traditional CD player set to "random" mode, or Ipod shuffle.

A CD/Ipod shuffle will play the whole track, some of the recordings on the disk are several hours long, I wish PD to select (for example) 16 files out of the list of thousands, seek to a random position in the file and play a 1 second snip from each.

Imagine the posibilities of rhythmic patterns that could be created if this simple process was then automated and triggered rhythmicly with a sequencer!

------

I have a copy of PureData extended 0.37 and at the moment have a small self made sequencer controlling 16 xgroove~ objects playing new random-seek segments from 16 arrays.

but the "select 16 new files to go into the arrays" process is entirely laborious and MANUAL.

Its got to the point now where I need to ask someone (you guys!) if there is a way to implement this in PD?

posted in technical issues read more
• Zenpho

Hey, just wondering how your art show went. Hope it went well!

I'm planning to use flashserver on a large number of machines for a summer school soon. There will be both Intel and PPC macs, with a variety of Windows boxes thrown in too; so I'm very curious to hear your experiences with the PPC version of flashserver on OSX.

Which version of PD-ext did you use on PPC?
Which version of flash did you use to author the .fla?
Did you use a browser to play the .swf, or a standalone flashplayer?
Were there any other libraries that you used with that version that caused problems / worked fine?

Thanks!

posted in technical issues read more
• Zenpho

You sir, are amazing.

I do not have the ead~ object, so the patch doesnt quite work, but I love the idea of you applying your knowledge of detailed sound crafting techniques to absurd, rediculous, silly things like this. Its genius! ;o)

• Zenpho

this is outrageously cool hardoff!
you rock sir...

Seriously tho, what spec is your machine to cope with all that sample mangling without once glitching?

Well I guess even if it did glitch, we might not notice through all the purposeful glitching.

Did you make sure all the samples would loop in time before you loaded them into this monster project? or was it all very skillfully mixed beforehand?

It is damned funky no matter what, I once saw someone do a similar thing to this at a local open-mic night - he used max/msp tho... you could very well have started a whole new level of DJing, a whole new era unfolds before you...

When can I hear more?

• Zenpho

thank you thank you thank you for all your help guys!

i've uploaded the full thing (its very messy):

[url=http://www.zenpho.co.uk/zenpho-textselect-andplay.pd ]http://www.zenpho.co.uk/zenpho-textselect-andplay.pd

i`ll formally publicise this patch after i've tidyed it up, then i`ll upload a small mp3 into the "output - feed your ears" section of this forum.

posted in technical issues read more
• Zenpho

zac: i've uploaded my implementation of the "randomly select a new line from the text file" here... it requires the [msgfile] external and a file called input.txt

http://www.zenpho.co.uk/zenpho-textselect.pd

posted in technical issues read more
• Zenpho

thanks for the information guys, i feel like a bit of an idiot given that the answer lies in the very OBVIOUS [textfile] object! ;o) I was looking for objects and externs that handled directory listings directly, but strangely I did not stumble across [playlist] until just now.

I'll begin work later this week, and let you know how I get on.

Zac: re randomness - i'll probably be using the [msgfile] external with plain old [random] seeks to various lines in the text file, did you a different way in mind?

I'm a bit worried that [readsf~] wont do looping like [xgroove~] will, and that it requires acurately timed SEEK, START and STOP commands to be sent in order to play snippets rather than entire files - this could mean a lot of objects arranged with suitable event delays just to get the timing right, but i`m sure i`ll work something out.

Hardoff: you say you've built a patch already - that was fast work sir!

I didn't mean this post to be a "someone build it for me" request - and I still don't mean that now - but would you let me see your implementation later? (I wanna try building my own first, but i'm very curious to see yours!)

posted in technical issues read more
• Zenpho

This, my good sir; is damned amazing!

I've been fascinated with the conversion of data from one form to another and the interesting artifacts and aliasing noise (visual and audio) produced...

This is RAW UNADULTERATED aliasing noise and artifacts!

would you mind if I asked for the .pd file? I'd quite like to see how you acomplished this. Bravo sir!