i am lazy and i’m guessing that maybe other people are too…
thought it would be cool to have a thread where we could consolidate any formula device code that’s been made. it might give people ideas for their own little formula device projects, and can also help people find ready-to-use code without too much difficulty.
ive forgotten how to get the formula device and what it does now…!
well, you select the formula device in the ‘Meta’ menu and drag it into your dsp chain or double click it. Formula device is used for running formulas. You noob.
Sometimes I just use the formula “A+B” with great joy - wondering why the meta mixer doesn’t seem to be able to do this.
Also I’ve once made the formula device help in pretty exact keytracking frequency parameters like filter cutoffs after taktik published some info, a recovered version of the thread seems to exist here:
Yes, I’ve been a little confused when writing this, and should finally get around to making a tool that will auto setup the stuff.
But you get the point, you can map from one parameter world into another, sometimes better than with the default 5 curves.
Or combine 2 or 3 parameters in some way. Or like the inertia devices, smoothen parameter updates, which is especially useful when you use pattern data commands to control then-smooth automations. Nerdy stuff like this.
Also I have managed to make synthetic pattern effect commands with formula devices. Like forging xy commands, for example x=speed and y=depth of an lfo or the like - and tune it to behave exactly as you’d want it to.
Together with hydras and lfos you can get pretty crazy logics of modulation operations.
Offtopic, but maybe interesting, add this doofer on a 0-line-sample instrument. Use ENV1 for ring mod detune and ENV2 for amp env:
Click to view contents
true
true
Ringmod Synth
User Library
false
1.0
Device only
0.0
Device only
Wave 1
6
1
0.0
1.0
Linear
0.0
Device only
Wave 2
7
1
0.0
1.0
Linear
63.2000885
Device only
Transp 2
5
2
0.0
1.0
Linear
54.8000069
Device only
Length
0
6
0.124999985
0.0156249832
Log Fast
1
6
0.124999985
0.0156249832
Log Fast
50
Device only
Macro 5
50
Device only
Macro 6
50
Device only
Macro 7
50
Device only
Macro 8
4
true
Init
Bundled Content
true
true
false
Init
Bundled Content
true
1.0
Device only
-1
Device only
5
Device only
1.0
Device only
0.507999778
Device only
-0.5
Device only
1.98351467
Device only
4
Device only
Linear
128
0.0
Unipolar
0,1.0
38,0.479591846
127,0.775510192
true
true
true
true
Init
Bundled Content
true
1.0
Device only
-1
Device only
4
Device only
1.0
Device only
0.25
Device only
0.125
Device only
1.98351467
Device only
4
Device only
Curve
256
0.0
Unipolar
0,0.0
1,1.0
106,0.540816307
174,0.704081655
242,0.0
true
true
false
false
Init
Bundled Content
true
1.0
Device only
-1
Linear
Clamp
0
119
-1
Device only
3
Device only
1.0
Device only
0.0
Device only
1.0
Device only
false
false
Init
Bundled Content
true
1.0
Device only
1
0.722689092
Mixer and Device
-1
Device only
6
Device only
2
Device only
0.0
Device only
1.0
Device only
Linear
-1
Device only
5
Device only
3
Device only
0.0
Device only
1.0
Device only
Linear
-1
Device only
0.0
Device only
8
Device only
0.0
Device only
0.0
Device only
Linear
-1
Device only
1.0
Device only
8
Device only
0.0
Device only
0.0
Device only
Linear
-1
Device only
-1
Device only
-1
Device only
0.0
Device only
1.0
Device only
Linear
-1
Device only
-1
Device only
-1
Device only
0.0
Device only
1.0
Device only
Linear
-1
Device only
-1
Device only
-1
Device only
0.0
Device only
1.0
Device only
Linear
-1
Device only
-1
Device only
-1
Device only
0.0
Device only
1.0
Device only
Linear
-1
Device only
-1
Device only
-1
Device only
0.0
Device only
1.0
Device only
Linear
false
false
Init
Bundled Content
true
1.0
Device only
0.0
Device only
0.0
Device only
false
false
Init
Bundled Content
true
1.0
Device only
A * example(A*200+50) + C + B / 119 * 12
-- put custom code or variables here
function example(s)
local y = sin(SAMPLECOUNTER/SRATE * 2*PI*s)
return y
end
A
B
C
true
0.139959097
Device only
0.632000864
Device only
0.722689092
Device only
-1
Device only
7
Device only
2
Device only
false
false
Init
Bundled Content
true
1.0
Device only
0.0
Device only
86
Device only
0.0
Device only
0.0625
Device only
1.0
Device only
false
false
Init
Bundled Content
true
1.0
Device only
0.0
Device only
110.231331
Device only
0.0
Device only
0.0427692533
Device only
1.0
Device only
This is 1D Perlin Noise. It is useful for where you want randomness, but want to slide smoothly between the random value instead of do a hard jump. Out of the box, it moves between a value of 0 and 1. change the amplitude variable to move between larger values. Modify the scale varaible to affect the speed of change.
Formula:
MAX_VERTICES = 256
MAX_VERTICES_MASK = MAX_VERTICES -1
amplitude = 1
scale = 0.01
r = {}
for i = 0, MAX_VERTICES do
r[i]=random()
end
function getVal( x )
scaledX = x * scale
xFloor = floor(scaledX)
t = scaledX - xFloor
tRemapSmoothstep = t * t * ( 3 - 2 * t )
xMin = xFloor % MAX_VERTICES_MASK
xMax = ( xMin + 1 ) % MAX_VERTICES_MASK
y = lerp( r[ xMin ], r[ xMax ], tRemapSmoothstep )
return y * amplitude
end
function lerp(a, b, t )
return a * ( 1 - t ) + b * t
end
Hello,
to contribute also so here is to try a piece of new code from Maciulxichotl update modified for Formula device.
It’s a Lorenz Attractor modified as an LFO.
Models an “analog drift” or other random but smooth value generator. Use A to set the LFO frequency, B to adjust the maximum output value and C to choose between standard output (value <0.5) or alternative.