Re: [Faudiostream-users] Median filter
Hi Julius and Dario, Thank you for your suggestions, took me a little to test because in online faust ide things sound differently for some reason. At first I was thinking about sorting algorithms but didn't know they were just implemented, until Dario's example. Do I get it right that we can not have a variable window length with them? On Sun, Jan 9, 2022 at 1:12 PM Julius Smith wrote: > You should be able to subtract median3 from medianFilter(3) in Faust and > get 0 as the optimized output - Julius > > On Sun, Jan 9, 2022 at 1:49 AM Dario Sanfilippo < > sanfilippo.da...@gmail.com> wrote: > >> Hello, Julius and Alik. >> >> I'm new to median filters but we should be able to use the recently added >> sorting algorithm for arbitrary window lenghts; does the following look >> correct to you? >> >> import("stdfaust.lib"); >> windowLen = 11; // it should be odd for symmetry >> medianFilter(L, x) = (x <: par(i, L, @(i))) : ro.bubbleSort(L) : >> ba.selectn(L, int(L / 2)); >> process = no.noise <: _ , medianFilter(windowLen); >> >> Ciao, >> Dr Dario Sanfilippo >> http://dariosanfilippo.com >> >> >> On Sun, 9 Jan 2022 at 10:28, Julius Smith wrote: >> >>> Hi Alik, >>> >>> This came up for me at some point: >>> >>> // Test order 3 median smoother: >>> >>> median3(a,b,c) = select3(s,b,a,c) >>> with { >>> cf(a,b) = 2*(a>> s=abs(cf(a,b)+2*cf(b,c)+3*cf(c,a))/2; >>> }; >>> >>> process = median3(1,2,3), median3(1,3,2), median3(2,1,3), >>> median3(2,3,1), median3(3,1,2), median3(3,2,1); // 2 >>> >>> Cheers, >>> Julius >>> >>> On Sun, Jan 9, 2022 at 12:51 AM Alik Rustamoff >>> wrote: >>> >>>> What is the way to make a median filter in faust? >>>> >>>> ___ >>>> Faudiostream-users mailing list >>>> Faudiostream-users@lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/faudiostream-users >>>> >>> >>> >>> -- >>> "Anybody who knows all about nothing knows everything" -- Leonard >>> Susskind >>> ___ >>> Faudiostream-users mailing list >>> Faudiostream-users@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/faudiostream-users >>> >> > > -- > "Anybody who knows all about nothing knows everything" -- Leonard Susskind > ___ Faudiostream-users mailing list Faudiostream-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/faudiostream-users
[Faudiostream-users] Median filter
What is the way to make a median filter in faust? ___ Faudiostream-users mailing list Faudiostream-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/faudiostream-users
[Faudiostream-users] Is there a way to load a component with faustide?
Hi! I installed faustide locally on my computer and it generally looks working nicely through chrome. But when I load a .dsp file with something like: somedspcode = component("/absolute/path/to/file.dsp"); faustide complains that it cannot find it, though the component file is on the same local filesystem. Is there a way to load a component with faustide? ___ Faudiostream-users mailing list Faudiostream-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/faudiostream-users
[Faudiostream-users] how to compile portable plugins
Hi! I usually compile plugins as lv2. And these only work on the machine they compiled on. I use faust2lv2 script How can I compile them so they portable (like online compiler does?) ___ Faudiostream-users mailing list Faudiostream-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/faudiostream-users
Re: [Faudiostream-users] noise from fi.highpass
Today I tested all three. With last two svf filters I don't see any difference (I use ardour's built in plugin analyser), no noise. The noisy fi.highpass (the first one) becomes closer to them as cutoff freq goes higher, but still has different phase characteristics in lowest part of it's spectrum (0 to ~20hz) declare name "nstest"; import("stdfaust.lib"); import("filtersEOC.lib"); // I put https://github.com/grame-cncm/faustlibraries/blob/master/filters.lib#L2611 part to this file (which is from EOC library) process(x,y) = x,y : nl(drive, offsetL, fb, f, filter), nl(drive, offsetR, fb, f, filter) with{ nl(drive, offset, fb, f, filter) = (+ : ef.cubicnl(drive, offset)) ~ * (fb): ( _<:(fi.highpass(2, f), f2.svf.hp(f, 1/sqrt(2)), ( f2.svf2blti(f, 1/sqrt(2), 1) :ba.selectn(10,1)) ) : ba.selectn(3,filter) ); filter = hslider("filter type",0, 0,3,0.5); f = hslider("HPF freq",50,10,1,0.01): si.smoo; fb = hslider("feedback",0,-1,1,0.001); drive = hslider("drive",0,0,1,0.001); offsetL = hslider("offsetL",0,-1,1,0.001); offsetR = hslider("offsetR",0,-1,1,0.001); } ; On Fri, Dec 18, 2020 at 9:10 PM Oleg Nesterov wrote: > Hi Dario, > > this motivated me to look at your library again ;) > > On 12/18, Alik Rustamoff wrote: > > > > Hi, Dario, I, btw, ended up using blti filter from your edge of chaos > > library. Good collection. No noises just does the job. > > Then I think that fi.svf.hp() should work equally well. Can you try it? > See > https://github.com/grame-cncm/faustlibraries/blob/master/filters.lib#L2611 > > And this probably means that Dario was right, and the problem was caused > by quantisation. > > Because IIUC in theory (and unless you modulate HPFfreq) these 3 filters > > fi.highpass(2, f) > fi.svf.hp(f, 1/sqrt(2)) > svf2blti(f, 1/sqrt(2), 1) : ba.selectn(10,1) > > should have the same transfer function / impulse response. > > Oleg. > > ___ Faudiostream-users mailing list Faudiostream-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/faudiostream-users
Re: [Faudiostream-users] noise from fi.highpass
Hi, Dario, I, btw, ended up using blti filter from your edge of chaos library. Good collection. No noises just does the job. About precision, I use default settings by running faust2lv2 script (I guess that runs with single precision) пт, 18 дек. 2020 г., 14:26 Dario Sanfilippo : > Hi, Alik. > > Other people will be able to give you a more exhaustive answer but it > might be caused by quantisation of the coefficients making the filter a bit > unstable. Are you working in double precision? > > Even in single precision, the biquad filter > <https://webaudio.github.io/Audio-EQ-Cookbook/audio-eq-cookbook.html> below > seems to be more stable, although it may be computationally more expensive. > > Ciao, > Dario > > declare name "nstest"; > import("stdfaust.lib"); > fb = hslider("feedback",0,-1,1,0.001); > process(x,y) = x,y : (+ : ef.cubicnl_nodc(drive, offsetL)) ~ * (fb), (+ : > ef.cubicnl(drive, offsetR)) ~ * (fb) > //: fi.highpass(2, HPFfreq), fi.highpass(2,HPFfreq) with{ > : highpass(HPFfreq), highpass(HPFfreq) with{ > HPFfreq = hslider("HPF freq",50, 20,1,0.01): si.smoo; > drive = hslider("drive",0,0,1,0.001); > offsetL = hslider("offsetL",0,-1,1,0.001); > offsetR = hslider("offsetR",0,-1,1,0.001); > } ; > highpass(cf, in) = biquad(a0, a1, a2, b1, b2, in) > with { > q1 = .707; > alpha = sin(w(cf)) / (2 * q1); > norm = 1 + alpha; > a0 = ((1 + cos(w(cf))) / 2) / norm; > a1 = -1 * (1 + cos(w(cf))) / norm; > a2 = ((1 + cos(w(cf))) / 2) / norm; > b1 = cos(w(cf)) * -2 / norm; > b2 = (1 - alpha) / norm; > w(f) = 2 * ma.PI * f / ma.SR; > biquad(a0, a1, a2, b1, b2, x) = fir : + > ~ iir > with { > fir = a0 * x + a1 * x' + a2 * x''; > iir(fb) = -b1 * fb - b2 * fb'; > }; > }; > > On Fri, 18 Dec 2020 at 07:14, Alik Rustamoff > wrote: > >> Hi, >> >> when I use fi.highpass in the following example I get weird noise at the >> output if when offset parameters are not 0 and fighpass frequency is less >> than 70hz. Removing the highpass filter of raising cutoff freq removes the >> noise. Should it be like that? what is the reason? >> >> >> declare name "nstest"; >> >> import("stdfaust.lib"); >> >> >> fb = hslider("feedback",0,-1,1,0.001); >> >> >> process(x,y) = x,y : (+ : ef.cubicnl_nodc(drive, offsetL)) ~ * (fb), (+ : >> ef.cubicnl(drive, offsetR)) ~ * (fb) >> >> : fi.highpass(2, HPFfreq), fi.highpass(2,HPFfreq) with{ >> >> >> HPFfreq = hslider("HPF freq",50, 20,1,0.01): si.smoo; >> >> drive = hslider("drive",0,0,1,0.001); >> >> offsetL = hslider("offsetL",0,-1,1,0.001); >> >> offsetR = hslider("offsetR",0,-1,1,0.001); >> >> } ; >> >> >> ___ >> Faudiostream-users mailing list >> Faudiostream-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/faudiostream-users >> > > > -- > Dr Dario Sanfilippo > http://dariosanfilippo.com > ___ Faudiostream-users mailing list Faudiostream-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/faudiostream-users
[Faudiostream-users] noise from fi.highpass
Hi, when I use fi.highpass in the following example I get weird noise at the output if when offset parameters are not 0 and fighpass frequency is less than 70hz. Removing the highpass filter of raising cutoff freq removes the noise. Should it be like that? what is the reason? declare name "nstest"; import("stdfaust.lib"); fb = hslider("feedback",0,-1,1,0.001); process(x,y) = x,y : (+ : ef.cubicnl_nodc(drive, offsetL)) ~ * (fb), (+ : ef.cubicnl(drive, offsetR)) ~ * (fb) : fi.highpass(2, HPFfreq), fi.highpass(2,HPFfreq) with{ HPFfreq = hslider("HPF freq",50, 20,1,0.01): si.smoo; drive = hslider("drive",0,0,1,0.001); offsetL = hslider("offsetL",0,-1,1,0.001); offsetR = hslider("offsetR",0,-1,1,0.001); } ; ___ Faudiostream-users mailing list Faudiostream-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/faudiostream-users