jiggled code around...

This commit is contained in:
Weird Constructor 2021-08-05 05:48:27 +02:00
parent 820c0bd69f
commit b4d6cb1cdb

View file

@ -131,14 +131,13 @@ impl DspNode for VOsc {
if oversample { if oversample {
for frame in 0..ctx.nframes() { for frame in 0..ctx.nframes() {
let freq = denorm_offs::VOsc::freq(freq, det.read(frame), frame);
let v = denorm::VOsc::v(v, frame).clamp(0.0, 1.0);
let d = denorm::VOsc::d(d, frame).clamp(0.0, 1.0);
let vs = denorm::VOsc::vs(vs, frame).clamp(0.0, 20.0);
let overbuf = self.oversampling.resample_buffer(); let overbuf = self.oversampling.resample_buffer();
for i in 0..4 { for i in 0..4 {
let freq = denorm_offs::VOsc::freq(freq, det.read(frame), frame);
let v = denorm::VOsc::v(v, frame).clamp(0.0, 1.0);
let d = denorm::VOsc::d(d, frame).clamp(0.0, 1.0);
let vs = denorm::VOsc::vs(vs, frame).clamp(0.0, 20.0);
let s = s(phi_vps(self.phase, v + vs, d)); let s = s(phi_vps(self.phase, v + vs, d));
overbuf[i] = s; overbuf[i] = s;
@ -152,9 +151,9 @@ impl DspNode for VOsc {
} else { } else {
for frame in 0..ctx.nframes() { for frame in 0..ctx.nframes() {
let freq = denorm_offs::VOsc::freq(freq, det.read(frame), frame); let freq = denorm_offs::VOsc::freq(freq, det.read(frame), frame);
let v = denorm::VOsc::v(v, frame).clamp(0.0, 1.0); let v = denorm::VOsc::v(v, frame).clamp(0.0, 1.0);
let d = denorm::VOsc::d(d, frame).clamp(0.0, 1.0); let d = denorm::VOsc::d(d, frame).clamp(0.0, 1.0);
let vs = denorm::VOsc::vs(vs, frame).clamp(0.0, 20.0); let vs = denorm::VOsc::vs(vs, frame).clamp(0.0, 20.0);
let s = s(phi_vps(self.phase, v + vs, d)); let s = s(phi_vps(self.phase, v + vs, d));