Help with audio plugins

Hello everyone, I’m new to Zig and I’m enjoying it a lot. I’ve been coding for a while, but I’ve done mostly Data Science related stuff, and a little bit of C in the past, and also I’ve been making electronic music for almost 10 years as a hobby and I’ve decided that I want to write my own plugins, but I don’t really know where to start. I’m actively reading related books, but wanted to ask you guys for some tips and recommendations on what libraries to use for plugin implementation (as I’ve seen there is the CLAP library in C which I could implement, but haven’t found anything related to VSTs), what libraries to use for the GUI, what resources to read or just your experience with these kinds of things. Right now I’m trying to build an oscilloscope for a first project.
Thank you!

I believe CLAP can be used to generate VSTs, although I haven’t done it myself.

I haven’t had the stomach to follow this advice myself, so maybe it’s bad advice, but making a VST plugin in Zig without the benefit of C++ frameworks like JUCE is pretty hard mode. Not only are you working on learning DSP fundamentals, but you have to work with drawing to the screen, user input, etc etc. Maybe it might be good to start with JUCE to get a working device going and then move the code to Zig + CLAP (or whatever) to learn the lower parts of the stack?

There is at least one Zig CLAP project, and some are using DVUI for the UI.

I’ve been having lots of fun learning zig and LV2 filling gaps in zig-lv2.

zig-lv2 is a draft of a toolkit for building plugins in the LV2 format by @SuperAuguste, and has not been updated in 5 years. I have a branch that builds in 0.16 and includes a sampler example with a gui on DVUI. Compared to JUCE, this zig-lv2 is a sliver of banishing height, but does exactly what I need. I am not promoting this stuff, just noting that It has been a wonderful learning experience to understand that part of the stack. Maybe you want to do your own CLAP bindings :D.

I have lots of respect for the people making JUCE, but I get enough of it at work, for my hobby stuff it feels bloated. On the other hand LV2 is very simple. I realize, at work adding stuff to the dependency list is a boring dread, with the zig stuff I’m doing, I love my dependencies: zig, LV2, DVUI, libsndfile, fftw. I use python for sketching stuff, and an example from fellow @mwaddoups to expose the zig stuff with CPython.

For the DSP part, Faust might be interesting: https://faust.grame.fr/

JUCE is used a lot, but not everyone is happy with it, when hitting issues it gets complex to fix and bloated is some criticism.

Thanks! I will definitely look into it. Might try and implement my own CLAP binding later, sounds like a fun project :smiley:

Dvui has a pugl backend
https://codeberg.org/lv2/pugl

I’ve been working on clap-zig (Zig bindings for CLAP) and juzi (A Zig build system for JUCE audio plugins). Hope they’re helpful!

That is so cool. This list is so cool,

SDL3
SDL3GPU
SDL2
Raylib
C
DX11
GLFW
wio
OpenGL
Vulkan
pugl

Wow, this looks super cool!!

Hey there, I was in a similar situation a year or so ago.

I tried using c, for libraries - raylib, for ui - faust, for dsp - sqlite, for files, state - rtaudio and rtmidi, for audio and midi - nativefiledialog for os native file dialogs and Zig, for building, and keeping in touch with what I consider the frontier.
After studying and working full time on the project for some months I had a half-decent standalone drum synth. Did a less-than-half-decent drum machine too.
At some point, it became frustrating that I could not create a daw plugin of these tools.

Since August I started using Juce & Zig. It feels great to be able to create plugins.
It is not something that I anticipated when I was starting.
Kind regards.