[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sc-dev] Buffer.cheby buggy?



hi,

is there a bug in the Chebychev Buffer Fill algorithm ? i get a lot of distortion / overtones when trying to use even harmonics ... any clues?

best, -sciss-


   b = Buffer.alloc( s, 1024, 1 );
   b.sine1([ 1.0 ], true, true, true );   // initial test

(
	{
		var input;
		input = SinOsc.ar( MouseX.kr( 40, 14000, \exponential ));
		Shaper.ar( b.bufnum, input, mul: 0.5 );
   }.play;
)	

   // just generate the fundamental ; that's ok
   b.cheby([ 1.0 ], true, true, true );
   // should be one octave but, but distorts
   b.cheby([ 0.0, 1.0 ], true, true, true );
   // ok
   b.cheby([ 0.0, 0.0, 1.0 ], true, true, true );
   // wrong
   b.cheby([ 0.0, 0.0, 0.0, 1.0 ], true, true, true );
   // ok
   b.cheby([ 0.0, 0.0, 0.0, 0.0, 1.0 ], true, true, true );
   // wrong
   b.cheby([ 0.0, 0.0, 0.0, 0.0, 0.0, 1.0 ], true, true, true );
   // ok
   b.cheby([ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0 ], true, true, true );
   // wrong
   b.cheby([ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0 ], true, true, true );
   // ok
   b.cheby([ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0 ], true, true, true );
   // all odd harmonics ok
   b.cheby([ 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0 ], true, true, true );
   // ok for some reason ?!
   b.cheby([ 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0 ], true, true, true );
   // not ok
   b.cheby([ 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0 ], true, true, true );