[gen~]: expr, GenExpr and codebox
additional work with gen~, including access to Max/MSP buffers
Links
See the
previous class links
for a lot of [gen~] documentation. We also implemented a few
more chaotic equations, taken from
Paul Bourke's web site.
Here they are:
- Clifford Attractors
-- this was the source of the main chaotic equation we used.
Different values of the a, b, c andd parameters
gave interestingly different sonic results.
- Peter De Jong Attractors
-- turned out that this used the same equation as the "Clifford Attractors",
but with even more values of the a, b, c andd parameters.
- bit-wise waveform creation
-- this was the video I showed with the highly-compact bit-shifting
algorithms used to generate interesting waveforms. We didn't try
any of these because [gen~] doesn't have bit-wise
operations, nor does it have 'char' (8-bit) data types.
But it might be fun to try a few of these out, at least as a
beginning-point for developing some new synthesis algorithms.
Class Patches, Discussion and Code
Here is the archive with the class [gen~] patches we coded:
A brief description of these:
Note how the x(n) and y(n) outputs recurse back into
the equation (through x(n-1) and y(n-1) variables) -- the
[history] operator allows us to do this.
We used the following sets of values for the a, b, c andd
parameters:
a = -1.4, b = 1.6, c = 1.0, d = 0.7
a = 1.1, b = -1.0, c = 1.0, d = 1.5
a = 1.6, b = -0.6, c = -1.2, d = 1.6
a = 1.7, b = 1.7, c = 0.06, d = 1.2
a = 1.3, b = 1.7, c = 0.5, d = 1.4
a = -2.24, b = 0.43, c = -0.65, d = -2.43
They are implemented as [param] messages.
clifford2.maxpat
A version of the 'clifford' [gen~] patch using
[expr] objects for the chaos equations.
clifford3.maxpat
This version uses the [codebox] capability of [gen~]
to rewrite the patch in a more text-y format. One warning: we
had a minor problem because the [history] operator needs
to be capitalized in [codebox]. Oh, computers!
writebuffer.maxpat
Very simple (and non-[gen~]) patch showing how we will write
a waveform into a Max/MSP [buffer~] object using the
multislider.
wavetabley.maxpat
This demonstrates how to read through a Max/MSP buffer "inside"
[gen~]. It is a somewhat crude wavetable oscillator,
though, as it doesn't have any interpolation or proper computation
of frequency => sampling increment (the amount we 'skip' through
the wavetable to get different frequencies, equal to
si = freq * wavetable-size/sampling-rate). There are
better [gen~] objects for doing wavetable synthesis
(see [wave], for example).
randwavetabley.maxpat
A version of the wavetabley.maxpat that does a random
buffer-lookup instead of a sequential lookup. Kind of silly,
but what the heck