Image Image Image Image Image
Scroll to Top

To Top

code

16

Jan
2014

7 Comments

In code

By admin

SuperCollider linux standalones

On 16, Jan 2014 | 7 Comments | In code | By admin

There isn’t a program for playing sound files in Linux which has the functionality that I want: fast, light, play files with any number of channels and 32bit floating-point encoded aiffs or wavs, so I decided to just code my own file player in SuperCollider. I didn’t want to have to start up SuperCollder to use the file player, I was in need of a “standalone”. Standalone is concept from OSX, which is not really use much in Linux. On OSX apps are just a folder with all the files and data inside (except some configuration files in ~/Library) while in Linux apps are usually installed system wide. Since the introduction in SuperCollider of the language configuration system via a yaml file, it’s possible to override which paths get searched for class files, and so kind of emulate standalones in linux too.

A SuperCollider standalone can then be created using the language config file, with the caveat that it has to be generated from a script in order to determine the location of the home folder, in order to disable loading the default extensions folder and class library folder. I have pushed a demo of this to github.

For quick scripts I just place

#!/usr/local/bin/sclang -l/home/miguel/bin/langconf.yaml

on top of the file and either run it from terminal or create a .desktop file for it:

So now I have a file player app ! 🙂

fileplayer-example1-1

fileplayer-example2

Tags |

Comments

  1. Interesting post! I wanted to mention that I have made a simple C library for doing sample playback with JACK on linux, if you’re interested. github.com/lightning/liblightning. I made it specifically for an application I’ve been working on called lightning, but I think it may be useful as a general-purpose tool for anyone wanting to playback audio files through JACK. Supports 32-bit fp and all formats supported by libsndfile.

  2. Hi Miguel,

    I would be very curious to look at source code of your standalone and maybe try to incorporate it to my OS X SC setup. Is source code available anywhere?

    Best,

    marcin

  3. admin

    Hi Marcin,

    The source code was linked to in the article: https://github.com/miguel-negrao/linuxStandalone

  4. The URL above (https://github.com/miguel-negrao/linuxStandalone) results in a 404 not found

  5. admin

    Yes, now that sclang has the -a option this approach is deprecated. Using -a is not enough though, paths in the yaml file should be resolved relative to path of yaml file, and that is not implemented yet in sclang. I have a prototype of that code, but haven’t shown it yet.

  6. FYI: if you check Miguels github, you’ll find this: https://github.com/miguel-negrao/scStandalone
    I guess this is the one.

    Thx a lot for putting this out there Miguel!

  7. admin

    Notice that the scStandalone repo requires using the version of SuperCollider at https://github.com/miguel-negrao/supercollider/tree/miguel/topic/projects

Submit a Comment