Introduction
Diogenic is a DSP language/engine. It allows you to write patches as S-expressions, and it compiles them to a performant instruction sequence.
This snippet evaluates to a simple sinusoid wave oscillating at 440Hz. Try it out!
A core idea of diogenic is modulation. We could replace 440 with a deeply nested S-expression:
Here, the frequency of the sinusoid varies between 440±110.
Notice the triangle! expression. This means the frequency will
smoothly interpolate between 330Hz and 550Hz. We could replace
it with a square oscillator instead:
Try replacing square! by sawtooth! and see what happens!
Here’s one last example:
First, let’s take a look at the declared bindings:
base:42.0, the base MIDI pitch, a Fa#2mod-freq: the frequency at which the next LFO will oscillatemod: a LFO
We use these bindings to express a sinusoid oscillator.
Its pitch oscillates between base - 6 and base + 6, so 36 and
48. We translate this MIDI pitch to a frequency with the
(midi->freq) function, and this gives us a silly-sounding patch,
Because the sinusoid frequency depends on an oscillator,
and the frequency of this oscillator also depends on an oscillator!
So that’s just a quick example of how trivial it is to express deeply modulated patches with diogenic. Please do check out the language reference and experiment!
Why use diogenic
Section titled “Why use diogenic”Diogenic is open source (licensed under GNU GPLv3) and easily extensible. It’s designed to make patches easy to read and write for humans. I believe DSP tools should never be black boxes that abstract away logic behind two or three knobs. Artists gain artistic freedom by using patches that clearly state their intent.