From 74442b0d76eb12b3a44e824c9422aaba6b8e9eb1 Mon Sep 17 00:00:00 2001 From: Raphael Forment Date: Fri, 8 Sep 2023 13:43:43 +0200 Subject: [PATCH] documenting vibrato and removing broken slide/pitchJump mechanism --- packages/core/controls.mjs | 8 ++++++-- packages/superdough/synth.mjs | 8 +------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/packages/core/controls.mjs b/packages/core/controls.mjs index f7f029e0..f6fcc89f 100644 --- a/packages/core/controls.mjs +++ b/packages/core/controls.mjs @@ -686,6 +686,7 @@ const generic_params = [ ['rate'], // TODO: slide param for certain synths ['slide'], + ['slidespeed'], // TODO: detune? https://tidalcycles.org/docs/patternlib/tutorials/synthesizers/#supersquare ['semitone'], @@ -893,10 +894,13 @@ const generic_params = [ // ZZFX ['zrand'], ['curve'], - ['slide'], // superdirt duplicate - ['deltaSlide'], ['pitchJump'], ['pitchJumpTime'], + ['slide'], // superdirt duplicate + ['deltaSlide'], + /** + * + */ ['lfo', 'repeatTime'], ['noise'], ['zmod'], diff --git a/packages/superdough/synth.mjs b/packages/superdough/synth.mjs index 4101aaee..8a240340 100644 --- a/packages/superdough/synth.mjs +++ b/packages/superdough/synth.mjs @@ -42,8 +42,6 @@ export function registerSynthSounds() { fmwave: fmWaveform = 'sine', vib = 0, vibmod = 1, - pitchJump, - pitchJumpSpeed = 1, } = value; let { n, note, freq } = value; // with synths, n and note are the same thing @@ -63,8 +61,6 @@ export function registerSynthSounds() { freq, vib, vibmod, - pitchJump: pitchJump * freq, - pitchJumpSpeed: sustain / pitchJumpSpeed, partials: n, }); @@ -150,7 +146,7 @@ export function waveformN(partials, type) { return osc; } -export function getOscillator({ s, freq, t, vib, vibmod, pitchJump, pitchJumpSpeed, partials }) { +export function getOscillator({ s, freq, t, vib, vibmod, partials }) { // Additional oscillator for vibrato effect if (vib > 0) { var vibrato_oscillator = getAudioContext().createOscillator(); @@ -168,7 +164,6 @@ export function getOscillator({ s, freq, t, vib, vibmod, pitchJump, pitchJumpSpe if (vib > 0) { o.frequency.value = Number(freq); - 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; @@ -186,7 +181,6 @@ export function getOscillator({ s, freq, t, vib, vibmod, pitchJump, pitchJumpSpe } else { // Normal operation, without vibrato o.frequency.value = Number(freq); - slide > 0 && o.frequency.linearRampToValueAtTime(freq + slide, t + slide_speed); o.start(t); const stop = (time) => o.stop(time); return { node: o, stop };