Skip to content

Commit

Permalink
fix: Tap Ugen samplerate compensation with BufRateScale.kr() (superco…
Browse files Browse the repository at this point in the history
…llider#5606)

* fix: Tap Ugen samplerate compensation with BufRateScale.kr()
  • Loading branch information
morfant authored and dyfer committed Nov 28, 2021
1 parent 1ad0dcb commit fede6ba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions SCClassLibrary/Common/Audio/BufIO.sc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit fede6ba

Please sign in to comment.