Interesting - to flatten the fb_fcomb peaks, you can run several of them in series, slightly detuned. If you can make the poles lie on a near-semicircle near the unit circle of the z plane, the resonance should look "Butterworth" instead of peaked. Another path to this is a higher-order feedback filter, such as usual_gain * fi.lowpass(3).
On Mon, Nov 18, 2024 at 2:56 PM Aaron Krister Johnson <akjmi...@gmail.com> wrote: > Julius, > > Thanks for the quick response! Brilliant, I'll give that a try. > > For the record, my starting point _was/is_ `fb_fcomb` (floats), not > `fb_comb` (ints) > > But I'll see if the interpolation helps things. The other thing I was > considering was a "post-signal" `ff_fcomb` on the resonant peak pitc > and its harmonics, one with a negative coefficient to dampen/negate the > original (i.e. comb troughs on a certain pitch instead of comb peaks). > > It was promising, did help a bit, but wasn't perfect. Now I'm wondering if > what you're proposing isn't somehow mathematically related to that. > > Cheers, > > Aaron Krister Johnson > Music, etc.: > https://soundcloud.com/aaron-krister-johnson > https://soundcloud.com/filtercreed > https://www.youtube.com/channel/UC_utjGYbSizWE0dNyr0Vdmg > https://aaronkristerjohnson.bandcamp.com/ > http://www.untwelve.org > Code: > https://github.com/akjmicro <http://www.untwelve.org> > > > On Mon, Nov 18, 2024 at 2:02 PM Julius Smith <julius.sm...@gmail.com> > wrote: > >> Hi Aaron, >> >> This is a well known phenomenon. It happens when the period is almost an >> exact integer. >> I see that fb_comb is defined as >> >> fb_comb(maxdel,N,b0,aN) = (+ <: de.delay(maxdel,N-1),_) ~ *(-aN) : >> !,*(b0) : mem; >> >> You really should use at least >> >> fb_fcomb(maxdel,N,b0,aN) = (+ <: fdelay(maxdel,float(N)-1.0),_) ~ *(-aN) >> : !,*(b0):mem; >> >> which linearly interpolates the delay. That will still "buzz" when SR/f0 >> is an integer. >> To address that, try changing fdelay to fdelay4: >> >> fb_f4comb(maxdel,N,b0,aN) = (+ <: de.fdelay4(maxdel,N-1),_) ~ *(-aN) : >> !,*(b0) : mem; >> >> and if that sounds good, you can try fdelay3 or fdelay2 to reduce >> computation. >> >> Cheers, >> Julius >> >> On Mon, Nov 18, 2024 at 10:29 AM Aaron Krister Johnson < >> akjmi...@gmail.com> wrote: >> >>> Sorry for the fat-fingers in the original post; wrote quickly on my tiny >>> phone keyboard... >>> >>> On Mon, Nov 18, 2024, 11:24 Aaron Krister Johnson <akjmi...@gmail.com> >>> wrote: >>> >>>> Hi all, >>>> >>>> Perhaps Julius O. Smith or some expert in filter resonance knows the >>>> answer: >>>> >>>> I have an app I built using the Karplus-Strong example in one of the >>>> "getting started" tutorial. It uses fi.fb_fcomb at its heart -- a comb >>>> filter excited by a burst of noise, then allowed to resonate and decay like >>>> a string. >>>> >>>> It is an _awesome_ sounding "superclav" as I call it; I have been >>>> playing Bach on it, it is expressive and its character is super-perfect for >>>> Baroque music. >>>> >>>> My issue is: I have set up a well-twmpered 12-note gamut using a >>>> waveform table, it works really well. But for some reason, at SR=48000, >>>> every C-sharp in my gamut, regardless of octave played, has an extra bit of >>>> bright "ping" that makes it stand out from the others. I suspect that >>>> particular pitch somehow reinforces, in the combo filter, some resonance >>>> mode and its harmonics. >>>> >>>> Does anyone have any ideas on how to mitigate and work around this? I >>>> have tried post-EQing the signal, but it's tough to do it for each >>>> harmonic, and it ends up doing the reverse: making each C-sharp, if the >>>> band-reject EQ resonance is narrow enough, sound too "pinched". >>>> >>>> Perhaps I need to shift my overall gamut by some constant so that no >>>> pitch hits the resonance peak? That's not ideal, though, so I am wondering >>>> if perhaps it's possible to mitigate this by pre-filyering the noise burst >>>> or similar, in such a way that the peak gets reduced on the excitation-end >>>> of things. >>>> >>>> Any/all ideas here are appreciated, and thanks again to the wonderful >>>> devs for giving us this powerful tool. >>>> >>>> -Aaron >>>> >>>> _______________________________________________ >>> Faudiostream-users mailing list >>> Faudiostream-users@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/faudiostream-users >>> >> >> >> -- >> For language models, Wittgenstein is right: "The limit of language is the >> limit of the world" >> > -- For language models, Wittgenstein is right: "The limit of language is the limit of the world"
_______________________________________________ Faudiostream-users mailing list Faudiostream-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/faudiostream-users