Re: [PD] A 6th order hilbert transformer?
The phase shift test from my previous mail expresses quadrature transformer output as normalized instantaneous frequencies (cycles). Depending on frequency (within the working range), deviation can be up to 1/100 of a cycle both for [olli~] and Pd's [hilbert~]. Of those two, [hilbert~] may even be most accurate, but [olli~]'s working range extends two octaves lower. The question is what accuracy and range you need per application, and how audible deviations are in practice. Would be nice to have a catalog of quadrature transformers (in Pd abstraction) for testing and prototyping, including Csound's. Katja On Fri, Jun 24, 2016 at 3:47 AM, Alexandre Torres Porreswrote: > I guess I have to find a way to implement it and test it. > > By the way, I'm testing max's hilbert~ with olli's - find picture attached. > > is this a good way to test it by the way? Seems Max's is more accurate > > > > 2016-06-23 22:40 GMT-03:00 Matt Barber : >> >> Not sure. I've used csound's a lot in ambisonic decoding and it's always >> worked well. >> >> On Thu, Jun 23, 2016 at 6:06 PM, Alexandre Torres Porres >> wrote: >>> >>> olli's seems easier for me to code, and better than csound's huh? >>> >>> thanks >>> >>> 2016-06-23 11:27 GMT-03:00 Matt Barber : csound's hilbert transform is also 6th-order. Code here: https://github.com/csound/csound/blob/2ec0073f4bb55253018689a19dd88a432ea6da46/Opcodes/ugsc.c On Thu, Jun 23, 2016 at 9:16 AM, katja wrote: > > Attached is a zip with test patch for [olli~] and [hilbert~] so you > can compare and also check with different sample rates. It seems that > Olli's coefficients are optimized to work well from 20 Hz up at 44K1 > sample rate, and Pd's built-in from 80 Hz up. They both work at other > samples rates too, but with different range. > > Since the coefficients for x[n-2] and y[n-2] are non-zero in the > biquads, the maximum phase shift is as large as in any 2nd order > section, therefore I think the four sections together are 8 order > equivalent indeed. > > By the way, the abstraction in my first response wasn't completely > vanilla-compatible, this is fixed in current attachment (for anyone > else interested). > > Katja > > On Thu, Jun 23, 2016 at 6:24 AM, Alexandre Torres Porres > wrote: > > Awesome, I can code it based on that :) but which order is it? > > > > I see it has 4 biquads, but it doesnt look like an 8th order because > > some > > coefficients are zeroed out, so I'm confused. > > > > Another question, does it work at any sample rate? This question is > > also > > aimed to pd's hilbert~ abstraction by the way. > > > > cheers > > > > 2016-06-22 17:27 GMT-03:00 katja : > >> > >> Hi, Olli Niemitalou has coefficients published for a higher order > >> 'hilbert transformer' on http://yehar.com/blog/, attached is [olli~] > >> abstraction based on it. > >> > >> Katja > >> > >> On Wed, Jun 22, 2016 at 4:37 AM, Alexandre Torres Porres > >> wrote: > >> > Howdy, I'm working on a frequency shifter object (via single > >> > sideband > >> > modulation / complex modulation). > >> > > >> > In Max they have a so called "6th order hilbert transformer with a > >> > minimum > >> > of error". In Pd, the hilbert~ abstraction is 4th order. I'm > >> > copying the > >> > pd > >> > abstraction for now, but I was hoping to use such a higher order > >> > filter > >> > and > >> > also use- but I can't find a source for such a formula. Any help > >> > finding > >> > it? > >> > > >> > thanks > >> > > >> > ___ > >> > Pd-list@lists.iem.at mailing list > >> > UNSUBSCRIBE and account-management -> > >> > https://lists.puredata.info/listinfo/pd-list > >> > > > > > > > ___ > Pd-list@lists.iem.at mailing list > UNSUBSCRIBE and account-management -> > https://lists.puredata.info/listinfo/pd-list > >>> >> > ___ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Re: [PD] A 6th order hilbert transformer?
Not sure. I've used csound's a lot in ambisonic decoding and it's always worked well. On Thu, Jun 23, 2016 at 6:06 PM, Alexandre Torres Porreswrote: > olli's seems easier for me to code, and better than csound's huh? > > thanks > > 2016-06-23 11:27 GMT-03:00 Matt Barber : > >> csound's hilbert transform is also 6th-order. Code here: >> >> >> https://github.com/csound/csound/blob/2ec0073f4bb55253018689a19dd88a432ea6da46/Opcodes/ugsc.c >> >> On Thu, Jun 23, 2016 at 9:16 AM, katja wrote: >> >>> Attached is a zip with test patch for [olli~] and [hilbert~] so you >>> can compare and also check with different sample rates. It seems that >>> Olli's coefficients are optimized to work well from 20 Hz up at 44K1 >>> sample rate, and Pd's built-in from 80 Hz up. They both work at other >>> samples rates too, but with different range. >>> >>> Since the coefficients for x[n-2] and y[n-2] are non-zero in the >>> biquads, the maximum phase shift is as large as in any 2nd order >>> section, therefore I think the four sections together are 8 order >>> equivalent indeed. >>> >>> By the way, the abstraction in my first response wasn't completely >>> vanilla-compatible, this is fixed in current attachment (for anyone >>> else interested). >>> >>> Katja >>> >>> On Thu, Jun 23, 2016 at 6:24 AM, Alexandre Torres Porres >>> wrote: >>> > Awesome, I can code it based on that :) but which order is it? >>> > >>> > I see it has 4 biquads, but it doesnt look like an 8th order because >>> some >>> > coefficients are zeroed out, so I'm confused. >>> > >>> > Another question, does it work at any sample rate? This question is >>> also >>> > aimed to pd's hilbert~ abstraction by the way. >>> > >>> > cheers >>> > >>> > 2016-06-22 17:27 GMT-03:00 katja : >>> >> >>> >> Hi, Olli Niemitalou has coefficients published for a higher order >>> >> 'hilbert transformer' on http://yehar.com/blog/, attached is [olli~] >>> >> abstraction based on it. >>> >> >>> >> Katja >>> >> >>> >> On Wed, Jun 22, 2016 at 4:37 AM, Alexandre Torres Porres >>> >> wrote: >>> >> > Howdy, I'm working on a frequency shifter object (via single >>> sideband >>> >> > modulation / complex modulation). >>> >> > >>> >> > In Max they have a so called "6th order hilbert transformer with a >>> >> > minimum >>> >> > of error". In Pd, the hilbert~ abstraction is 4th order. I'm >>> copying the >>> >> > pd >>> >> > abstraction for now, but I was hoping to use such a higher order >>> filter >>> >> > and >>> >> > also use- but I can't find a source for such a formula. Any help >>> finding >>> >> > it? >>> >> > >>> >> > thanks >>> >> > >>> >> > ___ >>> >> > Pd-list@lists.iem.at mailing list >>> >> > UNSUBSCRIBE and account-management -> >>> >> > https://lists.puredata.info/listinfo/pd-list >>> >> > >>> > >>> > >>> >>> ___ >>> Pd-list@lists.iem.at mailing list >>> UNSUBSCRIBE and account-management -> >>> https://lists.puredata.info/listinfo/pd-list >>> >>> >> > ___ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Re: [PD] A 6th order hilbert transformer?
olli's seems easier for me to code, and better than csound's huh? thanks 2016-06-23 11:27 GMT-03:00 Matt Barber: > csound's hilbert transform is also 6th-order. Code here: > > > https://github.com/csound/csound/blob/2ec0073f4bb55253018689a19dd88a432ea6da46/Opcodes/ugsc.c > > On Thu, Jun 23, 2016 at 9:16 AM, katja wrote: > >> Attached is a zip with test patch for [olli~] and [hilbert~] so you >> can compare and also check with different sample rates. It seems that >> Olli's coefficients are optimized to work well from 20 Hz up at 44K1 >> sample rate, and Pd's built-in from 80 Hz up. They both work at other >> samples rates too, but with different range. >> >> Since the coefficients for x[n-2] and y[n-2] are non-zero in the >> biquads, the maximum phase shift is as large as in any 2nd order >> section, therefore I think the four sections together are 8 order >> equivalent indeed. >> >> By the way, the abstraction in my first response wasn't completely >> vanilla-compatible, this is fixed in current attachment (for anyone >> else interested). >> >> Katja >> >> On Thu, Jun 23, 2016 at 6:24 AM, Alexandre Torres Porres >> wrote: >> > Awesome, I can code it based on that :) but which order is it? >> > >> > I see it has 4 biquads, but it doesnt look like an 8th order because >> some >> > coefficients are zeroed out, so I'm confused. >> > >> > Another question, does it work at any sample rate? This question is also >> > aimed to pd's hilbert~ abstraction by the way. >> > >> > cheers >> > >> > 2016-06-22 17:27 GMT-03:00 katja : >> >> >> >> Hi, Olli Niemitalou has coefficients published for a higher order >> >> 'hilbert transformer' on http://yehar.com/blog/, attached is [olli~] >> >> abstraction based on it. >> >> >> >> Katja >> >> >> >> On Wed, Jun 22, 2016 at 4:37 AM, Alexandre Torres Porres >> >> wrote: >> >> > Howdy, I'm working on a frequency shifter object (via single sideband >> >> > modulation / complex modulation). >> >> > >> >> > In Max they have a so called "6th order hilbert transformer with a >> >> > minimum >> >> > of error". In Pd, the hilbert~ abstraction is 4th order. I'm copying >> the >> >> > pd >> >> > abstraction for now, but I was hoping to use such a higher order >> filter >> >> > and >> >> > also use- but I can't find a source for such a formula. Any help >> finding >> >> > it? >> >> > >> >> > thanks >> >> > >> >> > ___ >> >> > Pd-list@lists.iem.at mailing list >> >> > UNSUBSCRIBE and account-management -> >> >> > https://lists.puredata.info/listinfo/pd-list >> >> > >> > >> > >> >> ___ >> Pd-list@lists.iem.at mailing list >> UNSUBSCRIBE and account-management -> >> https://lists.puredata.info/listinfo/pd-list >> >> > ___ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Re: [PD] A 6th order hilbert transformer?
Hi, Olli Niemitalou has coefficients published for a higher order 'hilbert transformer' on http://yehar.com/blog/, attached is [olli~] abstraction based on it. Katja On Wed, Jun 22, 2016 at 4:37 AM, Alexandre Torres Porreswrote: > Howdy, I'm working on a frequency shifter object (via single sideband > modulation / complex modulation). > > In Max they have a so called "6th order hilbert transformer with a minimum > of error". In Pd, the hilbert~ abstraction is 4th order. I'm copying the pd > abstraction for now, but I was hoping to use such a higher order filter and > also use- but I can't find a source for such a formula. Any help finding it? > > thanks > > ___ > Pd-list@lists.iem.at mailing list > UNSUBSCRIBE and account-management -> > https://lists.puredata.info/listinfo/pd-list > #N canvas 534 105 496 308 10; #X obj 254 75 delay~ 1 1; #X obj 254 46 inlet~; #X obj 29 227 outlet~; #X obj 254 229 outlet~; #X text 30 15 Olli Niemitalo's quadrature transformer; #X text 27 279 y[n]=b1*y[n-1]+b2*y[n-2]+a0*x[n]+a1*x[n-1]+a2*x[n-2] ; #X text 26 260 Pd's biquad:; #X obj 29 102 biquad~ 0 0.161758 0.161758 0 -1; #X obj 29 131 biquad~ 0 0.733029 0.733029 0 -1; #X obj 29 163 biquad~ 0 0.94535 0.94535 0 -1; #X obj 254 102 biquad~ 0 0.479401 0.479401 0 -1; #X obj 254 132 biquad~ 0 0.876218 0.876218 0 -1; #X obj 254 164 biquad~ 0 0.976599 0.976599 0 -1; #X obj 254 192 biquad~ 0 0.9975 0.9975 0 -1; #X text 81 228 first phase; #X text 310 228 second phase; #X text 157 228 << 90 degree >>; #X obj 29 190 biquad~ 0 0.990598 0.990598 0 -1; #X connect 0 0 10 0; #X connect 1 0 0 0; #X connect 1 0 7 0; #X connect 7 0 8 0; #X connect 8 0 9 0; #X connect 9 0 17 0; #X connect 10 0 11 0; #X connect 11 0 12 0; #X connect 12 0 13 0; #X connect 13 0 3 0; #X connect 17 0 2 0; ___ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
[PD] A 6th order hilbert transformer?
Howdy, I'm working on a frequency shifter object (via single sideband modulation / complex modulation). In Max they have a so called "6th order hilbert transformer with a minimum of error". In Pd, the hilbert~ abstraction is 4th order. I'm copying the pd abstraction for now, but I was hoping to use such a higher order filter and also use- but I can't find a source for such a formula. Any help finding it? thanks ___ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list