<div dir="ltr">Hm yeah I think you have to do the gain manually. I like to use another oscillator for modulation like this (dry-coded and untested):<br><br>fun void am(SinOsc @osc, SinOsc@ modulator, float modulation) {<br>
    while (true) {<br>        modulator.last*modulation => osc.gain;<br>        1::samp => now;<br>    }<br>}<br><br>SinOsc osc1 => blackhole;<br>SinOsc osc2 => dac;<br><br>spork ~ am(osc1, osc2, 0.1);<br><br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Dec 5, 2013 at 12:01 PM, Manuel Bärenz <span dir="ltr"><<a href="mailto:manuel@enigmage.de" target="_blank">manuel@enigmage.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div>I'm sorry, of course sine.sync is
      documented on
      <a href="http://chuck.cs.princeton.edu/doc/program/ugen_full.html#sinosc" target="_blank">http://chuck.cs.princeton.edu/doc/program/ugen_full.html#sinosc</a>.
      But I must admit that I didn't understand the documentation of
      this feature until now.<br>
      <br>
      As for the gain modulation, I'm still puzzled. There is no way of
      setting sine.sync in a way that anything chucked into sine will
      control sine.gain, right?<div class="im"><br>
      <br>
      Am 05/12/13 01:12, schrieb Moisés Gabriel Cachay Tello:<br>
    </div></div>
    <blockquote type="cite">
      <div dir="ltr">You can always try to modulate the Oscilator:<div><div class="h5"><br>
        <div><br>
        </div>
        <div>SinOsc vibrato => SinOsc sine => dac;</div>
        <div>
          // This will tell sine to take the vibrato input as a
          modulator of</div>
        <div>// it's frequency.<br>
        </div>
        <div>2 => sine.sync;</div>
        <div><br>
        </div>
        <div>5 => vibrato.freq;</div>
        <div>10 => vibrato.gain;</div>
        <div><br>
        </div>
        <div>5::second => now;</div>
      </div></div></div><div><div class="h5">
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">2013/12/4 Manuel Bärenz <span dir="ltr"><<a href="mailto:manuel@enigmage.de" target="_blank">manuel@enigmage.de</a>></span><br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi guys,<br>
            <br>
            I'm giving a presentation on ChucK tomorrow and I wanted to
            show off<br>
            some of the basic features in a live coding session. I found
            that<br>
            creating a vibrato (modulating the frequency) is far too
            hard. The<br>
            example I'm looking at is<br>
            <a href="http://chuck.cs.princeton.edu/doc/examples/basic/whirl.ck" target="_blank">http://chuck.cs.princeton.edu/doc/examples/basic/whirl.ck</a>.
            In an<br>
            infinite loop, you have this code:<br>
            <br>
                30 + ( Math.sin(t) + 1.0 ) * 10000.0 => s.sfreq;<br>
                t + .004 => t;<br>
            <br>
            Here, t is a float and s is a SinOsc. Now, what I would have
            expected is<br>
            the following, more intuitive setup outside the loop:<br>
            <br>
            30 + SinOsc freq_mod => s.freq;<br>
            1 => freq_mod.freq;<br>
            <br>
            I know that the first line with the "30 + SinOsc" is
            probably nonsense<br>
            in itself, but I could work around that (by using a step
            UGen for<br>
            example). My actual problem is that you can't chuck a SinOsc
            into s.freq.<br>
            Consider this line:<br>
            <br>
            SinOsc freq_mod => s.freq;<br>
            <br>
            I get an error like this:<br>
            arguments type(s) do not match:<br>
            ... for function 'SinOsc.freq(...)' ...<br>
            ...(please check the argument types)<br>
            <br>
            Is this something that the language is simply not capable of
            or am I<br>
            doing something wrong?<br>
            <br>
            Best, Manuel<br>
            _______________________________________________<br>
            chuck-users mailing list<br>
            <a href="mailto:chuck-users@lists.cs.princeton.edu" target="_blank">chuck-users@lists.cs.princeton.edu</a><br>
            <a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <div><br>
        </div>
        -- <br>
        -Moisés
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
chuck-users mailing list
<a href="mailto:chuck-users@lists.cs.princeton.edu" target="_blank">chuck-users@lists.cs.princeton.edu</a>
<a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a>
</pre>
    </div></div></blockquote>
  </div>

<br>_______________________________________________<br>
chuck-users mailing list<br>
<a href="mailto:chuck-users@lists.cs.princeton.edu">chuck-users@lists.cs.princeton.edu</a><br>
<a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Release me, insect, or I will destroy the Cosmos!
</div>