Hello everyone!
I think this would be the right place to share this project that I have been working on for a while: Onda, a new JIT-compiled audio programming language.
Onda has both native (LLVM) and web (Binaryen) backends, its own LSP server that can easily be used in vscode and neovim, a VST3 plugin, and of course a SuperCollider UGen that embeds the compiler, OndaCollider. This allows you to write very efficient, JIT-compiled, sample-by-sample code in an easy to use language on a running server. Pre-built releases are available for all platforms, and more information on how to use the OndaDef and Onda Classes are in the Help Files.
You can find the source code and pre-built releases of the Onda compiler on GitHub, or you can just try it out in your browser via the web playground. The website also contains various docs, the language guide and the example suite.
This has been a project that I have been building towards for quite a long time, starting with my previous audio DSL, omni, and I am very excited to finally share it.
Onda is still in active development and bugs are to be expected!
As an example of the language, here is how you could implement a saw oscillator processed by a resonant filter and an oversampled saturator
import std/osc
import std/filter
params:
freq = 110.0 {20.0, 880.0}
cutoff = 1200.0 {40.0, 12000.0}
resonance = 1.0 {0.1, 8.0}
drive = 1.0 {1.0, 10.0}
def soft_clip(x):
return tanh(x)
proc Saturator:
params:
amount = 1.0
sample 4:
out1 = soft_clip(in1 * amount)
init:
osc = std::osc::Saw()
filter = std::filter::Svf(cutoff = cutoff, q = resonance)
saturator = Saturator()
block:
filter.update_coeffs(cutoff, resonance)
sample:
tone = osc(freq = freq)
out1 = saturator(filter(tone), amount = drive)