<div dir="ltr">You can always try to modulate the Oscilator:<br><div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">SinOsc vibrato => SinOsc sine => dac;</font></div><div>
<font face="courier new, monospace">// This will tell sine to take the vibrato input as a modulator of</font></div><div><font face="courier new, monospace">// it's frequency.</font></div><div><font face="courier new, monospace">2 => sine.sync;</font></div>
<div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">5 => vibrato.freq;</font></div><div><font face="courier new, monospace">10 => vibrato.gain;</font></div><div><font face="courier new, monospace"><br>
</font></div><div><font face="courier new, monospace">5::second => now;</font></div></div><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">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>