[chuck-dev] SinOsc calculations

Spencer Salazar spencer at ccrma.stanford.edu
Fri Sep 18 02:20:43 EDT 2015


Hi Joel,

Thats correct- SinOsc is just a naive implementation of a sine wave. I
don't know that there is a reason for this other than simplicity.

In performance-sensitive situations I have recommended using either
MagicSine (if it is not necessary to change the freq/phase rapidly) or
Gen9/Gen10, which are sinusoid wavetables.

I have been interested in developing a chugin that is just a really
fast/mathematically accurate wavetable sine. If you'd be interested in
making something like that, or collaborating on it, that'd be very cool. If
we got that in good shape we could replace the default sine, if there is no
other reason to keep it the way it is.

spencer


On Thu, Sep 17, 2015 at 6:52 PM, Joel Matthys <jwmatthys at gmail.com> wrote:

> Hello! I was looking through the source recently, and I was a little
> surprised to find that the SinOsc UGen performs a trig function every
> sample. I was under the impression that most osc implementations use a
> lookup table with interpolation because it's considerably more efficient.
>
> Was this a specific design decision? Would there be support for revising
> SinOsc for efficiency if the audible result was indistinguishable?
>
> Thanks,
> Joel
> _______________________________________________
> chuck-dev mailing list
> chuck-dev at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-dev
>
>
>


-- 
Spencer Salazar
Doctoral Candidate
Center for Computer Research in Music and Acoustics
Stanford University

spencer at ccrma.stanford.edu
+1 831.277.4654
https://ccrma.stanford.edu/~spencer/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-dev/attachments/20150917/2fbcf7a1/attachment.html>


More information about the chuck-dev mailing list