its cool cause the intention is to compare both languages, also very simple examples and nice tips..

most of the code is written wrongly, but will be easy for us to fix

On 5 October 2012 15:27, Kassen <signal.automatique@gmail.com> wrote:
On Fri, Oct 05, 2012 at 04:16:19PM +0200, Alberto Alassio wrote:
> So the first part  will be something like
>
> SinOsc c => dac;
>
> SinOsc m => blackhole;
>
> Step centre_freq => c;
>
> 440 => centre_freq.next ;
>
> 2 => c.sync
>
> ?

Almost. We will put the signal of m into c. This is because m is
affecting (modulating) c. This modulation happens in a way set by the
.sync() function. So, the top two lines should be replaced by;

SinOsc m => SinOsc c => dac; //m affects what c plays. We listen to c.

All of the rest is right. If you set up m with something like;

110 => m.gain; //amplitude and thus modulation depth
3 => m.freq; //lfo frequency

Then it should work.

Once it works you can consider adding a envelope and maybe a loop that
plays a melody using your new sound.
>
> Thank you Kas for being so patient

No problem.

BTW; we do not need blackhole in this case because m is connected to c
and c is connected to the DAC. Anything that connects from the DAC
will be generating values because of that. We only need blackhole when
we want something to generate values (for example to use with .last())
but do not need to connected (indirectly) to the DAC. I think the
manual entry on blackhole should explain that.

Hope that helps explain the underlying reasoning.

Yours,
Kas.
_______________________________________________
chuck-users mailing list
chuck-users@lists.cs.princeton.edu
https://lists.cs.princeton.edu/mailman/listinfo/chuck-users