Here is a testpatch for delreadsinc~ (to open you must compile the feature/delreadsinc~ branch in [2]).
If you don't want to compile Pd, I uploaded a video:

https://youtu.be/bT74Qj_zmfU



On 25.04.21 14:45, Max wrote:
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


_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


#N struct 1004-xt float x float y;
#N struct 1004-yt float x float y;
#N canvas 922 298 885 727 10;
#N canvas 2556 202 450 297 smallblock 1;
#X obj 21 25 inlet~;
#X obj 167 254 outlet~;
#X obj 71 26 inlet;
#X obj 308 60 inlet;
#X obj 313 24 block~ 1 1 1;
#X obj 20 254 delwrite~ comb 100;
#X obj 41 232 hip~ 50;
#X obj 72 181 *~ -0.999;
#X obj 168 182 *~ -0.999;
#X obj 168 61 delreadsinc~ comb;
#X obj 71 61 delread4~ comb;
#X obj 168 161 *~;
#X obj 72 157 *~;
#X obj 87 135 -;
#X msg 87 113 1 \$1;
#X obj 361 61 inlet;
#X connect 0 0 5 0;
#X connect 2 0 10 0;
#X connect 2 0 9 0;
#X connect 3 0 7 1;
#X connect 3 0 8 1;
#X connect 6 0 5 0;
#X connect 7 0 6 0;
#X connect 7 0 1 0;
#X connect 8 0 1 0;
#X connect 8 0 6 0;
#X connect 9 0 11 0;
#X connect 10 0 12 0;
#X connect 11 0 8 0;
#X connect 12 0 7 0;
#X connect 13 0 12 1;
#X connect 14 0 13 0;
#X connect 15 0 11 1;
#X connect 15 0 14 0;
#X restore 45 336 pd smallblock;
#X obj 91 71 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1
;
#X obj 337 31 loadbang;
#X floatatom 189 231 5 0 1 0 - - -;
#X floatatom 137 233 5 0 0 0 - - -;
#X obj 193 605 dac~;
#X obj 209 296 hsl 200 15 0 1 0 0 empty empty empty -2 -8 0 10 -262144
-1 -1 0 1;
#X obj 46 174 *~, f 8;
#X obj 91 138 vline~;
#X msg 91 116 0 \, 1 5 \, 0.02 50 5 \, 0 1000 55;
#X obj 333 455 helmholtz~ 1024 1;
#X floatatom 354 490 5 0 0 0 - - -;
#X text 394 490 pitch;
#N canvas 675 22 263 214 filters 0;
#X obj 47 41 inlet~;
#X obj 47 176 outlet~;
#X text 103 79 DC filter;
#X text 140 140 sibilant filter;
#X obj 125 41 inlet;
#X text 165 40 freq;
#X obj 47 80 hip~ 160;
#X obj 47 140 lp6_cheb~ 3000;
#X connect 0 0 6 0;
#X connect 4 0 7 1;
#X connect 6 0 7 0;
#X connect 7 0 1 0;
#X restore 337 424 pd filters;
#X obj 394 397 nbx 4 14 1000 3000 1 1 empty empty empty 0 -8 0 10 -262144
-1 -1 3000 256;
#X text 393 380 lo pass filter freq;
#X obj 47 137 *~ 0.5;
#X obj 648 45 r pd;
#X obj 760 105 print;
#X obj 368 246 s pd;
#X msg 539 157 48000;
#X msg 454 158 32000;
#X msg 368 158 16000;
#X msg 410 158 22050;
#X msg 496 158 44100;
#X msg 586 157 96000;
#X msg 137 207 4;
#X obj 46 114 noise~;
#X obj 648 78 route ping watchdog;
#X obj 196 512 *~;
#X obj 222 481 hsl 95 15 0 1 0 0 empty empty empty -2 -8 0 10 -262144
-1 -1 6800 1;
#X obj 25 500 audiolab/pp.spectrum~;
#X text 193 318 4-pt;
#X text 398 318 Sinc;
#X obj 91 95 metro 1500;
#X msg 189 208 -0.999;
#X obj 533 629 writesf~;
#X obj 577 574 savepanel;
#X msg 577 598 open \$1;
#X obj 577 553 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X obj 194 573 hip~ 4;
#X obj 197 542 *~ 0.6;
#X floatatom 528 310 10 0 0 0 - - -;
#X obj 528 286 samplerate~;
#X obj 527 260 r pd-dsp-started;
#X msg 368 223 audio-dialog 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 \$1 25
-1 64;
#X connect 0 0 29 0;
#X connect 0 0 31 0;
#X connect 1 0 34 0;
#X connect 2 0 35 0;
#X connect 2 0 26 0;
#X connect 2 0 1 0;
#X connect 2 0 6 0;
#X connect 3 0 0 2;
#X connect 4 0 0 1;
#X connect 6 0 0 3;
#X connect 7 0 0 0;
#X connect 8 0 7 1;
#X connect 9 0 8 0;
#X connect 10 1 11 0;
#X connect 13 0 10 0;
#X connect 14 0 13 1;
#X connect 16 0 7 0;
#X connect 17 0 28 0;
#X connect 20 0 45 0;
#X connect 21 0 45 0;
#X connect 22 0 45 0;
#X connect 23 0 45 0;
#X connect 24 0 45 0;
#X connect 25 0 45 0;
#X connect 26 0 4 0;
#X connect 27 0 16 0;
#X connect 28 2 18 0;
#X connect 29 0 41 0;
#X connect 30 0 29 1;
#X connect 34 0 9 0;
#X connect 35 0 3 0;
#X connect 37 0 38 0;
#X connect 38 0 36 0;
#X connect 39 0 37 0;
#X connect 40 0 5 0;
#X connect 40 0 5 1;
#X connect 41 0 40 0;
#X connect 43 0 42 0;
#X connect 44 0 43 0;
#X connect 45 0 19 0;
_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list

Reply via email to