mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-15 15:48:29 +00:00
documenting vibrato and removing broken slide/pitchJump mechanism
This commit is contained in:
parent
3431803980
commit
74442b0d76
@ -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'],
|
||||
|
||||
@ -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 };
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user