Home

Awesome

<div align="center"> <br /> <p> <a href="https://glicol.org"><img src="https://github.com/glicol/glicol-logo/raw/main/logo.png" width="200" /></a> </p> </div> <div align="center"> <a href="https://glicol.org" target="_blank"><img alt="website" src="https://img.shields.io/badge/website-glicol.org-blue"></a> <a href="https://glicol.js.org" target="_blank"><img alt="website" src="https://img.shields.io/badge/npm%20docs-glicol.js.org-yellow"></a> <a href="https://npmjs.com/glicol" target="_blank"><img alt="npm" src="https://img.shields.io/npm/v/glicol"></a> <a href="https://discord.gg/8tmK2bHcwa" target="_blank"><img alt="Discord" src="https://img.shields.io/discord/963514061528662046"></a> <a href="https://github.com/chaosprint/glicol/blob/main/LICENSE"><img alt="GitHub" src="https://img.shields.io/github/license/chaosprint/glicol"></a> </div>

Glicol (an acronym for "graph-oriented live coding language") is a computer music language with both its language and audio engine written in Rust programming language, a modern alternative to C/C++. Given this low-level nature, Glicol can run on many different platforms such as browsers, VST plugins and Bela board. Glicol's synth-like syntax and powerful audio engine also make it possible to combine high-level synth or sequencer control with low-level sample-accurate audio synthesis, all in real-time.

<!-- Glicol can be used for: - live coding performance, either in browsers with your friends or in a VST plugin(experimental) - education of electronic music, DSP and coding - audio/music app development in browsers, [either CDN or NPM](https://github.com/chaosprint/glicol/tree/main/js) - Rust audio library, running on Web, Desktop, [DAW](https://github.com/chaosprint/glicol/tree/main/rs/vst), [Bela](https://github.com/chaosprint/glicol/tree/main/rs/bela), etc. -->

Get started

🚀 The Web App

The easiest way to try Glicol:

https://glicol.org

There you can find guides, demos, docs, and apps for collaboration.

<details> <summary>Features</summary> </details>

🎁 For Audio Dev

Description
NPM DocsSafe, performant, light-weight and ergonomic audio lib for web apps
Rust Audio LibWrite VST like this Dattorro reverb plugin
Run on BelaRun Glicol DSL on Bela board for quick audio prototyping.

🍿 YouTube Channel

Find Glicol demo vidoes in this playlist.

Philosophy of Glicol

The motivation of Glicol is:

In NIME community, it is known as:

low entry fee and high ceilings

This is Glicol's philosophy to approach these goals:

Reflected in the implementation:

Graph-oriented

The basic idea of Glicol is to connect different nodes like synth modules.

All you need to know is the audio input/output behaviour of each node.

Two ways for connecting: >> and ~reference:

// amplitude modulation and lazy evaluation example
// chain with ~ is a ref chain and will not be sent to the DAC

o: sin 440 >> mul ~amp
~amp: sin 1.0 >> mul 0.3 >> add 0.5
<!-- Sometimes, constraints make it easier to learn and use. -->

It also applies to sequencer and sampler:

// sequencer pattern
// first divide one bar with space
// then further divide each part based on midi number and rest(_)

o: speed 2.0 >> seq 60 _~a _ 48__67
>> sp \blip

// quantity alters probability
~a: choose 60 60 0 0 72 72

As mentioned above, you can try these examples on:

https://glicol.org

If you want, you can even hear how a seq node work:

o: speed 2.0 >> seq 60 _72 _ 48__67 >> mul 0.5

This is actually analogous to how hardware module pass signals.

It is very easy to remember and to get started.

When Glicol is used in education, we can let students see and hear each node, even including 'envelope'.

Just leave the introduction of data types, Object or Function later when we mix JavaScript with Glicol.

Zero-installation

For the audio engine, instead of mapping it to existing audio lib like SuperCollider, I decide to do it the hard way:

The main reason is to explore performant audio in browsers for easy access and live coding collaboration.

The reward is that we now have an Rust audio lib called glicol_synth:

It can run on Web, Desktop, DAW, Bela board, etc.

And one more thing.

To write everything from low-level also opens the door for meta node.

Now I can explain to students, the hello world tone can also be written in this way:

o: meta `
    output.pad(128, 0.0);
    for i in 0..128 {
        output[i] = sin(2*PI()*phase) ;
        phase += 440.0 / sr;
    };
    while phase > 1.0 { phase -= 1.0 };
    output
`

Roadmap

<!-- - [ ] midi support? used in vst? --> <!-- - [ ] examples for web audio, vst, bela, etc. -->

Note that Glicol is still highly experimental, so it can be risky for live performances. The API may also change before version 1.0.0.

Please let me know in issues or discussions: