Copyright © by Nils Kay und Peter
Heeren. All rights reserved.
JCself
a generator for Csound
using a stochastic method.
JCself is a program that generates an 'orchestra file'
and a 'score file' in the Csound-format. Download
Before you can start JCself, you have to install the
'Java Runtime environment 1.1.8' or higher.
You can find that at http://java.sun.com/products/jdk/1.1/jre/download-jre-windows.html
for Windows 95/98/NT and Solaris.
How to install JcSelf on windows platforms:
Unzip the jcself.zip - archive to the hard-disk, ususally
onto 'C'.
In the folder 'phs' you will find the file 'jcself.bat'.
This is used to start the application. (Note: some packer- programs unzip into an additional
folder, like: 'c:\jcself\phs\'. In that case, move the
folder 'phs' onto the root of hard-disk : 'c:\phs' or change
the path setting in jcself.bat)
To start 'JCself', run 'jcself.bat'.
This program is used to generate an orchestra file
and a score file for Csound. The idea of the program is, that the probability of a
note to be used in the composition is.influenced by the
notes already used: The distribution of the probabilities for the individual
frequency values changes therefore by itself while the
program runs.
On the calculation of the value of the frequency (in
cycles per second) depends the duration, the volume and the
distribution on a pair of loudspeakers: JCself determines the difference between the so far most
frequent value and the current and derives from it the
duration and the volume.
With the distribution on the loudspeakers (Panning)
additionally it is considered whether the current value is
smaller (leaning to the left) or larger (leaning to the
right) than the so far most frequent.
JCself shows a linear table. The scope of it is the
frequency range (' Minimum Frequency ' and Maximum Frequency
') , defined by the composer beforehand is (see below).
The columns of the table are the frequency values or a
range of frequency values (' Frequency Raster ' (see below))
.
The current value, which JCself determines, is
inserted into the table marked by a red line.
This leaves an entry in the appropriate column, which
is marked blue.
The height of the blue line or rectangle shows the
frequency of the occurrence of the frequency or the
frequency range.
The table is normalized. I.e. always the most frequent
value re-clamps the full height of the table.
The tone-range is input by the composer in the
program.
In the fields 'Minimum frequency' and 'Maximum Frequency'
is indicated the frequency range. The values of the
frequencies (in the measure cycles per second (Hz)) are
integral. In the field 'Seed Frequency' exists the possibility of
giving the first frequency. If this field is left free or if
into this field a '0' is entered, the program determines a
coincidental value after the probability calculation
described below. As given frequency value only a value
within the tonal-range given by the composer is meaningful.
The frequency value of 'seed' indicates JCself as a green
line in the table.
In the fields 'Minimum Duration' and 'Maximum Duration'
selects the composer the tone length area. In the fields 'Minimum Velocity' and 'Maximum Velocity'
the volume range will be selected.
By the activation of the field '12 Temperated Steps' only
the 12 tone steps are selected.
The frequency values maximum 3 digits behind the
colon.(The frequency range in the fields 'Minimum Frequency'
and 'Maximum Frequency' must be adjusted so, that JCself can
select one of the 12 tone levels (Octaves taken in
account).)
By the activation of the field 'Stereo Effects' the
distribution on two loudspeakers will be enabled.
The probability distribution results particularly
from the interaction of the fields 'Population' and 'Amount
to select from':
In the field 'Population' determines the value, entered
by the composer, how many coincidentally (even (pseudo)
probability distribution) value can be calculated from
JCself.
From these values those are selected, which occurred so
far most frequentcy. The number of those values is
determined by the composer in the field 'Amount to select
from'. From this quantity one value will be taken on random,
which is then written as value of the frequency in the score
file (Csound). JCself stores this value and increases the
value how often this frequency was used and by doing this
increases the probability of its repetition.
In the field 'Frequency Raster' determines the value of
the number the raster of the table, by which the values for
the calculation of the probability distribution becomes
"summarized".
I.e. not the value of the frequency, but a coherent area
of frequency values is differentiated from the program for
the calculation of the probability distribution. The columns
will be relatively increased.
'Footprint' indicates the frequency range around the
determined value, whose 'weight' value are increased
likewise. How much is determined by the composer in the
field 'Random Weight'. The weighting decreases, the further
the table code if off the of the current determined value.
The value in the field 'Iteration' indicates the number
of tones which will be generated. JCself indicates a
counting in the top-left corner of the table-graph.
How often a tone was selected is stored in the frequency
table. We call this number the 'weight'.
Example for the function of
fields:
In 'population' the digit '20' was input. In 'Amount to
Select from', '5'. 'Random Weight' was set up to '300'. (an
effect shows 'Random Weight' however only, if 'Footprint' is
adjusted higher than 'Frequency Raster '. JCself produces 20 random values, which represent the
frequency values (cycles per second) in the first step:
Assumed: 120, 117, 113, 117, 110, 104, 117, 125, 110,
103, 109, 112, 119, 101, 100, 111, 114, 105, 116, 123.
Jcself counts how often a frequency occurs.
1'st Iteration
Frequency (in Hz)
Amount
Weight
100
1
0
101:
1
0
102:
0
0
103:
1
0
104:
1
0
105:
1
0
106:
0
0
107:
0
0
108:
0
0
109:
1
0
110:
2
0
111:
1
0
112:
1
0
113:
1
0
114:
1
0
115:
1
0
116:
1
0
117:
3
0
118:
0
0
119:
0
0
120:
1
0
121:
0
0
122:
0
0
123:
1
0
124:
0
0
125:
1
0
JCself sorts these values according to their weight.
(with same weight the frequency values in the order of their
last entry are sorted.) For example:
117, 117, 117, 110, 110, 102, 123, 103, 104, 105, 109,
etc.
Since 'Amount to select from' is adjusted to '5', remain
only the following values:
117, 117, 117, 110, 110
One of these frequency values is selected on random and
written by into the score file (Csound). after the 1'st
Iteration
Frequency
Amount
Weight
100
1
0
101:
1
0
102:
0
0
103:
1
0
104:
1
0
105:
1
0
106:
0
0
107:
0
0
108:
0
0
109:
1
0
110:
2
0
111:
1
0
112:
1
0
113:
1
0
114:
1
0
115:
1
0
116:
1
0
117:
3
300
118:
0
0
119:
0
0
120:
1
0
121:
0
0
122:
0
0
123:
1
0
124:
0
0
125:
1
0
In the next iterations this amount will be added for the
choosen frequencies: 10'th Iteration
Frequency
Amount
Weight
100
1
300
101:
0
0
102:
0
0
103:
0
0
104:
1
0
105:
1
0
106:
0
0
107:
0
0
108:
0
0
109:
1
0
110:
4
900
111:
0
0
112:
1
0
113:
1
0
114:
0
0
115:
1
0
116:
1
0
117:
3
1500
118:
0
0
119:
1
0
120:
1
0
121:
0
300
122:
0
0
123:
1
0
124:
0
0
125:
2
0
(In this case the frequency 117 cycles per second is the
first in the order which JCself has determined, although it
occurs with this iteration coincidentally fewer, as the
frequency 110 cycles per second. The reason for this is
situated in the larger " weight " of the value 117.)
By JCself produced orchestra file:
; orc*************
nchnls = 2
instr 1
idur = p3; Dauer kenv linseg 0, idur*ifact, 1, idur*(1-2*ifact), 1,
idur*ifact, 0 outs aosc*ich1, aosc*ich2
endin ;***********
This is a simple example and can be modified by the
respective composer.
The parameters are described in the orc file: the fourth
parameter (p4) corresponds to the frequency, the fifth (p5)
of the volume and sixth (p6) of the distribution on the
loudspeakers.
In planning is an orchetra file with a fof generator.
JCself was written in Java. Juli 2000 Nils Kay and Peter Heeren
Installation
Idea
Influencing control
Example for the function of
fields
Orchestra and score file
(Csound)
Future developements
Example
When you have unpacked onto another hard-disk or folder,
open 'jcself.bat' using 'Notepad' oder similar. Now edit the
line with: 'set TopUi=c:\PHS\jcself.jar' and change
accordingly.
The rule to generate one tone is based on random and
evolution.
The distribution of the probabilities for the frequency
values changes self-structuring while the program is
working.
the program calculates the frequency f of a tone after a
certain probability distribution (see below). The
probability that this frequency f in the following tones
occurs again, is now larger than before.
The more often a certain frequency was calculated, the
higher is the probability that it will occur again.
the closer the actual calculated value of the frequency is
to the most frequent value of the frequencys, the louder and
shorter sounds the tone and the more centrically sounds it -
a stereophones pair of loudspeakers presupposed.
The table is arranged after these values.
The tone length cannot last more briefly as 0.001 and not
longer than 9999999999.999 seconds.
(Note: The value of 'Population' must be greater than the
value of 'Amount to select from'.)
The frequency range was defined as '100-125', and both
'Frequency Raster ' and 'Footprint 'to '1'.
The weight of this frequency value will be increased by the
amount which was defined in 'Random Weight', i.e. to '300'.
For example:
ifreq = p4; Frequenz
iamp = p5; Lautstaerke
ich1 = p6; Kanal1
ich2 = 1-p6; Kanal2
ifact pow .00125/p3, .6; Steigung
ifact = (p3 < .0039686 ? .5 : ifact)
aosc oscili ampdb(iamp)*kenv, ifreq, 1
JCself is Freeware.