One Synth Challenge #180: Regency by nakst (ELEX Wins!)

VST, AU, AAX, CLAP, etc. Plugin Virtual Instruments Discussion
Post Reply New Topic
RELATED
PRODUCTS
Regency

Post

I'm not exatly sure, but I think what we do with "phase distortion" is actually funtion composition.
That means we don't have f(x), we have f(g(x)).
f(x) is always a sine in case to Regency. And g is given by one "distortion shape". with three distortion shapes we actually have f(g(h(i(x))) ... ahhhhhh ... headaches!

If you want you can try out function composition, then let's go here:
Jump to symbolab.com
The link directly jumps to an interessting example, which is sin(tan(x)) ... Look at the graph. Parts of it resemble a sawtooth like form. In this example the g(x) is tan(x) ...

How can you transform this into Regency? How do you get a tangens shape into a distortion shap to start with? For now I have come up with a example to dial into the formula window: tan(-pi/2+0.2 + x*(pi-0.4))

For the math inclined. tan has an asymptotic value at -pi/2 and a periodicity of pi, therefore we must map the definition area of the distortion window which runs between [0, 1] to [-pi/2, pi/2] ... and we should better not use -pi/2 directly because asymptotic value means the y value goes to infinity... this is why I added the +0.2 part to result in -pi/2 + 0.2... and the -0.4.
If you choose smaler values, say for instance +0.05 and -0.1 then the shape get's different ... try it out.

Already there? No, not yet ... we have to shift phase of the oscillator about pi/2 which means we have to set the phase knob to 50%...

The result looks like a sawtooth ... but it's more of a softened version of it. Anyway hope this gives you some inspiration about how to deal with function composition ;-)
You do not have the required permissions to view the files attached to this post.
Last edited by ] Peter:H [ on Sat Feb 03, 2024 4:18 pm, edited 1 time in total.

Post

] Peter:H [ wrote: Sat Feb 03, 2024 10:28 am Anyway hope this gives you some inspiration about how to deal with function composition ;-)
Nope, it scares the bejezus out of me... :help:

Post

well I got this far
Schermafdruk van 2024-02-03 23-11-33.png
You do not have the required permissions to view the files attached to this post.

Post

I think the functions of the three windows are additive:
So it is f(a(x) + b(x) + c(x))
Check it out by Dist amount to 33% on all three grids and than increase one to 100%. It doesn't matter which one you dial in, always the same result:
Is there a list of functions that work? I saw and tested so far: floor, ceil, round, all trigonometric fkt (sin,cos, tan, asin, acos) (and pi as a symbol), pow, exp, sqrt. Anything missing?

And each function a,b,c seems to be normalized, since 0.1 *x*x results in the same function as 5*x*x. However, the sum is not normalized.

Post

audio_dsp wrote: Sun Feb 04, 2024 7:44 pm Is there a list of functions that work? I saw and tested so far: floor, ceil, round, all trigonometric fkt (sin,cos, tan, asin, acos) (and pi as a symbol), pow, exp, sqrt. Anything missing?
From Nakst ~

max(), min()
pow(), mod()
acos(), asin(), atan()
cos(), cosh()
sin(), sinh()
tan(), tanh()
abs(), ceil(), floor(), frac(), round()
exp(), log(), sqrt()
RandomFloat01() (gives a random number between 0 and 1)

Post

UPDATE (11 Feb 24): This has been resolved. The internal representations of the forumulas in the windows involve normalization, so the composite function is not f(g(h(x))) for f(x), g(x), and h(x) if these represent formulas in the windows. The composite function would be:

alpha( f( beta( g( gamma( h(x))))))

where alpha, beta, and gamma are normalization functions whose forms depend on the arguments.

For more see:

https://www.execonsultingtx.com/wp-cont ... Update.pdf

Also, although the model of reading waves I describe below does work for all examples I've looked at, the code is constructed so that a ramp comes in from the right and is processed by the third window formula, then the second, then the first, after which a sin(2*pi*x) is taken of the result. So rather than processing a sin wave coming from the left, the code processes the argument of the sin wave as the argument is processed coming from the right.

-------------------------------------

The functions are composite, but not in the way previously described. If you put sin(2*pi*x) (sine in menu) into the first window with 100% distortion, phase 0, sync 0, basically all zeroed out, the incoming sin wave will be read starting in the middle (0), then will be read relatively quickly but slowing down as it approaches the end of the incoming single cycle. It then turns around and reads the incoming cycle backwards, starting slowly, then increasingly fast. It crosses the middle (0 again), then slows down until it reaches the beginning of the cycle. It then turns around once again and heads towards the middle of the cycle (0 again). The incoming sin wave is read twice in this operation. The result is a sort of square wave with a big dip towards zero for both positive and negative excursions.

If you now put sin(2*pi*x) (sine in the menu) in the second window and turn up the distortion to max, it will read the resulting wave from the first operation in the same type of fashion: From middle to end while slowing down, etc. The result is another type of square wave, but with more dips for positive and negative excursions.

To compare a composite function with the two successive actual operations in Regency:

If you now turn OFF both of the first two windows and enter the forumula sin(2*pi*sin(2*pi*x)) in the third window with 100% distortion so it reads the entire cycle according to this function, the incoming single cycle sin wave will be read in a much complicated fashion than any previous signal as shown by the waveform that will appear. It has lots of changes in slope and so on. Somewhat like the previous quasi-square waves, but with more dips.

With this arrangement, you can switch back and forth between sin(2*pi*x) for two windows versus sin(2*pi*sin(2*pi*x)) in one window (remembering to set the Distortion amounts correspondingly) and both hear the difference and see it with a scope. The two successive operations result in a smoother, less distorted sound than the single composite function.

This shows that it's composite but, as I said before, not in the way previously described. The results of the functions you enter can be thought of as indexes into tables, or pointers to values. They are not used as arguments to other functions subsequently evaluated. You may see some things that appear otherwise, but the best thing to do is to follow the indexes and look at the incoming waveforms to see what is being read. It can be confusing, so be careful.

Be sure to turn everything that is not necessary off that you can to be sure you are looking at the correct signals.
Last edited by DaveClark on Mon Feb 12, 2024 3:56 am, edited 2 times in total.

Post

In case it is helpful to anyone, I posted the source code of the oscillators on the original KVR thread for Regency:
viewtopic.php?p=8671292#p8671292

Post

nakst wrote: Mon Feb 05, 2024 5:33 pm In case it is helpful to anyone, I posted the source code of the oscillators on the original KVR thread for Regency:
viewtopic.php?p=8671292#p8671292
So actually ... sin(2*pi*( P + f(g(h(t))) )) which comes close to my initial explanation ;-)

Post

UPDATE (11 Feb 24): The discrepancy has been resolved. If the formulas in the three windows are represented by f(x), g(x), and h(x), the composite function is not f(g(h(x))) but instead:

alpha( f( beta( g( gamma( h(x))))))

because inside Regency Synthesizer, there are effectively normalization functions that need to be taken into account. The form of these normalization functions depend on their arguments.

For more see:

https://www.execonsultingtx.com/wp-cont ... Update.pdf

-------------------------------------------
] Peter:H [ wrote: Mon Feb 05, 2024 9:26 pm
nakst wrote: Mon Feb 05, 2024 5:33 pm In case it is helpful to anyone, I posted the source code of the oscillators on the original KVR thread for Regency:
viewtopic.php?p=8671292#p8671292
So actually ... sin(2*pi*( P + f(g(h(t))) )) which comes close to my initial explanation ;-)
And that formula, when you work through the algebra, predicts that the two cases I considered should be identical, but they are not as I show in the video. So the formula appears to me not to be what is actually implemented in the code.

If I made a mistake, where is it?

Edit: Video link removed (11 Feb 24)
Last edited by DaveClark on Mon Feb 12, 2024 4:06 am, edited 1 time in total.

Post

DaveClark wrote: Mon Feb 05, 2024 9:53 pm

Another mistake on my part?
I don't think so, Dave. You seem to be correct. Using Case #1 as an example, it seems that the synth outputs sin(pi*sin(2*pi*x), not sin(2*pi*sin(2*pi*x).

To demonstrate:

Image

vs.

Image

Thus, it seems that the outer function has a period of 1 (as opposed to 2). Of course, someone please tell me if I made an error.

Post

kylebenjamin wrote: Tue Feb 06, 2024 3:45 am
DaveClark wrote: Mon Feb 05, 2024 9:53 pm

Another mistake on my part?
I don't think so, Dave. You seem to be correct. Using Case #1 as an example, it seems that the synth outputs sin(pi*sin(2*pi*x), not sin(2*pi*sin(2*pi*x).

To demonstrate:

Image

vs.

Image

Thus, it seems that the outer function has a period of 1 (as opposed to 2). Of course, someone please tell me if I made an error.
Regency actually normalizes the functions f, g and h to output values only in the range 0 to 1. So, sin(2*pi*x) becomes 0.5*sin(2*pi*x)+0.5. See https://www.desmos.com/calculator/wxllcwsoyo. Furthermore, there's also a high pass filter to remove the DC offset, which can cause the waveform to look a little different. Also, it's been a while since I wrote the code so I do not remember 100% of the details.

But to be honest, I don't think the details of the maths is important. Like FM synthesis, phase distortion is something you have to play by ear :wink:

Post

It got mathy and suddenly I'm interested. There's an FL Studio version of this, right? My main Saw doesn't use CLAP but I have FL Studio too, and IIRC this dev makes FL Studio versions of their plugins. I think there's a way to connect FL Studio audio to other DAW's too, right?

Post

nakst wrote: Tue Feb 06, 2024 8:52 am ...
But to be honest, I don't think the details of the maths is important. Like FM synthesis, phase distortion is something you have to play by ear :wink:
However, understanding how various parameters affect the sound helps to zero in on the sound you need. I spent ages (using my ears) getting the right sound from my CZ1000. It was much easier to home in on a sound with my DX-11 :)

That said, I can get some nice sounds once I get it to move away from the dirt and filth!!! :D

dB

Post

It would be nice if Regency gets a ring modulator.

Post

nakst wrote: Tue Feb 06, 2024 8:52 am But to be honest, I don't think the details of the maths is important. Like FM synthesis, phase distortion is something you have to play by ear :wink:
Agreed! As much as I enjoy geeking out over the math(s) involved, actually experimenting and playing around is where the magic happens. :phones:

Post Reply

Return to “Instruments”