fix: node export
This commit is contained in:
parent
e8254735bb
commit
c9f494d865
2 changed files with 3 additions and 2 deletions
|
|
@ -150,7 +150,7 @@ class PulseOsc {
|
|||
return 2 * phase - 1 - p;
|
||||
}
|
||||
update(freq, pw = 0.5) {
|
||||
const dt = freq / sampleRate;
|
||||
const dt = freq / SAMPLE_RATE;
|
||||
let pulse = this.saw(0, dt) - this.saw(pw, dt);
|
||||
this.phase = (this.phase + dt) % 1;
|
||||
return pulse + pw * 2 - 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue