- KVRist
- 116 posts since 10 Oct, 2014

Yes, with the benefits of LP, BP and HP outputs instead of a pair quadrature BP

But, with the SVF, I can't figure how to do thru zero FM (i.e. including negative frequencies).

With the Matthews rotation filter it is trivial

But, with the SVF, I can't figure how to do thru zero FM (i.e. including negative frequencies).

With the Matthews rotation filter it is trivial

- KVRist
- 96 posts since 12 May, 2012

i once tried something with bandpass filters, in series with allpass filters to achieve quadrature. i was trying to get something like a constant q transform, with the filters spaced logarithmically. anyway, i sampled it linearly, like one would do i guess if someone did fourier analysis the long way.

i hooked my filterbank up to make use of the phase for improved analysis, but what i got was a signal almost perfectly quantized to where the fft bins of that window size would have been. it looked like an ifft with the phase thrown out

of course, now i know that it requires sampling that reflects the logarithmic filter spacing. it was a major a ha moment in starting to recognize all the nifty shit that can be done with sinusoids in quadrature. it literally sucked my signal back up into the form that which the entire business was dreamed up to avoid in the first place

i hooked my filterbank up to make use of the phase for improved analysis, but what i got was a signal almost perfectly quantized to where the fft bins of that window size would have been. it looked like an ifft with the phase thrown out

of course, now i know that it requires sampling that reflects the logarithmic filter spacing. it was a major a ha moment in starting to recognize all the nifty shit that can be done with sinusoids in quadrature. it literally sucked my signal back up into the form that which the entire business was dreamed up to avoid in the first place

- KVRist
- 116 posts since 10 Oct, 2014

@kamalmanzukie,

If you want some sort of analysis/synthesis scheme with various bin spacings and widths,

maybe you can investigate some sort of real-input complex heterodyne analysers .

The center freq of the bin is f0, the bandwidth is set by the LPFs.

If you want some sort of analysis/synthesis scheme with various bin spacings and widths,

maybe you can investigate some sort of real-input complex heterodyne analysers .

The center freq of the bin is f0, the bandwidth is set by the LPFs.

- KVRist
- 96 posts since 12 May, 2012

yes heterodynes! another mystery. someone built a sort of weird quasi fft that uses heterodynes for the reaktor user library. it shifts the frequencies to near zero as beats, correct? i spent a good amount of time trying to get my head around the whole thing but it eluded me, mostly around time of phase unwrapping

almost anything you can find to read about phase unwrapping seems to say say something to the effect of 'this is really hard, and it won't work right'

the thing that really gets me is that i borrowed the module that samples the filter output linearly for the experiment i mentioned in my previous post, from that ensemble. both projects were toward the use of logarithmically spaced bins, but his frequency resolution was improved while mine just tried to aggressively (and nonlinearly) shift to where they would have been had it just been regular fourier analysis. maybe that's what the phase unwrapping is correcting for?

anyway, whatever i was trying to do was somewhere between the implementation of the heterodyne and my own jumbled understanding of how the constant q works. i figured out a workaround for the sampling intervals.. since i was using a sine bank for resynthesis, it did well enough to trigger the sampling with zero crossings

fourier related frequency analysis is such a broad discipline, and seems to reward all manner of base, obscene kludges

at least in the short term

almost anything you can find to read about phase unwrapping seems to say say something to the effect of 'this is really hard, and it won't work right'

the thing that really gets me is that i borrowed the module that samples the filter output linearly for the experiment i mentioned in my previous post, from that ensemble. both projects were toward the use of logarithmically spaced bins, but his frequency resolution was improved while mine just tried to aggressively (and nonlinearly) shift to where they would have been had it just been regular fourier analysis. maybe that's what the phase unwrapping is correcting for?

anyway, whatever i was trying to do was somewhere between the implementation of the heterodyne and my own jumbled understanding of how the constant q works. i figured out a workaround for the sampling intervals.. since i was using a sine bank for resynthesis, it did well enough to trigger the sampling with zero crossings

fourier related frequency analysis is such a broad discipline, and seems to reward all manner of base, obscene kludges

at least in the short term

- KVRist
- 96 posts since 12 May, 2012

radio seems to find all the best uses for quadrature. putting one where a regular clock oscillator would go in a phase locked loop increases the stability and accuracy significantly enough to warrant being granted its own distinct subtype.

https://en.wikipedia.org/wiki/Costas_loop

https://en.wikipedia.org/wiki/Costas_loop

- KVRAF
- 2919 posts since 27 Jan, 2006, from Phoenix, AZ

- Code: Select all
`double xoxos(double phase, double A, double B_sin, double B_cos, double C)`

{

double sin_x, cos_x;

sinCos(phase, &sin_x, &cos_x);

double sqrt_val = sqrt(pow(A + cos_x, 2) + pow(C*sin_x, 2));

double out = ((A + cos_x)*B_cos + (C*sin_x)*B_sin) / sqrt_val;

return out;

}

VS

- Code: Select all
`double XoxosOscillator::getSample()`

{

double x, y, t = s0;

s0 = s0 * w0 + s1 * w1;

s1 = s1 * w0 - t * w1;

x = s0 * scale;

t = s1 + offset;

y = t * m0 - x * m1;

x = x * m0 + t * m1;

return y / sqrt(x * x + y * y);

}

What is the right term to use to describe the difference of these two formulas? One being incremental and taking a speed value, and the other being based on a time or phase value.

Something like incremental vs analytical? variable vs fixed? recursive vs non-recursive?

Edit: Correct term i believe is explicit vs recursive.

Last edited by Architeuthis on Tue Oct 10, 2017 12:02 pm, edited 1 time in total.

- KVRAF
- 4667 posts since 11 Feb, 2006, from Helsinki, Finland

kamalmanzukie wrote:yes heterodynes! another mystery. someone built a sort of weird quasi fft that uses heterodynes for the reaktor user library. it shifts the frequencies to near zero as beats, correct?

There's nothing "weird" about these, it's all pretty straight-forward.

The difference between a heterodyne like pictured above and the (continuous) Fourier Transform at that particular frequency is really just that the former uses a low-pass filter (which is essentially a band-pass filter in terms of the unshifted spectra) while the latter would use pure integration over all time. By using low-pass filter (to essentially get something like a "short time integral") you get to keep some time-resolution (and avoid having to deal with the signal from -inf to inf at once) at the cost of some frequency resolution.

You can also argue that it shifts all the frequencies by a constant amount such that the desired analysis frequency ends up at DC... which is again one way to look at what FFT actually does as well (for each bin, shift one particular frequency at DC and take a sum over the whole block to integrate). Normally we would probably rather think of the process as correlation with sinusoids, but it's really just a matter of view point 'cos the math looks the same either way.

<- plugins | forum

- KVRist
- 96 posts since 12 May, 2012

i think i follow. i just read somewhere the other day about it being just taking the integral, which had never clicked before. i don't understand how every freq is shifted to dc though, does that have to do with amplitude being unipolar?

so what would that mean for the hillbilly method i employed: bandpass filter, and then the same bandpass to an allpass with the same cutoff, sampled at certain intervals, to get the real and imaginary parts? i'm pretty sure it doesn't take the integral of anything (tho integration is a pretty new concept for my brain), but it does seem to work in principal

anyway, i find the more viewpoints one can muster to see the same thing, the better the understanding becomes. i've found this to be especially true with fft

so what would that mean for the hillbilly method i employed: bandpass filter, and then the same bandpass to an allpass with the same cutoff, sampled at certain intervals, to get the real and imaginary parts? i'm pretty sure it doesn't take the integral of anything (tho integration is a pretty new concept for my brain), but it does seem to work in principal

anyway, i find the more viewpoints one can muster to see the same thing, the better the understanding becomes. i've found this to be especially true with fft

- KVRist
- 116 posts since 10 Oct, 2014

This is frequency translation by AM (de )modulation that's very similar to how AM radio works.

What's fun with heterodyne channels is that you can change continuously their parameters (frequency and width) in time. Some "anti larsen" stuff work on "tracking" heterodyne filters.

What's fun with heterodyne channels is that you can change continuously their parameters (frequency and width) in time. Some "anti larsen" stuff work on "tracking" heterodyne filters.

- KVRAF
- 4667 posts since 11 Feb, 2006, from Helsinki, Finland

kamalmanzukie wrote:i think i follow. i just read somewhere the other day about it being just taking the integral, which had never clicked before. i don't understand how every freq is shifted to dc though, does that have to do with amplitude being unipolar?

This is fairly easy to understand in terms of complex sinusoids, if you're not afraid of thinking about it mathematically.

First, recall that cos(w)+i*sin(w) = exp(i*w), that is, exponential with imaginary exponent gives us cosines/sines are real/imaginary components respectively.

Also recall that if we have positive and negative frequencies and we sum them together, then thanks to symmetries, we have:

(cos(w)+i*sin(w)) + (cos(-w)+i*sin(-w))

= cos(w)+i*sin(w) + cos(w)-i*sin(w)

= 2*cos(w).

So in this sense, a real-values sinusoid is simply a sum of positive and negative complex sinusoids, where the imaginary parts cancel out because of the symmetry.

The final piece of the puzzle is the following two equalities:

a*(b+c) = a*b + a*c

a^b * a^c = a^(b+c)

These happen to hold even if any of the variables happens to be complex!

So if we have cos(w) * exp(i*w0) then by thinking about the cosine as a sum of positive and negative complex sinusoids we get sum/difference frequencies as follows:

.5*(exp(i*w)+exp(-i*w))*exp(i*w0)

= .5 * (exp(i*(w0+w)) + exp(i*(w0-w)).

Then if w0 = w, the second exponential has a constant argument (of zero) and simply gives us constant 1. The first exponential gives us a sinusoid at twice the frequency, which we'd filter out (with the low-pass).

This also works with just multiplying two real-valued sinusoids together, but in that case the DC would depend on the relative phase of the two signals as we'd only get the real-part of the final sinusoid. By using an exponential modulator, the relative phase difference just results in constant phase shift of the output (to prove this, just substitute w0 = w + k where k is constant over time and you'll get exp(i*k), which is just rotation by k radians), so we get to estimate the amplitude and phase separately.

<- plugins | forum

- KVRist
- 96 posts since 12 May, 2012

Smashed Transistors wrote:This is frequency translation by AM (de )modulation that's very similar to how AM radio works.

are you saying that as an answer to my question about bandpasses? if so, that's rad, but i've actually been messing around with heterodynes again after you mentioned em and i think you're not wrong. i'm always on the lookout for new radio technologies to appropriate

mystran wrote:

This is fairly easy to understand in terms of complex sinusoids, if you're not afraid of thinking about it mathematically.

a little bit, actually. but what i tell myself is that i'm a notmath in reform. and, as such, doing a bit of research to reply kind of snowballed and i'd say your reply prompted 2 distinct forays down the rabbit hole. the first one to make sure i understood what was being said. the second, more general, was the slower realization that being a person who thinks about math related things as much i do,while having almost no basic competence in actual arithmetic is sort of an absurd thing to be

the bitter pill had me suppressing mild rage to get through an introduction to the complex plane. did not appreciate the part where they cut it and gift wrap it around a half deflated blow up pyramid

the upside is no slow descent into hubris, and no questions that should be obvious to someone with a rudimentary understanding

anyway, getting back to the bin to dc thing, does this summarize it: integrating or correlating with a windowed segment over a sinusoid, what you take from that is a single value (dc) and.... (this is a shot in the dark because i never actually penetrated the math) the output will still be zero at inopportune times unless you repeat the process again with a 90 phase shift

**Moderator:** Moderators (Main)