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

Re: [sc-users] question regarding \filter -> Function



Hi,

here is what happens:

I have a question regarding the \filter slot of a NodeProxy. I would like to do the following:


p = ProxySpace.push(s)

~f = {
    SinOsc.ar([300,1200],0,0.1)
}

now ~f is a 2chan sig, [hiSin, LoSin]

~f.play

plays to the out busses (0, 1)

//access channel 1 of the 2 channel audio stream
~f[1] = \filter -> {
    arg in;
    in[0]
}

filter puts a mixable replaceout on the signal:
'in' is the audio signal of the last stage of sources before the filter.

So, on channel 0, you replace hiSin with itself,
on channel 1, you replace nothing, so loSin stays audible.

if you want chan1 to be silent, overwrite it with silence:

~f[1] = \filter -> { arg in; [in[0], Silent.ar] }
do something with both channels (here, swap them):

~f[1] = \filter -> { arg in; in.reverse }
replace both with something else:

~f[1] = \filter -> { arg in; Decay.ar(Dust.ar([30, 30], 0.1), 0.1) }
filter both sines thru something else:

~f[1] = \filter -> { arg in; Decay.ar(Dust.ar([30, 30]), 0.1) * in.reverse }

hope that helps,
best,
a


This doesn't work; what is being played are both SinOsc's. Changing to in[1], plays the higher sinetone only. Could someone explain this behaviour, as I don't really understand what the type 'in' argument is, thus don't know how to access the audio streams independently? Just from a gut-feeling I find it quite intuitive to access the input stream as an array, like with other multichannel audio streams.

Thank you,

krgn

_______________________________________________
sc-users mailing list
sc-users@xxxxxxxxxxxxxxx
http://www.create.ucsb.edu/mailman/listinfo/sc-users


--
--
Alberto de Campo
Bergstrasse 59/33
A-8020 Graz, Austria
e-mail : decampo@xxxxxx
--