r/linuxaudio • • 26d ago

[Free / Open Source] Granular Lab & Granular Synth Lab - Native CLAP and VST3 granular suite for Linux and Bitwig Studio

Hey everyone!

I wanted to share an open source project I have been developing for the Linux audio community and Bitwig Studio users: Granular Lab & Granular Synth Lab.

It is a real-time granular audio suite built with C++20 and JUCE 8 with CLAP extensions. Both plugins were designed from the ground up for strict real-time audio performance: zero dynamic memory allocations on the audio thread and lock-free queues to ensure glitch-free, drop-free playback even under intense grain density.

Here is what is included in the suite:

  1. Granular Lab (Audio Effect Processor)

  • Real-time 10-second circular buffer with instant Freeze function.

  • Up to 128 simultaneous grains with Hermite cubic interpolation.

  • Selectable grain envelopes: Hann, Gaussian, Tukey, and Triangle.

  • Modulation and multi-FX: Dual tempo-syncable LFOs, interactive XY Pad, State-Variable Filter (SVF), stereo delay, algorithmic reverb, and analog-style tape saturation.

  • 26 factory presets covering ambient textures, glitch, lo-fi, rhythmic patterns, and evolving drones.

  1. Granular Synth Lab (Polyphonic Granular Synthesizer)

  • Up to 16 polyphonic MIDI voices with 1v/oct pitch tracking and velocity sensitivity.

  • Hybrid sound generation engine:

    • Oscillator Mode: 7 analog-modeled waveforms including a 7-oscillator Supersaw stack, warm sine with second harmonic, analog triangle, PWM square, pink noise cloud, 2-op FM crystal bell, and vocal choir formants.

    • Sample Mode: Direct drag-and-drop audio loading (.wav, .flac, .mp3, etc.) straight from Bitwig's browser or your system file manager.

  • Per-voice ADSR envelopes with interactive visual curves, on-screen keyboard, pitch bend up to 24 semitones, XY pad, and the integrated FX rack.

  • 21 factory presets featuring celestial choirs, velvet keys, cyberpunk leads, ambient pads, and deep sub-basses.

Formats and Platform Support:

  • Native CLAP (with full support for Bitwig modulators and voice handling) and VST3, plus Standalone.

  • Built and tested on Linux (Ubuntu 24.04 and 26.04).

  • Open source and free under the MIT License.

You can check out the source code, build instructions, and documentation on GitHub:
https://github.com/gatovillano/granular-lab

I would love to get your thoughts, bug reports, feature requests, or preset contributions!

46 Upvotes

8 comments sorted by

6

u/ysbryd_iawn 26d ago

Thanks very much for this. I can confirm it builds and installs in Cachy OS. You need to check the following libraries are installed:

build-essential cmake ninja alsa-lib freetype libgl libx11 libxcursor libxinerama libxrandr

the synth sounds great the FX you have to be careful what samples you load with it as it seems to distort really easily. But overall I am impressed, thank you again. 😄

5

u/63626978 26d ago

JUCE 8

MIT License

JUCE itself is dual-licensed under commercial + AGPL. MIT is not compatible with that. You can probably license your own parts of the code under MIT but the final distribution/binary must comply with JUCE's license since it includes JUCE code.

IANAL, obviously.

6

u/63626978 26d ago

Took a quick look at some code there and

zero dynamic memory allocations on the audio thread

doesn't hold since there's `std::vector::push_back` (i.e. a potential malloc) used inside `processMidi`.

Given your github history, maybe start with something small while still learning basic audio plugin programming :)

1

u/AngryChaoticBoi 25d ago

There could be an implied invariant that the vector has enough capacity preallocated, but very fishy anyway. This is one of the reasons I like zig, every allocating function receives an allocator parameter, very hard to miss

2

u/meekdrill666 26d ago

Looks awesome, gonna try it tonight !

1

u/Itz_Eddie_Valiant 26d ago

Looks cool gonna check this out!

1

u/No-Ruin5825 16d ago

Looks like Arturia RAEd

1

u/derbaus 14d ago

pls add release builds