freenode/#sicl - IRC Chatlog
Search
8:55:56
|3b|
(integrated GPUs are better at latency than dedicated, since they share memory with host)
8:56:46
no-defun-allowed
yeah, it's mostly sampling with some specific synthesis for simpler waveforms like analog synths, electric pianos and organs
8:59:25
beach
I think someone should try a scaled-up experiment with additive synthesis using Common Lisp.
9:01:35
no-defun-allowed
with your resonator x(t+1) = k x(t) - x(t-1), k = cos (2 pi f/fx), is f the sample frequency and fx the desired sample rate?
9:01:50
|3b|
https://marcan.st/2016/06/hacking-and-upgrading-the-korg-kronos/ has some interesting info on the korg, separate arm CPU for IO, 1 core of atom for synth, 1 for effects, both in kernel modules
14:50:56
beach
Initial experiment is disappointing. I implemented two versions of the oscillator, one with double floats and one with double float complex numbers. The first one requires one multiplication and one addition for each sample. The second one requires four multiplications and two additions for each sample.
14:51:03
beach
I created some abstractions, so that an oscillator is a standard object with slots for the frequency, amplitude, and the data for the sample(s). Each oscillator also has a buffer in the form of a specialized vector with 10 elements.
14:51:09
beach
A central synthesizer object asks each oscillator for 10 samples and sums them up in its own vector. Anyway, it takes 10 times as long as my calculation above. But both versions take the same time, suggesting that the entire thing is dominated by generic function dispatch and other overhead.
14:52:45
beach
I can do several things to check the hypothesis. I can do many more samples per iteration. That won't fly in a real-time situation though, so it would just be to test the hypothesis. And I can time the raw computation without the abstractions to see what max performance can be expected.
14:53:51
beach
But I need to get back to our ELS paper submissions, so this work will only be during breaks.
15:23:54
Shinmera
Not really. At the moment I use generic functions in the hot loop and it's fine for my purposes.
15:24:39
Shinmera
I experienced trouble when I tried to do everything in Lisp, especially things like sample conversion.
15:25:09
Shinmera
So my sound processing stuff has a large chunk of C stuff, much to my own dissatisfaction
15:25:47
Shinmera
But maybe I was just doing things really dumb in my first attempt and it could be done just fine in Lisp too, by someone smarter than me :)
15:39:44
beach
So with a single core, max performance is around 20μs/5ns = 4000 simultaneous oscillators of this type.