ChuGL (sounds like "chuckle"; rhymes with "juggle") is a unified audiovisual programming framework built into the ChucK programming language. It combines ChucK's strongly-timed, concurrent programming model and real-time audio synthesis capabilities with a hardware-accelerated 3D graphics engine and API. At its core is a scenegraph architecture that provides low-latency, high performance audiovisual synchronization at frame-level accuracy.
ChuGL was created by Andrew Zhu Aday and Ge Wang, with support from the ChucK Team, and benefitted from prior prototypes of ChuGL and GLucK, respectively by Spencer Salazar and Philip Davidson.
ChuGL v0.1.0 (alpha) — ChuGL API Reference • ChuGL Examples • ChuGL Tutorial
To install ChuGL as a pre-built chugin (ChuGL.chug), visit the ChuGL homepage for download and installation instructions.
To build the latest ChuGL from source, clone the chugl
repo from github:
git clone https://github.com/ccrma/chugl.git
Compatibility note: ChuGL requires ChucK 1.5.1.5 or higher. See the chuck repo for more details regarding building ChucK.
navigate to the chugl/src
directory, and run make mac
:
cd chugl/src
make mac
This should build a ChuGL.chug
executable in build-release
, which is also copied to the chugl/src
directory. This file can be installed/used as any other chugin (e.g., install ChuGL.chug by copying it into ~/.chuck/lib
.)
To build chuck using Visual Studio (2019 or later recommended), navigate to chugl\src\
, and run make build-release
:
cd chugl/src
make build-release
This creates a CMake compatible build-release
directory with Visual Studio project files. Navigate into this directory and open ChuGL.sln
. Building this project should create ChuGL.chug
. This file can be installed/used as any other chugin (e.g., install ChuGL.chug by copying it into C:\Users\<usename>\Documents\ChucK\chugins\
.)
navigate to the chugl/src
directory, and run make linux
:
cd chugl/src
make linux
This should build a ChuGL.chug
executable in build-release
, which is also copied to the chugl/src
directory. This file can be installed/used as any other chugin (e.g., install ChuGL.chug by copying it into ~/.chuck/lib
.)
If you are on a linux system, make sure to install the dependencies that GLFW require. By default, it tries to build for both X11 and Wayland so you need both sets of dependencies. If you only want to use/install one of them, turn either GLFW_BUILD_X11 or GLFW_BUILD_WAYLAND off when calling cmake, e.g.:
# Build with only X11 support
cmake -B build -DGLFW_BUILD_WAYLAND=OFF
Note: Currently ChuGL only supports command-line chuck. MiniAudicle support to come soon.
You can run commandline ChucK with the option --chugin-probe
to check which chugins are found and properly loaded.
If the chugin is properly loaded, running the following example via commandline chuck will open a blank window. Press esc
to exit.
while (true) { GG.nextFrame() => now; }
Congrats, you now have ChuGL properly installed!