diff --git a/.prettierignore b/.prettierignore index f4b94613..010ad28a 100644 --- a/.prettierignore +++ b/.prettierignore @@ -10,3 +10,4 @@ paper pnpm-lock.yaml pnpm-workspace.yaml **/dev-dist +website/.astro diff --git a/packages/core/controls.mjs b/packages/core/controls.mjs index d979ff23..97129779 100644 --- a/packages/core/controls.mjs +++ b/packages/core/controls.mjs @@ -234,7 +234,7 @@ const generic_params = [ * note("c3 e3").decay("<.1 .2 .3 .4>").sustain(0) * */ - ['decay'], + ['decay', 'dec'], /** * Amplitude envelope sustain level: The level which is reached after attack / decay, being sustained until the offset. * @@ -270,7 +270,7 @@ const generic_params = [ * s("bd sd,hh*3").bpf("<1000 2000 4000 8000>") * */ - [['bandf', 'bandq'], 'bpf', 'bp'], + [['bandf', 'bandq', 'bpenv'], 'bpf', 'bp'], // TODO: in tidal, it seems to be normalized /** * Sets the **b**and-**p**ass **q**-factor (resonance). @@ -481,7 +481,7 @@ const generic_params = [ * s("bd*8").lpf("1000:0 1000:10 1000:20 1000:30") * */ - [['cutoff', 'resonance'], 'ctf', 'lpf', 'lp'], + [['cutoff', 'resonance', 'lpenv'], 'ctf', 'lpf', 'lp'], /** * Sets the lowpass filter envelope modulation depth. @@ -758,7 +758,7 @@ const generic_params = [ * .vibmod("<.25 .5 1 2 12>:8") */ [['vibmod', 'vib'], 'vmod'], - [['hcutoff', 'hresonance'], 'hpf', 'hp'], + [['hcutoff', 'hresonance', 'hpenv'], 'hpf', 'hp'], /** * Controls the **h**igh-**p**ass **q**-value. * @@ -1394,10 +1394,20 @@ controls.adsr = register('adsr', (adsr, pat) => { const [attack, decay, sustain, release] = adsr; return pat.set({ attack, decay, sustain, release }); }); -controls.ds = register('ds', (ds, pat) => { - ds = !Array.isArray(ds) ? [ds] : ds; - const [decay, sustain] = ds; +controls.ad = register('ad', (t, pat) => { + t = !Array.isArray(t) ? [t] : t; + const [attack, decay = attack] = t; + return pat.attack(attack).decay(decay); +}); +controls.ds = register('ds', (t, pat) => { + t = !Array.isArray(t) ? [t] : t; + const [decay, sustain = 0] = t; return pat.set({ decay, sustain }); }); +controls.ds = register('ar', (t, pat) => { + t = !Array.isArray(t) ? [t] : t; + const [attack, release = attack] = t; + return pat.set({ attack, release }); +}); export default controls; diff --git a/packages/core/util.mjs b/packages/core/util.mjs index 6c0439b6..ef55de95 100644 --- a/packages/core/util.mjs +++ b/packages/core/util.mjs @@ -86,7 +86,7 @@ export const midi2note = (n) => { // modulo that works with negative numbers e.g. _mod(-1, 3) = 2. Works on numbers (rather than patterns of numbers, as @mod@ from pattern.mjs does) export const _mod = (n, m) => ((n % m) + m) % m; -export function nanFallback(value, fallback) { +export function nanFallback(value, fallback = 0) { if (isNaN(Number(value))) { logger(`"${value}" is not a number, falling back to ${fallback}`, 'warning'); return fallback; diff --git a/packages/soundfonts/fontloader.mjs b/packages/soundfonts/fontloader.mjs index c2f6a19c..dc3f4b61 100644 --- a/packages/soundfonts/fontloader.mjs +++ b/packages/soundfonts/fontloader.mjs @@ -1,5 +1,5 @@ import { noteToMidi, freqToMidi, getSoundIndex } from '@strudel.cycles/core'; -import { getAudioContext, registerSound, getEnvelope } from '@strudel.cycles/webaudio'; +import { getAudioContext, registerSound, getParamADSR, getADSRValues } from '@strudel.cycles/webaudio'; import gm from './gm.mjs'; let loadCache = {}; @@ -130,24 +130,33 @@ export function registerSoundfonts() { registerSound( name, async (time, value, onended) => { + const [attack, decay, sustain, release] = getADSRValues([ + value.attack, + value.decay, + value.sustain, + value.release, + ]); + + const { duration } = value; const n = getSoundIndex(value.n, fonts.length); - const { attack = 0.001, decay = 0.001, sustain = 1, release = 0.001 } = value; const font = fonts[n]; const ctx = getAudioContext(); const bufferSource = await getFontBufferSource(font, value, ctx); bufferSource.start(time); - const { node: envelope, stop: releaseEnvelope } = getEnvelope(attack, decay, sustain, release, 0.3, time); - bufferSource.connect(envelope); - const stop = (releaseTime) => { - const silentAt = releaseEnvelope(releaseTime); - bufferSource.stop(silentAt); - }; + const envGain = ctx.createGain(); + const node = bufferSource.connect(envGain); + const holdEnd = time + duration; + getParamADSR(node.gain, attack, decay, sustain, release, 0, 0.3, time, holdEnd, 'linear'); + let envEnd = holdEnd + release + 0.01; + + bufferSource.stop(envEnd); + const stop = (releaseTime) => {}; bufferSource.onended = () => { bufferSource.disconnect(); - envelope.disconnect(); + node.disconnect(); onended(); }; - return { node: envelope, stop }; + return { node, stop }; }, { type: 'soundfont', prebake: true, fonts }, ); diff --git a/packages/superdough/helpers.mjs b/packages/superdough/helpers.mjs index 9194e2bb..bee26f38 100644 --- a/packages/superdough/helpers.mjs +++ b/packages/superdough/helpers.mjs @@ -1,5 +1,5 @@ import { getAudioContext } from './superdough.mjs'; -import { clamp } from './util.mjs'; +import { clamp, nanFallback } from './util.mjs'; export function gainNode(value) { const node = getAudioContext().createGain(); @@ -7,78 +7,68 @@ export function gainNode(value) { return node; } -// alternative to getADSR returning the gain node and a stop handle to trigger the release anytime in the future -export const getEnvelope = (attack, decay, sustain, release, velocity, begin) => { - const gainNode = getAudioContext().createGain(); - let phase = begin; - gainNode.gain.setValueAtTime(0, begin); - phase += attack; - gainNode.gain.linearRampToValueAtTime(velocity, phase); // attack - phase += decay; - let sustainLevel = sustain * velocity; - gainNode.gain.linearRampToValueAtTime(sustainLevel, phase); // decay / sustain - // sustain end - return { - node: gainNode, - stop: (t) => { - // to make sure the release won't begin before sustain is reached - phase = Math.max(t, phase); - // see https://github.com/tidalcycles/strudel/issues/522 - gainNode.gain.setValueAtTime(sustainLevel, phase); - phase += release; - gainNode.gain.linearRampToValueAtTime(0, phase); // release - return phase; - }, - }; -}; - -export const getExpEnvelope = (attack, decay, sustain, release, velocity, begin) => { - sustain = Math.max(0.001, sustain); - velocity = Math.max(0.001, velocity); - const gainNode = getAudioContext().createGain(); - gainNode.gain.setValueAtTime(0.0001, begin); - gainNode.gain.exponentialRampToValueAtTime(velocity, begin + attack); - gainNode.gain.exponentialRampToValueAtTime(sustain * velocity, begin + attack + decay); - return { - node: gainNode, - stop: (t) => { - // similar to getEnvelope, this will glitch if sustain level has not been reached - gainNode.gain.exponentialRampToValueAtTime(0.0001, t + release); - }, - }; -}; - -export const getADSR = (attack, decay, sustain, release, velocity, begin, end) => { - const gainNode = getAudioContext().createGain(); - gainNode.gain.setValueAtTime(0, begin); - gainNode.gain.linearRampToValueAtTime(velocity, begin + attack); // attack - gainNode.gain.linearRampToValueAtTime(sustain * velocity, begin + attack + decay); // sustain start - gainNode.gain.setValueAtTime(sustain * velocity, end); // sustain end - gainNode.gain.linearRampToValueAtTime(0, end + release); // release - // for some reason, using exponential ramping creates little cracklings - /* let t = begin; - gainNode.gain.setValueAtTime(0, t); - gainNode.gain.exponentialRampToValueAtTime(velocity, (t += attack)); - const sustainGain = Math.max(sustain * velocity, 0.001); - gainNode.gain.exponentialRampToValueAtTime(sustainGain, (t += decay)); - if (end - begin < attack + decay) { - gainNode.gain.cancelAndHoldAtTime(end); - } else { - gainNode.gain.setValueAtTime(sustainGain, end); +const getSlope = (y1, y2, x1, x2) => { + const denom = x2 - x1; + if (denom === 0) { + return 0; } - gainNode.gain.exponentialRampToValueAtTime(0.001, end + release); // release */ - return gainNode; + return (y2 - y1) / (x2 - x1); }; +export const getParamADSR = ( + param, + attack, + decay, + sustain, + release, + min, + max, + begin, + end, + //exponential works better for frequency modulations (such as filter cutoff) due to human ear perception + curve = 'exponential', +) => { + attack = nanFallback(attack); + decay = nanFallback(decay); + sustain = nanFallback(sustain); + release = nanFallback(release); -export const getParamADSR = (param, attack, decay, sustain, release, min, max, begin, end) => { + const ramp = curve === 'exponential' ? 'exponentialRampToValueAtTime' : 'linearRampToValueAtTime'; + if (curve === 'exponential') { + min = Math.max(0.0001, min); + } const range = max - min; - const peak = min + range; - const sustainLevel = min + sustain * range; + const peak = max; + const sustainVal = min + sustain * range; + const duration = end - begin; + + const envValAtTime = (time) => { + if (attack > time) { + let slope = getSlope(min, peak, 0, attack); + return time * slope + (min > peak ? min : 0); + } else { + return (time - attack) * getSlope(peak, sustainVal, 0, decay) + peak; + } + }; + param.setValueAtTime(min, begin); - param.linearRampToValueAtTime(peak, begin + attack); - param.linearRampToValueAtTime(sustainLevel, begin + attack + decay); - param.setValueAtTime(sustainLevel, end); - param.linearRampToValueAtTime(min, end + Math.max(release, 0.1)); + if (attack > duration) { + //attack + param[ramp](envValAtTime(duration), end); + } else if (attack + decay > duration) { + //attack + param[ramp](envValAtTime(attack), begin + attack); + //decay + param[ramp](envValAtTime(duration), end); + } else { + //attack + param[ramp](envValAtTime(attack), begin + attack); + //decay + param[ramp](envValAtTime(attack + decay), begin + attack + decay); + //sustain + param.setValueAtTime(sustainVal, end); + } + //release + param[ramp](min, end + release); }; export function getCompressor(ac, threshold, ratio, knee, attack, release) { @@ -92,38 +82,44 @@ export function getCompressor(ac, threshold, ratio, knee, attack, release) { return new DynamicsCompressorNode(ac, options); } -export function createFilter( - context, - type, - frequency, - Q, - attack, - decay, - sustain, - release, - fenv, - start, - end, - fanchor = 0.5, -) { +// changes the default values of the envelope based on what parameters the user has defined +// so it behaves more like you would expect/familiar as other synthesis tools +// ex: sound(val).decay(val) will behave as a decay only envelope. sound(val).attack(val).decay(val) will behave like an "ad" env, etc. + +export const getADSRValues = (params, curve = 'linear', defaultValues) => { + const envmin = curve === 'exponential' ? 0.001 : 0.001; + const releaseMin = 0.01; + const envmax = 1; + const [a, d, s, r] = params; + if (a == null && d == null && s == null && r == null) { + return defaultValues ?? [envmin, envmin, envmax, releaseMin]; + } + const sustain = s != null ? s : (a != null && d == null) || (a == null && d == null) ? envmax : envmin; + return [Math.max(a ?? 0, envmin), Math.max(d ?? 0, envmin), Math.min(sustain, envmax), Math.max(r ?? 0, releaseMin)]; +}; + +export function createFilter(context, type, frequency, Q, att, dec, sus, rel, fenv, start, end, fanchor) { + const curve = 'exponential'; + const [attack, decay, sustain, release] = getADSRValues([att, dec, sus, rel], curve, [0.005, 0.14, 0, 0.1]); const filter = context.createBiquadFilter(); + filter.type = type; filter.Q.value = Q; filter.frequency.value = frequency; - + // envelope is active when any of these values is set + const hasEnvelope = att ?? dec ?? sus ?? rel ?? fenv; // Apply ADSR to filter frequency - if (!isNaN(fenv) && fenv !== 0) { - const offset = fenv * fanchor; - - const min = clamp(2 ** -offset * frequency, 0, 20000); - const max = clamp(2 ** (fenv - offset) * frequency, 0, 20000); - - // console.log('min', min, 'max', max); - - getParamADSR(filter.frequency, attack, decay, sustain, release, min, max, start, end); + if (hasEnvelope !== undefined) { + fenv = nanFallback(fenv, 1, true); + fanchor = nanFallback(fanchor, 0, true); + const fenvAbs = Math.abs(fenv); + const offset = fenvAbs * fanchor; + let min = clamp(2 ** -offset * frequency, 0, 20000); + let max = clamp(2 ** (fenvAbs - offset) * frequency, 0, 20000); + if (fenv < 0) [min, max] = [max, min]; + getParamADSR(filter.frequency, attack, decay, sustain, release, min, max, start, end, curve); return filter; } - return filter; } diff --git a/packages/superdough/sampler.mjs b/packages/superdough/sampler.mjs index 754ccf9b..932be995 100644 --- a/packages/superdough/sampler.mjs +++ b/packages/superdough/sampler.mjs @@ -1,6 +1,6 @@ import { noteToMidi, valueToMidi, getSoundIndex } from './util.mjs'; import { getAudioContext, registerSound } from './index.mjs'; -import { getEnvelope } from './helpers.mjs'; +import { getADSRValues, getParamADSR } from './helpers.mjs'; import { logger } from './logger.mjs'; const bufferCache = {}; // string: Promise @@ -243,6 +243,7 @@ export async function onTriggerSample(t, value, onended, bank, resolveUrl) { begin = 0, loopEnd = 1, end = 1, + duration, vib, vibmod = 0.5, } = value; @@ -254,7 +255,8 @@ export async function onTriggerSample(t, value, onended, bank, resolveUrl) { loop = s.startsWith('wt_') ? 1 : value.loop; const ac = getAudioContext(); // destructure adsr here, because the default should be different for synths and samples - const { attack = 0.001, decay = 0.001, sustain = 1, release = 0.001 } = value; + + let [attack, decay, sustain, release] = getADSRValues([value.attack, value.decay, value.sustain, value.release]); //const soundfont = getSoundfontKey(s); const time = t + nudge; @@ -298,26 +300,28 @@ export async function onTriggerSample(t, value, onended, bank, resolveUrl) { bufferSource.loopEnd = loopEnd * bufferSource.buffer.duration - offset; } bufferSource.start(time, offset); - const { node: envelope, stop: releaseEnvelope } = getEnvelope(attack, decay, sustain, release, 1, t); - bufferSource.connect(envelope); + const envGain = ac.createGain(); + const node = bufferSource.connect(envGain); + if (clip == null && loop == null && value.release == null) { + const bufferDuration = bufferSource.buffer.duration / bufferSource.playbackRate.value; + duration = (end - begin) * bufferDuration; + } + let holdEnd = t + duration; + + getParamADSR(node.gain, attack, decay, sustain, release, 0, 1, t, holdEnd, 'linear'); + const out = ac.createGain(); // we need a separate gain for the cutgroups because firefox... - envelope.connect(out); + node.connect(out); bufferSource.onended = function () { bufferSource.disconnect(); vibratoOscillator?.stop(); - envelope.disconnect(); + node.disconnect(); out.disconnect(); onended(); }; - const stop = (endTime, playWholeBuffer = clip === undefined && loop === undefined) => { - let releaseTime = endTime; - if (playWholeBuffer) { - const bufferDuration = bufferSource.buffer.duration / bufferSource.playbackRate.value; - releaseTime = t + (end - begin) * bufferDuration; - } - const silentAt = releaseEnvelope(releaseTime); - bufferSource.stop(silentAt); - }; + let envEnd = holdEnd + release + 0.01; + bufferSource.stop(envEnd); + const stop = (endTime, playWholeBuffer) => {}; const handle = { node: out, bufferSource, stop }; // cut groups diff --git a/packages/superdough/superdough.mjs b/packages/superdough/superdough.mjs index f6ce6c60..f5674f2c 100644 --- a/packages/superdough/superdough.mjs +++ b/packages/superdough/superdough.mjs @@ -280,26 +280,26 @@ export const superdough = async (value, deadline, hapDuration) => { // low pass cutoff, lpenv, - lpattack = 0.01, - lpdecay = 0.01, - lpsustain = 1, - lprelease = 0.01, + lpattack, + lpdecay, + lpsustain, + lprelease, resonance = 1, // high pass hpenv, hcutoff, - hpattack = 0.01, - hpdecay = 0.01, - hpsustain = 1, - hprelease = 0.01, + hpattack, + hpdecay, + hpsustain, + hprelease, hresonance = 1, // band pass bpenv, bandf, - bpattack = 0.01, - bpdecay = 0.01, - bpsustain = 1, - bprelease = 0.01, + bpattack, + bpdecay, + bpsustain, + bprelease, bandq = 1, channels = [1, 2], //phaser @@ -333,6 +333,7 @@ export const superdough = async (value, deadline, hapDuration) => { compressorAttack, compressorRelease, } = value; + gain = nanFallback(gain, 1); //music programs/audio gear usually increments inputs/outputs from 1, so imitate that behavior diff --git a/packages/superdough/synth.mjs b/packages/superdough/synth.mjs index 13c8b93b..6a3e381a 100644 --- a/packages/superdough/synth.mjs +++ b/packages/superdough/synth.mjs @@ -1,6 +1,6 @@ import { midiToFreq, noteToMidi } from './util.mjs'; import { registerSound, getAudioContext } from './superdough.mjs'; -import { gainNode, getEnvelope, getExpEnvelope } from './helpers.mjs'; +import { gainNode, getADSRValues, getParamADSR } from './helpers.mjs'; import { getNoiseMix, getNoiseOscillator } from './noise.mjs'; const mod = (freq, range = 1, type = 'sine') => { @@ -29,8 +29,11 @@ export function registerSynthSounds() { registerSound( s, (t, value, onended) => { - // destructure adsr here, because the default should be different for synths and samples - let { attack = 0.001, decay = 0.05, sustain = 0.6, release = 0.01 } = value; + const [attack, decay, sustain, release] = getADSRValues( + [value.attack, value.decay, value.sustain, value.release], + 'linear', + [0.001, 0.05, 0.6, 0.01], + ); let sound; if (waveforms.includes(s)) { @@ -45,21 +48,24 @@ export function registerSynthSounds() { // turn down const g = gainNode(0.3); - // gain envelope - const { node: envelope, stop: releaseEnvelope } = getEnvelope(attack, decay, sustain, release, 1, t); + const { duration } = value; o.onended = () => { o.disconnect(); g.disconnect(); onended(); }; + + const envGain = gainNode(1); + let node = o.connect(g).connect(envGain); + const holdEnd = t + duration; + getParamADSR(node.gain, attack, decay, sustain, release, 0, 1, t, holdEnd, 'linear'); + const envEnd = holdEnd + release + 0.01; + triggerRelease?.(envEnd); + stop(envEnd); return { - node: o.connect(g).connect(envelope), - stop: (releaseTime) => { - const silentAt = releaseEnvelope(releaseTime); - triggerRelease?.(releaseTime); - stop(silentAt); - }, + node, + stop: (releaseTime) => {}, }; }, { type: 'synth', prebake: true }, @@ -112,13 +118,14 @@ export function getOscillator( // fm fmh: fmHarmonicity = 1, fmi: fmModulationIndex, - fmenv: fmEnvelopeType = 'lin', + fmenv: fmEnvelopeType = 'exp', fmattack: fmAttack, fmdecay: fmDecay, fmsustain: fmSustain, fmrelease: fmRelease, fmvelocity: fmVelocity, fmwave: fmWaveform = 'sine', + duration, }, ) { let ac = getAudioContext(); @@ -148,26 +155,30 @@ export function getOscillator( o.start(t); // FM - let stopFm, fmEnvelope; + let stopFm; + let envGain = ac.createGain(); if (fmModulationIndex) { const { node: modulator, stop } = fm(o, fmHarmonicity, fmModulationIndex, fmWaveform); if (![fmAttack, fmDecay, fmSustain, fmRelease, fmVelocity].find((v) => v !== undefined)) { // no envelope by default modulator.connect(o.frequency); } else { - fmAttack = fmAttack ?? 0.001; - fmDecay = fmDecay ?? 0.001; - fmSustain = fmSustain ?? 1; - fmRelease = fmRelease ?? 0.001; - fmVelocity = fmVelocity ?? 1; - fmEnvelope = getEnvelope(fmAttack, fmDecay, fmSustain, fmRelease, fmVelocity, t); - if (fmEnvelopeType === 'exp') { - fmEnvelope = getExpEnvelope(fmAttack, fmDecay, fmSustain, fmRelease, fmVelocity, t); - fmEnvelope.node.maxValue = fmModulationIndex * 2; - fmEnvelope.node.minValue = 0.00001; - } - modulator.connect(fmEnvelope.node); - fmEnvelope.node.connect(o.frequency); + const [attack, decay, sustain, release] = getADSRValues([fmAttack, fmDecay, fmSustain, fmRelease]); + const holdEnd = t + duration; + getParamADSR( + envGain.gain, + attack, + decay, + sustain, + release, + 0, + 1, + t, + holdEnd, + fmEnvelopeType === 'exp' ? 'exponential' : 'linear', + ); + modulator.connect(envGain); + envGain.connect(o.frequency); } stopFm = stop; } @@ -199,7 +210,7 @@ export function getOscillator( o.stop(time); }, triggerRelease: (time) => { - fmEnvelope?.stop(time); + // envGain?.stop(time); }, }; } diff --git a/packages/superdough/util.mjs b/packages/superdough/util.mjs index 29eaa7bc..4e3c7e41 100644 --- a/packages/superdough/util.mjs +++ b/packages/superdough/util.mjs @@ -54,9 +54,9 @@ export const valueToMidi = (value, fallbackValue) => { return fallbackValue; }; -export function nanFallback(value, fallback) { +export function nanFallback(value, fallback = 0, silent) { if (isNaN(Number(value))) { - logger(`"${value}" is not a number, falling back to ${fallback}`, 'warning'); + !silent && logger(`"${value}" is not a number, falling back to ${fallback}`, 'warning'); return fallback; } return value; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b8b6e007..1fb74b48 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -586,6 +586,9 @@ importers: claviature: specifier: ^0.1.0 version: 0.1.0 + date-fns: + specifier: ^3.2.0 + version: 3.2.0 nanoid: specifier: ^5.0.4 version: 5.0.4 @@ -6220,6 +6223,10 @@ packages: engines: {node: '>= 12'} dev: true + /date-fns@3.2.0: + resolution: {integrity: sha512-E4KWKavANzeuusPi0jUjpuI22SURAznGkx7eZV+4i6x2A+IZxAMcajgkvuDAU1bg40+xuhW1zRdVIIM/4khuIg==} + dev: false + /dateformat@3.0.3: resolution: {integrity: sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==} dev: true diff --git a/website/.astro/types.d.ts b/website/.astro/types.d.ts new file mode 100644 index 00000000..268e956b --- /dev/null +++ b/website/.astro/types.d.ts @@ -0,0 +1,276 @@ +declare module 'astro:content' { + interface Render { + '.mdx': Promise<{ + Content: import('astro').MarkdownInstance<{}>['Content']; + headings: import('astro').MarkdownHeading[]; + remarkPluginFrontmatter: Record; + }>; + } +} + +declare module 'astro:content' { + interface Render { + '.md': Promise<{ + Content: import('astro').MarkdownInstance<{}>['Content']; + headings: import('astro').MarkdownHeading[]; + remarkPluginFrontmatter: Record; + }>; + } +} + +declare module 'astro:content' { + export { z } from 'astro/zod'; + + type Flatten = T extends { [K: string]: infer U } ? U : never; + + export type CollectionKey = keyof AnyEntryMap; + export type CollectionEntry = Flatten; + + export type ContentCollectionKey = keyof ContentEntryMap; + export type DataCollectionKey = keyof DataEntryMap; + + // This needs to be in sync with ImageMetadata + export type ImageFunction = () => import('astro/zod').ZodObject<{ + src: import('astro/zod').ZodString; + width: import('astro/zod').ZodNumber; + height: import('astro/zod').ZodNumber; + format: import('astro/zod').ZodUnion< + [ + import('astro/zod').ZodLiteral<'png'>, + import('astro/zod').ZodLiteral<'jpg'>, + import('astro/zod').ZodLiteral<'jpeg'>, + import('astro/zod').ZodLiteral<'tiff'>, + import('astro/zod').ZodLiteral<'webp'>, + import('astro/zod').ZodLiteral<'gif'>, + import('astro/zod').ZodLiteral<'svg'>, + import('astro/zod').ZodLiteral<'avif'>, + ] + >; + }>; + + type BaseSchemaWithoutEffects = + | import('astro/zod').AnyZodObject + | import('astro/zod').ZodUnion<[BaseSchemaWithoutEffects, ...BaseSchemaWithoutEffects[]]> + | import('astro/zod').ZodDiscriminatedUnion + | import('astro/zod').ZodIntersection; + + type BaseSchema = + | BaseSchemaWithoutEffects + | import('astro/zod').ZodEffects; + + export type SchemaContext = { image: ImageFunction }; + + type DataCollectionConfig = { + type: 'data'; + schema?: S | ((context: SchemaContext) => S); + }; + + type ContentCollectionConfig = { + type?: 'content'; + schema?: S | ((context: SchemaContext) => S); + }; + + type CollectionConfig = ContentCollectionConfig | DataCollectionConfig; + + export function defineCollection( + input: CollectionConfig + ): CollectionConfig; + + type AllValuesOf = T extends any ? T[keyof T] : never; + type ValidContentEntrySlug = AllValuesOf< + ContentEntryMap[C] + >['slug']; + + export function getEntryBySlug< + C extends keyof ContentEntryMap, + E extends ValidContentEntrySlug | (string & {}), + >( + collection: C, + // Note that this has to accept a regular string too, for SSR + entrySlug: E + ): E extends ValidContentEntrySlug + ? Promise> + : Promise | undefined>; + + export function getDataEntryById( + collection: C, + entryId: E + ): Promise>; + + export function getCollection>( + collection: C, + filter?: (entry: CollectionEntry) => entry is E + ): Promise; + export function getCollection( + collection: C, + filter?: (entry: CollectionEntry) => unknown + ): Promise[]>; + + export function getEntry< + C extends keyof ContentEntryMap, + E extends ValidContentEntrySlug | (string & {}), + >(entry: { + collection: C; + slug: E; + }): E extends ValidContentEntrySlug + ? Promise> + : Promise | undefined>; + export function getEntry< + C extends keyof DataEntryMap, + E extends keyof DataEntryMap[C] | (string & {}), + >(entry: { + collection: C; + id: E; + }): E extends keyof DataEntryMap[C] + ? Promise + : Promise | undefined>; + export function getEntry< + C extends keyof ContentEntryMap, + E extends ValidContentEntrySlug | (string & {}), + >( + collection: C, + slug: E + ): E extends ValidContentEntrySlug + ? Promise> + : Promise | undefined>; + export function getEntry< + C extends keyof DataEntryMap, + E extends keyof DataEntryMap[C] | (string & {}), + >( + collection: C, + id: E + ): E extends keyof DataEntryMap[C] + ? Promise + : Promise | undefined>; + + /** Resolve an array of entry references from the same collection */ + export function getEntries( + entries: { + collection: C; + slug: ValidContentEntrySlug; + }[] + ): Promise[]>; + export function getEntries( + entries: { + collection: C; + id: keyof DataEntryMap[C]; + }[] + ): Promise[]>; + + export function reference( + collection: C + ): import('astro/zod').ZodEffects< + import('astro/zod').ZodString, + C extends keyof ContentEntryMap + ? { + collection: C; + slug: ValidContentEntrySlug; + } + : { + collection: C; + id: keyof DataEntryMap[C]; + } + >; + // Allow generic `string` to avoid excessive type errors in the config + // if `dev` is not running to update as you edit. + // Invalid collection names will be caught at build time. + export function reference( + collection: C + ): import('astro/zod').ZodEffects; + + type ReturnTypeOrOriginal = T extends (...args: any[]) => infer R ? R : T; + type InferEntrySchema = import('astro/zod').infer< + ReturnTypeOrOriginal['schema']> + >; + + type ContentEntryMap = { + "blog": { +"release-0.0.2-schwindlig.mdx": { + id: "release-0.0.2-schwindlig.mdx"; + slug: "release-002-schwindlig"; + body: string; + collection: "blog"; + data: InferEntrySchema<"blog"> +} & { render(): Render[".mdx"] }; +"release-0.0.2.1-stuermisch.mdx": { + id: "release-0.0.2.1-stuermisch.mdx"; + slug: "release-0021-stuermisch"; + body: string; + collection: "blog"; + data: InferEntrySchema<"blog"> +} & { render(): Render[".mdx"] }; +"release-0.0.3-maelstrom.mdx": { + id: "release-0.0.3-maelstrom.mdx"; + slug: "release-003-maelstrom"; + body: string; + collection: "blog"; + data: InferEntrySchema<"blog"> +} & { render(): Render[".mdx"] }; +"release-0.0.4-gischt.mdx": { + id: "release-0.0.4-gischt.mdx"; + slug: "release-004-gischt"; + body: string; + collection: "blog"; + data: InferEntrySchema<"blog"> +} & { render(): Render[".mdx"] }; +"release-0.3.0-donauwelle.mdx": { + id: "release-0.3.0-donauwelle.mdx"; + slug: "release-030-donauwelle"; + body: string; + collection: "blog"; + data: InferEntrySchema<"blog"> +} & { render(): Render[".mdx"] }; +"release-0.4.0-brandung.mdx": { + id: "release-0.4.0-brandung.mdx"; + slug: "release-040-brandung"; + body: string; + collection: "blog"; + data: InferEntrySchema<"blog"> +} & { render(): Render[".mdx"] }; +"release-0.5.0-wirbel.mdx": { + id: "release-0.5.0-wirbel.mdx"; + slug: "release-050-wirbel"; + body: string; + collection: "blog"; + data: InferEntrySchema<"blog"> +} & { render(): Render[".mdx"] }; +"release-0.6.0-zimtschnecke.mdx": { + id: "release-0.6.0-zimtschnecke.mdx"; + slug: "release-060-zimtschnecke"; + body: string; + collection: "blog"; + data: InferEntrySchema<"blog"> +} & { render(): Render[".mdx"] }; +"release-0.7.0-zuckerguss.mdx": { + id: "release-0.7.0-zuckerguss.mdx"; + slug: "release-070-zuckerguss"; + body: string; + collection: "blog"; + data: InferEntrySchema<"blog"> +} & { render(): Render[".mdx"] }; +"release-0.8.0-himbeermuffin.mdx": { + id: "release-0.8.0-himbeermuffin.mdx"; + slug: "release-080-himbeermuffin"; + body: string; + collection: "blog"; + data: InferEntrySchema<"blog"> +} & { render(): Render[".mdx"] }; +"release-0.9.0-bananenbrot.mdx": { + id: "release-0.9.0-bananenbrot.mdx"; + slug: "release-090-bananenbrot"; + body: string; + collection: "blog"; + data: InferEntrySchema<"blog"> +} & { render(): Render[".mdx"] }; +}; + + }; + + type DataEntryMap = { + + }; + + type AnyEntryMap = ContentEntryMap & DataEntryMap; + + type ContentConfig = typeof import("../src/content/config"); +} diff --git a/website/database.types.ts b/website/database.types.ts new file mode 100644 index 00000000..152742b4 --- /dev/null +++ b/website/database.types.ts @@ -0,0 +1,120 @@ +// generated with https://supabase.com/docs/reference/javascript/typescript-support#generating-typescript-types +export type Json = string | number | boolean | null | { [key: string]: Json | undefined } | Json[]; + +export interface Database { + public: { + Tables: { + code: { + Row: { + code: string | null; + created_at: string | null; + featured: boolean | null; + hash: string | null; + id: number; + public: boolean | null; + }; + Insert: { + code?: string | null; + created_at?: string | null; + featured?: boolean | null; + hash?: string | null; + id?: number; + public?: boolean | null; + }; + Update: { + code?: string | null; + created_at?: string | null; + featured?: boolean | null; + hash?: string | null; + id?: number; + public?: boolean | null; + }; + Relationships: []; + }; + }; + Views: { + [_ in never]: never; + }; + Functions: { + [_ in never]: never; + }; + Enums: { + [_ in never]: never; + }; + CompositeTypes: { + [_ in never]: never; + }; + }; +} + +export type Tables< + PublicTableNameOrOptions extends + | keyof (Database['public']['Tables'] & Database['public']['Views']) + | { schema: keyof Database }, + TableName extends PublicTableNameOrOptions extends { schema: keyof Database } + ? keyof (Database[PublicTableNameOrOptions['schema']]['Tables'] & + Database[PublicTableNameOrOptions['schema']]['Views']) + : never = never, +> = PublicTableNameOrOptions extends { schema: keyof Database } + ? (Database[PublicTableNameOrOptions['schema']]['Tables'] & + Database[PublicTableNameOrOptions['schema']]['Views'])[TableName] extends { + Row: infer R; + } + ? R + : never + : PublicTableNameOrOptions extends keyof (Database['public']['Tables'] & Database['public']['Views']) + ? (Database['public']['Tables'] & Database['public']['Views'])[PublicTableNameOrOptions] extends { + Row: infer R; + } + ? R + : never + : never; + +export type TablesInsert< + PublicTableNameOrOptions extends keyof Database['public']['Tables'] | { schema: keyof Database }, + TableName extends PublicTableNameOrOptions extends { schema: keyof Database } + ? keyof Database[PublicTableNameOrOptions['schema']]['Tables'] + : never = never, +> = PublicTableNameOrOptions extends { schema: keyof Database } + ? Database[PublicTableNameOrOptions['schema']]['Tables'][TableName] extends { + Insert: infer I; + } + ? I + : never + : PublicTableNameOrOptions extends keyof Database['public']['Tables'] + ? Database['public']['Tables'][PublicTableNameOrOptions] extends { + Insert: infer I; + } + ? I + : never + : never; + +export type TablesUpdate< + PublicTableNameOrOptions extends keyof Database['public']['Tables'] | { schema: keyof Database }, + TableName extends PublicTableNameOrOptions extends { schema: keyof Database } + ? keyof Database[PublicTableNameOrOptions['schema']]['Tables'] + : never = never, +> = PublicTableNameOrOptions extends { schema: keyof Database } + ? Database[PublicTableNameOrOptions['schema']]['Tables'][TableName] extends { + Update: infer U; + } + ? U + : never + : PublicTableNameOrOptions extends keyof Database['public']['Tables'] + ? Database['public']['Tables'][PublicTableNameOrOptions] extends { + Update: infer U; + } + ? U + : never + : never; + +export type Enums< + PublicEnumNameOrOptions extends keyof Database['public']['Enums'] | { schema: keyof Database }, + EnumName extends PublicEnumNameOrOptions extends { schema: keyof Database } + ? keyof Database[PublicEnumNameOrOptions['schema']]['Enums'] + : never = never, +> = PublicEnumNameOrOptions extends { schema: keyof Database } + ? Database[PublicEnumNameOrOptions['schema']]['Enums'][EnumName] + : PublicEnumNameOrOptions extends keyof Database['public']['Enums'] + ? Database['public']['Enums'][PublicEnumNameOrOptions] + : never; diff --git a/website/package.json b/website/package.json index a324821b..0f1e1e8a 100644 --- a/website/package.json +++ b/website/package.json @@ -48,6 +48,7 @@ "astro": "^4.0.8", "canvas": "^2.11.2", "claviature": "^0.1.0", + "date-fns": "^3.2.0", "nanoid": "^5.0.4", "nanostores": "^0.9.5", "react": "^18.2.0", diff --git a/website/src/components/BlogPost.astro b/website/src/components/BlogPost.astro new file mode 100644 index 00000000..b5b82680 --- /dev/null +++ b/website/src/components/BlogPost.astro @@ -0,0 +1,27 @@ +--- +import type { CollectionEntry } from 'astro:content'; + +type Props = CollectionEntry<'blog'>['data']; + +const { post } = Astro.props; +const { Content } = await post.render(); +import { format } from 'date-fns'; +--- + +
+
+
+

{post.data.title}

+
+

+ +

+
+
+ +
+
diff --git a/website/src/components/BlogVideo.astro b/website/src/components/BlogVideo.astro new file mode 100644 index 00000000..e9112fda --- /dev/null +++ b/website/src/components/BlogVideo.astro @@ -0,0 +1,5 @@ +--- +const { src } = Astro.props; +--- + + diff --git a/website/src/components/Header/Header.astro b/website/src/components/Header/Header.astro index 6447d9d6..cbc91ca0 100644 --- a/website/src/components/Header/Header.astro +++ b/website/src/components/Header/Header.astro @@ -9,7 +9,7 @@ import MobileNav from '../../docs/MobileNav'; import { SIDEBAR } from '../../config'; type Props = { - currentPage: string; + currentPage?: string; }; const { currentPage } = Astro.props as Props; diff --git a/website/src/components/PageContent/PageContent.astro b/website/src/components/PageContent/PageContent.astro index 9c433945..c53053af 100644 --- a/website/src/components/PageContent/PageContent.astro +++ b/website/src/components/PageContent/PageContent.astro @@ -1,18 +1,11 @@ --- -import type { Frontmatter } from '../../config'; import MoreMenu from '../RightSidebar/MoreMenu.astro'; -import TableOfContents from '../RightSidebar/TableOfContents'; -import type { MarkdownHeading } from 'astro'; type Props = { - frontmatter: Frontmatter; - headings: MarkdownHeading[]; - githubEditUrl: string; + githubEditUrl?: string; }; -const { frontmatter, headings, githubEditUrl } = Astro.props as Props; -const title = frontmatter.title; -const currentPage = Astro.url.pathname; +const { githubEditUrl } = Astro.props as Props; ---
diff --git a/website/src/components/RightSidebar/MoreMenu.astro b/website/src/components/RightSidebar/MoreMenu.astro index 1cf1c4e5..5205c9c5 100644 --- a/website/src/components/RightSidebar/MoreMenu.astro +++ b/website/src/components/RightSidebar/MoreMenu.astro @@ -2,7 +2,7 @@ import * as CONFIG from '../../config'; type Props = { - editHref: string; + editHref?: string; }; const { editHref } = Astro.props as Props; diff --git a/website/src/components/RightSidebar/RightSidebar.astro b/website/src/components/RightSidebar/RightSidebar.astro index ba193d24..cd501b1a 100644 --- a/website/src/components/RightSidebar/RightSidebar.astro +++ b/website/src/components/RightSidebar/RightSidebar.astro @@ -6,7 +6,7 @@ import AvatarList from '../Footer/AvatarList.astro'; type Props = { headings: MarkdownHeading[]; - githubEditUrl: string; + githubEditUrl?: string; }; const { headings, githubEditUrl } = Astro.props as Props; diff --git a/website/src/components/Showcase.jsx b/website/src/components/Showcase.jsx index bbdf7785..e4e624a9 100644 --- a/website/src/components/Showcase.jsx +++ b/website/src/components/Showcase.jsx @@ -36,6 +36,13 @@ export function Showcase() { } let _videos = [ + { title: 'Coding Music With Strudel Workhop by Dan Gorelick and Viola He', id: 'oqyAJ4WeKoU' }, + { title: 'Hexe - playing w strudel live coding music', id: '03m3F5xVOMg' }, + { title: 'DJ_Dave - Array [Lil Data Edit]', id: 'KUujFuTcuKc' }, + { title: 'DJ_Dave - Bitrot [v10101a Edit]', id: 'z_cJMdBp67Q' }, + { title: 'you will not steve reich your way out of it', id: 'xpILnXcWyuo' }, + { title: 'dough dream #1 - strudel jam 12/03/23', id: 'p0J7XrT9JEs' }, + { title: 'eddyflux & superdirtspatz at the dough cathedral', id: 'GrkwKMQ7_Ys' }, // solstice 2023 { title: 'Jade Rose @ solstice stream 2023', id: 'wg0vW5Ac7L0' }, { diff --git a/website/src/config.ts b/website/src/config.ts index fc904bfa..effc593c 100644 --- a/website/src/config.ts +++ b/website/src/config.ts @@ -57,6 +57,7 @@ export const SIDEBAR: Sidebar = { Presentation: [ { text: 'What is Strudel?', link: 'workshop/getting-started' }, { text: 'Showcase', link: 'intro/showcase' }, + { text: 'Blog', link: 'blog' }, ], Workshop: [ // { text: 'Getting Started', link: 'workshop/getting-started' }, diff --git a/website/src/content/blog/release-0.0.2-schwindlig.mdx b/website/src/content/blog/release-0.0.2-schwindlig.mdx new file mode 100644 index 00000000..b65ff98f --- /dev/null +++ b/website/src/content/blog/release-0.0.2-schwindlig.mdx @@ -0,0 +1,40 @@ +--- +title: 'Release Notes v0.0.2 Schwindlig' +description: '' +date: '2022-03-28' +tags: ['meta'] +author: froos +--- + +## What's Changed + +- Most work done as [commits to main](https://github.com/tidalcycles/strudel/commits/2a0d8c3f77ff7b34e82602e2d02400707f367316) +- repl + reify functions by @felixroos in https://github.com/tidalcycles/strudel/pull/2 +- Fix path by @yaxu in https://github.com/tidalcycles/strudel/pull/3 +- update readme for local dev by @kindohm in https://github.com/tidalcycles/strudel/pull/4 +- Patternify all the things by @yaxu in https://github.com/tidalcycles/strudel/pull/5 +- krill parser + improved repl by @felixroos in https://github.com/tidalcycles/strudel/pull/6 +- fixed editor crash by @felixroos in https://github.com/tidalcycles/strudel/pull/7 +- timeCat by @yaxu in https://github.com/tidalcycles/strudel/pull/8 +- Bugfix every, and create more top level functions by @yaxu in https://github.com/tidalcycles/strudel/pull/9 +- Failing test for `when` WIP by @yaxu in https://github.com/tidalcycles/strudel/pull/10 +- Added mask() and struct() by @yaxu in https://github.com/tidalcycles/strudel/pull/11 +- Add continuous signals (sine, cosine, saw, etc) by @yaxu in https://github.com/tidalcycles/strudel/pull/13 +- add apply and layer, and missing div/mul methods by @yaxu in https://github.com/tidalcycles/strudel/pull/15 +- higher latencyHint by @felixroos in https://github.com/tidalcycles/strudel/pull/16 +- test: 📦 Add missing dependency and a CI check, to prevent oversights ;p by @puria in https://github.com/tidalcycles/strudel/pull/17 +- fix: 💄 Enhance visualisation of the Tutorial on mobile by @puria in https://github.com/tidalcycles/strudel/pull/19 +- Stateful queries and events (WIP) by @yaxu in https://github.com/tidalcycles/strudel/pull/14 +- Fix resolveState by @yaxu in https://github.com/tidalcycles/strudel/pull/22 +- added \_asNumber + interprete numbers as midi by @felixroos in https://github.com/tidalcycles/strudel/pull/21 +- Update package.json by @ChiakiUehira in https://github.com/tidalcycles/strudel/pull/23 +- packaging by @felixroos in https://github.com/tidalcycles/strudel/pull/24 + +## New Contributors + +- @felixroos made their first contribution in https://github.com/tidalcycles/strudel/pull/2 +- @kindohm made their first contribution in https://github.com/tidalcycles/strudel/pull/4 +- @puria made their first contribution in https://github.com/tidalcycles/strudel/pull/17 +- @ChiakiUehira made their first contribution in https://github.com/tidalcycles/strudel/pull/23 + +**Full Changelog**: https://github.com/tidalcycles/strudel/commits/2a0d8c3f77ff7b34e82602e2d02400707f367316 diff --git a/website/src/content/blog/release-0.0.2.1-stuermisch.mdx b/website/src/content/blog/release-0.0.2.1-stuermisch.mdx new file mode 100644 index 00000000..3824bd6b --- /dev/null +++ b/website/src/content/blog/release-0.0.2.1-stuermisch.mdx @@ -0,0 +1,53 @@ +--- +title: 'Release Notes v0.0.3 Stürmisch' +date: '2022-05-20' +tags: ['meta'] +author: froos +--- + +## What's Changed + +- Add chunk, chunkBack and iterBack by @yaxu in https://github.com/tidalcycles/strudel/pull/25 +- Update tutorial.mdx by @bwagner in https://github.com/tidalcycles/strudel/pull/37 +- Update tutorial.mdx by @bwagner in https://github.com/tidalcycles/strudel/pull/38 +- Compose by @felixroos in https://github.com/tidalcycles/strudel/pull/40 +- Fix polymeter by @yaxu in https://github.com/tidalcycles/strudel/pull/44 +- First run at squeezeBind, ref #32 by @yaxu in https://github.com/tidalcycles/strudel/pull/48 +- Implement `chop()` by @yaxu in https://github.com/tidalcycles/strudel/pull/50 +- OSC and SuperDirt support by @yaxu in https://github.com/tidalcycles/strudel/pull/27 +- More functions by @yaxu in https://github.com/tidalcycles/strudel/pull/56 +- More functions by @yaxu in https://github.com/tidalcycles/strudel/pull/61 +- Separate out strudel.mjs, make index.mjs aggregate module by @yaxu in https://github.com/tidalcycles/strudel/pull/62 +- Speech output by @felixroos in https://github.com/tidalcycles/strudel/pull/67 +- use new fixed version of osc-js package by @felixroos in https://github.com/tidalcycles/strudel/pull/68 +- First effort at rand() by @yaxu in https://github.com/tidalcycles/strudel/pull/69 +- More randomness, fix `rand`, and add `brand`, `irand` and `choose` by @yaxu in https://github.com/tidalcycles/strudel/pull/70 +- webaudio package by @felixroos in https://github.com/tidalcycles/strudel/pull/26 +- Port `perlin` noise, `rangex`, and `palindrome` by @yaxu in https://github.com/tidalcycles/strudel/pull/73 +- More random functions by @yaxu in https://github.com/tidalcycles/strudel/pull/74 +- Try to fix appLeft / appRight by @yaxu in https://github.com/tidalcycles/strudel/pull/75 +- Basic webserial support by @yaxu in https://github.com/tidalcycles/strudel/pull/80 +- Webaudio in REPL by @felixroos in https://github.com/tidalcycles/strudel/pull/77 +- add `striate()` by @yaxu in https://github.com/tidalcycles/strudel/pull/76 +- Tidy up a couple of old files by @mindofmatthew in https://github.com/tidalcycles/strudel/pull/84 +- Add pattern composers, implements #82 by @yaxu in https://github.com/tidalcycles/strudel/pull/83 +- Fiddles with cat/stack by @yaxu in https://github.com/tidalcycles/strudel/pull/90 +- Paper by @felixroos in https://github.com/tidalcycles/strudel/pull/98 +- Change to Affero GPL by @yaxu in https://github.com/tidalcycles/strudel/pull/101 +- Work on Codemirror 6 highlighting by @mindofmatthew in https://github.com/tidalcycles/strudel/pull/102 +- Codemirror 6 by @felixroos in https://github.com/tidalcycles/strudel/pull/97 +- Tune tests by @felixroos in https://github.com/tidalcycles/strudel/pull/104 +- /embed package: web component for repl by @felixroos in https://github.com/tidalcycles/strudel/pull/106 +- Reset, Restart and other composers by @felixroos in https://github.com/tidalcycles/strudel/pull/88 +- Embed style by @felixroos in https://github.com/tidalcycles/strudel/pull/109 +- In source doc by @yaxu in https://github.com/tidalcycles/strudel/pull/105 +- `.brak()`, `.inside()` and `.outside()` by @yaxu in https://github.com/tidalcycles/strudel/pull/112 +- loopAt by @yaxu in https://github.com/tidalcycles/strudel/pull/114 +- Osc timing improvements by @yaxu in https://github.com/tidalcycles/strudel/pull/113 + +## New Contributors + +- @bwagner made their first contribution in https://github.com/tidalcycles/strudel/pull/37 +- @mindofmatthew made their first contribution in https://github.com/tidalcycles/strudel/pull/84 + +**Full Changelog**: https://github.com/tidalcycles/strudel/compare/v0.0.2...@strudel.cycles/core@0.1.0 diff --git a/website/src/content/blog/release-0.0.3-maelstrom.mdx b/website/src/content/blog/release-0.0.3-maelstrom.mdx new file mode 100644 index 00000000..542412d8 --- /dev/null +++ b/website/src/content/blog/release-0.0.3-maelstrom.mdx @@ -0,0 +1,66 @@ +--- +title: 'Release Notes v0.0.3 Maelstrom' +description: '' +date: '2022-06-18' +tags: ['meta'] +author: froos +--- + +## What's Changed + +- Add chunk, chunkBack and iterBack by @yaxu in https://github.com/tidalcycles/strudel/pull/25 +- Update tutorial.mdx by @bwagner in https://github.com/tidalcycles/strudel/pull/37 +- Update tutorial.mdx by @bwagner in https://github.com/tidalcycles/strudel/pull/38 +- Compose by @felixroos in https://github.com/tidalcycles/strudel/pull/40 +- Fix polymeter by @yaxu in https://github.com/tidalcycles/strudel/pull/44 +- First run at squeezeBind, ref #32 by @yaxu in https://github.com/tidalcycles/strudel/pull/48 +- Implement `chop()` by @yaxu in https://github.com/tidalcycles/strudel/pull/50 +- OSC and SuperDirt support by @yaxu in https://github.com/tidalcycles/strudel/pull/27 +- More functions by @yaxu in https://github.com/tidalcycles/strudel/pull/56 +- More functions by @yaxu in https://github.com/tidalcycles/strudel/pull/61 +- Separate out strudel.mjs, make index.mjs aggregate module by @yaxu in https://github.com/tidalcycles/strudel/pull/62 +- Speech output by @felixroos in https://github.com/tidalcycles/strudel/pull/67 +- use new fixed version of osc-js package by @felixroos in https://github.com/tidalcycles/strudel/pull/68 +- First effort at rand() by @yaxu in https://github.com/tidalcycles/strudel/pull/69 +- More randomness, fix `rand`, and add `brand`, `irand` and `choose` by @yaxu in https://github.com/tidalcycles/strudel/pull/70 +- webaudio package by @felixroos in https://github.com/tidalcycles/strudel/pull/26 +- Port `perlin` noise, `rangex`, and `palindrome` by @yaxu in https://github.com/tidalcycles/strudel/pull/73 +- More random functions by @yaxu in https://github.com/tidalcycles/strudel/pull/74 +- Try to fix appLeft / appRight by @yaxu in https://github.com/tidalcycles/strudel/pull/75 +- Basic webserial support by @yaxu in https://github.com/tidalcycles/strudel/pull/80 +- Webaudio in REPL by @felixroos in https://github.com/tidalcycles/strudel/pull/77 +- add `striate()` by @yaxu in https://github.com/tidalcycles/strudel/pull/76 +- Tidy up a couple of old files by @mindofmatthew in https://github.com/tidalcycles/strudel/pull/84 +- Add pattern composers, implements #82 by @yaxu in https://github.com/tidalcycles/strudel/pull/83 +- Fiddles with cat/stack by @yaxu in https://github.com/tidalcycles/strudel/pull/90 +- Paper by @felixroos in https://github.com/tidalcycles/strudel/pull/98 +- Change to Affero GPL by @yaxu in https://github.com/tidalcycles/strudel/pull/101 +- Work on Codemirror 6 highlighting by @mindofmatthew in https://github.com/tidalcycles/strudel/pull/102 +- Codemirror 6 by @felixroos in https://github.com/tidalcycles/strudel/pull/97 +- Tune tests by @felixroos in https://github.com/tidalcycles/strudel/pull/104 +- /embed package: web component for repl by @felixroos in https://github.com/tidalcycles/strudel/pull/106 +- Reset, Restart and other composers by @felixroos in https://github.com/tidalcycles/strudel/pull/88 +- Embed style by @felixroos in https://github.com/tidalcycles/strudel/pull/109 +- In source doc by @yaxu in https://github.com/tidalcycles/strudel/pull/105 +- `.brak()`, `.inside()` and `.outside()` by @yaxu in https://github.com/tidalcycles/strudel/pull/112 +- loopAt by @yaxu in https://github.com/tidalcycles/strudel/pull/114 +- Osc timing improvements by @yaxu in https://github.com/tidalcycles/strudel/pull/113 +- react package + vite build by @felixroos in https://github.com/tidalcycles/strudel/pull/116 +- In source doc by @felixroos in https://github.com/tidalcycles/strudel/pull/117 +- fix: #108 by @felixroos in https://github.com/tidalcycles/strudel/pull/123 +- fix: #122 ctrl enter would add newline by @felixroos in https://github.com/tidalcycles/strudel/pull/124 +- Webdirt by @felixroos in https://github.com/tidalcycles/strudel/pull/121 +- Fix link to contributing to tutorial docs by @stephendwolff in https://github.com/tidalcycles/strudel/pull/129 +- Pianoroll enhancements by @felixroos in https://github.com/tidalcycles/strudel/pull/131 +- add createParam + createParams by @felixroos in https://github.com/tidalcycles/strudel/pull/110 +- remove cycle + delta from onTrigger by @felixroos in https://github.com/tidalcycles/strudel/pull/135 +- Scheduler improvements by @felixroos in https://github.com/tidalcycles/strudel/pull/134 +- add onTrigger helper by @felixroos in https://github.com/tidalcycles/strudel/pull/136 + +## New Contributors + +- @bwagner made their first contribution in https://github.com/tidalcycles/strudel/pull/37 +- @mindofmatthew made their first contribution in https://github.com/tidalcycles/strudel/pull/84 +- @stephendwolff made their first contribution in https://github.com/tidalcycles/strudel/pull/129 + +**Full Changelog**: https://github.com/tidalcycles/strudel/compare/v0.0.2...v0.0.3 diff --git a/website/src/content/blog/release-0.0.4-gischt.mdx b/website/src/content/blog/release-0.0.4-gischt.mdx new file mode 100644 index 00000000..83b831a7 --- /dev/null +++ b/website/src/content/blog/release-0.0.4-gischt.mdx @@ -0,0 +1,45 @@ +--- +title: 'Release Notes v0.0.4 Gischt' +description: '' +date: '2022-08-14' +tags: ['meta'] +author: froos +--- + +## What's Changed + +- Webaudio rewrite by @felixroos in https://github.com/tidalcycles/strudel/pull/138 +- Fix createParam() by @yaxu in https://github.com/tidalcycles/strudel/pull/140 +- Soundfont Support by @felixroos in https://github.com/tidalcycles/strudel/pull/139 +- Serial twiddles by @yaxu in https://github.com/tidalcycles/strudel/pull/141 +- Pianoroll Object Support by @felixroos in https://github.com/tidalcycles/strudel/pull/142 +- flash effect on ctrl enter by @felixroos in https://github.com/tidalcycles/strudel/pull/144 +- can now generate short link for sharing by @felixroos in https://github.com/tidalcycles/strudel/pull/146 +- Sampler optimizations and more by @felixroos in https://github.com/tidalcycles/strudel/pull/148 +- Final update to demo.pdf by @yaxu in https://github.com/tidalcycles/strudel/pull/151 +- add webdirt drum samples to prebake for general availability by @larkob in https://github.com/tidalcycles/strudel/pull/150 +- update to tutorial documentation by @larkob in https://github.com/tidalcycles/strudel/pull/162 +- add chooseInWith/chooseCycles by @yaxu in https://github.com/tidalcycles/strudel/pull/166 +- fix: jsdoc comments by @felixroos in https://github.com/tidalcycles/strudel/pull/169 +- Pianoroll fixes by @felixroos in https://github.com/tidalcycles/strudel/pull/163 +- Talk fixes by @felixroos in https://github.com/tidalcycles/strudel/pull/164 +- Amend shapeshifter to allow use of dynamic import by @debrisapron in https://github.com/tidalcycles/strudel/pull/171 +- add more shapeshifter flags by @felixroos in https://github.com/tidalcycles/strudel/pull/99 +- Replace react-codemirror6 with @uiw/react-codemirror by @felixroos in https://github.com/tidalcycles/strudel/pull/173 +- fix some annoying bugs by @felixroos in https://github.com/tidalcycles/strudel/pull/177 +- incorporate elements of randomness to the mini notation by @bpow in https://github.com/tidalcycles/strudel/pull/165 +- replace mocha with vitest by @felixroos in https://github.com/tidalcycles/strudel/pull/175 +- scheduler improvements by @felixroos in https://github.com/tidalcycles/strudel/pull/181 +- Fix codemirror bug by @felixroos in https://github.com/tidalcycles/strudel/pull/186 +- wait for prebake to finish before evaluating by @felixroos in https://github.com/tidalcycles/strudel/pull/189 +- fix regression: old way of setting frequencies was broken by @felixroos in https://github.com/tidalcycles/strudel/pull/190 +- Soundfont file support by @felixroos in https://github.com/tidalcycles/strudel/pull/183 +- change "stride"/"offset" of successive degradeBy/chooseIn by @bpow in https://github.com/tidalcycles/strudel/pull/185 + +## New Contributors + +- @larkob made their first contribution in https://github.com/tidalcycles/strudel/pull/150 +- @debrisapron made their first contribution in https://github.com/tidalcycles/strudel/pull/171 +- @bpow made their first contribution in https://github.com/tidalcycles/strudel/pull/165 + +**Full Changelog**: https://github.com/tidalcycles/strudel/compare/v0.0.3...v0.0.4 diff --git a/website/src/content/blog/release-0.3.0-donauwelle.mdx b/website/src/content/blog/release-0.3.0-donauwelle.mdx new file mode 100644 index 00000000..70dba0e6 --- /dev/null +++ b/website/src/content/blog/release-0.3.0-donauwelle.mdx @@ -0,0 +1,65 @@ +--- +title: 'Release Notes v0.3.0 Donauwelle' +description: '' +date: '2022-11-06' +tags: ['meta'] +author: froos +--- + +## Package Versions + +- @strudel.cycles/core@0.3.1 +- @strudel.cycles/eval@0.3.1 +- @strudel.cycles/midi@0.3.1 +- @strudel.cycles/mini@0.3.1 +- @strudel.cycles/react@0.3.1 +- @strudel.cycles/soundfonts@0.3.1 +- @strudel.cycles/tonal@0.3.1 +- @strudel.cycles/tone@0.3.1 +- @strudel.cycles/webaudio@0.3.1 +- @strudel.cycles/webdirt@0.3.1 +- @strudel.cycles/xen@0.3.1 + +## What's Changed + +- Fix numbers in sampler by @felixroos in https://github.com/tidalcycles/strudel/pull/196 +- document random functions by @felixroos in https://github.com/tidalcycles/strudel/pull/199 +- add rollup-plugin-visualizer to build by @felixroos in https://github.com/tidalcycles/strudel/pull/200 +- add vowel to .out by @felixroos in https://github.com/tidalcycles/strudel/pull/201 +- Coarse crush shape by @felixroos in https://github.com/tidalcycles/strudel/pull/205 +- Webaudio guide by @felixroos in https://github.com/tidalcycles/strudel/pull/207 +- Even more docs by @felixroos in https://github.com/tidalcycles/strudel/pull/212 +- Just another docs PR by @felixroos in https://github.com/tidalcycles/strudel/pull/215 +- sampler features + fixes by @felixroos in https://github.com/tidalcycles/strudel/pull/217 +- samples now have envelopes by @felixroos in https://github.com/tidalcycles/strudel/pull/218 +- encapsulate webaudio output by @felixroos in https://github.com/tidalcycles/strudel/pull/219 +- Fix squeeze join by @yaxu in https://github.com/tidalcycles/strudel/pull/220 +- Feedback Delay by @felixroos in https://github.com/tidalcycles/strudel/pull/213 +- support negative speeds by @felixroos in https://github.com/tidalcycles/strudel/pull/222 +- focus tweak for squeezeJoin - another go at fixing #216 by @yaxu in https://github.com/tidalcycles/strudel/pull/221 +- Reverb by @felixroos in https://github.com/tidalcycles/strudel/pull/224 +- fix fastgap for events that go across cycle boundaries by @yaxu in https://github.com/tidalcycles/strudel/pull/225 +- Core util tests by @mystery-house in https://github.com/tidalcycles/strudel/pull/226 +- Refactor tunes away from tone by @felixroos in https://github.com/tidalcycles/strudel/pull/230 +- Just another docs branch by @felixroos in https://github.com/tidalcycles/strudel/pull/228 +- Patternify range by @yaxu in https://github.com/tidalcycles/strudel/pull/231 +- Out by default by @felixroos in https://github.com/tidalcycles/strudel/pull/232 +- Fix zero length queries WIP by @yaxu in https://github.com/tidalcycles/strudel/pull/234 +- add vcsl sample library by @felixroos in https://github.com/tidalcycles/strudel/pull/235 +- fx on stereo speakers by @felixroos in https://github.com/tidalcycles/strudel/pull/236 +- Tidal drum machines by @felixroos in https://github.com/tidalcycles/strudel/pull/237 +- Object arithmetic by @felixroos in https://github.com/tidalcycles/strudel/pull/238 +- Load samples from url by @felixroos in https://github.com/tidalcycles/strudel/pull/239 +- feat: support github: links by @felixroos in https://github.com/tidalcycles/strudel/pull/240 +- in source example tests by @felixroos in https://github.com/tidalcycles/strudel/pull/242 +- Readme + TLC by @felixroos in https://github.com/tidalcycles/strudel/pull/244 +- patchday by @felixroos in https://github.com/tidalcycles/strudel/pull/246 +- Some tunes by @felixroos in https://github.com/tidalcycles/strudel/pull/247 +- snapshot tests on shared snippets by @felixroos in https://github.com/tidalcycles/strudel/pull/243 +- General purpose scheduler by @felixroos in https://github.com/tidalcycles/strudel/pull/248 + +## New Contributors + +- @mystery-house made their first contribution in https://github.com/tidalcycles/strudel/pull/226 + +**Full Changelog**: https://github.com/tidalcycles/strudel/compare/v0.0.4...v0.3.0 diff --git a/website/src/content/blog/release-0.4.0-brandung.mdx b/website/src/content/blog/release-0.4.0-brandung.mdx new file mode 100644 index 00000000..56a1d2e2 --- /dev/null +++ b/website/src/content/blog/release-0.4.0-brandung.mdx @@ -0,0 +1,15 @@ +--- +title: 'Release Notes v0.4.0 Brandung' +description: '' +date: '2022-11-13' +tags: ['meta'] +author: froos +--- + +## What's Changed + +- new transpiler based on acorn by @felixroos in https://github.com/tidalcycles/strudel/pull/249 +- Webaudio build by @felixroos in https://github.com/tidalcycles/strudel/pull/250 +- Repl refactoring by @felixroos in https://github.com/tidalcycles/strudel/pull/255 + +**Full Changelog**: https://github.com/tidalcycles/strudel/compare/v0.3.0...v0.4.0 diff --git a/website/src/content/blog/release-0.5.0-wirbel.mdx b/website/src/content/blog/release-0.5.0-wirbel.mdx new file mode 100644 index 00000000..7d04f0d2 --- /dev/null +++ b/website/src/content/blog/release-0.5.0-wirbel.mdx @@ -0,0 +1,59 @@ +--- +title: 'Release Notes v0.5.0 Wirbel' +description: '' +date: '2022-12-13' +tags: ['meta'] +author: froos +--- + +## Package Versions + +- @strudel.cycles/core@0.5.0 +- @strudel.cycles/osc@0.4.0 +- @strudel.cycles/serial@0.3.0 +- @strudel.cycles/csound@0.5.1 +- @strudel.cycles/eval@0.5.0 +- @strudel.cycles/midi@0.5.0 +- @strudel.cycles/mini@0.5.0 +- @strudel.cycles/react@0.5.0 +- @strudel.cycles/soundfonts@0.5.0 +- @strudel.cycles/tonal@0.5.0 +- @strudel.cycles/tone@0.5.0 +- @strudel.cycles/transpiler@0.5.0 +- @strudel.cycles/webaudio@0.5.0 +- @strudel.cycles/webdirt@0.5.0 +- @strudel.cycles/xen@0.5.0 + +## What's Changed + +- Binaries by @felixroos in https://github.com/tidalcycles/strudel/pull/254 +- fix tutorial bugs by @felixroos in https://github.com/tidalcycles/strudel/pull/263 +- fix performance bottleneck by @felixroos in https://github.com/tidalcycles/strudel/pull/266 +- Tidying up core by @yaxu in https://github.com/tidalcycles/strudel/pull/256 +- tonal update with fixed memory leak by @felixroos in https://github.com/tidalcycles/strudel/pull/272 +- add eslint by @felixroos in https://github.com/tidalcycles/strudel/pull/271 +- release version bumps by @felixroos in https://github.com/tidalcycles/strudel/pull/273 +- Support sending CRC16 bytes with serial messages by @yaxu in https://github.com/tidalcycles/strudel/pull/276 +- add licenses / credits to all tunes + remove some by @felixroos in https://github.com/tidalcycles/strudel/pull/277 +- add basic csound output by @felixroos in https://github.com/tidalcycles/strudel/pull/275 +- do not recompile orc by @felixroos in https://github.com/tidalcycles/strudel/pull/278 +- implement collect + arp function by @felixroos in https://github.com/tidalcycles/strudel/pull/281 +- Switch 'operators' from .whatHow to .what.how by @yaxu in https://github.com/tidalcycles/strudel/pull/285 +- Fancy hap show, include part in snapshots by @yaxu in https://github.com/tidalcycles/strudel/pull/291 +- Reorganise pattern.mjs with a 'toplevel first' regime by @yaxu in https://github.com/tidalcycles/strudel/pull/286 +- add prettier task by @felixroos in https://github.com/tidalcycles/strudel/pull/296 +- Move stuff to new register function by @felixroos in https://github.com/tidalcycles/strudel/pull/295 +- can now add bare numbers to numeral object props by @felixroos in https://github.com/tidalcycles/strudel/pull/287 +- update vitest by @felixroos in https://github.com/tidalcycles/strudel/pull/297 +- remove whitespace from highlighted region by @felixroos in https://github.com/tidalcycles/strudel/pull/298 +- .defragmentHaps() for merging touching haps that share a whole and value by @yaxu in https://github.com/tidalcycles/strudel/pull/299 +- fix whitespace trimming by @felixroos in https://github.com/tidalcycles/strudel/pull/300 +- add freq support to sampler by @felixroos in https://github.com/tidalcycles/strudel/pull/301 +- add lint + prettier check before test by @felixroos in https://github.com/tidalcycles/strudel/pull/305 +- Updated csoundm to use the register facility . by @gogins in https://github.com/tidalcycles/strudel/pull/303 + +## New Contributors + +- @gogins made their first contribution in https://github.com/tidalcycles/strudel/pull/303 + +**Full Changelog**: https://github.com/tidalcycles/strudel/compare/v0.4.0...v0.5.0 diff --git a/website/src/content/blog/release-0.6.0-zimtschnecke.mdx b/website/src/content/blog/release-0.6.0-zimtschnecke.mdx new file mode 100644 index 00000000..ee6353d3 --- /dev/null +++ b/website/src/content/blog/release-0.6.0-zimtschnecke.mdx @@ -0,0 +1,84 @@ +--- +title: 'Release Notes v0.6.0 Zimtschnecke' +description: '' +date: '2023-02-01' +tags: ['meta'] +author: froos +--- + +## Package Versions + +- @strudel.cycles/core@0.6.8 +- @strudel.cycles/eval@0.6.2 +- @strudel.cycles/transpiler@0.6.0 +- @strudel.cycles/mini@0.6.0 +- @strudel.cycles/tonal@0.6.0 +- @strudel.cycles/tone@0.6.0 +- @strudel.cycles/xen@0.6.0 +- @strudel.cycles/webaudio@0.6.1 +- @strudel.cycles/react@0.6.0 +- @strudel.cycles/osc@0.6.0 +- @strudel.cycles/midi@0.6.0 +- @strudel.cycles/webdirt@0.6.0 +- @strudel.cycles/serial@0.6.0 +- @strudel.cycles/soundfonts@0.6.0 +- @strudel.cycles/csound@0.6.0 + +## What's Changed + +- support freq in pianoroll by @felixroos in https://github.com/tidalcycles/strudel/pull/308 +- ICLC2023 paper WIP by @yaxu in https://github.com/tidalcycles/strudel/pull/306 +- fix: copy share link to clipboard was broken for some browers by @felixroos in https://github.com/tidalcycles/strudel/pull/311 +- Jsdoc component by @felixroos in https://github.com/tidalcycles/strudel/pull/312 +- object support for .scale by @felixroos in https://github.com/tidalcycles/strudel/pull/307 +- Astro build by @felixroos in https://github.com/tidalcycles/strudel/pull/315 +- Reference tab sort by @felixroos in https://github.com/tidalcycles/strudel/pull/318 +- tutorial updates by @jarmitage in https://github.com/tidalcycles/strudel/pull/320 +- support notes without octave by @felixroos in https://github.com/tidalcycles/strudel/pull/323 +- mini repl improvements by @felixroos in https://github.com/tidalcycles/strudel/pull/324 +- fix: workaround Object.assign globalThis by @felixroos in https://github.com/tidalcycles/strudel/pull/326 +- add examples route by @felixroos in https://github.com/tidalcycles/strudel/pull/327 +- add my-patterns by @felixroos in https://github.com/tidalcycles/strudel/pull/328 +- my-patterns build + deploy by @felixroos in https://github.com/tidalcycles/strudel/pull/329 +- my-patterns: fix paths + update readme by @felixroos in https://github.com/tidalcycles/strudel/pull/330 +- improve displaying 's' in pianoroll by @felixroos in https://github.com/tidalcycles/strudel/pull/331 +- fix: can now multiply floats in mini notation by @felixroos in https://github.com/tidalcycles/strudel/pull/332 +- Embed mode improvements by @felixroos in https://github.com/tidalcycles/strudel/pull/333 +- testing + docs docs by @felixroos in https://github.com/tidalcycles/strudel/pull/334 +- animate mvp by @felixroos in https://github.com/tidalcycles/strudel/pull/335 +- Tidy parser, implement polymeters by @yaxu in https://github.com/tidalcycles/strudel/pull/336 +- animation options by @felixroos in https://github.com/tidalcycles/strudel/pull/337 +- move /my-patterns to /swatch by @yaxu in https://github.com/tidalcycles/strudel/pull/338 +- more animate functions + mini repl fix by @felixroos in https://github.com/tidalcycles/strudel/pull/340 +- Patternify euclid, fast, slow and polymeter step parameters in mininotation by @yaxu in https://github.com/tidalcycles/strudel/pull/341 +- fixes #346 by @felixroos in https://github.com/tidalcycles/strudel/pull/347 +- Fix prebake base path by @felixroos in https://github.com/tidalcycles/strudel/pull/345 +- Fix Bjorklund by @yaxu in https://github.com/tidalcycles/strudel/pull/343 +- docs: tidal comparison + add global fx + add missing sampler fx by @felixroos in https://github.com/tidalcycles/strudel/pull/356 +- Fix .out(), renaming webaudio's out() to webaudio() by @yaxu in https://github.com/tidalcycles/strudel/pull/361 +- Support for multiple mininotation operators by @yaxu in https://github.com/tidalcycles/strudel/pull/350 +- doc structuring by @felixroos in https://github.com/tidalcycles/strudel/pull/360 +- add https to url by @urswilke in https://github.com/tidalcycles/strudel/pull/364 +- document more functions + change arp join by @felixroos in https://github.com/tidalcycles/strudel/pull/369 +- improve new draw logic by @felixroos in https://github.com/tidalcycles/strudel/pull/372 +- Draw fixes by @felixroos in https://github.com/tidalcycles/strudel/pull/377 +- update my-patterns instructions by @felixroos in https://github.com/tidalcycles/strudel/pull/384 +- docs: use note instead of n to mitigate confusion by @felixroos in https://github.com/tidalcycles/strudel/pull/385 +- add run + test + docs by @felixroos in https://github.com/tidalcycles/strudel/pull/386 +- Rename a to angle by @felixroos in https://github.com/tidalcycles/strudel/pull/387 +- document csound by @felixroos in https://github.com/tidalcycles/strudel/pull/391 +- Notes are not essential :) by @yaxu in https://github.com/tidalcycles/strudel/pull/393 +- add ribbon + test + docs by @felixroos in https://github.com/tidalcycles/strudel/pull/388 +- Add tidal-drum-patterns to examples by @urswilke in https://github.com/tidalcycles/strudel/pull/379 +- add pattern methods hurry, press and pressBy by @yaxu in https://github.com/tidalcycles/strudel/pull/397 +- proper builds + use pnpm workspaces by @felixroos in https://github.com/tidalcycles/strudel/pull/396 +- fix: minirepl styles by @felixroos in https://github.com/tidalcycles/strudel/pull/398 +- can now await initAudio + initAudioOnFirstClick by @felixroos in https://github.com/tidalcycles/strudel/pull/399 +- release webaudio by @felixroos in https://github.com/tidalcycles/strudel/pull/400 + +## New Contributors + +- @jarmitage made their first contribution in https://github.com/tidalcycles/strudel/pull/320 +- @urswilke made their first contribution in https://github.com/tidalcycles/strudel/pull/364 + +**Full Changelog**: https://github.com/tidalcycles/strudel/compare/v0.5.0...v0.6.0 diff --git a/website/src/content/blog/release-0.7.0-zuckerguss.mdx b/website/src/content/blog/release-0.7.0-zuckerguss.mdx new file mode 100644 index 00000000..1d810cb2 --- /dev/null +++ b/website/src/content/blog/release-0.7.0-zuckerguss.mdx @@ -0,0 +1,88 @@ +--- +title: 'Release Notes v0.7.0 Zimtschnecke' +description: '' +date: '2023-03-23' +tags: ['meta'] +author: froos +--- + +## Package Versions + +- @strudel.cycles/core@0.7.2 +- @strudel.cycles/transpiler@0.7.1 +- @strudel.cycles/mini@0.7.2 +- @strudel.cycles/tonal@0.7.1 +- @strudel.cycles/xen@0.7.1 +- @strudel.cycles/tone@0.7.1 +- @strudel.cycles/webaudio@0.7.1 +- @strudel.cycles/react@0.7.1 +- @strudel.cycles/osc@0.7.1 +- @strudel.cycles/serial@0.7.1 +- @strudel.cycles/midi@0.7.1 +- @strudel.cycles/csound@0.7.1 + +## What's Changed + +- pin @csound/browser to 6.18.3 + bump by @felixroos in https://github.com/tidalcycles/strudel/pull/403 +- update csound + fix sound output by @felixroos in https://github.com/tidalcycles/strudel/pull/404 +- fix: share url on subpath by @felixroos in https://github.com/tidalcycles/strudel/pull/405 +- add shabda doc by @felixroos in https://github.com/tidalcycles/strudel/pull/407 +- Update effects.mdx by @bwagner in https://github.com/tidalcycles/strudel/pull/410 +- improve effects doc by @felixroos in https://github.com/tidalcycles/strudel/pull/409 +- google gtfo by @felixroos in https://github.com/tidalcycles/strudel/pull/413 +- improve samples doc by @felixroos in https://github.com/tidalcycles/strudel/pull/411 +- PWA with offline support by @felixroos in https://github.com/tidalcycles/strudel/pull/417 +- add caching strategy for missing file types + cache all samples loaded from github by @felixroos in https://github.com/tidalcycles/strudel/pull/419 +- add more offline caching by @felixroos in https://github.com/tidalcycles/strudel/pull/421 +- add cdn.freesound to cache list by @felixroos in https://github.com/tidalcycles/strudel/pull/425 +- minirepl: add keyboard shortcuts by @felixroos in https://github.com/tidalcycles/strudel/pull/429 +- Themes by @felixroos in https://github.com/tidalcycles/strudel/pull/431 +- autocomplete preparations by @felixroos in https://github.com/tidalcycles/strudel/pull/427 +- Fix anchors by @felixroos in https://github.com/tidalcycles/strudel/pull/433 +- Update code.mdx by @bwagner in https://github.com/tidalcycles/strudel/pull/436 +- Update mini-notation.mdx by @bwagner in https://github.com/tidalcycles/strudel/pull/437 +- Update synths.mdx by @bwagner in https://github.com/tidalcycles/strudel/pull/438 +- FIXES: Warning about jsxBracketSameLine deprecation by @bwagner in https://github.com/tidalcycles/strudel/pull/461 +- Composable functions by @yaxu in https://github.com/tidalcycles/strudel/pull/390 +- weave and weaveWith by @yaxu in https://github.com/tidalcycles/strudel/pull/465 +- slice and splice by @yaxu in https://github.com/tidalcycles/strudel/pull/466 +- fix: osc should not return a promise by @felixroos in https://github.com/tidalcycles/strudel/pull/472 +- FIXES: freqs instead of pitches by @bwagner in https://github.com/tidalcycles/strudel/pull/464 +- Update input-output.mdx by @bwagner in https://github.com/tidalcycles/strudel/pull/471 +- settings tab with vim / emacs modes + additional themes and fonts by @felixroos in https://github.com/tidalcycles/strudel/pull/467 +- fix: hash links by @felixroos in https://github.com/tidalcycles/strudel/pull/473 +- midi cc support by @felixroos in https://github.com/tidalcycles/strudel/pull/478 +- Fix array args by @felixroos in https://github.com/tidalcycles/strudel/pull/480 +- docs: packages + offline by @felixroos in https://github.com/tidalcycles/strudel/pull/482 +- Update mini-notation.mdx by @yaxu in https://github.com/tidalcycles/strudel/pull/365 +- Revert "Another attempt at composable functions - WIP (#390)" by @felixroos in https://github.com/tidalcycles/strudel/pull/484 +- fix app height by @felixroos in https://github.com/tidalcycles/strudel/pull/485 +- add algolia creds + optimize sidebar for crawling by @felixroos in https://github.com/tidalcycles/strudel/pull/488 +- refactor react package by @felixroos in https://github.com/tidalcycles/strudel/pull/490 +- react style fixes by @felixroos in https://github.com/tidalcycles/strudel/pull/491 +- implement cps in scheduler by @felixroos in https://github.com/tidalcycles/strudel/pull/493 +- Add control aliases by @yaxu in https://github.com/tidalcycles/strudel/pull/497 +- fix: nano-repl highlighting by @felixroos in https://github.com/tidalcycles/strudel/pull/501 +- Reinstate slice and splice by @yaxu in https://github.com/tidalcycles/strudel/pull/500 +- can now use : as a replacement for space in scales by @felixroos in https://github.com/tidalcycles/strudel/pull/502 +- Support list syntax in mininotation by @yaxu in https://github.com/tidalcycles/strudel/pull/512 +- update react to 18 by @felixroos in https://github.com/tidalcycles/strudel/pull/514 +- add arrange function by @felixroos in https://github.com/tidalcycles/strudel/pull/508 +- Update README.md by @bwagner in https://github.com/tidalcycles/strudel/pull/474 +- add 2 illegible fonts by @felixroos in https://github.com/tidalcycles/strudel/pull/518 +- registerSound API + improved sounds tab + regroup soundfonts by @felixroos in https://github.com/tidalcycles/strudel/pull/516 +- fix: envelopes in chrome by @felixroos in https://github.com/tidalcycles/strudel/pull/521 +- Update samples.mdx by @bwagner in https://github.com/tidalcycles/strudel/pull/524 +- Update intro.mdx by @bwagner in https://github.com/tidalcycles/strudel/pull/525 +- fix(footer): fix link to tidalcycles by @revolunet in https://github.com/tidalcycles/strudel/pull/529 +- FIXES: alias pm for polymeter by @bwagner in https://github.com/tidalcycles/strudel/pull/527 +- Maintain random seed state in parser, not globally by @ijc8 in https://github.com/tidalcycles/strudel/pull/531 +- feat: add freq support to gm soundfonts by @felixroos in https://github.com/tidalcycles/strudel/pull/534 +- Update lerna by @felixroos in https://github.com/tidalcycles/strudel/pull/535 + +## New Contributors + +- @revolunet made their first contribution in https://github.com/tidalcycles/strudel/pull/529 +- @ijc8 made their first contribution in https://github.com/tidalcycles/strudel/pull/531 + +**Full Changelog**: https://github.com/tidalcycles/strudel/compare/v0.6.0...v0.7.0 diff --git a/website/src/content/blog/release-0.8.0-himbeermuffin.mdx b/website/src/content/blog/release-0.8.0-himbeermuffin.mdx new file mode 100644 index 00000000..7baea4c1 --- /dev/null +++ b/website/src/content/blog/release-0.8.0-himbeermuffin.mdx @@ -0,0 +1,130 @@ +--- +title: 'Release Notes v0.8.0 Himbeermuffin' +description: '' +date: '2023-06-30' +tags: ['meta'] +author: froos +--- + +import BlogVideo from '../../components/BlogVideo.astro'; + +These are the release notes for Strudel 0.8.0 aka "Himbeermuffin"! + +[Go to Tidal Club Forum for this Release](https://club.tidalcycles.org/t/strudel-0-8-0-released/4769) + +Let me write up some of the highlights: + +## Desktop App + +Besides the REPL (https://strudel.tidalcycles.org/), Strudel is now also distributed as a Desktop App via https://tauri.app/! Thanks to [vasilymilovidov](https://github.com/vasilymilovidov)! + +- [Linux: Debian based](https://github.com/tidalcycles/strudel/releases/download/v0.8.0/strudel_0.1.0_amd64.deb) +- [Linux: AppImage](https://github.com/tidalcycles/strudel/releases/download/v0.8.0/strudel_0.1.0_amd64.AppImage) +- [MacOS](https://github.com/tidalcycles/strudel/releases/download/v0.8.0/Strudel_0.1.0_x64.dmg) +- [Windows .exe](https://github.com/tidalcycles/strudel/releases/download/v0.8.0/Strudel_0.1.0_x64-setup.exe) +- [Windows .msi](https://github.com/tidalcycles/strudel/releases/download/v0.8.0/Strudel_0.1.0_x64_en-US.msi) + +edit: the desktop app performance on linux is currently not that great.. the web REPL runs much smoother (using firefox or chromium) + +The desktop App has the same features as the webapp, with the additional ability to load samples from disk. It is currently not documented yet, but you can do something like + +```js +await samples('~/music/xxx'); + +s('my_sound'); +``` + +You have to start with `~/music/`, followed by an arbitrary folder path that is expected to be present in the systems [audio directory](https://tauri.app/v1/api/js/path/#audiodir). +When you first run it, the app will create a strudel.json file in that directory to map out the available samples. + +I would be very happy to collect some feedback on how it works across different platforms & systems! + +## Spiral Visualization + +Also still undocumented, but you can now visualize patterns as a spiral via `.spiral()`: + + + +This is especially nice because strudel is not only the name of a dessert but also the german word for vortex! The spiral is very fitting to visualize cycles because you can align cycles vertically, while surfing along an infinite twisted timeline. + +## More settings + +In the settings tab, you can now toggle: + +- line numbers +- auto-complete +- line wrapping + +Thanks to [roipoussiere](https://github.com/roipoussiere)! + +## More + +Scroll down to see the full list of Changes! + +A big thanks to all the contributors! + +## Package Versions + +- @strudel.cycles/core: 0.8.2 +- @strudel.cycles/mini: 0.8.2 +- @strudel.cycles/transpiler: 0.8.2 +- @strudel.cycles/webaudio: 0.8.2 +- @strudel.cycles/soundfonts: 0.8.2 +- @strudel.cycles/react: 0.8.0 +- @strudel.cycles/midi: 0.8.0 +- @strudel.cycles/osc: 0.8.0 +- @strudel.cycles/csound: 0.8.0 +- @strudel.cycles/serial: 0.8.0 +- @strudel.cycles/tonal: 0.8.2 +- @strudel.cycles/xen: 0.8.0 +- @strudel/codemirror: 0.8.4 +- @strudel/web: 0.8.3 + +## What's Changed + +- fix period key for dvorak + remove duplicated code by @felixroos in https://github.com/tidalcycles/strudel/pull/537 +- improve initial loading + wait before eval by @felixroos in https://github.com/tidalcycles/strudel/pull/538 +- do not reset cps before eval #517 by @felixroos in https://github.com/tidalcycles/strudel/pull/539 +- feat: add loader bar to animate loading state by @felixroos in https://github.com/tidalcycles/strudel/pull/542 +- add firacode font by @felixroos in https://github.com/tidalcycles/strudel/pull/544 +- fix: allow whitespace at the end of a mini pattern by @felixroos in https://github.com/tidalcycles/strudel/pull/547 +- fix: reset time on stop by @felixroos in https://github.com/tidalcycles/strudel/pull/548 +- fix: load soundfonts in prebake by @felixroos in https://github.com/tidalcycles/strudel/pull/550 +- fix: colorable highlighting by @felixroos in https://github.com/tidalcycles/strudel/pull/553 +- fix: make soundfonts import dynamic by @felixroos in https://github.com/tidalcycles/strudel/pull/556 +- add basic triads and guidetone voicings by @felixroos in https://github.com/tidalcycles/strudel/pull/557 +- Patchday by @felixroos in https://github.com/tidalcycles/strudel/pull/559 +- Vanilla JS Refactoring by @felixroos in https://github.com/tidalcycles/strudel/pull/563 +- repl: add option to display line numbers by @roipoussiere in https://github.com/tidalcycles/strudel/pull/582 +- learn/tonal: fix typo in "scaleTran[s]pose" by @srenatus in https://github.com/tidalcycles/strudel/pull/585 +- Music metadata by @roipoussiere in https://github.com/tidalcycles/strudel/pull/580 +- New Workshop by @felixroos in https://github.com/tidalcycles/strudel/pull/587 +- Fix option dot by @felixroos in https://github.com/tidalcycles/strudel/pull/596 +- fix: allow f for flat notes like tidal by @felixroos in https://github.com/tidalcycles/strudel/pull/593 +- fix: division by zero by @felixroos in https://github.com/tidalcycles/strudel/pull/591 +- Solmization added by @dariacotocu in https://github.com/tidalcycles/strudel/pull/570 +- improve cursor by @felixroos in https://github.com/tidalcycles/strudel/pull/597 +- enable auto-completion by @roipoussiere in https://github.com/tidalcycles/strudel/pull/588 +- add ratio function by @felixroos in https://github.com/tidalcycles/strudel/pull/602 +- editor: enable line wrapping by @roipoussiere in https://github.com/tidalcycles/strudel/pull/581 +- tonal fixes by @felixroos in https://github.com/tidalcycles/strudel/pull/607 +- fix: flatten scale lists by @felixroos in https://github.com/tidalcycles/strudel/pull/605 +- clip now works like legato in tidal by @felixroos in https://github.com/tidalcycles/strudel/pull/598 +- fix: doc links by @felixroos in https://github.com/tidalcycles/strudel/pull/612 +- tauri desktop app by @vasilymilovidov in https://github.com/tidalcycles/strudel/pull/613 +- add spiral viz by @felixroos in https://github.com/tidalcycles/strudel/pull/614 +- patterning ui settings by @felixroos in https://github.com/tidalcycles/strudel/pull/606 +- Fix typo on packages.mdx by @paikwiki in https://github.com/tidalcycles/strudel/pull/520 +- cps dependent functions by @felixroos in https://github.com/tidalcycles/strudel/pull/620 +- desktop: play samples from disk by @felixroos in https://github.com/tidalcycles/strudel/pull/621 +- fix: midi clock drift by @felixroos in https://github.com/tidalcycles/strudel/pull/627 + +## New Contributors + +- @roipoussiere made their first contribution in https://github.com/tidalcycles/strudel/pull/582 +- @srenatus made their first contribution in https://github.com/tidalcycles/strudel/pull/585 +- @dariacotocu made their first contribution in https://github.com/tidalcycles/strudel/pull/570 +- @vasilymilovidov made their first contribution in https://github.com/tidalcycles/strudel/pull/613 +- @paikwiki made their first contribution in https://github.com/tidalcycles/strudel/pull/520 + +**Full Changelog**: https://github.com/tidalcycles/strudel/compare/v0.7.0...v0.8.0 diff --git a/website/src/content/blog/release-0.9.0-bananenbrot.mdx b/website/src/content/blog/release-0.9.0-bananenbrot.mdx new file mode 100644 index 00000000..eed5bf55 --- /dev/null +++ b/website/src/content/blog/release-0.9.0-bananenbrot.mdx @@ -0,0 +1,114 @@ +--- +title: 'Release Notes v0.9.0 Bananenbrot' +description: '' +date: '2023-09-17' +tags: ['meta'] +author: froos +--- + +import BlogVideo from '../../components/BlogVideo.astro'; + +These are the release notes for Strudel 0.9.0 aka "Bananenbrot"! + +The last release was over 11 weeks ago, so a lot of things have happened! + +Let me write up some of the highlights: + +## Improved Synth Engine + +The synth engine has gotten a lot of love + a name: [superdough](https://www.npmjs.com/package/superdough) encapsulates the web audio based synth / sampler / fx engine into a reusable package, which is already used by [Topos](https://topos.raphaelforment.fr/). +Main new features include: + +- [filter envelopes](https://strudel.tidalcycles.org/learn/effects#filter-envelope) +- [FM Synthesis](https://strudel.tidalcycles.org/learn/synths#fm-synthesis) +- [looping samples](https://strudel.tidalcycles.org/learn/samples#loop), allowing [wavetable synthesis](https://strudel.tidalcycles.org/?I9myTNQoKKaP) +- [vibrato](https://strudel.tidalcycles.org/learn/synths#vibrato) +- an integration of [ZZFX](https://strudel.tidalcycles.org/learn/synths#zzfx) + + + +Related PRs: + +- superdough: encapsulates web audio output by @felixroos in https://github.com/tidalcycles/strudel/pull/664 +- basic fm by @felixroos in https://github.com/tidalcycles/strudel/pull/669 +- Wave Selection and Global Envelope on the FM Synth Modulator by @Bubobubobubobubo in https://github.com/tidalcycles/strudel/pull/683 +- control osc partial count with n by @felixroos in https://github.com/tidalcycles/strudel/pull/674 +- ZZFX Synth support by @Bubobubobubobubo in https://github.com/tidalcycles/strudel/pull/684 +- Adding filter envelopes and filter order selection by @Bubobubobubobubo in https://github.com/tidalcycles/strudel/pull/692 +- Adding loop points and thus wavetable synthesis by @Bubobubobubobubo in https://github.com/tidalcycles/strudel/pull/698 +- Adding vibrato to base oscillators by @Bubobubobubobubo in https://github.com/tidalcycles/strudel/pull/693 + +## Desktop App Improvements + +Thanks to @daslyfe and @vasilymilovidov , the desktop app now has its own rust based MIDI and OSC integrations, +which do not depend on browser APIs! + +You can see superdough, superdirt via OSC + hardware synths via MIDI all together playing in harmony in this [awesome video](https://www.youtube.com/watch?v=lxQgBeLQBgk). These are the related PRs: + +- Create Midi Integration for Tauri Desktop app by @daslyfe in https://github.com/tidalcycles/strudel/pull/685 +- add sleep timer + improve message iterating by @daslyfe in https://github.com/tidalcycles/strudel/pull/688 +- fix MIDI CC messages by @vasilymilovidov in https://github.com/tidalcycles/strudel/pull/690 +- Direct OSC Support in Tauri by @daslyfe in https://github.com/tidalcycles/strudel/pull/694 +- Add logging from tauri by @daslyfe in https://github.com/tidalcycles/strudel/pull/697 +- fix osc bundle timestamp glitches caused by drifting clock by @daslyfe in https://github.com/tidalcycles/strudel/pull/666 +- Midi time fixes by @daslyfe in https://github.com/tidalcycles/strudel/pull/668 +- [Bug Fix] Account for numeral notation when converting to midi by @daslyfe in https://github.com/tidalcycles/strudel/pull/656 +- [Bug Fix] Midi: Don't treat note 0 as false by @daslyfe in https://github.com/tidalcycles/strudel/pull/657 + +## Visuals + +- 2 new FFT based vizualisations have now landed: [scope and fscope](https://github.com/tidalcycles/strudel/pull/677) (featured in the video at the top). +- pianoroll has new options, see [PR](https://github.com/tidalcycles/strudel/pull/679) + +Related PRs: + +- Scope by @felixroos in https://github.com/tidalcycles/strudel/pull/677 ([demo](https://strudel.tidalcycles.org/?hXVQF-KxMI8p)) +- Pianoroll improvements by @felixroos in https://github.com/tidalcycles/strudel/pull/679 ([demo](https://strudel.tidalcycles.org/?aPMKqXGVMgSM)) + +## Voicings + +There is now a new way to play chord voicings + a huge selection of chord voicings available. Find out more in these PRs: + +- stateless voicings + tonleiter lib by @felixroos in https://github.com/tidalcycles/strudel/pull/647 ([demo](https://strudel.tidalcycles.org/?FoILM0Hs9y9f)) +- ireal voicings by @felixroos in https://github.com/tidalcycles/strudel/pull/653 ([demo](https://strudel.tidalcycles.org/?bv_TjY9hOC28)) + +## Adaptive Highlighting + +Thanks to @mindofmatthew , the highlighting will adapt to edits instantly! Related PRs: + +- More work on highlight IDs by @mindofmatthew in https://github.com/tidalcycles/strudel/pull/636 +- Adaptive Highlighting by @felixroos in https://github.com/tidalcycles/strudel/pull/634 + +## UI Changes + +- teletext theme + fonts by @felixroos in https://github.com/tidalcycles/strudel/pull/681 (featured in video at the top) +- togglable panel position by @felixroos in https://github.com/tidalcycles/strudel/pull/667 + +## Other New Features + +- slice: list mode by @felixroos in https://github.com/tidalcycles/strudel/pull/645 ([demo](https://strudel.tidalcycles.org/?bAYIqz5NLjRr)) +- add emoji support by @felixroos in https://github.com/tidalcycles/strudel/pull/680 ([demo](https://strudel.tidalcycles.org/?a6FgLz475gN9)) + +## Articles + +- Understand pitch by @felixroos in https://github.com/tidalcycles/strudel/pull/652 + +## Other Fixes & Enhancements + +- fix: out of range error by @felixroos in https://github.com/tidalcycles/strudel/pull/630 +- fix: update canvas size on window resize by @felixroos in https://github.com/tidalcycles/strudel/pull/631 +- FIXES: TODO in rotateChroma by @bwagner in https://github.com/tidalcycles/strudel/pull/650 +- snapshot tests: sort haps by part by @felixroos in https://github.com/tidalcycles/strudel/pull/637 +- Delete old packages by @felixroos in https://github.com/tidalcycles/strudel/pull/639 +- update vitest by @felixroos in https://github.com/tidalcycles/strudel/pull/651 +- fix: welcome message for latestCode by @felixroos in https://github.com/tidalcycles/strudel/pull/659 +- fix: always run previous trigger by @felixroos in https://github.com/tidalcycles/strudel/pull/660 + +## New Contributors + +- @daslyfe made their first contribution in https://github.com/tidalcycles/strudel/pull/656 +- @Bubobubobubobubo made their first contribution in https://github.com/tidalcycles/strudel/pull/683 + +**Full Changelog**: https://github.com/tidalcycles/strudel/compare/v0.8.0...v0.9.0 + +A big thanks to all the contributors! diff --git a/website/src/content/config.ts b/website/src/content/config.ts new file mode 100644 index 00000000..bc5d1dd3 --- /dev/null +++ b/website/src/content/config.ts @@ -0,0 +1,24 @@ +import { defineCollection, z } from 'astro:content'; + +const blog = defineCollection({ + // Type-check frontmatter using a schema + schema: z.object({ + title: z.string(), + author: z.string(), + description: z.string().optional(), + // Transform string to Date object + date: z + .string() + .or(z.date()) + .transform((val) => new Date(val)), + updatedDate: z + .string() + .optional() + .transform((str) => (str ? new Date(str) : undefined)), + image: z.string().optional(), + tags: z.array(z.string()).optional(), + draft: z.boolean().optional(), + }), +}); + +export const collections = { blog }; diff --git a/website/src/env.d.ts b/website/src/env.d.ts index 5263bd6a..bd7aa94b 100644 --- a/website/src/env.d.ts +++ b/website/src/env.d.ts @@ -2,3 +2,5 @@ /// /// /// + +declare module 'date-fns'; diff --git a/website/src/pages/blog.astro b/website/src/pages/blog.astro new file mode 100644 index 00000000..80270353 --- /dev/null +++ b/website/src/pages/blog.astro @@ -0,0 +1,50 @@ +--- +import BlogPost from '../components/BlogPost.astro'; +import HeadCommon from '../components/HeadCommon.astro'; +import HeadSEO from '../components/HeadSEO.astro'; +import Header from '../components/Header/Header.astro'; +import LeftSidebar from '../components/LeftSidebar/LeftSidebar.astro'; +import PageContent from '../components/PageContent/PageContent.astro'; +import RightSidebar from '../components/RightSidebar/RightSidebar.astro'; +import { getCollection } from 'astro:content'; +import { compareDesc } from 'date-fns'; + +const currentPage = Astro.url.pathname; + +const posts = (await getCollection('blog')).sort((a, b) => compareDesc(a.data.date, b.data.date)); +--- + + + + + + 🌀 Strudel Blog + + + +
+
+
+
+
+
+ + + {posts.map((post) => )} + + +
+
+
+ + diff --git a/website/src/pages/de/workshop/first-effects.mdx b/website/src/pages/de/workshop/first-effects.mdx index b408a343..a790120a 100644 --- a/website/src/pages/de/workshop/first-effects.mdx +++ b/website/src/pages/de/workshop/first-effects.mdx @@ -15,7 +15,6 @@ import Box from '@components/Box.astro'; **low-pass filter** /2") .sound("sawtooth").lpf(800)`} @@ -33,7 +32,6 @@ lpf = **l**ow **p**ass **f**ilter **filter automatisieren** /2") .sound("sawtooth").lpf("200 1000")`} @@ -51,7 +49,6 @@ Später sehen wir, wie man mit Wellenformen Dinge automatisieren kann. **vowel = Vokal** /2") .sound("sawtooth").vowel("/2")`} @@ -60,7 +57,6 @@ Später sehen wir, wie man mit Wellenformen Dinge automatisieren kann. **gain = Verstärkung** ") .sound("sawtooth").lpf(600) @@ -145,7 +139,6 @@ Kannst du erraten, was die einzelnen Werte machen? **adsr-Kurznotation** ") .sound("sawtooth").lpf(600) @@ -156,7 +149,6 @@ Kannst du erraten, was die einzelnen Werte machen? **delay = Verzögerung** ~]") @@ -188,7 +180,6 @@ Was passiert, wenn du `.delay(".8:.06:.8")` schreibst? Kannst du erraten, was di **room aka reverb = Hall** ~@16] ~>/2") .scale("D4:minor").sound("gm_accordion:2") @@ -206,7 +197,6 @@ Füg auch ein Delay hinzu! **kleiner Dub-Tune** ~]") @@ -221,7 +211,6 @@ Füg auch ein Delay hinzu! Für echten Dub fehlt noch der Bass: ~]") @@ -245,7 +234,6 @@ Füg `.hush()` ans Ende eines Patterns im stack... **pan = Panorama** ").room(.2)`} /> +").room(.2)`} /> **fast and slow = schnell und langsam** Mit `fast` und `slow` kann man das Tempo eines Patterns außerhalb der Mini-Notation ändern: - + @@ -272,13 +260,13 @@ Was passiert, wenn du den Wert automatisierst? z.b. `.fast("<1 [2 4]>")` ? Übrigens, innerhalb der Mini-Notation: `fast` ist `*` und `slow` ist `/`. -")`} /> +")`} /> ## Automation mit Signalen Anstatt Werte schrittweise zu automatisieren, können wir auch sogenannte Signale benutzen: - + @@ -294,7 +282,7 @@ Der `gain`-Wert (Verstärkung) wird in der Visualisierung als Transparenz darges Signale bewegen sich standardmäßig zwischen 0 und 1. Wir können das mit `range` ändern: - + `range` ist nützlich wenn wir Funktionen mit einem anderen Wertebereich als 0 und 1 automatisieren wollen (z.b. `lpf`) @@ -307,7 +295,6 @@ Was passiert wenn du die beiden Werte vertauschst? Wir können die Geschwindigkeit der Automation mit slow / fast ändern: /2") .sound("sawtooth") @@ -322,15 +309,15 @@ Die ganze Automation braucht nun 8 cycle bis sie sich wiederholt. ## Rückblick -| Name | Beispiel | -| ----- | -------------------------------------------------------------------------------------------------- | -| lpf | ")`} /> | -| vowel | ")`} /> | -| gain | | -| delay | | -| room | | -| pan | | -| speed | ")`} /> | -| range | | +| Name | Beispiel | +| ----- | --------------------------------------------------------------------------------------- | +| lpf | ")`} /> | +| vowel | ")`} /> | +| gain | | +| delay | | +| room | | +| pan | | +| speed | ")`} /> | +| range | | Lass uns nun die für Tidal typischen [Pattern-Effekte anschauen](/de/workshop/pattern-effects). diff --git a/website/src/pages/de/workshop/first-notes.mdx b/website/src/pages/de/workshop/first-notes.mdx index c44969df..0f5efc55 100644 --- a/website/src/pages/de/workshop/first-notes.mdx +++ b/website/src/pages/de/workshop/first-notes.mdx @@ -17,7 +17,6 @@ Jetzt schauen wir uns an wie man mit Tönen mit der `note` Funktion spielt. **Töne mit Zahlen** + @@ -126,7 +121,6 @@ Probier ein paar sounds aus: **Zwischen Sounds hin und her wechseln** + @@ -171,7 +164,7 @@ Wenn eine Sequenz unabhängig von ihrem Inhalt immer gleich schnell bleiben soll **Eins pro Cycle per \< \>** -").sound("gm_acoustic_bass")`} punchcard /> +").sound("gm_acoustic_bass")`} punchcard /> @@ -190,7 +183,6 @@ usw.. **Eine Sequenz pro Cycle** ") .sound("gm_acoustic_bass")`} @@ -200,7 +192,6 @@ usw.. oder auch... /2") .sound("gm_acoustic_bass")`} @@ -212,7 +203,6 @@ oder auch... Ähnlich wie Unter-Sequenzen, kann auch `<...>` innerhalb einer Sequenz verwendet werden: ") .sound("gm_xylophone")`} @@ -222,7 +212,6 @@ oder auch... Das ist auch praktisch für atonale Sounds: , [~ hh]*2") .bank("RolandTR909")`} @@ -235,7 +224,6 @@ Es kann mühsam sein die richtigen Noten zu finden wenn man alle zur Verfügung Mit Skalen ist das einfacher: ") .scale("C:minor").sound("piano")`} @@ -262,7 +250,6 @@ Probier verschiedene Skalen: Wie alle Funktionen können auch Skalen mit einem Pattern automatisiert werden: , 2 4 <[6,8] [7,9]>") .scale("/4") @@ -283,7 +270,7 @@ Nimm dir Zeit um herauszufinden welche Skalen du magst. **Verlängern mit @** - + @@ -296,7 +283,6 @@ Spiel mit der Länge! **Unter-Sequenzen verlängern** *2") .scale("/4") @@ -314,7 +300,7 @@ Das nennt man auch manchmal `triolen swing`. Es ist ein typischer Rhythmus im Bl **Wiederholen** -]").sound("piano")`} punchcard /> +]").sound("piano")`} punchcard /> @@ -328,27 +314,26 @@ Was ist der Unterschied? Das haben wir in diesem Kapitel gelernt: -| Concept | Syntax | Example | -| ------------ | ------ | ------------------------------------------------------------------- | -| Verlangsamen | \/ | | -| Alternativen | \<\> | ")`} /> | -| Verlängern | @ | | -| Wiederholen | ! | | +| Concept | Syntax | Example | +| ------------ | ------ | -------------------------------------------------------- | +| Verlangsamen | \/ | | +| Alternativen | \<\> | ")`} /> | +| Verlängern | @ | | +| Wiederholen | ! | | Neue Funktionen: -| Name | Description | Example | -| ----- | --------------------------------------- | -------------------------------------------------------------------------------------------- | -| note | Tonhöhe als Buchstabe oder Zahl | | -| scale | Interpretiert `n` als Skalenstufe | | -| stack | Spiele mehrere Patterns parallel (s.u.) | | +| Name | Description | Example | +| ----- | --------------------------------------- | --------------------------------------------------------------------------------- | +| note | Tonhöhe als Buchstabe oder Zahl | | +| scale | Interpretiert `n` als Skalenstufe | | +| stack | Spiele mehrere Patterns parallel (s.u.) | | ## Beispiele **Bassline** /2") .sound("gm_synth_bass_1") @@ -358,7 +343,6 @@ Neue Funktionen: **Melodie** , [~ hh]*2") .bank("RolandTR909")`} @@ -387,7 +370,6 @@ Das geht mit `stack` 😙 /2") diff --git a/website/src/pages/de/workshop/first-sounds.mdx b/website/src/pages/de/workshop/first-sounds.mdx index a689add8..743a5312 100644 --- a/website/src/pages/de/workshop/first-sounds.mdx +++ b/website/src/pages/de/workshop/first-sounds.mdx @@ -15,7 +15,7 @@ Dies ist das erste Kapitel im Strudel Workshop, schön dich an Bord zu haben! Der Workshop ist voller interaktiver Textfelder. Lass uns lernen wie sie funktionieren. Hier ist eins: - + @@ -35,7 +35,7 @@ Glückwunsch, du kannst jetzt live coden! Gerade haben wir schon den ersten sound mit `sound` abgespielt: - + @@ -57,7 +57,7 @@ Ein Sound kann mehrere Samples (Audio Dateien) enthalten. Du kannst ein anderes Sample wählen, indem du `:` und eine Zahl an den Sound-Namen anhängst: - + @@ -74,7 +74,7 @@ Vorerst bleiben wir bei den voreingestellten Sounds, später erfahren wir noch w Strudel kommt von Haus aus mit einer breiten Auswahl an Drum Sounds: - + @@ -92,7 +92,7 @@ Probier verschiedene Sounds aus! Wir können den Charakter des Drum Sounds verändern, indem wir mit `bank` die Drum Machine auswählen: - + In diesem Beispiel ist `RolandTR909` der Name der Drum Machine, die eine prägende Rolle für House und Techno Musik spielte. @@ -117,7 +117,7 @@ Dann kannst du ihn mit `Strg`+`C` kopieren und mit `Strg`+`V` einfügen. Im letzten Beispiel haben wir schon gesehen dass man mehrere Sounds hintereinander abspielen kann wenn man sie durch Leerzeichen trennt: - + Beachte wie der aktuell gespielte Sound im Code markiert und auch darunter visualisiert wird. @@ -129,13 +129,13 @@ Versuch noch mehr Sounds hinzuzfügen! **Je länger die Sequence, desto schneller** - + Der Inhalt einer Sequence wird in einen sogenannten Cycle (=Zyklus) zusammengequetscht. **Tempo ändern mit `cpm`** - + @@ -151,7 +151,7 @@ Wir werden später noch mehr Möglichkeiten kennen lernen das Tempo zu veränder **Pausen mit '~'** - + @@ -164,7 +164,7 @@ Tilde tippen: **Unter-Sequenzen mit [Klammern]** - + @@ -178,11 +178,11 @@ Genau wie bei der ganzen Sequence wird eine Unter-Sequence schneller je mehr dri **Multiplikation: Dinge schneller machen** - + **Multiplikation: Vieeeeeeel schneller** - + @@ -192,12 +192,11 @@ Tonhöhe = sehr schneller Rhythmus **Multiplikation: Ganze Unter-Sequences schneller machen** - + Bolero: + @@ -216,15 +215,15 @@ Du kannst so tief verschachteln wie du willst! **Parallele Sequenzen mit Komma** - + Du kannst so viele Kommas benutzen wie du möchtest: - + Kommas können auch in Unter-Sequenzen verwendet werden: - + @@ -237,7 +236,6 @@ Es kommt öfter vor, dass man die gleiche Idee auf verschiedene Arten ausdrücke **Mehrere Zeilen schreiben mit \` (backtick)** + Das gleiche kann man auch so schreiben: - + ## Rückblick @@ -267,35 +265,35 @@ Wir haben jetzt die Grundlagen der sogenannten Mini-Notation gelernt, der Rhythm Das haben wir bisher gelernt: -| Concept | Syntax | Example | -| --------------------- | ----------- | -------------------------------------------------------------------------------- | -| Sequenz | Leerzeichen | | -| Sound Nummer | :x | | -| Pausen | ~ | | -| Unter-Sequenzen | \[\] | | -| Unter-Unter-Sequenzen | \[\[\]\] | | -| Schneller | \* | | -| Parallel | , | | +| Concept | Syntax | Example | +| --------------------- | ----------- | --------------------------------------------------------------------- | +| Sequenz | Leerzeichen | | +| Sound Nummer | :x | | +| Pausen | ~ | | +| Unter-Sequenzen | \[\] | | +| Unter-Unter-Sequenzen | \[\[\]\] | | +| Schneller | \* | | +| Parallel | , | | Die mit Apostrophen umgebene Mini-Notation benutzt man normalerweise in einer sogenannten Funktion. Die folgenden Funktionen haben wir bereits gesehen: -| Name | Description | Example | -| ----- | -------------------------------------- | ---------------------------------------------------------------------------------- | -| sound | Spielt den Sound mit dem Namen | | -| bank | Wählt die Soundbank / Drum Machine | | -| cpm | Tempo in **C**ycles **p**ro **M**inute | | -| n | Sample Nummer | | +| Name | Description | Example | +| ----- | -------------------------------------- | ----------------------------------------------------------------------- | +| sound | Spielt den Sound mit dem Namen | | +| bank | Wählt die Soundbank / Drum Machine | | +| cpm | Tempo in **C**ycles **p**ro **M**inute | | +| n | Sample Nummer | | ## Beispiele **Einfacher Rock Beat** - + **Klassischer House** - + @@ -306,12 +304,11 @@ Bestimmte Drum Patterns werden oft genreübergreifend wiederverwendet. We Will Rock you - + **Yellow Magic Orchestra - Firecracker** + **jux = einen stereo kanal modifizieren** - + So würde man das ohne `jux` schreiben: + Das hat den gleichen Effekt, wie: >")) .color(">").adsr("[.1 0]:.2:[1 0]") @@ -95,7 +91,6 @@ z.B. c4 = 60, also ist c4 + 2 = 62 Man kann auch mehrmals addieren: >").add("0,7")) .color(">").adsr("[.1 0]:.2:[1 0]") @@ -106,7 +101,6 @@ Man kann auch mehrmals addieren: **add + scale** [~ <4 1>]>*2".add("<0 [0,2,4]>/4")) .scale("C5:minor").release(.5) @@ -117,7 +111,6 @@ Man kann auch mehrmals addieren: **Alles zusammen** [~ <4 1>]>*2".add("<0 [0,2,4]>/4")) @@ -134,11 +127,11 @@ Man kann auch mehrmals addieren: **ply** - + das ist wie: - + @@ -149,7 +142,6 @@ Probier `ply` mit einem pattern zu automatisieren, z.b. `"<1 2 1 3>"` **off** ] <2 3> [~ 1]>" .off(1/8, x=>x.add(4)) @@ -168,16 +160,15 @@ In der Notation `x=>x.`, ist `x` das Pattern, das wir bearbeiten. `off` ist auch nützlich für Sounds: x.speed(1.5).gain(.25))`} /> -| Name | Beschreibung | Beispiel | -| ---- | --------------------------------- | ---------------------------------------------------------------------------------------------- | -| rev | rückwärts | | -| jux | einen Stereo-Kanal modifizieren | | -| add | addiert Zahlen oder Noten | ")).scale("C:minor")`} /> | -| ply | multipliziert jedes Element x mal | ")`} /> | -| off | verzögert eine modifizierte Kopie | x.speed(2))`} /> | +| Name | Beschreibung | Beispiel | +| ---- | --------------------------------- | ----------------------------------------------------------------------------------- | +| rev | rückwärts | | +| jux | einen Stereo-Kanal modifizieren | | +| add | addiert Zahlen oder Noten | ")).scale("C:minor")`} /> | +| ply | multipliziert jedes Element x mal | ")`} /> | +| off | verzögert eine modifizierte Kopie | x.speed(2))`} /> | diff --git a/website/src/pages/de/workshop/recap.mdx b/website/src/pages/de/workshop/recap.mdx index c0d577d1..14ef6b25 100644 --- a/website/src/pages/de/workshop/recap.mdx +++ b/website/src/pages/de/workshop/recap.mdx @@ -11,58 +11,58 @@ Diese Seite ist eine Auflistung aller im Workshop vorgestellten Funktionen. ## Mini Notation -| Konzept | Syntax | Beispiel | -| --------------------- | -------- | -------------------------------------------------------------------------------- | -| Sequenz | space | | -| Sample-Nummer | :x | | -| Pausen | ~ | | -| Unter-Sequenzen | \[\] | | -| Unter-Unter-Sequenzen | \[\[\]\] | | -| Schneller | \* | | -| Verlangsamen | \/ | | -| Parallel | , | | -| Alternieren | \<\> | ")`} /> | -| Verlängern | @ | | -| Wiederholen | ! | | +| Konzept | Syntax | Beispiel | +| --------------------- | -------- | --------------------------------------------------------------------- | +| Sequenz | space | | +| Sample-Nummer | :x | | +| Pausen | ~ | | +| Unter-Sequenzen | \[\] | | +| Unter-Unter-Sequenzen | \[\[\]\] | | +| Schneller | \* | | +| Verlangsamen | \/ | | +| Parallel | , | | +| Alternieren | \<\> | ")`} /> | +| Verlängern | @ | | +| Wiederholen | ! | | ## Sounds -| Name | Beschreibung | Beispiel | -| ----- | -------------------------- | ---------------------------------------------------------------------------------- | -| sound | spielt den Sound mit Namen | | -| bank | wählt die Soundbank | | -| n | wählt Sample mit Nummer | | +| Name | Beschreibung | Beispiel | +| ----- | -------------------------- | ----------------------------------------------------------------------- | +| sound | spielt den Sound mit Namen | | +| bank | wählt die Soundbank | | +| n | wählt Sample mit Nummer | | ## Noten -| Name | Beschreibung | Beispiel | -| --------- | ---------------------------------- | -------------------------------------------------------------------------------------------- | -| note | wählt Note per Zahl oder Buchstabe | | -| n + scale | wählt Note n in Skala | | -| stack | spielt mehrere Patterns parallel | | +| Name | Beschreibung | Beispiel | +| --------- | ---------------------------------- | --------------------------------------------------------------------------------- | +| note | wählt Note per Zahl oder Buchstabe | | +| n + scale | wählt Note n in Skala | | +| stack | spielt mehrere Patterns parallel | | ## Audio-Effekte -| Name | Beispiele | -| ----- | -------------------------------------------------------------------------------------------------- | -| lpf | ")`} /> | -| vowel | ")`} /> | -| gain | | -| delay | | -| room | | -| pan | | -| speed | ")`} /> | -| range | | +| Name | Beispiele | +| ----- | --------------------------------------------------------------------------------------- | +| lpf | ")`} /> | +| vowel | ")`} /> | +| gain | | +| delay | | +| room | | +| pan | | +| speed | ")`} /> | +| range | | ## Pattern-Effekte -| Name | Beschreibung | Beispiel | -| ---- | --------------------------------- | ---------------------------------------------------------------------------------------------- | -| cpm | Tempo in Cycles pro Minute | | -| fast | schneller | | -| slow | langsamer | | -| rev | rückwärts | | -| jux | einen Stereo-Kanal modifizieren | | -| add | addiert Zahlen oder Noten | ")).scale("C:minor")`} /> | -| ply | jedes Element schneller machen | ")`} /> | -| off | verzögert eine modifizierte Kopie | x.speed(2))`} /> | +| Name | Beschreibung | Beispiel | +| ---- | --------------------------------- | ----------------------------------------------------------------------------------- | +| cpm | Tempo in Cycles pro Minute | | +| fast | schneller | | +| slow | langsamer | | +| rev | rückwärts | | +| jux | einen Stereo-Kanal modifizieren | | +| add | addiert Zahlen oder Noten | ")).scale("C:minor")`} /> | +| ply | jedes Element schneller machen | ")`} /> | +| off | verzögert eine modifizierte Kopie | x.speed(2))`} /> | diff --git a/website/src/pages/learn/metadata.mdx b/website/src/pages/learn/metadata.mdx index 9ade4447..e8bb86df 100644 --- a/website/src/pages/learn/metadata.mdx +++ b/website/src/pages/learn/metadata.mdx @@ -50,7 +50,7 @@ Available tags are: - `@title`: music title - `@by`: music author(s), separated by comma, eventually followed with a link in `<>` (ex: `@by John Doe `) -- `@license`: music license(s) +- `@license`: music license(s), e.g. CC BY-NC-SA. Unsure? [Choose a creative commons license here](https://creativecommons.org/choose/) - `@details`: some additional information about the music - `@url`: web page(s) related to the music (git repo, soundcloud link, etc.) - `@genre`: music genre(s) (pop, jazz, etc) diff --git a/website/src/pages/workshop/first-effects.mdx b/website/src/pages/workshop/first-effects.mdx index e3ce5487..48764bce 100644 --- a/website/src/pages/workshop/first-effects.mdx +++ b/website/src/pages/workshop/first-effects.mdx @@ -17,7 +17,6 @@ We have sounds, we have notes, now let's look at effects! **low-pass filter** /2") .sound("sawtooth").lpf(800)`} @@ -35,7 +34,6 @@ lpf = **l**ow **p**ass **f**ilter **pattern the filter** /2") .sound("sawtooth").lpf("200 1000")`} @@ -53,7 +51,6 @@ We will learn how to automate with waves later... **vowel** /2") .sound("sawtooth").vowel("/2")`} @@ -62,7 +59,6 @@ We will learn how to automate with waves later... **gain** ") .sound("sawtooth").lpf(600) @@ -146,7 +140,6 @@ Can you guess what they do? **adsr short notation** ") .sound("sawtooth").lpf(600) @@ -157,7 +150,6 @@ Can you guess what they do? **delay** ~]") @@ -189,7 +181,6 @@ What happens if you use `.delay(".8:.06:.8")` ? Can you guess what the third num **room aka reverb** ~@16] ~>/2") .scale("D4:minor").sound("gm_accordion:2") @@ -207,7 +198,6 @@ Add a delay too! **little dub tune** ~]") @@ -222,7 +212,6 @@ Add a delay too! Let's add a bass to make this complete: ~]") @@ -246,7 +235,6 @@ Try adding `.hush()` at the end of one of the patterns in the stack... **pan** ").room(.2)`} /> +").room(.2)`} /> **fast and slow** We can use `fast` and `slow` to change the tempo of a pattern outside of Mini-Notation: - + @@ -273,13 +261,13 @@ What happens if you use a pattern like `.fast("<1 [2 4]>")`? By the way, inside Mini-Notation, `fast` is `*` and `slow` is `/`. -")`} /> +")`} /> ## automation with signals Instead of changing values stepwise, we can also control them with signals: - + @@ -295,7 +283,7 @@ The gain is visualized as transparency in the pianoroll. By default, waves oscillate between 0 to 1. We can change that with `range`: - + @@ -306,7 +294,6 @@ What happens if you flip the range values? We can change the automation speed with slow / fast: /2") .sound("sawtooth") @@ -321,15 +308,15 @@ The whole automation will now take 8 cycles to repeat. ## Recap -| name | example | -| ----- | -------------------------------------------------------------------------------------------------- | -| lpf | ")`} /> | -| vowel | ")`} /> | -| gain | | -| delay | | -| room | | -| pan | | -| speed | ")`} /> | -| range | | +| name | example | +| ----- | --------------------------------------------------------------------------------------- | +| lpf | ")`} /> | +| vowel | ")`} /> | +| gain | | +| delay | | +| room | | +| pan | | +| speed | ")`} /> | +| range | | Let us now take a look at some of Tidal's typical [pattern effects](/workshop/pattern-effects). diff --git a/website/src/pages/workshop/first-notes.mdx b/website/src/pages/workshop/first-notes.mdx index ab11ed90..335cffe7 100644 --- a/website/src/pages/workshop/first-notes.mdx +++ b/website/src/pages/workshop/first-notes.mdx @@ -17,7 +17,6 @@ Let's look at how we can play notes **play notes with numbers** + {/* c2 g2, e3 b3 d4 e4 */} @@ -127,7 +122,6 @@ Try out different sounds: **switch between sounds** + @@ -172,7 +165,7 @@ Because it is so common to just play one thing per cycle, you can.. **Play one per cycle with \< \>** -").sound("gm_acoustic_bass")`} punchcard /> +").sound("gm_acoustic_bass")`} punchcard /> @@ -185,7 +178,6 @@ Try adding more notes inside the brackets and notice how it does **not** get fas {/* <[c2 c3]*4 [bb1 bb2]*4 [f2 f3]*4 [eb2 eb3]*4>/2 */} /2") .sound("gm_acoustic_bass")`} @@ -195,7 +187,6 @@ Try adding more notes inside the brackets and notice how it does **not** get fas **Alternate between multiple things** ") .sound("gm_xylophone")`} @@ -205,7 +196,6 @@ Try adding more notes inside the brackets and notice how it does **not** get fas This is also useful for unpitched sounds: , [~ hh]*2") .bank("RolandTR909")`} @@ -217,7 +207,6 @@ This is also useful for unpitched sounds: Finding the right notes can be difficult.. Scales are here to help: ") .scale("C:minor").sound("piano")`} @@ -244,7 +233,6 @@ Try out different scales: Just like anything, we can automate the scale with a pattern: , 2 4 <[6,8] [7,9]>") .scale("/4") @@ -265,7 +253,7 @@ Take your time and you'll find scales you like! **Elongate with @** - + @@ -278,7 +266,6 @@ Try changing that number! **Elongate within sub-sequences** *2") .scale("/4") @@ -296,7 +283,7 @@ This is also sometimes called triplet swing. You'll often find it in blues and j **Replicate** -]").sound("piano")`} punchcard /> +]").sound("piano")`} punchcard /> @@ -310,27 +297,26 @@ What's the difference? Let's recap what we've learned in this chapter: -| Concept | Syntax | Example | -| --------- | ------ | ------------------------------------------------------------------- | -| Slow down | \/ | | -| Alternate | \<\> | ")`} /> | -| Elongate | @ | | -| Replicate | ! | | +| Concept | Syntax | Example | +| --------- | ------ | -------------------------------------------------------- | +| Slow down | \/ | | +| Alternate | \<\> | ")`} /> | +| Elongate | @ | | +| Replicate | ! | | New functions: -| Name | Description | Example | -| ----- | ----------------------------------- | -------------------------------------------------------------------------------------------- | -| note | set pitch as number or letter | | -| scale | interpret `n` as scale degree | | -| stack | play patterns in parallel (read on) | | +| Name | Description | Example | +| ----- | ----------------------------------- | --------------------------------------------------------------------------------- | +| note | set pitch as number or letter | | +| scale | interpret `n` as scale degree | | +| stack | play patterns in parallel (read on) | | ## Examples **Classy Bassline** /2") .sound("gm_synth_bass_1") @@ -340,7 +326,6 @@ New functions: **Classy Melody** , [~ hh]*2") .bank("RolandTR909")`} @@ -369,7 +353,6 @@ It's called `stack` 😙 /2") diff --git a/website/src/pages/workshop/first-sounds.mdx b/website/src/pages/workshop/first-sounds.mdx index 5897f029..91ae1e5a 100644 --- a/website/src/pages/workshop/first-sounds.mdx +++ b/website/src/pages/workshop/first-sounds.mdx @@ -15,7 +15,7 @@ This is the first chapter of the Strudel Workshop, nice to have you on board! The workshop is full of interactive code fields. Let's learn how to use those. Here is one: - + @@ -33,7 +33,7 @@ Congratulations, you are now live coding! We have just played a sound with `sound` like this: - + @@ -55,7 +55,7 @@ One Sound can contain multiple samples (audio files). You can select the sample by appending `:` followed by a number to the name: - + @@ -72,7 +72,7 @@ For now we'll stick to this little selection of sounds, but we'll find out how t By default, Strudel comes with a wide selection of drum sounds: - + @@ -90,7 +90,7 @@ Try out different drum sounds! To change the sound character of our drums, we can use `bank` to change the drum machine: - + In this example `RolandTR909` is the name of the drum machine that we're using. It is a famous drum machine for house and techno beats. @@ -115,7 +115,7 @@ There are a lot more, but let's keep it simple for now In the last example, we already saw that you can play multiple sounds in a sequence by separating them with a space: - + Notice how the currently playing sound is highlighted in the code and also visualized below. @@ -127,13 +127,13 @@ Try adding more sounds to the sequence! **The longer the sequence, the faster it runs** - + The content of a sequence will be squished into what's called a cycle. **One way to change the tempo is using `cpm`** - + @@ -147,11 +147,11 @@ We will look at other ways to change the tempo later! **Add a rests in a sequence with '~'** - + **Sub-Sequences with [brackets]** - + @@ -163,15 +163,15 @@ Similar to the whole sequence, the content of a sub-sequence will be squished to **Multiplication: Speed things up** - + **Multiplication: Speed up sequences** - + **Multiplication: Speeeeeeeeed things up** - + @@ -181,7 +181,7 @@ Pitch = really fast rhythm **Sub-Sub-Sequences with [[brackets]]** - + @@ -191,15 +191,15 @@ You can go as deep as you want! **Play sequences in parallel with comma** - + You can use as many commas as you want: - + Commas can also be used inside sub-sequences: - + @@ -212,7 +212,6 @@ It is quite common that there are many ways to express the same idea. **Multiple Lines with backticks** + This is shorter and more readable than: - + ## Recap Now we've learned the basics of the so called Mini-Notation, the rhythm language of Tidal. This is what we've leared so far: -| Concept | Syntax | Example | -| ----------------- | -------- | -------------------------------------------------------------------------------- | -| Sequence | space | | -| Sample Number | :x | | -| Rests | ~ | | -| Sub-Sequences | \[\] | | -| Sub-Sub-Sequences | \[\[\]\] | | -| Speed up | \* | | -| Parallel | , | | +| Concept | Syntax | Example | +| ----------------- | -------- | --------------------------------------------------------------------- | +| Sequence | space | | +| Sample Number | :x | | +| Rests | ~ | | +| Sub-Sequences | \[\] | | +| Sub-Sub-Sequences | \[\[\]\] | | +| Speed up | \* | | +| Parallel | , | | The Mini-Notation is usually used inside some function. These are the functions we've seen so far: -| Name | Description | Example | -| ----- | ----------------------------------- | ---------------------------------------------------------------------------------- | -| sound | plays the sound of the given name | | -| bank | selects the sound bank | | -| cpm | sets the tempo in cycles per minute | | -| n | select sample number | | +| Name | Description | Example | +| ----- | ----------------------------------- | ----------------------------------------------------------------------- | +| sound | plays the sound of the given name | | +| bank | selects the sound bank | | +| cpm | sets the tempo in cycles per minute | | +| n | select sample number | | ## Examples **Basic rock beat** - + **Classic house** - + @@ -273,12 +272,11 @@ Certain drum patterns are reused across genres. We Will Rock you - + **Yellow Magic Orchestra - Firecracker** + **play pattern left and modify it right with jux** - + This is the same as: + This is like doing >")) .color(">").adsr("[.1 0]:.2:[1 0]") @@ -93,7 +89,6 @@ If you add a number to a note, the note will be treated as if it was a number We can add as often as we like: >").add("0,7")) .color(">").adsr("[.1 0]:.2:[1 0]") @@ -104,7 +99,6 @@ We can add as often as we like: **add with scale** [~ <4 1>]>*2".add("<0 [0,2,4]>/4")) .scale("C5:minor").release(.5) @@ -115,7 +109,6 @@ We can add as often as we like: **time to stack** [~ <4 1>]>*2".add("<0 [0,2,4]>/4")) @@ -132,11 +125,11 @@ We can add as often as we like: **ply** - + this is like writing: - + @@ -147,7 +140,6 @@ Try patterning the `ply` function, for example using `"<1 2 1 3>"` **off** ] <2 3> [~ 1]>" .off(1/8, x=>x.add(4)) @@ -166,16 +158,15 @@ In the notation `x=>x.`, the `x` is the shifted pattern, which where modifying. off is also useful for sounds: x.speed(1.5).gain(.25))`} /> -| name | description | example | -| ---- | ------------------------------ | ---------------------------------------------------------------------------------------------- | -| rev | reverse | | -| jux | split left/right, modify right | | -| add | add numbers / notes | ")).scale("C:minor")`} /> | -| ply | speed up each event n times | ")`} /> | -| off | copy, shift time & modify | x.speed(2))`} /> | +| name | description | example | +| ---- | ------------------------------ | ----------------------------------------------------------------------------------- | +| rev | reverse | | +| jux | split left/right, modify right | | +| add | add numbers / notes | ")).scale("C:minor")`} /> | +| ply | speed up each event n times | ")`} /> | +| off | copy, shift time & modify | x.speed(2))`} /> | diff --git a/website/src/pages/workshop/recap.mdx b/website/src/pages/workshop/recap.mdx index fad14fb4..9260a8f6 100644 --- a/website/src/pages/workshop/recap.mdx +++ b/website/src/pages/workshop/recap.mdx @@ -11,58 +11,58 @@ This page is just a listing of all functions covered in the workshop! ## Mini Notation -| Concept | Syntax | Example | -| ----------------- | -------- | -------------------------------------------------------------------------------- | -| Sequence | space | | -| Sample Number | :x | | -| Rests | ~ | | -| Sub-Sequences | \[\] | | -| Sub-Sub-Sequences | \[\[\]\] | | -| Speed up | \* | | -| Parallel | , | | -| Slow down | \/ | | -| Alternate | \<\> | ")`} /> | -| Elongate | @ | | -| Replicate | ! | | +| Concept | Syntax | Example | +| ----------------- | -------- | --------------------------------------------------------------------- | +| Sequence | space | | +| Sample Number | :x | | +| Rests | ~ | | +| Sub-Sequences | \[\] | | +| Sub-Sub-Sequences | \[\[\]\] | | +| Speed up | \* | | +| Parallel | , | | +| Slow down | \/ | | +| Alternate | \<\> | ")`} /> | +| Elongate | @ | | +| Replicate | ! | | ## Sounds -| Name | Description | Example | -| ----- | --------------------------------- | ---------------------------------------------------------------------------------- | -| sound | plays the sound of the given name | | -| bank | selects the sound bank | | -| n | select sample number | | +| Name | Description | Example | +| ----- | --------------------------------- | ----------------------------------------------------------------------- | +| sound | plays the sound of the given name | | +| bank | selects the sound bank | | +| n | select sample number | | ## Notes -| Name | Description | Example | -| --------- | ----------------------------- | -------------------------------------------------------------------------------------------- | -| note | set pitch as number or letter | | -| n + scale | set note in scale | | -| stack | play patterns in parallel | | +| Name | Description | Example | +| --------- | ----------------------------- | --------------------------------------------------------------------------------- | +| note | set pitch as number or letter | | +| n + scale | set note in scale | | +| stack | play patterns in parallel | | ## Audio Effects -| name | example | -| ----- | -------------------------------------------------------------------------------------------------- | -| lpf | ")`} /> | -| vowel | ")`} /> | -| gain | | -| delay | | -| room | | -| pan | | -| speed | ")`} /> | -| range | | +| name | example | +| ----- | --------------------------------------------------------------------------------------- | +| lpf | ")`} /> | +| vowel | ")`} /> | +| gain | | +| delay | | +| room | | +| pan | | +| speed | ")`} /> | +| range | | ## Pattern Effects -| name | description | example | -| ---- | ----------------------------------- | ---------------------------------------------------------------------------------------------- | -| cpm | sets the tempo in cycles per minute | | -| fast | speed up | | -| slow | slow down | | -| rev | reverse | | -| jux | split left/right, modify right | | -| add | add numbers / notes | ")).scale("C:minor")`} /> | -| ply | speed up each event n times | ")`} /> | -| off | copy, shift time & modify | x.speed(2))`} /> | +| name | description | example | +| ---- | ----------------------------------- | ----------------------------------------------------------------------------------- | +| cpm | sets the tempo in cycles per minute | | +| fast | speed up | | +| slow | slow down | | +| rev | reverse | | +| jux | split left/right, modify right | | +| add | add numbers / notes | ")).scale("C:minor")`} /> | +| ply | speed up each event n times | ")`} /> | +| off | copy, shift time & modify | x.speed(2))`} /> | diff --git a/website/src/repl/panel/PatternsTab.jsx b/website/src/repl/panel/PatternsTab.jsx index 05385b15..e2d9cd1d 100644 --- a/website/src/repl/panel/PatternsTab.jsx +++ b/website/src/repl/panel/PatternsTab.jsx @@ -1,6 +1,13 @@ import { DocumentDuplicateIcon, PencilSquareIcon, TrashIcon } from '@heroicons/react/20/solid'; import { + + $featuredPatterns, + $publicPatterns, + clearUserPatterns, + deleteActivePattern, + duplicateActivePattern, + exportPatterns, importPatterns, useActivePattern, @@ -9,8 +16,14 @@ import { userPattern, examplePattern, } from '../../settings.mjs'; + import { useMemo } from 'react'; +import * as tunes from '../tunes.mjs'; +import { useStore } from '@nanostores/react'; +import { getMetadata } from '../../metadata_parser'; + + function classNames(...classes) { return classes.filter(Boolean).join(' '); } @@ -50,6 +63,7 @@ export function PatternsTab({ context }) { const { userPatterns } = useSettings(); const examplePatterns = useMemo(() => examplePattern.getAll(), []); const activePattern = useActivePattern(); + const viewingPattern = useViewingPattern(); const updateCodeWindow = (id, code, reset = false) => { context.handleUpdate(id, code, reset); @@ -62,6 +76,11 @@ export function PatternsTab({ context }) { }; const isExample = examplePatterns[viewingPattern] != null; + + const featuredPatterns = useStore($featuredPatterns); + const publicPatterns = useStore($publicPatterns); + const isExample = useMemo(() => activePattern && !!tunes[activePattern], [activePattern]); + return (
@@ -147,7 +166,52 @@ export function PatternsTab({ context }) {
+ {featuredPatterns && ( +
+

Featured Patterns

+
+
+ )} + {publicPatterns && ( +
+

Last Creations

+ +
+ )}
+

Examples

onPatternBtnClick(id, true)} @@ -156,7 +220,36 @@ export function PatternsTab({ context }) { activePattern={activePattern} viewingPattern={viewingPattern} /> + +

Stock Examples

+
+ {Object.entries(tunes).map(([key, tune]) => ( + { + setActivePattern(key); + context.handleUpdate(tune, true); + }} + > + {key} + + ))} +
+
); } + +export function PatternLabel({ pattern } /* : { pattern: Tables<'code'> } */) { + const meta = useMemo(() => getMetadata(pattern.code), [pattern]); + return ( + <> + {pattern.id}. {meta.title || pattern.hash} by {Array.isArray(meta.by) ? meta.by.join(',') : 'Anonymous'} + + ); +} diff --git a/website/src/repl/panel/SoundsTab.jsx b/website/src/repl/panel/SoundsTab.jsx index a3639dfb..7c16b266 100644 --- a/website/src/repl/panel/SoundsTab.jsx +++ b/website/src/repl/panel/SoundsTab.jsx @@ -57,32 +57,36 @@ export function SoundsTab() { settingsMap.setKey('soundsFilter', 'user')} />
- {soundEntries.map(([name, { data, onTrigger }]) => ( - { - const ctx = getAudioContext(); - const params = { - note: ['synth', 'soundfont'].includes(data.type) ? 'a3' : undefined, - s: name, - clip: 1, - release: 0.5, - }; - const time = ctx.currentTime + 0.05; - const onended = () => trigRef.current?.node?.disconnect(); - trigRef.current = Promise.resolve(onTrigger(time, params, onended)); - trigRef.current.then((ref) => { - connectToDestination(ref?.node); - }); - }} - > - {' '} - {name} - {data?.type === 'sample' ? `(${getSamples(data.samples)})` : ''} - {data?.type === 'soundfont' ? `(${data.fonts.length})` : ''} - - ))} + {soundEntries.map(([name, { data, onTrigger }]) => { + return ( + { + const ctx = getAudioContext(); + const params = { + note: ['synth', 'soundfont'].includes(data.type) ? 'a3' : undefined, + s: name, + clip: 1, + release: 0.5, + sustain: 1, + duration: 0.5, + }; + const time = ctx.currentTime + 0.05; + const onended = () => trigRef.current?.node?.disconnect(); + trigRef.current = Promise.resolve(onTrigger(time, params, onended)); + trigRef.current.then((ref) => { + connectToDestination(ref?.node); + }); + }} + > + {' '} + {name} + {data?.type === 'sample' ? `(${getSamples(data.samples)})` : ''} + {data?.type === 'soundfont' ? `(${data.fonts.length})` : ''} + + ); + })} {!soundEntries.length ? 'No custom sounds loaded in this pattern (yet).' : ''}
diff --git a/website/src/repl/util.mjs b/website/src/repl/util.mjs index 81c41e9d..3405e93d 100644 --- a/website/src/repl/util.mjs +++ b/website/src/repl/util.mjs @@ -9,13 +9,37 @@ import { createClient } from '@supabase/supabase-js'; import { nanoid } from 'nanoid'; import { writeText } from '@tauri-apps/api/clipboard'; import { createContext } from 'react'; +import { $publicPatterns, $featuredPatterns } from '../settings.mjs'; // Create a single supabase client for interacting with your database -const supabase = createClient( +export const supabase = createClient( 'https://pidxdsxphlhzjnzmifth.supabase.co', 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InBpZHhkc3hwaGxoempuem1pZnRoIiwicm9sZSI6ImFub24iLCJpYXQiOjE2NTYyMzA1NTYsImV4cCI6MTk3MTgwNjU1Nn0.bqlw7802fsWRnqU5BLYtmXk_k-D1VFmbkHMywWc15NM', ); +export function loadPublicPatterns() { + return supabase.from('code').select().eq('public', true).limit(20).order('id', { ascending: false }); +} + +export function loadFeaturedPatterns() { + return supabase.from('code').select().eq('featured', true).limit(20).order('id', { ascending: false }); +} + +async function loadDBPatterns() { + try { + const { data: publicPatterns } = await loadPublicPatterns(); + const { data: featuredPatterns } = await loadFeaturedPatterns(); + $publicPatterns.set(publicPatterns); + $featuredPatterns.set(featuredPatterns); + } catch (err) { + console.error('error loading patterns'); + } +} + +if (typeof window !== 'undefined') { + loadDBPatterns(); +} + export async function initCode() { // load code from url hash (either short hash from database or decode long hash) try { @@ -90,10 +114,13 @@ export async function shareCode(codeToShare) { logger(`Link already generated!`, 'error'); return; } + const isPublic = confirm( + 'Do you want your pattern to be public? If no, press cancel and you will get just a private link.', + ); // generate uuid in the browser const hash = nanoid(12); const shareUrl = window.location.origin + window.location.pathname + '?' + hash; - const { data, error } = await supabase.from('code').insert([{ code: codeToShare, hash }]); + const { error } = await supabase.from('code').insert([{ code: codeToShare, hash, ['public']: isPublic }]); if (!error) { lastShared = codeToShare; // copy shareUrl to clipboard diff --git a/website/src/settings.mjs b/website/src/settings.mjs index a68a65c6..f500b92c 100644 --- a/website/src/settings.mjs +++ b/website/src/settings.mjs @@ -1,9 +1,13 @@ +import { atom } from 'nanostores'; import { persistentMap, persistentAtom } from '@nanostores/persistent'; import { useStore } from '@nanostores/react'; import { register } from '@strudel.cycles/core'; import * as tunes from './repl/tunes.mjs'; import { logger } from '@strudel.cycles/core'; +export let $publicPatterns = atom([]); +export let $featuredPatterns = atom([]); + export const defaultAudioDeviceName = 'System Standard'; export const defaultSettings = { @@ -147,6 +151,7 @@ export const examplePattern = { }, }; +// break export const userPattern = { getAll() { return JSON.parse(settingsMap.get().userPatterns); @@ -216,6 +221,43 @@ export const userPattern = { alert('Name already taken!'); return { id, data }; } +// break +export function updateUserCode(code) { + const userPatterns = getUserPatterns(); + let activePattern = getActivePattern(); + // check if code is that of an example tune + const [example] = Object.entries(tunes).find(([_, tune]) => tune === code) || []; + if (example && (!activePattern || activePattern === example)) { + // select example + setActivePattern(example); + return; + } + const publicPattern = $publicPatterns.get().find((pat) => pat.code === code); + if (publicPattern) { + setActivePattern(publicPattern.hash); + return; + } + const featuredPattern = $featuredPatterns.get().find((pat) => pat.code === code); + if (featuredPattern) { + setActivePattern(featuredPattern.hash); + return; + } + if (!activePattern) { + // create new user pattern + activePattern = newUserPattern(); + setActivePattern(activePattern); + } else if ( + (!!tunes[activePattern] && code !== tunes[activePattern]) || // fork example tune? + $publicPatterns.get().find((p) => p.hash === activePattern) || // fork public pattern? + $featuredPatterns.get().find((p) => p.hash === activePattern) // fork featured pattern? + ) { + // fork example + activePattern = getNextCloneName(activePattern); + setActivePattern(activePattern); + } + setUserPatterns({ ...userPatterns, [activePattern]: { code } }); +} +// break userPatterns[newID] = data; // copy code delete userPatterns[id];