| I don't have an example now, but I probably have one in
my office. Effectively you just declare an array
and loop it calling the ar/kr methods of the class
you want. Since SC is just like any other language
it has all these constructs.
I can dig the example on Monday.
Victor
>
>
>
>
> On Sep 23, 2006, at 12:41 AM, Victor Lazzarini wrote:
>
> > (This is in fact, for me, the only thing in
> > SuperCollider which has an advantage over Csound. In SC,
> > creating filterbanks, oscillator banks can be done with
> > very compact code, because of looping and arrays.)
>
> yes -- a good friend ( joe anderson -- who is teaching in
> Scarborough now -- maybe you UK
> folk have run into him?) is an ex-csound supercollider
> user -- and always cites
> oscillator banks and audio signal arrays ( he does a lot
> of work in B- format )
> as one of the reasons he uses supercollider instead.
>
> so how does supercollider handle opcode arrays?
> i can't seem to find an example..
>
>
> also i noticed a typo in my previous post and it should
> be:
>
> aBfSig arrayinit 4
> aBfFilter arrayinit 4
>
> ihp = 1000
>
> aBfSig in
> aBfFilter tone aBfSig, ihp
> out aBfFilter
>
> ; and for something more similar to Victor's original
> example, ; you could do something like:
>
> iPartials init 10
> kCps arrayinit iPartials
>
> kPitch line 20, p3, 20000
>
> kIndex = 0
> while (kIndex < iPartials)
> kCps[kIndex] = kPitch*(kIndex+1)
> endwhile
>
> aSig oscili 0dbfs/iPartials, kCps
> out aSig
>
> ; so 10 oscili's would be automatically generated
> ; and we want their outputs to be mixed into aSig
> ; ( since aSig is not an array ) -- can we assume
> ; this will always be the case?
>
>
>
>
>
> ----------------------------------------------------------
> --------------- Take Surveys. Earn Cash. Influence the
> Future of IT Join SourceForge.net's Techsay panel and
> you'll get the chance to share your opinions on IT &
> business topics through brief surveys -- and earn cash
>
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>
>
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net |