/JuliaCollider

Julia's JIT compilation for low-level audio synthesis and prototyping in SuperCollider.

Primary LanguageC++GNU General Public License v3.0GPL-3.0

What is JuliaCollider?

JuliaCollider is a project that aims to bring the JIT compilation and ease of use of a high performance programming language like Julia to the SuperCollider real-time audio synthesis server.

Build from source

Requirements:

The requirements to build JuliaCollider are the same that Julia has:

  • GNU make — building dependencies.
  • gcc & g++ (>= 4.7) or Clang (>= 3.1, Xcode 4.3.3 on OS X) — compiling and linking C, C++.
  • libatomic — provided by gcc and needed to support atomic operations.
  • python (>=2.7) — needed to build LLVM.
  • gfortran — compiling and linking Fortran libraries.
  • perl — preprocessing of header files of libraries.
  • wget, curl, or fetch (FreeBSD) — to automatically download external libraries.
  • m4 — needed to build GMP.
  • awk — helper tool for Makefiles.
  • patch — for modifying source code.
  • cmake (>= 3.4.3) — needed to build libgit2.
  • pkg-config — needed to build libgit2 correctly, especially for proxy support.

Check Julia's README for additional platform specific build informations. You should ignore the Architecture Customization section.

Clone and build:

Once you have all the requirements in place, building JuliaCollider simply requires to:

  1. Clone the repository with all initialized submodules:

     git clone --recursive https://github.com/vitreo12/JuliaCollider
    
  2. Move inside the cloned repository:

     cd JuliaCollider/
    
  3. Run the build_install.sh script:

    • To see which flags are available for the script, run the help file by evaluating:

      ./build_install.sh -h
      

      Available flags are:

        [-c] [default = 4] : 
      
            - Number of cores to build Julia with.
      
        [-e] [default MacOS = ~/Library/Application\ Support/SuperCollider/Extensions]
             [default Linux = ~/.local/share/SuperCollider/Extensions] :
      
            - Your SuperCollider's "Platform.userExtensionDir" or "Platform.systemExtensionDir".
      
        [-a] [OPTIONAL] [default = native] :
      
            - Build architecture.
      
    • Once you've chosen the number of cores to build Julia with and found your SuperCollider's Extensions directory, run the script with the correct flags. This is an example of build with 8 cores, with the Extensions directory in "~/Library/Application\ Support/SuperCollider/Extensions":

      ./build_install.sh -c 8 -e ~/Library/Application\ Support/SuperCollider/Extensions
      

If the build_install.sh script gives error, you are probably missing some of Julia's required software. Make sure you have all of them installed. If they are all installed and you're still given an error, run the script again, as Julia's build, sometimes, fails in downloading all the rest of its necessary dependencies.

NOTE: As JuliaCollider uses a custom fork of Julia, which needs to be built from the ground up, the first time you'll compile JuliaCollider will take some time.

Getting started

NOTE FOR MACOS USERS: JuliaCollider only works with at least MacOS 10.10.

NOTE FOR LINUX USERS: In order to use JuliaCollider you must make sure that your distribution has pmap installed.

To get started with JuliaCollider simply navigate to the Browse section of SCIde's Help Browser. If JuliaCollider has been correctly installed in either the Platform.userExtensionDir or the Platform.systemExtensionDir, you should be able to see a JuliaCollider section which contains an overview, a series of 10 tutorials and help files for both the Julia and JuliaDef new Classes:

Refer to these help files in the SuperCollider's Document Browser to correctly setup your JuliaCollider environment.