[linux-audio-dev] Re: Does anyone have a working example ...

From: Alfons Adriaensen <fons.adriaensen@email-addr-hidden>
Date: Wed May 18 2005 - 18:43:57 EEST

On Wed, May 18, 2005 at 10:32:14AM -0400, Ivica Ico Bukvic wrote:

> If I have a statement that does:
>
> Out.ar(out, SinOsc.ar(freq, mul: 0.5))
>
> Then it works.
>
>
> If I have a statement that does:
>
> Out.ar(out, SinOsc.ar(freq * 100, mul: 0.5))
>
> This also works.
>
>
> Now if I have:
>
> Out.ar(out, SinOsc.ar(freq + 100, mul: 0.5))
>
> This doesn't.

I see no reason why the last one should not work...

There is something related you have to watch out for (and I've
fallen into this trap at leass 10000 (binary) times): SC does
_not_ use the normal precedence of operators. If you write

  a + b * c

that will be interpreted as

  (a + b) * c

So always use () to be sure.

-- 
FA
Received on Wed May 18 20:15:09 2005

This archive was generated by hypermail 2.1.8 : Wed May 18 2005 - 20:15:10 EEST