Modualr audio synthesis library

Pixilang programming language
Posts: 5
Joined: Thu Jul 30, 2015 8:12 pm

Modualr audio synthesis library

Postby fairplay » Thu Aug 13, 2015 7:41 pm

Hi! Here is the prototype of my little library for modular audio synthesis, codename "Embe"

Sources --


Code: Select all

// Include library
include "embe.pixi"

// Create 3 oscillators
// Other oscillators types: osc_sine, osc_saw, osc_noise
// osc_noise takes only one argument -- amplitude (from 0 to 1)
$o1 = osc_sqr(220, 0.2)
$o2 = osc_sqr(293, 0.2)
$o3 = osc_sqr(330, 0.2)

// Create a mixer
$m = mix()

// Join oscillators to the mixer
j($m, $o1)
j($m, $o2)
j($m, $o3)

// Create low pass filter
// with cutoff frequency = 110Hz and resonance = 33%
$f = flt_lp(110, 33)

// Join mixer to the filter
j($f, $m)

// Run audio from our filter (filtered A-minor chord)

You can find more complex example on github, result here --

Everything is dirty, noisy, 8-bitty, without interpolations and antialiasings. And, probably, dsp-code contains some nasty errors.

It was fun to implement OOP in Pixilang.

Return to “Pixilang”

Who is online

Users browsing this forum: No registered users and 1 guest