Skip to content

Create SuperCollider packages with automatically compiled Faust plugins

License

Notifications You must be signed in to change notification settings

madskjeldgaard/faust.quark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Faust.quark

This SuperCollider package makes it possible to create SuperCollider packages (Quarks) containing plugins written in Faust code. With this, you can distribute plugins written in Faust and make it easy for others to install, compile or uninstall them. It also contains some simple interfaces for the faust and faust2sc.py commands used behind the scenes.

Prerequisites

This package requires faust version 2.40.0 or higher to work.

How to make a Faust quark with this package

If you've never made a SuperCollider package before, read this guide and/or try generating one using this cookiecutter recipe.

If you want to see a finished package that uses this method, see this example Quark.

Step 0: Add faust files to your project

This package assumes that you have .dsp faust files in your project in a folder at the root of your project called faust (if you want to change this, see the help files). Every .dsp file in this folder will be part of your installation.

Step 1: Add dependency

In your Quark folder, open up the .quark file and add this package as a dependency eg:

(
  name: "mycoolfaustplugins",
  summary: "Only the world's coolest plugins",
  version: "0.001",
  schelp: "MyCoolFaust.schelp",
  dependencies: ["https://github.com/madskjeldgaard/faust.quark"], // <----- Add Faust.quark here
  license: "GNU GPL v3.0",
  copyright: "yourname",
  ext_dependency: nil,
  url: "https://github.com/yourname/mycoolfaustplugins"
)

With this done, when people install your quark it will automatically download this package along with it.

Step 2: Create a subclass

In your Quark, create a simple class that inherits from the AbstractFaustPackage class defined in this package:

MyCoolFaust : AbstractFaustPackage {}

From now on, your users can install your plugins like this:

MyCoolFaust.install();

Or uninstall like this:

MyCoolFaust.uninstall();

Step 3 (optional): Automatically compile and install

If you want to automatically compile and install the plugins, you can do the following in your subclass:

MyCoolFaust : AbstractFaustPackage{
    *initClass{
        this.autoCompileAtStartup()
    }
}

With this, after the first class library compilation, Faust.quark will check if the plugins are installed and if not it will install them automatically.

That's it. See the help files for more information.

Installation

Open up SuperCollider and evaluate the following line of code: Quarks.install("https://github.com/madskjeldgaard/faust.quark")

About

Create SuperCollider packages with automatically compiled Faust plugins

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Sponsor this project