Cockos Incorporated Forums [Solved] If the PDC of FX oversampled by x times is not a multiple of x, the output i
 Register Search Today's Posts Mark Forums Read

 04-05-2023, 06:40 AM #1 lewloiwc Human being with feelings   Join Date: Aug 2021 Posts: 120 [Solved] If the PDC of FX oversampled by x times is not a multiple of x, the output i If the PDC of an oversampled FX by x times is not a multiple of x, the output is delayed by (PDC%x/x) spls. To be precise, when the oversampling of REAPER is 4x, PDC from 0 to 3 is actually 0, from 4 to 7 is actually 4, and from 40 to 43 is actually 40, so I think the cause is that the delay is shifted from the delay expected by the plug-in. In my estimation if the exact implementation, Code: @init pdc_delay = 1; pdc_bot_ch = 0; pdc_top_ch = 2; If this is used with 2x oversampling, the output should be 0.5 samples earlier, and if used with 4x oversampling, the output should be 0.25 samples earlier. Here is the JSFX used for verification Code: desc:_x_pdc_and_x_delay slider1:x_slider=0<0,30,1>x @init //---------------------------------------------------------------- ext_nodenorm = 1; function delay(x0,x1,mem,delay) ( delay <= 0 ? ( this.0 = x0; this.1 = x1; ) : ( this.0 = mem[this.cnt]; this.1 = mem[this.cnt + 1]; mem[this.cnt] = x0; mem[this.cnt + 1] = x1; this.cnt < delay*2 - 2 ? ( this.cnt += 2; ) : ( this.cnt = 0; ); ); ); @slider //---------------------------------------------------------------- pdc_delay = x_slider; pdc_bot_ch = 0; pdc_top_ch = 2; @sample //---------------------------------------------------------------- delay.delay(spl0,spl1,0,x_slider); spl0 = delay.0; spl1 = delay.1; Code: desc:_pdc_and_delay slider1:pdc_slider=0<0,30,1>PDC slider2:delay_slider=0<0,30,1>Delay @init //---------------------------------------------------------------- ext_nodenorm = 1; function delay(x0,x1,mem,delay) ( delay <= 0 ? ( this.0 = x0; this.1 = x1; ) : ( this.0 = mem[this.cnt]; this.1 = mem[this.cnt + 1]; mem[this.cnt] = x0; mem[this.cnt + 1] = x1; this.cnt < delay*2 - 2 ? ( this.cnt += 2; ) : ( this.cnt = 0; ); ); ); @slider //---------------------------------------------------------------- pdc_delay = pdc_slider; pdc_bot_ch = 0; pdc_top_ch = 2; @sample //---------------------------------------------------------------- delay.delay(spl0,spl1,0,delay_slider); spl0 = delay.0; spl1 = delay.1; Windows 10 Home | REAPER v6.78+dev0404/win64 Translated with www.DeepL.com/Translator (free version) Last edited by lewloiwc; 04-10-2023 at 12:42 PM. Reason: [Solved]