its cool cause the intention is to compare both languages, also very simple examples and nice tips..<div><br></div><div>most of the code is written wrongly, but will be easy for us to fix<br><div><div><br><div class="gmail_quote">

On 5 October 2012 15:27, Kassen <span dir="ltr"><<a href="mailto:signal.automatique@gmail.com" target="_blank">signal.automatique@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im">On Fri, Oct 05, 2012 at 04:16:19PM +0200, Alberto Alassio wrote:<br>
> So the first part  will be something like<br>
><br>
> SinOsc c => dac;<br>
><br>
> SinOsc m => blackhole;<br>
><br>
> Step centre_freq => c;<br>
><br>
> 440 => centre_freq.next ;<br>
><br>
> 2 => c.sync<br>
><br>
> ?<br>
<br>
</div>Almost. We will put the signal of m into c. This is because m is<br>
affecting (modulating) c. This modulation happens in a way set by the<br>
.sync() function. So, the top two lines should be replaced by;<br>
<br>
SinOsc m => SinOsc c => dac; //m affects what c plays. We listen to c.<br>
<br>
All of the rest is right. If you set up m with something like;<br>
<br>
110 => m.gain; //amplitude and thus modulation depth<br>
3 => m.freq; //lfo frequency<br>
<br>
Then it should work.<br>
<br>
Once it works you can consider adding a envelope and maybe a loop that<br>
plays a melody using your new sound.<br>
<div class="im">><br>
> Thank you Kas for being so patient<br>
<br>
</div>No problem.<br>
<br>
BTW; we do not need blackhole in this case because m is connected to c<br>
and c is connected to the DAC. Anything that connects from the DAC<br>
will be generating values because of that. We only need blackhole when<br>
we want something to generate values (for example to use with .last())<br>
but do not need to connected (indirectly) to the DAC. I think the<br>
manual entry on blackhole should explain that.<br>
<br>
Hope that helps explain the underlying reasoning.<br>
<div class="HOEnZb"><div class="h5"><br>
Yours,<br>
Kas.<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>
</div></div></blockquote></div><br></div></div></div>