Approach

How I Did What I Did

"I tell you: one must have chaos in one to give birth to a dancing star.
I tell you: you still have chaos in you."
- Nietzsche
"Groo does not give up! Even if it does not work, Groo will do it again and again and again!"
- Groo the Wanderer


The Basic Idea

The basic idea is to take as input a musical phrase, then repeatedly substitute each note with a scaled and transposed copy of the whole. I wanted to be able to edit the phrase within my commercial software package, Cakewalk Pro Audio, invoke the algorithm, then immediately view & listen to the results in Cakewalk.

Cakewalk provides a programming language, CAL. CAL, however cannot perform recursion (when a function calls itself), as is needed in implementing the Fractal Sequencer. Due to this and other limitations, I implemented the algorithm as a Windows .dll written in C, and I pass notes back and forth between the Fractal Sequencer and Cakewalk using CAL.

The CAL program and the source code to the .dll it invokes are available for download on the Downloads page.


Input

The initiator is the first component of input. It basically tells the Fractal Sequencer where to start. The initator is a single note that determines the key and modality of the result.

The rule is the musical phrase to process. The rule must be very carefully selected - minor variations in the input rule yield dramatic changes in the result - not all appealing...


Parameters

Factor. If the Initiator and rule are both one measure, the rule contains 4 notes, and you perform 4 iterations, you may get 256 notes. This is an awful lot of activity for a single measure... I apply a factor to the input initiator and rule before processing in order to stretch the results out in time. It's much more satisfying to listen to 16000 generated notes over a 9 minute interval than a 3 second interval...

Iterations. How many iterations the program should perform.

Minimum Duration. The minimum duration of an output note. The Fractal Sequencer will not substitute any individual note with a scaled and transposed copy of the rule if it would result in a note that is smaller than the minimum duration. Although this may cause 'uneven' application of the algorithm - some portions of the rule may be iterated more times than others - it results in far more consistent and listenable output.

Chromatic/Diatonic Transposition Mode. Either chromatic or diatonic transposition may be selected.

Key signature. The Fractal Sequencer must know the key signature in order to perform diatonic transposition properly.

Timebase. The MIDI setting for "timebase" specifies the number of "ticks" that exist per quarter note. This setting can greatly effect the output of the Fracal Sequencer. In MIDI, this usually defaults to 120. When using the Fractal Sequencer, it makes sense to use a timebase that will allow for the most iterations and that will reduce mathematical rounding errors. 120 = 2x2x2x3x5, but 96 is 2x2x2x2x2x3, which allows a more exact application of the algorithm for pieces in 4/4 time. I use 96 most of the time. Pieces with triplets or in 3/4 time may require a different setting.


Biggest Challenge - Transpositions

The Fractal Sequencer must be able to transpose from anything by anything... I could not find any documented transposition rules to follow that covered all the bases. In particular, I could not find answers to the following two questions: I was surprised I could not find documented rules for an "official" solution to these questions. Cakewalk's own diatonic transposition logic, if transposing C, D-flat, D up by a second will result in D, E, E. I believe this robs the phrase of its color. It was important to me to preserve the color in such a phrase. Such color, in an extended piece produced by the Fractal Sequencer, will result in an entire portion of the song being deliberately "off color".

The bottom line is I developed my own mechanism for performing transpositions that leaves no gaps in the logic at all. The exact details are spelled out in the source code available for download on the Downloads page.


Single Voice Method

The simplest case of using the Fractal Sequencer is to use a simple single rule with a single voice. Depicted below are the first three iterations of Result003.mid. It is easy to see how even a simple, 4-note phrase can result in an extremely complex piece.

Result003.mid - First Three Iterations.


Multi Voice Method I

To produce output for multiple simultaneous voices, there are two methods I use. The first method is the obvious one... I simply use separate rules for each of the voices. A string quartet requires 4 rules, each processed separately by the Fractal Sequencer, then brought together for the performance.

Result012.mid is my very first attempt at a string quartet.


Multi Voice Method II

Although I find output produced by the Multi-Voice Method I interesting, it feels like cheating. I want to generate all output for a string quartet from a simple, single input phrase. This led me to try Method II.

In Method II, the different notes in a single input phrase are assigned to different instruments by using different MIDI channels in the input phrase itself. The Fractal Sequencer is invoked. The results are all crowded in one output track. I then use a Cakewalk-provided utility that splits the output based on the MIDI channel of the MIDI events within the track.

The results of Method II are multiple tracks of music based on the single input phrase. What is absolutely mind-boggling about this approach is that each note played by each instrument is based 100% on each note played by each other instrument... The four voices interact with each other in very complex ways...

Method II output examples: Result015.mid, Result016.mid


Sign My GuestbookGuestbook by GuestWorldView My Guestbook


Date Last Updated: 4/23/01
Page hits: Page Counter
Home | Why | Self Similarity | Approach | Results | Questions | Downloads | Links
Questions & Feedback