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

[sc-dev] Re: Some 3.3 work



On 2008-12-18, Josh Parmenter wrote:
> This would BREAK any HARDCODED control indices between 0 and
> numOuptutBusses - 1.

I don't think this is a good idea at all.

The control bus scheme has been documented since the first release of
scsynth, and the documentation very clearly states:

  Synths can send control signals to each other via a single global
  array of control buses.  Buses are indexed by integers beginning
  with zero.

It's already straightforward to write a function that switches between
reading from an audio or a control bus given a switching signal.

s.boot;

{ var f = rrand(220.0, 880.0)
; var w = rrand(-1.0, 1.0)
; [f, w].postln
; s.sendMsg ("c_set", 0, f, 1, w) 
}.value

{ var offset = s.options.firstPrivateBus
; var bus_in = { arg r, i, nc
               ; var b = r > 0
               ; var k = In.kr(i, nc)
               ; var a = In.ar(i + offset, nc)
               ; (b * k) + ((1 - b) * a) }
; var switch = In.kr(1, 1)
; Out.ar(offset, LFNoise0.ar(92) * 220 + 660)
; Out.ar(0, SinOsc.ar(bus_in.value(switch, 0, 1), 0) * 0.1)
}.play


_______________________________________________
sc-dev mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-dev/
search: https://listarc.bham.ac.uk/lists/sc-dev/search/