hi @thedurf18,
I can only guess, but are you using patterns in SC? Perhaps what is being referred to as “blob” is indeed a set of data—since you’re dealing with chords these data might refer to velocity, pitch, etc…
Possibly, SC is also assigning some random names to the data it is sending to TD
Sending OSC from SC is however not as easy as receiving these messages. I prepared and commented a little SC code which connects to a TD patch. The audio signals generated in SC are used to drive some parameters in TD (I have to copy-paste the SC code as part of my comment)
I hope this helps a bit, but if you could post some of your SC code and perhaps the TD patch, that could help!
Cheers
s.reboot
s.quit
//OSC sender–don't forget to set the same port in TouchDesigner
~sendOSC = NetAddr.new("127.0.0.1", 55160)
//we need a variable
~msg ="";
//eternal process–repeats forever!
(fork{
inf.do{
//packing the message (2 values, X and Y coords) into an array: OSC tag, value1, value2
~msg = ["/coords", 0.5, 0.3];
//sending that bundle over
~sendOSC.sendMsg(*~msg);
//wait 1 sec before bringing things back to origin
1.wait;
//sending values to bring the object back to origin (now with a more explicit/less bundled syntax)
~msg = ["/coords", 0.0, 0.0];
~sendOSC.sendMsg(*~msg);
//~sendOSC.sendMsg("/coords", 0.0, 0.0);
//wait another second and repeat the process
1.wait;}
};)
/**********************************A MORE COMPLEX EXAMPLE**********************************/
//create a 10-channel control bus (just bc we can, as we're not going to use all of these)
~abus = Bus.control(s, 10);
//~abus.free //just in case we mess things up and need to re-allocate the busses
//synth which is not really meant to provide meaningful audio, but rather populate of control values the busses to TouchDesigner
(SynthDef.new(\testSine, {|outVal, outValAux, audioVal, frequency = 3|
//creates a sinusoidal signal (audio rate)
outVal = SinOsc.ar(frequency) * 10;
//sawtooth signal (audio rate)
outValAux = Saw.ar(frequency/2)*1.5;
//a "dummy" sinusoidal signal just for us to make sure something is cooking (we hear a sine: all good!)
audioVal = SinOsc.ar(200);
/*we pass to our control bus an array of values, which are stored in the first 2 channels of our 10-channel bus
NOTE!! Since we're sending audio data to a control bus, the signals are automatically "converted" (downsampled) to kr*/
Out.kr(~abus, [outVal, outValAux]);
//we want to output our dummy audio signal too for aural feedback
Out.ar(0, Splay.ar(audioVal*0.2));
}).add;)
//instantiate an instance of the synth defined above
x = Synth(\testSine);
//set a super silly frequency
x.set(\frequency, 0.1);
//three useful debug methods:
~abus.getnSynchronous(2) //prints a list of the first n elements (2); synchronous
~abus.getnSynchronous(2)[1] //prints 2nd element of the returned list of n elements; synchronous
~abus.get //gets all the channels printed to the console
//we need this infinite loop/routine to send messages to TouchDesigner (as above)
(fork{
inf.do{
//we access the busses only once and store the 2 channels we know are populated into the variable (remember, it was defined at the beginning)
~msg = ~abus.getnSynchronous(2);
//send the two values as a bundled osc message
~msg = ["/audioCoord1",~msg[0], "/audioCoord2",~msg[1]];
~sendOSC.sendMsg(*~msg);
//less waiting for a smoother feeling. The sine signal should "roll" the cube; the saw one should move it to the right through a "pulse-like" movement
0.01.wait;}
};)
s.quit;
TD-SC_Connection-Slave.toe (6.1 KB)