Hi there, just thought I’d mention my new SimplexNoise-SC Quark, now in the main repository (just update your Quarks to see and install it, using Quarks.gui
). It’s based on a public domain Java implementation of Simplex noise by Stefan Gustavson (and has his enthusiastic blessing ;-).
It is somewhat similar to the RedPerlin
class from Frederik’s redUniverse, although that one isn’t actually Perlin (gradient-based) noise, it seems to be interpolated “value noise”. On the Server side, we have the Perlin3
UGen (although it has the unpleasant effect (bug?) of returning 0 a lot of the time, so it’s extra noisy (in the audio sense!), not being very continuous).
There is a different character to value noise vs Perlin noise vs Simplex noise (although the last two are gradient-based, so they’re more closely related).
You’ll find some basic examples in the Simplex
class help page – you can use it to draw noisy pictures, create fake stock market graphs, or generate a set of “related” periodic Waveforms for Osc.ar
synthesis.
(0,0.01..10).collect{ |x| Simplex.fBm2(x, 33.3, 8); }.plot
To get different noise, offset the coordinates. Nearby coordinates (e.g. change
y
from 33.3 to 33.35) will produce different but “similar” results.
You can use it generate continuous streams of pseudo-random data for musical Events (similar to Pbrown
, except that it’s more predictable and smoothly interpolated, and you can do things like make it periodic – a trick I like to do, by moving on a closed path through the higher noise dimensions).
You can use Simplex.periodic
to make periodic waveforms that evolve over subsequent cycles if you gradually shift the offset:
(0,0.01..10).collect{ |x| Simplex.periodic(x, [0.02 * x, 3]); }.plot
And here is a teaser that generates an evolving melody (notes and durations) using a Routine (Prout
):
(
f = { arg periodSteps = 8, variationRate = 0.005, offset = #[13, 14];
{
var x = 0;
loop{
Simplex.periodic(x, [variationRate * x, 0] + offset).yield;
x = x + periodSteps.reciprocal;
}
}.p
}
)
(
p = Pbind(
\degree, f.(8).linlin(-1.2,1.2,-14,7).round,
\dur, Pindex([Rest(0.125), 0.125,0.25,0.5,1], f.(16, offset: 77).linlin(-1,1,0,4.99).asInteger)
).play
)
p.stop
I will likely add a Pattern class to the Quark, to do something similar to the above f
function (generate a series of periodic random value events), if I can settle on a name: Pperiodic
, Psimplex
, Pprand
, Pcycrand
, …? Any preferences?
I find this kind of pseudo-noise musically very useful and a source of all kinds of creative ideas; let me know if you find your own neat use for it. And any suggestions or (friendly) criticisms are welcome!
Glen.