| home | featured artist | releases | links |

me$a.elech/tele



| download |

- rnd_msic
(windows XP or mac OSX only)

in the .zip file,
-rnd_msic, a music generating software using liner congruence
-music for piano generated by additive series with condition #1, a graphical scaore generator
-three abstractions for max/msp (random-lm, random-as, random-lc)

| rnd_msic |

this is a simple music generator using liner congruence described on the bottom. the keyboard sound may be changed by three faders right below where it says "sound". also it comes with simple buffer loop effect. you may change tempo and humanizing factor by clicking on the top of the numbers and dragging up or down. the same is true for changing numbers in the equation. here are mp3 examples:

- example01

- example02


| music for piano generated by additive series with condition #1 |



*note: this software does NOT generate sound...

this is a graphical score generator for piano using additive series with condition. directions are described in the score. spacebar will change the score.


| notes on abstractions |

if you are a max user, i know in many occasions you use [random] object. and maybe, if you're like me, you've even tried to make music with [random] object by simply connecting it to [makenote]. i did, and i was very disappointed by the result. [random] object seems a little too random (duh!) to use directly to make something "musical". then i learned that i had to work my way around to use [random] object to make it "musical".

indeed, [random] object that comes with max is a very sophisticated random generator that provides decent random numbers that are fairly unperiodical and unpredictable. as a result, if you simply connect [random] object directly to [makenote], the resulting music will be unperiodical and unpredictable, which is interesting by all means except not necessarily very "musical". i put quotation marks on the word "musical" because what's musical is very debatable. (damn you, Cage!) but being a big fan of music like bach, webern and morton feldman, i think one of the keywords for "musical" is "motific" (whether it's presented as series of notes or as sound like musique concrete. i find many field recordings very "musical" because they have sonic "motives").

the problem with computer generated random numbers, or pseudo-random numbers, for they are NOT true random numbers, is they often could be periodical and predictable, which then don't serve as good random numbers for many applications like computer game programming and security coding. so programmers bang their heads to the wall to make pseudo-random numbers unperiodical and unpredictable. as a matter of fact, like i said, whoever wrote [random] object did a good job. but a wait a minuet, aren't periodical and predictable parts of "motific" quality? when we say "motific", it usually means somewhat repetitive with variety. and of course, repetitive means periodical and predictable. so there we have it. the "problem" among computer programmers is a welcoming factor for music. while top computer scientists put their genius minds together to make pseudo-random numbers as sophisticated, as random as possible, all we the musicians need to do to make pseudo-random numbers applicable to music is dumb it down.

in order to dumb it down, let's not use very complicated math stuff. here are the ones that are going to be used:

[ + ] for adding
[ - ] for subtracting
[ * ] for multiplying
[ / ] for dividing
[ % ] for calculating the remainder after division. for example, [20 % 6 = 2] because [20 = (6 * 3) + 2]

another thing that you'll see a lot is the expressions like,

{X[0], X[1], X[2], X[3], X[4], X[5], ... X[n], X[n+1], X[n+2], X[n+3], etc.}

this represents series of numbers. for example, what is (A)?

{1, 2, 4, 8, 16, 32, (A), 128...}

yes, the answer is 64 because the number following is always twice of the number right before.
so this series can be represented as:

X[n+1] = X[n] * 2

X[n+1] is the number right after X[n] in the series. fair enough?


| pseudo-random generators |

1. logistic map
2. additive series with condition
3. liner congruence
4. other pseudo-random generators
5. musical examples (mp3s)


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

| logistic map |



X[n+1] = X[n] * a * (1 - X[n]),
0 < a < 4,
0 < X[0] < 1


first inlet: bang to generate random numbers
second inlet: value of (a) between 3 and 4 in float (0. ~ 100.).
outlet: float (0.~1.)

logistic map is rarely used to generate random numbers because even at the most chaotic point where (a=4), it still has a very strong tendency in distributions, or I can say, the distribution of logistic map is "modal", meaning that it's not true random or "atonal". And the distribution, or the "mode" is determined by the value of (a). in general, higher the value of (a), more complex the output values. but at some point this may not be the case. Here are some graphs of different values of (a):

second inlet = 75 (a=3.75)


second inlet = 82.75 (a=3.8275)


second inlet = 84 (a=3.84)


second inlet = 100 (a=4)


value of 100 (i.e. a = 4) looks very random, but as you can see in this graphical representation, it has very strong tendency.

second inlet = 100 (a=4)


you can see it yourself by opening a patch called "overview.txt" in max/msp


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

| additive series with condition |



X[n+2] = X[n] + X[n+1]
if X[n] > 100, then X[n] - 100
0 < X[0] < 100


first inlet: bang to generate random numbers
second inlet: value of X[0] (1. ~ 100.).
outlet: float (0.~1.)

if you start this series with 1, the series will be infamous fibonatchi series till 100. the distribution or the "mode" of is determined by X[0], i.e. what number you start the series from. if you start from 50, the series will be,

{50, 50, 100, 50, 50, 100, 50, 50, 100…}

and so on.
if you start from 20,

{20, 20, 40, 60, 100, 60, 60, 20, 80, 100, 80, 80, 60, 40, 100, 40, 40, 80, 20, 100, 20, 20…}

so the numbers and the cycle period vary depending on where you start.
here are the graphs of different values of X[0]:

second inlet = 20 (X[0]=20)


second inlet = 2 (X[0]=2)


interesting feature of the series is the tendency to "shift". If you take a look at some of the graphical representation of the series, it looks as if you drew a similar geometry over and over on top of each other but moving it a little bit each time.

second inlet = 2 (X[0]=2)


if you use decimal points, you will get more complex outputs with more shifts and longer period.

you can see it yourself by opening a patch called "overview.txt" in max/msp


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

| liner congruence|



X[n+1] = (X[n] * a + b) % 100
0 < X[0]

liner congruence method is one of the oldest methods of generating pseudo-random numbers. the distribution or the "mode" is determined by values of (a) and (b), and the value of X[0]. for easy control over the output, the last variable is fixed to 100, but actually you can get more variety by changing this as well. this method generates various patterns of tendencies that can be seen both on graphs and graphical representations.

a=51, b=51, X[0]=28
graph
graphical representation

a=97, b=61, X[0]=38.67
graph
graphical representation

a=82.5, b=61, X[0]=26
graph
graphical representation

as you can see, if you use decimal points, you get more complex results.


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

| other pseudo-random generators |

there are numbers of pseudo-random generators. some are like ones on the above and some are made with completely different concepts such as use of irrational numbers and other mathematic mothods. here are a list of some that are similar to the ones on the above.

-mixed congruence
X[n+1] = int((X[n] * a + b) * pow(10, c)) % pow(10, d)
c < 0 < d

-middle-square method
X[n+1] = int(X[n]^2 * pow(10, c)) % pow(10, d)
c < 0 < d

-lagged fibonacci
X[n]=X[n-a] + X[n-b]%c
0 < a < b

-blum blum shub
X[n+1] = X[n]^2 % a

these are easy to put in max/msp's [expr] object, so if you are interested, you should give it a try and see what kind of random numbers they generate.


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

| musical examples |

01. beats056.mp3

in this piece of D major for organ, logistic map is used to determine both pitch and rhythm. since there are two [random-lm] used with different values of (a), pitch and rhythm don't correspond to each other.


02. beats076.mp3

this piano piece has a similar concept with the above but using [random-as]. again, pitch and rhythm are determined by additive series with condition.


03. beats011.mp3

this is a short example of how you can apply logistic map to rhythm. the hihat sound keeps the "steady" rhythm generated by logistic map. and everything else is derived from the rhythm.


04. beats054-001.mp3
05. beats054-002.mp3
06. beats054-003.mp3
07. beats054-004.mp3
08. beats054-005.mp3
09. beats054-006.mp3
10. beats054-007.mp3

these are examples of a composition using MTL and logistic map. once again, logistic map is used to determine both pitch and rhythm. but this time, for rhythm, logistic map is used to give a "human touch" to the rhythm in conjunction with a normal constant rhythm generator to randomize the constant rhythm.


11. beats038.mp3

this piece employs logistic map to generate short motives and repeats the motives. once again pitch and rhythm are determined by logistic map. this piece was inspired by erik satie's "chinema".