From 76051987742f2703c78fab3378fb9e6490cc65d1 Mon Sep 17 00:00:00 2001 From: Raphael Forment Date: Tue, 5 Sep 2023 11:27:42 +0200 Subject: [PATCH] parameter renaming --- packages/superdough/synth.mjs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/superdough/synth.mjs b/packages/superdough/synth.mjs index f02a1909..4101aaee 100644 --- a/packages/superdough/synth.mjs +++ b/packages/superdough/synth.mjs @@ -42,8 +42,8 @@ export function registerSynthSounds() { fmwave: fmWaveform = 'sine', vib = 0, vibmod = 1, - slide, - slide_speed = 1, + pitchJump, + pitchJumpSpeed = 1, } = value; let { n, note, freq } = value; // with synths, n and note are the same thing @@ -63,8 +63,8 @@ export function registerSynthSounds() { freq, vib, vibmod, - slide: slide * freq, - slide_speed: sustain / slide_speed, + pitchJump: pitchJump * freq, + pitchJumpSpeed: sustain / pitchJumpSpeed, partials: n, }); @@ -150,7 +150,7 @@ export function waveformN(partials, type) { return osc; } -export function getOscillator({ s, freq, t, vib, vibmod, slide, slide_speed, partials }) { +export function getOscillator({ s, freq, t, vib, vibmod, pitchJump, pitchJumpSpeed, partials }) { // Additional oscillator for vibrato effect if (vib > 0) { var vibrato_oscillator = getAudioContext().createOscillator(); @@ -168,7 +168,7 @@ export function getOscillator({ s, freq, t, vib, vibmod, slide, slide_speed, par if (vib > 0) { o.frequency.value = Number(freq); - slide > 0 && o.frequency.linearRampToValueAtTime(freq + slide, t + slide_speed); + slide > 0 && o.frequency.linearRampToValueAtTime(freq + pitchJump, t + pitchJumpSpeed); var gain = getAudioContext().createGain(); // Vibmod is the amount of vibrato, in semitones gain.gain.value = vibmod * freq;