I see why sin is looking worse than osc. It starts with a leading
zero.  Try this:

import("stdfaust.lib");
f = 1000;
sino = 2*ma.PI*f*ba.time/ma.SR:sin;
process = sino,os.osc(f)';

(Note added ' at end to time align the two cases.)

The different starting phase results in different "window damage" to
the sinusoid.

A rectangular window does not "enhance high-frequency components" --
it creates them!

- Julius

On Thu, Feb 20, 2020 at 12:23 PM Dario Sanfilippo
<sanfilippo.da...@gmail.com> wrote:
>
> Hi, Julius.
>
> I'm using a rectangular window. This is what I get using os.osc(1000) using 
> the same analysis parameters: 
> https://www.dropbox.com/s/0b9bvpek6axj47d/zcsine.png?dl=0.
>
> Os.osc(1000) looks better with this windowing. I understand that a 
> rectangular window will enhance high-frequency components, but I still wonder 
> why sin has those and os.osc doesn't.
>
> Cheers,
> Dario
>
>
> On Thu, 20 Feb 2020 at 20:47, Julius Smith <julius.sm...@gmail.com> wrote:
>>
>> Something amiss in my attached window screenshot.  One more try . . .
>>
>> On Thu, Feb 20, 2020 at 11:43 AM Julius Smith <julius.sm...@gmail.com> wrote:
>> >
>> > I am seeing much higher purity from sin (blue) over osc (red), using a
>> > Blackman window on 2048 samples generated by faust2octave.  Which FFT
>> > window are you using?
>> >
>> > import("stdfaust.lib");
>> > f = 1000;
>> > sino = 2*ma.PI*f*ba.time/ma.SR:sin;
>> > process = sino,os.osc(f);
>> > // then faust2octave
>> >
>> > On Thu, Feb 20, 2020 at 7:01 AM Dario Sanfilippo
>> > <sanfilippo.da...@gmail.com> wrote:
>> > >
>> > > Hello, list.
>> > >
>> > > I'm generating the spectrum in red using double-precision and 96kHz SR 
>> > > with: process = 2*ma.PI*1000*ba.time/ma.SR:sin;
>> > >
>> > > See this plot: 
>> > > https://www.dropbox.com/s/73ollb5pmkud47d/sinefft.png?dl=0.
>> > >
>> > > Would you know what causes the high-frequency noise? process = 
>> > > os.osc(1000); appears to be much cleaner. (Not shown in the plot.)
>> > >
>> > > Thanks,
>> > > Dario
>> > >
>> > >
>> > >
>> > > _______________________________________________
>> > > 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
>>
>>
>>
>> --
>> "Anybody who knows all about nothing knows everything" -- Leonard Susskind



-- 
"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

Reply via email to