SuperCollider 4: First Thoughts

The slowest part of sclang BY FAR is the garbage collector. JVM’s realtime collector is likely to be an order of magnitude more efficient than sclang’s current Baker treadmill implementation, and would probably result in both better realtime guarantees AND better overall performance for the language.

There are already scsynth clients in other languages, as well as libraries for composition / event processing / etc - I don’t think any of these would really constitute a “SuperCollider 4” - but rather just “LuaCollider” or whatever. With a critical mass of development effort, I could imagine one of these could become sophisticated enough to transition the majority of the community to it, but I don’t know of any solutions that very close.

If “SuperCollider 4” has at least some continuity with CURRENT SuperCollider - e.g. it would be possible to transition some of the class library and port existing code, even if there wasn’t 100% backwards compatibility - the best possible path forward is using graalvm and truffle to build an sclang implementation against a JVM backend. The parser-compiler-interpreter part of this is probably not even a crazy-large amount of work (though it requires some programming language expertise that’s hard to come by…).

The much bigger chunk of work would be porting all of the existing primitives (many many hundreds?), which would need to be more or less rewritten from scratch. Because a JVM port of sclang would be actually-fast, it’s likely that almost all of the primitives could be rewritten directly in sclang code with no detriment to performance, which is of course pretty fantastic. But this is still a HUGE code surface area, and would probably require large scale community participation if it ever had a chance at being finished.

The upside here is that - if sclang was ported to JVM, it would have as good or better performance than most scripting languages (graal ports of languages tend to outperform their own VM’s). This would put it waaaaay out at the front of the pack of creative programming languages - if this vision of SuperCollider 4 actually succeeded, it probably would mean a HUGE expansion in the SC capabilities and community.

It’s a cool future to imagine… I guess we just need to find a programming language / VM expert and the funding to pay for a year or two of development costs so it actually gets finished. :slight_smile:

5 Likes