the beginnings of a beautiful era for audio dsp

DSP, Plugin and Host development discussion.
RELATED
PRODUCTS

Post

well stratum, there are many perspectives, certainly my previous lack of considering this form of 2d rotation in dsp makes me a buffoon, yet as said i haven't noticed anything about classic waveform synthesis with this method. perhaps because it is so elementary. then again, my nescient perspective has led me to make extensive use of things others have apparently not seen applicable for the vst format. been catching up a bit on that this morning, reviewing verklagekasper's page on DSF with these oscs, katjaas, smashed transistors notes elsewhere and such.

i do expect that if i've omitted the applciation, so have others. i like the whole kinda forum, place of learning deal. it's reasonable to anticipate some complexity in both what people offer and retain. you never know what people will concoct left to their own devices, at the same time, what will people do with this. between autonomy and articulacy in these fashions, how is the, a path correctly traversed.

tale - things to do, plus mucking around. can i do shepard tones with the partials, will that sound crap with a constant fundamental. got loads of ideas recently, might do a set of single osc synths, one more hurrah for freeware to prove my total obscurity :) i think it's only old people that layer instances, isn't it? everyone else, buys one synth that is supposed to do everything.
you come and go, you come and go. amitabha neither a follower nor a leader be tagore "where roads are made i lose my way" where there is certainty, consideration is absent.

Post

Hi xoxos,

I would like to try your method some day. Unfortunately musicdsp is not my job and while time available for my hobby is limited, I guess I have understood it. At least I know how to rotate an offseted 2d point, for sure. I'm not sure what you have meant by scaling the x axis, though. Begining with a point on the unit circle, and scaling and offseting a point, I guess we end up first with a point say (0.5,1) (scaled by 0.5 in x) and if we offset that with say 0.5 along the y axis, then we end up at (0.5, 1.5). Then I guess we apply some repeated 2d rotation to this point (angle determines the frequency, obviously), and extract the signal using your formula (that *out=...). Overall, it doesn't look very complex, and apparently can be an interesting oscillator for some reason. At least, that's what I have understood.

Thanks for sharing it, BTW.
~stratum~

Post

stratum wrote:Hi xoxos,

I would like to try your method some day. Unfortunately musicdsp is not my job and while time available for my hobby is limited, I guess I have understood it. At least I know how to rotate an offseted 2d point, for sure. I'm not sure what you have meant by scaling the x axis, though. Begining with a point on the unit circle, and scaling and offseting a point, I guess we end up first with a point say (0.5,1) (scaled by 0.5 in x) and if we offset that with say 0.5 along the y axis, then we end up at (0.5, 1.5). Then I guess we apply some repeated 2d rotation to this point (angle determines the frequency, obviously), and extract the signal using your formula (that *out=...). Overall, it doesn't look very complex, and apparently can be an interesting oscillator for some reason. At least, that's what I have understood.

Thanks for sharing it, BTW.
The first part is a quadrature oscillator, that produces sine and cosine waves in s0 and s1, with w0 and w1 controlling the frequency. This the only part that actually produces sound, the other parts just process the output from this part.

Next the scale, offset and rotation essentially just mixes s0 and s1 with some DC offset into a new x,y coordinate. It literally is just a mixer with DC added in.

The last part he is theoretically taking the angle of the new x,y, then taking the sin() of that. I say theoretically because that's the thought process he described but in code he's simplified to calculate the sin directly, IE...

output = sin(angleof(xy))

but... sin = opposite/hypotenuse

so... output = y / sqrt(x^2+y^2)

you can also get rid of the square root...

output = y^2 / (x^2+y^2)

but it's important to remember that x,y each has 3 terms at this point, so if it was fully expanded there'd be terms for s0^2, s0, s1^2, s1, s0*s1, so top and bottom is a mix of 5 different AM products.

So you can view the last part as "output = sin(angleof(xy))" or you can view it as "output = shit load of amplitude modulation***", depending on you preference.

***that is if you ignore the division, who knows what that does.
Chris Jones
www.sonigen.com

Post

xoxos wrote:we also need to antialias it, i'd recommend the polyphase filters from musicdsp for low cpu :)
Hi,
Instead of filtering I'd recommend limiting the scale param.
When scale (ie in2) is near-zero you get aliasing.

So, the in2 param could be clipped to be something like

Code: Select all

// x = s0 * *in2;            //   scale
x = max( abs(s0 * *in2), freq * 10 / samplerate);
Negative scale values are not strictly necessary, the same waveform is created when angle is negative.


I don't like first creating lots of aliasing, then trying to filter it out.
Yes, you dampen the high frequencies, but aliased frequencies come diving down after "bouncing" on the Nyquist frequency, so you might get a generally muddy high-end anyway. This eats overall sound energy we'd want for the bass end.
It's even better to filter on a clean wideband sound to create the effect you want. Just a quality of life thing :)

Post

The first part is a quadrature oscillator, that produces sine and cosine waves in s0 and s1, with w0 and w1 controlling the frequency. This the only part that actually produces sound, the other parts just process the output from this part.

Next the scale, offset and rotation essentially just mixes s0 and s1 with some DC offset into a new x,y coordinate. It literally is just a mixer with DC added in.

The last part he is theoretically taking the angle of the new x,y, then taking the sin() of that. I say theoretically because that's the thought process he described but in code he's simplified to calculate the sin directly, IE...

output = sin(angleof(xy))

but... sin = opposite/hypotenuse

so... output = y / sqrt(x^2+y^2)

you can also get rid of the square root...

output = y^2 / (x^2+y^2)

but it's important to remember that x,y each has 3 terms at this point, so if it was fully expanded there'd be terms for s0^2, s0, s1^2, s1, s0*s1, so top and bottom is a mix of 5 different AM products.

So you can view the last part as "output = sin(angleof(xy))" or you can view it as "output = shit load of amplitude modulation***", depending on you preference.

***that is if you ignore the division, who knows what that does.
Thanks, that's a lot clearer. So, basically this looks like another way to generate a signal whose spectrum contains a lot of harmonics (*). Perhaps he was bored of analog inspired saws and squares, who knows.

(*) Usually that's what we want from an oscillator (so that we can later create some smoother sound by filtering.
~stratum~

Post

sonigen wrote:so... output = y / sqrt(x^2+y^2)

you can also get rid of the square root...

output = y^2 / (x^2+y^2)
Hm a/b is not the same as (a^2)/(b^2), or am I missing something? :wink:

Anyway an interesting idea for an oscillator, and thanks for elaborating on xoxos' idea.

Richard
Synapse Audio Software - www.synapse-audio.com

Post

Hm a/b is not the same as (a^2)/(b^2), or am I missing something?
I have seen that too, but assumed that a and b always have the same sign for some reason so that the simplified formula is valid (didn't check, but may be true as we were offsetting the variable 'y'.). That still would leave a square, (output vs output^2), but that may be acceptable in some cases (i.e. the output would just contain more harmonics instead of doubling the oscillator frequency). Anyway, that formula probably isn't acceptable for all offset values of y.
~stratum~

Post

dunno how or why he said tha, but yes, it obviously returns a different result.
you come and go, you come and go. amitabha neither a follower nor a leader be tagore "where roads are made i lose my way" where there is certainty, consideration is absent.

Post

Richard_Synapse wrote: Hm a/b is not the same as (a^2)/(b^2), or am I missing something? :wink:
No it's me, dont know how I figured that, out of practice I guess. :dog:
Chris Jones
www.sonigen.com

Post

one more bump!

course it's clear by now it's more or less an intro into much deeper topics. they just happen to be topics people haven't thought "i can make a non-AA osc out of this"

reviewing other methods, the procedure here is spectral generation by projecting a 2d point ("complex" number) onto the unit circle, instead of eg. division as in DSF, and to clarify how obvious it is, i will repeat.. in exactly the same way as calculating the horoscope position of a planet, the method was conceived by deriving only the angle.

we can and have found references to people using complex signals for all sorts of interesting things (i've been stuck thinking the inferior quad osc form was the gem of audio dsp), and so far i have managed to add "plenty o' sidebands" by summing another oscillator with the pre-projected coordinate. and as mentioned, frequency shifting ala weaver can be used to compress or expand the spectrum for inharmonic partials, like dsf.

of course, once you've done all that the process is using a fair bit of cpu (since oversampling is required for general applications) so it's worth selecting methods for the task.

things i didn't get so far with.. scaling by magnitude (problems past unity, didn't have imo a useful discretised timbral effect). also (based on 3d osc plots) warping a segment of the phase into 3D. could be timbrally descriptive but doesn't fit with the thingy i'm thinknig about atm.
you come and go, you come and go. amitabha neither a follower nor a leader be tagore "where roads are made i lose my way" where there is certainty, consideration is absent.

Post

vst ought to be out in a week or three. algorithm as described above, with noise/instability modulation and a secondary quad osc which produces sidebands in several modes. architecture here selected for production of "warm acoustic-like signals" eg. the synth wind instruments i like to use. also very suitable for "electric hum" timbres and of course distorted guitar tones. i'm not erudite enough to do single sideband without adding more filters.

there's a little bit of audible aliasing when pushed, might keep that or clip timbral params with high pitch. should work well for synth percussion.

lots of sideband noise, nice at the end. interesting partial sequences at static settings at the beginning.
http://xoxos.net/temp/outtest.mp3

how to cook your ears developer style :)
you come and go, you come and go. amitabha neither a follower nor a leader be tagore "where roads are made i lose my way" where there is certainty, consideration is absent.

Post

writing along today and casually extended this technique to a 3d form, which is extremely obvious, though i can't remember thinking about it previously.

i think then that the best nomenclature for this method is normalisation synthesis wherein a multidimensional coordinate is normalised to generate harmonics. encapsulated? there it is.

elan's scope seems to do a pretty good job of visualising a duplex signal from the arrangement i had today,
viewtopic.php?p=6694848#p6694802

audio software developers.. we spend all our lives working for that little dong.
you come and go, you come and go. amitabha neither a follower nor a leader be tagore "where roads are made i lose my way" where there is certainty, consideration is absent.

Post

Initially, I thought you were heading towards a relatively simple polar-type oscillator, e.g.

looping theta from 0 to 2*pi

r = sin(theta-b);
out = r * sin(theta);

By picking different formula for r and varying the values over time (e.g. b above), some pretty interesting waveforms can be created. I'm starting to suss out where you're going with this, though, and it's admittedly pretty cool. I'll keep at it.

Post

:) tbh the 2d implementation i started the thread with was theoretically engaging but aurally tame by itself, whereas 3d is about as complex as i'd want a synth to get. (the core of the current state is a secondary rotation situated on the fundamental to form a variable thickness toroid, fading from ring to sphere as amplitude of modulator is increased. this is tilted and rotated before the scaling and transposition, then the tilting and rotation are reversed so transforms occur on an arbitrary plane. i'll upload both later today).
you come and go, you come and go. amitabha neither a follower nor a leader be tagore "where roads are made i lose my way" where there is certainty, consideration is absent.

Post

vst version (32 bit) if you're curious.

http://xoxos.net/temp/blackout.zip

two vst.. both are unpatched at present.

"out" is the 2d form discussed throughout this thread. it has noise and a single mod osc and is pretty mundane (2x oversampling).

"black" is a 3d extension of the form with chaotic feedback. it is complex and deep and took a while for me to realise its depth extends to more than just noise (no AA). the "rewarding" build of the method.
you come and go, you come and go. amitabha neither a follower nor a leader be tagore "where roads are made i lose my way" where there is certainty, consideration is absent.

Post Reply

Return to “DSP and Plugin Development”