---------------------------- Original Message ----------------------------

Subject: Re: [music-dsp] Antialiased OSC

From: "Ross Bencina" <[email protected]>

Date: Sun, August 5, 2018 12:17 am

To: [email protected]

--------------------------------------------------------------------------



> Hi Robert,

>

> On 5/08/2018 8:17 AM, robert bristow-johnson wrote:

>> In a software

>> synthetic that runs on a modern computer, the waste of memory does not

>> seem to be salient.� 4096 � 4 � 64 = 1 meg.� Thats 64 wavetables for

>> some instrument.
i meant to say "In a software synth" and the android spell-fascist insisted on 
"synthetic".


>

> The salient metric is amortized number of L1/L2/L3 cache misses per

> sample lookup.

>
that's a good point.� it's sorta one reason that the code that i posted in 
dropbox processes samples by blocks of samples.� but since the wavetables are 
so large (so that we can get away with linear interpolation between samples), 
the pointer is striding through the wavetable in
big steps.� and then there is the morphing with other wavetables that are 
stored somewhere else.
caching is complicated.� besides morphing/mixing with other wavetables in up 
to, say, 3 dimensions of control, those other wavetables can be anywhere.� i 
think it would be pretty
hard to avoid L1 cache misses (each wavetable is 16K).
i suppose the rows and columns of the wavetables can be switched so that 
samples having the same index number for each wavetable are stored interlaced 
and adjacent to each other, then mixing between the wavetables (for a single 
output
sample) would be less of a problem.� but they will still stride through the 
beginning to the end of the wavetable in just a few samples.�
i haven't thought about cache misses.� seems to me the only thing that can 
maybe help is to reorder ("reshape" in MATLAB) the array
of wavetables; grouping together samples of the same sample index in the 
waveform.� in 3-dimensional mixing, the code that i posted would mix samples 
from 8 different wavetables out of a larger constellation.� and, in the 
simple-minded "all wavetables the same size" in my
approach, (i think Nigel avoids this problem in his code), we know that in one 
output sample computation, the index is the same for all of the wavetables.� i 
just dunno what else can be done to reduce L1 cache misses.� looks like L3 
cache miss is not a
problem.
�
�

--



r b-j� � � � � � � � � � � � �[email protected]



"Imagination is more important than knowledge."

�
�
�
�
_______________________________________________
dupswapdrop: music-dsp mailing list
[email protected]
https://lists.columbia.edu/mailman/listinfo/music-dsp

Reply via email to