1

I'm interested in using SuperCollider's various plugins within a game engine. But the FFI in my programming language (SwiftForth) only supports plain old C-language DLL files.

I know that for starters I need some kind of OSC interface. Then, SuperCollider needs to be running somehow. I don't know the details of how this could be done in a game yet.

I've also read something about a commandline interface to SuperCollider. Is that practical for what I want to do?

I am open to suggestions and alternatives, but the only non-negotiable is SwiftForth. I've already written a large amount of engine-related code and wanted to add realtime synthesis for its uniqueness and flexibility.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Roger Levy
  • 105
  • 1
  • 1
  • 9

1 Answers1

2

The most straightforward way to do it is probably to run the SuperCollider audio engine ("scsynth") in a separate process, and simply send OSC commands to it.

For an example of integration, see how the lispy "overtone" system does this - it provides its own language, but uses scsynth to generate the sound.

The "commandline interface to supercollider" that you've heard of is probably the fact that you can run "sclang" in a terminal and have an interactive sclang session without needing any GUI. You could indeed pipe commands to sclang, but in your case you don't need that, just use scsynth on its own for the plugins etc.

(Note: SuperCollider is GPL licensed. If you include scsynth as a separate process, rather than compiled into your system, then you don't need to GPL the whole thing overall if you publish it. If you compile it in, the GPL must be used for the overall package.)

Dan Stowell
  • 4,618
  • 2
  • 20
  • 30