Piping from python to supercollider?

Hey! Is there any way to get the output from a python program into supercollider?

I messed around a bit with the Pipe class, but didn’t find a way to to it yet.

Martin

are you trying to get audio from python into SC or just data?

If data, it would be easiest to simply send some messages with OSC.
Check out OSCdef in SuperCollider (http://doc.sccode.org/Classes/OSCdef.html) for receiving them and use any python OSC library you can get your hands on.

you should send messages to the SC default port of 57120 although “occasionally” that port can be different if something else is already bound to it (you can look that up by running NetAddr.langPort).

1 Like

Just data!
Thanks a lot for the tip, but I actually already did it with OSC, but encountered a problem with the max length of an OSC message. I’m sure it wouldn’t be a problem for what I’m doing now, but I wanted to see if I could do it more “under the hood”.

Do you / anybody know how I’d for instance write my own class to be able to do this?