Announcing: Sapphire Elastika

Sapphire v2.1.2 is now available in the VCV Rack library with the following improvements:

9 Likes

I’m having more fun with Elastika tonight, just goofing around with its self-sustaining chaotic drones. To get into these modes, it helps to keep FRIC a little below the middle, set CURL either above or below zero. Then tinker with the other settings. Be ready to crank down the output level because it can easily get out of control!

5 Likes

super cool! I can’t wait to test it :heart:

What fun! My mind went a bit wild thinking of setting up a system that uses CV control to vary the Elastika in parameter space and then monitor the output to find strange attractors, eigenvalues, poles, resonances, singularities and the like.

2 Likes

I noticed the high levels, and I use a limiter to tame the Elastika output,
I would recommend this to any1 who experiments with it.

I’m thinking of adding an optional limiter in the right-click menu for a future version, but I would not enable it by default, for backward compatibility. Does anyone have opinions about that?

4 Likes

a limiter would really be helpfull imho,
I would rather like it, if you could implement it with a small knob on the main UI

1 Like

If you store the new option as a boolean in your preset via dataToJson(), in dataFromJson() you can first read the boolean from the preset and then test whether the value you tried to read actually exists (is not null). This way you can set the boolean to whatever default you want in the case where a preset is loaded that does not contain the boolean (i.e. a patch made using a prior version of Elastika).

Here’s how that looks in my code:

5 Likes

Thanks, Lexandra! That is a great idea.

2 Likes

Because there is already an output level knob and I’d rather not move stuff around on my panel design (that gets painful), I’m resistant to adding a new knob for a limiter. But I’d like to understand more, to see if there’s another way to provide a good experience.

I have already added a slider to the right-click menu to control the DC cutoff filter’s corner frequency, and I’m open to adding another slider like that.

The part I don’t yet understand is what a limiter knob/slider would do. In my mind, I would want to try to maintain a maximum output level of ±5V. I could guarantee that hard limit if I used a “brick wall” filter. But that would introduce unpleasant distortion. I’m thinking it would be better to have a softer attack on the limiter where output could overshoot but then quickly ramp down.

Then there’s the issue of whether the output level knob that already exists would be “fighting with” the limiter. You could turn the output level knob all the way up to +24 dB, and then the limiter could kick in and invisibly cancel out the level setting.

Or maybe the output level knob can change its meaning when the limiter is enabled? Then it becomes the limiter ceiling value, instead of a flat amount of gain. But I still want a way to amplify quiet sounds. I’m not crazy about full automatic gain control because then there is limited dynamic range. Sometimes I want Elastika to be quieter, other times louder.

Are there module developers and/or audio engineers out there who could help me understand a good way to conceptualize this?

just a quick idea for the UI with a “limiter knob”
(you just need to click in the middle of the OUT knob to activate/deactivate the limiter)

limiter off:

limiter on:

2 Likes

so a full blown limiter is tricky to write especially if you are latency sensitive. And they exist downstream as modules.

one trick i’ve done in some modules which can get hairy is put a cubic soft clipper on the back. That is, signal → x - 4/27 x^3 for x in [-1.5, 1.5] which is pretty transparent for low signals and clips in a warm way as you get louder. Adding a menu for limiter options like ‘hard clip’ (x =clamp(x,-1,1)) soft clip (function like that after clamping to -1.5, 1.5) may be good

(I’m using [-1,1] voltage standard; for rack in the [-5,5] standard you can do the multiplication I’m sure, or just take 0.2 out and put 5 in for the soft clip).

Maybe that helps?

1 Like

Graphing Calculator for those functional forms.

1 Like

I like that idea a lot. Like you say, no latency at all, and it’s very simple and deterministic. And the output level knob still works for amplifying quiet sounds. For loud sounds, turning the level knob up would act like a distortion effect, which could be fun and useful in its own right. Thanks!

1 Like

Yeah especially if you add menu items to deactivate it so users have a choice

Yes, definitely it will be optional. Someone might want large output voltages if they know they are going to feed it into a VCA or mixer and crank it way down. Then they can still get linear response if they want.

I just had some fun working through the math to generalize the cubic formula to make it tunable. Let x be the raw voltage, y be the clipped voltage. Suppose you want \pm R to be the limited output range of y (a fixed ±5V in my case).

Let Q be a tunable parameter that shapes how large x has to get in order to reach R in the positive direction. In other words, Q is the clipping limit.

Start with the general form:

y(x) = x - B x ^3

Then we need

y(Q) = Q - B Q^3 = R

Solve for B to obtain

B = \frac {Q-R} {Q^3}

Substitute back to get the general clipping function for the region |x| \le Q:

y(x) = x - \left( Q - R \right) \left( \frac {x} {Q} \right) ^3

So I could add a slider that adjusts the value of Q. When Q increases, there is more distortion but it allows for larger values of x before clipping. When Q decreases, there is less distortion for small values of x, but you start clipping sooner.

Fun stuff!

EDIT: After graphing of these curves, I realize I don’t need a new slider to tune Q. When this clipping is enabled, setting Q \lt R actually causes amplification just like turning up the level knob does, so I might as well make the level knob control Q in the first place. Interesting!

2 Likes

OK, never mind, I realize I have to be careful of the value of Q to avoid the cubic part overshooting ±5V. I still need the output level knob to be independent of the curve tuning constant Q. I’ll go down into the code bunker and figure it out. Pretty interesting stuff.

2 Likes

OK, I have come full circle and realized I don’t want to tune Q at all. I get the least possible distortion from clipping if the slope of my function approaches 0 as x approaches Q from the lower side. That happens when Q = \frac{3}{2} R, so I end up with a formula that looks like what @baconpaul suggested in the first place, only adjusted for R = 5V instead of 1V amplitude:

y(x) = x - \frac{4}{27 R^2} x^3

So for anyone reading this later, this makes the non-clamped cubic part join with the clamped part while leveling off to a flat slope where it joins.

3 Likes

Neat! Section 6.7 of THE ART OF VA FILTER DESIGN has some great discussion of a somewhat related approach in case you hadn’t come across it.

2 Likes

you can have an output level and a limit knob. Everyone uses my Comp module, and it’s got both.

1 Like