wterrain2Signal Generators:Wave Terrain Synthesiswterrain2wterrain2
A wave-terrain synthesis opcode using different curves
Description
A wave-terrain synthesis opcode that enhances the wterrain opcode by providing some more curves, krate table parameters and a parameter for rotating the curve.
Syntaxaout wterrain2 kamp, kcps, kx, ky, krx, kry, krot, \
ktab0, ktab1, kcurve, kcurveparam
Performancektabx, ktaby -- The two tables that define the terrain - they can be changed at krate.
The output is the result of traversing at frequency kcps the curve kcurve with the parameter kcurveparam (see below), scaled with krx and kry and centered at kx, ky on the terrain and rotated around the center with krot radians.
kcurve=0: ellipse as in the wterrain opcode but with a special extension. kcurveparam controls a speed change of the traversing point. The formula is:
fx(t) = kx + krx * sin( t + kcurveparam * sin(t) )
fy(t) = ky + kry * cos( t + kcurveparam * sin(t) )
kcurve=1: lemniskate - this is a simple 8. here also the kcurveparam controls a speed change of the traversing point. The formula is:
fx(t) = kx + krx * cos( t + kcurveparam * sin(t) )
fy(t) = ky + kry * sin( t + kcurveparam * sin(t) ) * cos( t + kcurveparam * sin(t) )
kcurve=2: limacon
fx(t) = kx + krx * sin(t) * (cos(t) + kcurveparam);
fy(t) = ky + kry * cos(t) * (cos(t) + kcurveparam);
limacon curve with different parameters
limacon curve with different parameters
kcurve=3: cornoid
fx(t) = kx + krx * cos(t) * cos(2*t)
fy(t) = ky + kry * sin(t) * (kcurveparam + cos(2*t))
cornoid with different parameters
a cornoid curve with different parameters
kcurve=4: trisectrix (Ceva)
fx(t) = kx + krx * cos(t) * (1+kcurveparam*sin(2*t));
fy(t) = ky + kry * sin(t) * (1+kcurveparam*sin(2*t));
trisectrix curve with different parameters
a trisectrix curve with different parameters
kcurve=5: scarabeus
fx(t) = kx + krx * cos(t) * (1+kcurveparam*sin(2*t));
fy(t) = ky + kry * sin(t) * (1+kcurveparam*sin(2*t));
scarabeus curve with different parameters
Examples
Here is an example of the wterrain2 opcode. It uses the file
wterrain2.csd.
Example of the wterrain2 opcode.See the sections Real-time Audio and Command Line Flags for more information on using command line flags.
Here is an other example of the wterrain2 - a sound fugue.
It uses the file wterrain2_2.csd.
Another Example of the wterrain2 opcode - a sound fugueSee AlsoWave Terrain SynthesisCreditsAuthor: Christian BacherNew in version 6.15