octal-dev
[Top][All Lists]
Advanced

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

Re: square might be out of tune


From: David O'Toole
Subject: Re: square might be out of tune
Date: Tue Mar 6 19:33:01 2001

Thank you for pointing out this problem; I will fix it. Oh, I hope not
too many generators are bases on squaregen...  it was written very early
on in the project's like (until recently it still had emacs-style
indentation IIRC) and it isn't very exciting. Perhaps I should rewrite
it and make it better? When I write the sampleplayer machine (I will add
the wave table extension to the API very soon) I'll try to make that one
a better example from the start. 

> I was looking at squaregen.c to try to make a sawtooth generator, and I
> think line 164 which says
> 
>       if (phase >= 1.0) phase = 0.0;
> 
> should be changed to
> 
>       if (phase >= 1.0) phase -= 1.0;
> 
> In the first one, the position in the wave is always set back to 0
> without taking into account how far it may have gone past 1; setting
> phase to ((current position) - 1) compensates for that, I think.  I know
> it's just an example generator, but it should be fixed since other
> generators will be based on it..
> 
> ben
> 
> _______________________________________________
> Octal-dev mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/octal-dev
> 



-- 
@@@ david o'toole
@@@ address@hidden
@@@ www.gnu.org/software/octal




reply via email to

[Prev in Thread] Current Thread [Next in Thread]