[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] Bus questions



It's really pretty simple. If you have a Synth with mono output and an Out.ar
(0, output) then it goes out 0. If it's stereo it goes out 0 and 1. Quad 
0,1,2,3.

Remember the lowest audio busses are the output channels. (You can set the 
number of these as options for a Server.)

The Bus class encapsulates some of this and makes it transparent. (And 
therfore potentially misleading.

So if I have b = Bus.audio(s, 4), that reserves 4 consecutive indices. So if 
b.index is 10, then 10,11,12,13. Get it? When I say it reserves those indices 
I just mean that the Server's bus allocator won't give them out again. You can 
still do Out.ar(11, someOutput) or whatever. Creating a 4 channel Bus object 
just presumes that you're dealing with a quad output, and allows you to deal 
with a single index if you keep track of how many channels you're using. That 
really shouldn't be a problem.

Remember that multichannel outputs are Arrays. So you can do all the cool 
stuff that SC's extensive array manipulation allows you. Any method that Array 
responds to can be used on arrays of output channels. Some basic examples:

stereo = [SinOsc.ar, SinOsc.ar];

// this is the same as Out.ar(0, stereo)
Out.ar(0, stereo[0]);
Out.ar(1, stereo[1]);

// Reverse left and right
Out.ar(0, stereo[1]);
Out.ar(1, stereo[0]);

// Arbitrary outputs
Out.ar(436, stereo[0]);
Out.ar(3, stereo[1]);

// Go nuts
outs = List[];
20.do({arg i; outs.add(Out.ar(20.rand, stereo.wrapAt(i))});

or whatever...

I'll definitely make a multichannel help file.

S.

Quoting David Loehlin <dloehlin@xxxxxxxxxxxxxxxxxxx>:

> On Fri, 26 Dec 2003, travis wrote:
> 
> > I'm trying to put different effects on about six different sounds
> (drum 
> > sounds, sorry) , so I thought, simple, I'll just put each Synth on a 
> > different bus, put effect after it on same bus, and then have an In.ar
> 
> > Synth that reads all those busses and puts them on 0 (and 1?) , but it
> 
> > seems it doesn't work this way. Stereo sounds take up two busses? Is 
> > there a different way to do this?
> 
> Yeah, stereo sounds take up two busses.  
> 
> I have a couple suggestions:
> 1.  grit your teeth and keep track of how many busses you're using.  You
> could only use even-numbered busses if you're workign with stereo
> soundfiles.
> 2.  If that's a pain and you want something that's easier to remember,
> use
> busses 10, 20, 30, etc.  That should keep down most of the multichannel
> expansion.  Of course you still need to know which busses are being used
> for when you pull everything to the audio busses.
> 3.  Go mono.  Retro's big these days!  Seriously, though, what's the
> point
> of a stereo drum sample?  Though if you Mix a stereo buffer down to
> mono,
> you still need to put it on two busses. 
>  
>                              David Loehlin
> 	             dloehlin@xxxxxxxxxxxx    
> 
> 	                 Anticlimax radio:
> 		       whpk 88.5fm chicago
>   	  	   fridays eight to ten am
>         http://home.uchicago.edu/~dloehlin
> 
> 
> _______________________________________________
> sc-users mailing list
> sc-users@xxxxxxxxxxxxxxx
> http://www.create.ucsb.edu/mailman/listinfo/sc-users
>