patchlore · @paul
699 followers · 8266 posts · Server post.lurk.org

Started some very initial work on a core C API for . It is a thin layer on top of my audio graph library that allows one to build up patches in C in a similar fashion to how it has been previously done in higher level languages.

A little boring "hello world" sine wave:

git.sr.ht/~pbatch/sndkit/tree/

More info on the core API here:

pbat.ch/sndkit/core/

#patchwerk #sndkit

Last updated 4 years ago

patchlore · @paul
699 followers · 8266 posts · Server post.lurk.org

Naturally, there are already plans to bring this into the collection, and to create a node around it for .

#monolith #patchwerk #sndkit

Last updated 4 years ago

patchlore · @paul
699 followers · 8266 posts · Server post.lurk.org

valp1 is a VA one-pole lowpass filter implemented in ANSI C: pbat.ch/sndkit/valp1/ using

It's based on the implementation found in the The Art of VA Filter design by Vadim Zavalishin, a engineer of native instruments and creator of Reaktor.

I've uploaded a sample of what it sounds like when you use it to filter noise. Because it's only 1-pole, it sounds an awful lot like gain control.

I've also ported it to a node in . Here's the code used to generate the sound:

patchwerk nodes

0.5 noise
1 1 sine 100 1000 biscale
valp1

"valp1.wav" wavout bdrop

sr 20 * _compute rep

#runt #monolith #patchwerk #dsp #literateprogramming

Last updated 4 years ago

patchlore · @paul
699 followers · 8266 posts · Server post.lurk.org

Working on a linear feedback shift register noise generator based on the NES APU specs found here: wiki.nesdev.com/w/index.php/AP

I've wrapped it into a node called bitnoise, and made a little patch to test it out (audio attached).

Here is the code that generated it:

patchwerk nodes
60 300 1 randi 5000
2 dmetro 0.5 0 maygate 0.1 port 1 20 scale
randi
1 dmetro 0.5 0 maygate bitnoise
0.1 mul
8000 butlp
"test.wav" wavout bdrop
sr 20 * _compute rep

#runt #patchwerk

Last updated 4 years ago

patchlore · @paul
699 followers · 8266 posts · Server post.lurk.org

Some impromptu textures using a processed crossfade-looped vocal sample I had laying around, and some just intonation ratios. Written using and via , with some light processing in for fades.

Code:

patchwerk nodes

"longpad.wav" loadwav 0 regset

2 0 phasor 0 regget trd
2 1.5 * 0 phasor 0 regget trd add
2 16 * 9 / 0 phasor 0 regget trd add

0.5 0 phasor 0 regget trd
0.25 0 phasor 0 regget trd add
1 0 phasor 0 regget trd add
1 5 / 1 sine 0 1 biscale mul
add

-3 ampdb mul

out

30 set_dur

write_wav

#sox #monolith #patchwerk #runt

Last updated 4 years ago

patchlore · @paul
699 followers · 8266 posts · Server post.lurk.org

This algorithm was implemented as a node, wrapped inside of a word.

The entire example patch itself is written in runt code:

patchwerk nodes

"./hclock" load

0 110 4 clock bhold 0 cabset

0 cabget 8 0 tdiv
1 10 / 1 sine 0 0.03 biscale 8 110 4 hclock
0.005 0.005 0.01 tenvx
67 mtof 0.2 bltriangle mul

0 cabget 0.005 0.005 0.01 tenvx
60 mtof 0.2 bltriangle mul
add

0 cabget 8 0 tdiv
1 10 / 1 sine 0 0.03 biscale 8 110 4 hclock
0.005 0.005 0.01 tenvx
74 mtof 0.2 bltriangle mul
add

0 cabget bunhold

"test.wav" wavout bdrop

sr 30 * _compute rep

#runt #patchwerk

Last updated 4 years ago