<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi Spencer.<br>
    <br>
    I think I would like to work on making a wavetable sine.<br>
    <br>
    Actually, I think a general wavetable instrument which takes an
    array might be very useful. Chuck ought to be able to read a user
    array just as quickly as an internal one, right? So it could be
    something like:<br>
    <br>
    Wavetable w =&gt; dac;<br>
    w.table("sine", 1027); // shape, number of points in array<br>
    440 =&gt; w.freq;<br>
    week =&gt; now; // sit back and enjoy<br>
    <br>
    [-1,0,1] @=&gt; float[] mytable;<br>
    w.set(mytable);<br>
    2::weeks =&gt; now; //even better<br>
    <br>
    I'll see what I can glean from the RTcmix code (which I think does
    it really well, and IIRC is pretty close to MusicN wavetable code)
    and make a Chugin, and then do some tests to compare for efficiency.<br>
    <br>
    Joel<br>
    <br>
    <div class="moz-cite-prefix">On 09/18/2015 01:20 AM, Spencer Salazar
      wrote:<br>
    </div>
    <blockquote
cite="mid:CA+ezOE7eo=oBWfCwKH8vgBHc82ZJr6RvXC=VvAbTk=BUP2QAmg@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hi Joel,
        <div><br>
        </div>
        <div>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. </div>
        <div><br>
        </div>
        <div>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. </div>
        <div><br>
        </div>
        <div>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. </div>
        <div><br>
        </div>
        <div>spencer</div>
        <div><br>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Thu, Sep 17, 2015 at 6:52 PM, Joel
          Matthys <span dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:jwmatthys@gmail.com" target="_blank">jwmatthys@gmail.com</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">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.<br>
            <br>
            Was this a specific design decision? Would there be support
            for revising SinOsc for efficiency if the audible result was
            indistinguishable?<br>
            <br>
            Thanks,<br>
            Joel<br>
            _______________________________________________<br>
            chuck-dev mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:chuck-dev@lists.cs.princeton.edu"
              target="_blank">chuck-dev@lists.cs.princeton.edu</a><br>
            <a moz-do-not-send="true"
              href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-dev"
              rel="noreferrer" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-dev</a><br>
            <br>
            <br>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <div><br>
        </div>
        -- <br>
        <div class="gmail_signature">
          <div dir="ltr">
            <div>
              <div dir="ltr">
                <div>
                  <div dir="ltr">
                    <div>
                      <div dir="ltr">
                        <div style="font-family:arial;font-size:small">
                          <div>Spencer Salazar<br>
                          </div>
                          <div>Doctoral Candidate</div>
                          <div>Center for Computer Research in Music and
                            Acoustics</div>
                          <div>Stanford University</div>
                          <div><br>
                          </div>
                          <div><a moz-do-not-send="true"
                              href="mailto:spencer@ccrma.stanford.edu"
                              target="_blank">spencer@ccrma.stanford.edu</a></div>
                          <div>+1 831.277.4654<br>
                          </div>
                          <div><a moz-do-not-send="true"
                              href="https://ccrma.stanford.edu/%7Espencer/"
                              style="color:rgb(17,85,204)"
                              target="_blank">https://ccrma.stanford.edu/~spencer/</a><br>
                          </div>
                          <div><br>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
chuck-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:chuck-dev@lists.cs.princeton.edu">chuck-dev@lists.cs.princeton.edu</a>
<a class="moz-txt-link-freetext" href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-dev">https://lists.cs.princeton.edu/mailman/listinfo/chuck-dev</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>