Hi list,
the 4-point interpolation in tabread4~ has been a popular topic in the
past, going back to at least 2008. [1]
A similar issue is in delread4~. In fact a simple resonator changes its
timbre quite drastically by just changing the sample rate of the audio
interface. Attached is a test patch.
The issue becomes audible when choosing an odd delay time and compare
the result between an odd and an even sample rate (e.g. 44.1k vs. 48k).
This is not good. In fact this is a serious defect. Imagine you want to
market a product like a synth plugin (based on libpd) which sounds
different depending on if the daw is opened in 44.1 or 48 kHz.
Cyrille Henry has coded tabread4c~ with a four-point cubic interpolation
in the nusmuk library, but there is no delread4c~ equivalent in nusmuk.
Clemens Wegener has coded delreadsinc~ which implements a
Whittaker–Shannon interpolation (Sinc function). This implementation
does sounds consistent in any sample rate. It also sounds much better at
very slow speeds inside a pitch shifter where delread4~ produces serious
artefacts. The Sinc function requires a larger padding for the
interpolation.
There are a couple of questions regarding on how to contribute this to Pd.
Vanilla objects are currently:
delwrite~ = the sink
delread~ = control rate tap
delread4~ (vd~) = audio rate tap with a four-point interpolation
1. the code in delwrite~ isn't agnostic towards the interpolation since
it already provides the padding for the 4 point interpolation
2. if we add more interpolation methods to delread / tabread, the
cleanest way would be to just have one tap object and the interpolation
can be changed by a message and argument to it. currently there are
implementations for the miller 4pt, cubic 4pt and Sinc.
Unfortunately delread4 already carries the 4 from 4-point interpolation
in its name, so probably it would be the best to deprecate that and find
a new name like varidelay~ or so.
[1] Review of tabread4~ threads in the archive
https://lists.puredata.info/pipermail/pd-list/2019-06/125391.html
[2] https://github.com/chairaudio/pure-data/tree/feature/delreadsinc
#N canvas 1067 617 544 348 12;
#X obj 93 39 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1
;
#X obj 93 116 vline~;
#X obj 32 255 dac~;
#X obj 93 64 metro 1500;
#X text 155 116 excitation;
#X obj 32 224 *~ 0.1;
#N canvas 2299 650 475 354 resonator 0;
#X obj 32 24 inlet~;
#X obj 211 209 outlet~;
#X obj 343 25 block~ 1 1;
#X obj 31 209 delwrite~ buf 100;
#X obj 211 98 delread4~ buf;
#X floatatom 211 33 5 0 0 0 - - -;
#X obj 211 68 sig~ 0.25;
#X obj 210 142 *~ -0.999;
#X connect 0 0 3 0;
#X connect 4 0 7 0;
#X connect 5 0 6 0;
#X connect 6 0 4 0;
#X connect 7 0 3 0;
#X connect 7 0 1 0;
#X restore 32 192 pd resonator;
#X msg 93 91 1 \, 0 2;
#X obj 31 117 noise~;
#X obj 32 158 *~;
#X text 252 47 This patch changes timbre depending on the samplerate.
With odd samplrates it sounds drastically different than with even
samplerates., f 36;
#X connect 0 0 3 0;
#X connect 1 0 9 1;
#X connect 3 0 7 0;
#X connect 5 0 2 0;
#X connect 5 0 2 1;
#X connect 6 0 5 0;
#X connect 7 0 1 0;
#X connect 8 0 9 0;
#X connect 9 0 6 0;
_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management ->
https://lists.puredata.info/listinfo/pd-list