From fede6bacad73793df2ed7970248b7c71c13254bd Mon Sep 17 00:00:00 2001 From: morfant Date: Sun, 21 Nov 2021 10:20:53 +0900 Subject: [PATCH] fix: Tap Ugen samplerate compensation with BufRateScale.kr() (#5606) * fix: Tap Ugen samplerate compensation with BufRateScale.kr() --- SCClassLibrary/Common/Audio/BufIO.sc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SCClassLibrary/Common/Audio/BufIO.sc b/SCClassLibrary/Common/Audio/BufIO.sc index 373914c9855..feb62e47c56 100644 --- a/SCClassLibrary/Common/Audio/BufIO.sc +++ b/SCClassLibrary/Common/Audio/BufIO.sc @@ -135,9 +135,9 @@ ScopeOut2 : UGen { Tap : UGen { *ar { arg bufnum = 0, numChannels = 1, delaytime = 0.2; - var n; - n = delaytime * SampleRate.ir.neg; // this depends on the session sample rate, not buffer. - ^PlayBuf.ar(numChannels, bufnum, 1, 0, n, 1); + var scale = BufRateScale.kr(bufnum); + var n = delaytime * (SampleRate.ir.neg * scale); + ^PlayBuf.ar(numChannels, bufnum, scale, 0, n, 1); } }