[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-users] trying to understand multichannel expansion
- To: sc-users@xxxxxxxxxxxxxxxx
- Subject: Re: [sc-users] trying to understand multichannel expansion
- From: Justin Glenn Smith <noisesmith@xxxxxxxxx>
- Date: Fri, 25 Dec 2009 06:25:39 -0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=iyq+/UF9bOsLGHjjqqKfix7SpqEF3DtVoipMtLsrZYw=; b=PptVGGOhC/fhvgQ2LkZB8r4OMvEoIZNEx+6Gjvh4UW6G8pslr2rpUoYt4ajzRuFQlg TrYbg2ZdoksKK7Gm/zzyXPLi3Is/Xo7NTPvhm6qWnePQoobe1zVz0QnMgVHU2FgvyLHo Zg9TLWKiHaTOyklWI4hoc9ii2UhP7xLfwesuE=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=WEM+LfzE08OEA2SpOV8PxpEormXwbET/jygjVbptCGnJOkItNKRriqn4fwKg35SVCf gurhvlOFAzVNmS1HYMKsC/W1r8XCDTCJs0wOmNSjKXA0TjGhZvQTYBcaJoxTCQ/UTJ9h Z2OE3Bz+JqmQNx/Wj0zKlLYSW47PEibCKMMiA=
- In-reply-to: <4B34C42E.7010606@xxxxxxxxxxxx>
- List-id: SuperCollider users mailing list <sc-users.create.ucsb.edu>
- References: <4B34C42E.7010606@xxxxxxxxxxxx>
- Reply-to: sc-users@xxxxxxxxxxxxxxxx
- Sender: owner-sc-users@xxxxxxxxxxxxxxxx
- User-agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090706)
Jonatan Liljedahl wrote:
> First, it seems that an array inside a toplevel array does not expand
> but is mixed instead, but I can't find any note about this in the docs
> about multichannel expansion. example:
>
> {SinOsc.ar([[100,120],[105,125]],0,0.2)}.play
>
> The left channel is the sum of two sines with 100 and 120 hz, the right
> 105 and 125...
>
> But, I have a question regarding this:
>
> f={({SinOsc.ar({rrand(30.0,800)}!20,0,LFNoise1.ar(0.1,20,21)).tanh}!2)*0.05}
>
> SynthDef(\test,f).dumpUGens
>
> why is the *0.05 duplicated for each of the 40 oscillators? I was
> expecting one for each of the two output channels.
>
I think this has to do with the way multiplication by a nested array is interpreted.
[[0, 1, 2, 3], [4, 5, 6]] * 0.5;
=> [ [ 0, 0.5, 1, 1.5 ], [ 2, 2.5, 3 ] ]
A workaround is f = {({
var sig = SinOsc.ar({rrand(30.0,800)}!20,0,LFNoise1.ar(0.1,20,21)).tanh}!2);
sig*0.05}
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/