Discussion:
control bus in a proxyspace (how to)
paganmuzak
2014-09-26 06:53:48 UTC
Permalink
Hello everyone,
I ask again a question of my previous post in which I have not yet found a
solution.
I am trying to use a control bus with a proxyspace but with the following
code I get an error message.
Where am I wrong?
Thanks in advance

c = Bus.control(s, 24);
o = OSCFunc({ arg msg;
(msg[2].value.asString++":"++msg[3].value.asString).postln; c.setAt(msg[2],
msg[3].value)}, '/ID', nil, nil, ['0', nil, nil] );
p = ProxySpace.push();
~grano = { |freq = 0.5| SinOsc.ar(freq*1000) };
~grano.play;
~grano.map(\freq, c.index);

but I get the following error when evaluate the last line of code
(~grano.map(\freq, c.index);):

ERROR: map: not a node proxy
CALL STACK:
Exception:reportError 0x44e3830
arg this = <instance of Error>
Nil:handleError 0x453e710
arg this = nil
arg error = <instance of Error>
Thread:handleError 0x44e1250
arg this = <instance of Thread>
arg error = <instance of Error>
Object:throw 0x452d010
arg this = <instance of Error>
< FunctionDef in Method ProxyNodeMap:map > 0x54f1cb0
arg key = 'freq'
arg mapProxy = 0
var setting = nil
var numChannels = nil
Integer:forBy 0x54f0770
arg this = 0
arg endval = 0
arg stepval = 2
arg function = <instance of Function>
var i = 0
var j = 0
SequenceableCollection:pairsDo 0x54a8550
arg this = [*2]
arg function = <instance of Function>
ProxyNodeMap:map 0x5d38810
arg this = <instance of ProxyNodeMap>
arg args = [*2]
var playing = true
NodeProxy:map 0x55fc130
arg this = <instance of NodeProxy>
arg args = [*2]
var bundle = <instance of List>
Interpreter:interpretPrintCmdLine 0x44ab350
arg this = <instance of Interpreter>
var res = nil
var func = <instance of Function>
var code = "~grano.map(\freq, c.index);"
var doc = nil
var ideClass = <instance of Meta_ScIDE>
Process:interpretPrintCmdLine 0x5d30770
arg this = <instance of Main>
^^ The preceding error dump is for ERROR: map: not a node proxy



--
View this message in context: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/control-bus-in-a-proxyspace-how-to-tp7613568.html
Sent from the SuperCollider Users New (Use this!!!!) mailing list archive at Nabble.com.

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
James Harkins
2014-09-26 09:03:51 UTC
Permalink
On Thu, 25 Sep 2014 23:53:48 -0700 (PDT)
Post by paganmuzak
Hello everyone,
I ask again a question of my previous post in which I have not yet
found a solution.
I am trying to use a control bus with a proxyspace but with the
following code I get an error message.
Where am I wrong?
This appears to be a limitation of the version of JITLib that is
included with SC 3.6. NodeProxy:map expects node proxies (in fact,
BusPlug or any subclass) -- Bus objects or bus indices are not
permitted.

You'll have to use the alternate way to map a bus -- that is, *set*
(don't map) the control to the bus's mapping string:

~grano.set(\freq, c.asMap);

hjh




_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
adc
2014-09-26 09:30:24 UTC
Permalink
you can also just make a kr nodeproxy and map that, e.g.

~freq = { |freq = 300| freq };
~snd = { |freq = 100| Blip.ar(freq, 20) * 0.1; };
~snd.play;
~snd.map(\freq, ~freq);

// add some lag for smoothing later?
~freq = { |freq = 300| freq.lag(0.1) };

best
adc
Post by James Harkins
On Thu, 25 Sep 2014 23:53:48 -0700 (PDT)
Post by paganmuzak
Hello everyone,
I ask again a question of my previous post in which I have not yet
found a solution.
I am trying to use a control bus with a proxyspace but with the
following code I get an error message.
Where am I wrong?
This appears to be a limitation of the version of JITLib that is
included with SC 3.6. NodeProxy:map expects node proxies (in fact,
BusPlug or any subclass) -- Bus objects or bus indices are not
permitted.
You'll have to use the alternate way to map a bus -- that is, *set*
~grano.set(\freq, c.asMap);
hjh
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
paganmuzak
2014-09-26 13:32:43 UTC
Permalink
thank you very much for the help
Roberto



--
View this message in context: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/control-bus-in-a-proxyspace-how-to-tp7613568p7613577.html
Sent from the SuperCollider Users New (Use this!!!!) mailing list archive at Nabble.com.

_______________________________________________
sc-users mailing list

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

Loading...