Image Image Image Image Image
Scroll to Top

To Top

2014 January

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 |

09

Jan
2014

No Comments

In code

By admin

supercollider async actions with completion messages

On 09, Jan 2014 | No Comments | In code | By admin

Usually async actions in SuperCollider are dealt with the sync message. A sync message is placed in between each group of commands containing an async command which needs to run before some other future command. An alternative to the sync message is to use the completion messages. This is the mechanism used by the Request monad from hsc3-server.

Today I needed to quickly get some code going to record from the input buses of a server to a file on disk, and I decided to chain the commands via completion messages:

Tags |