1class:: SharedIn 2summary:: Read from a shared control bus. 3related:: Classes/SharedOut 4categories:: UGens>InOut 5 6 7Description:: 8 9warning:: 10SharedIn has been deprecated. Synchronous access to busses on local servers is possible via 11link::Classes/Bus#-getSynchronous:: and link::Classes/Bus#-setSynchronous:: 12:: 13 14Reads from a control bus shared between the internal server and the SC 15client. Control rate only. Writing to a shared control bus from the 16client is synchronous. When not using the internal server use node 17arguments or the set method of Bus (or /c_set in messaging style). 18 19 20classmethods:: 21 22method::kr 23 24argument::bus 25 26The index of the shared control bus to read from. 27 28 29argument::numChannels 30 31the number of channels (i.e. adjacent buses) to read in. The 32default is 1. You cannot modulate this number by assigning it to 33an argument in a SynthDef. 34 35 36Examples:: 37 38code:: 39 40( 41// only works with the internal server 42s = Server.internal; 43s.boot; 44) 45 46( 47SynthDef("help-SharedIn1", { 48 Out.ar(0, SinOsc.ar(Lag.kr(SharedIn.kr(0, 1), 0.01), 0, 0.2)); 49}).add; 50SynthDef("help-SharedIn2", { 51 Out.ar(1, SinOsc.ar(Lag.kr(SharedIn.kr(0, 1), 0.01, 1.5), 0, 0.2)); 52}).add; 53) 54 55( 56s.setSharedControl(0, 300); // an initial value 57s.sendMsg(\s_new, "help-SharedIn1", x = s.nextNodeID, 0, 1); 58s.sendMsg(\s_new, "help-SharedIn2", y = s.nextNodeID, 0, 1); 59 60Routine({ 61 30.do({ 62 s.setSharedControl(0, 300 * (10.rand + 1)); 63 0.2.wait; 64 }); 65 s.sendMsg(\n_free, x); 66 s.sendMsg(\n_free, y); 67}).play; 68) 69 70 71s.quit; 72 73:: 74 75