feat: fix target audio for all 96 levels and improve layout density

- Enhance targetAudio.js with envelope (ADSR), LFO modulation, effects
  (delay/reverb/distortion), and retrigger patterns for rhythmic sounds
- Fill in target audio configs for 87 levels (worlds 3-12) that had empty
  build arrays, making the "Objetivo" preview button functional everywhere
- Increase base sizes for modules, sidebar, ports, knobs, and typography
  so the UI feels less empty at 100% zoom

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jose Luis
2026-03-21 04:08:41 +01:00
parent 888b88e748
commit 58d567c671
12 changed files with 986 additions and 146 deletions

View File

@@ -24,7 +24,14 @@ export const WORLD_10 = {
preplacedModules: [
{ id: 1, type: 'output', x: 800, y: 140, params: { volume: -8 }, locked: true },
],
target: { build: [], duration: 3 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sine', frequency: 220, detune: 0 } },
{ type: 'oscillator', params: { waveform: 'sine', frequency: 330, detune: 0 } },
],
envelope: { attack: 0.05, decay: 0.3, sustain: 0.4, release: 0.2 },
duration: 3,
},
checks: [
{
star: 1,
@@ -87,7 +94,14 @@ export const WORLD_10 = {
preplacedModules: [
{ id: 1, type: 'output', x: 800, y: 140, params: { volume: -8 }, locked: true },
],
target: { build: [], duration: 3 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sine', frequency: 220, detune: 0 } },
{ type: 'oscillator', params: { waveform: 'sine', frequency: 220, detune: 8 } },
],
envelope: { attack: 0.06, decay: 0.35, sustain: 0.35, release: 0.25 },
duration: 3,
},
checks: [
{
star: 1,
@@ -148,7 +162,16 @@ export const WORLD_10 = {
preplacedModules: [
{ id: 1, type: 'output', x: 800, y: 140, params: { volume: -8 }, locked: true },
],
target: { build: [], duration: 3 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sine', frequency: 165, detune: 0 } },
],
effects: [
{ type: 'delay', delayTime: 0.035, feedback: 0.15, wet: 0.8 },
],
envelope: { attack: 0.08, decay: 0.4, sustain: 0.3, release: 0.3 },
duration: 3,
},
checks: [
{
star: 1,
@@ -205,7 +228,16 @@ export const WORLD_10 = {
preplacedModules: [
{ id: 1, type: 'output', x: 700, y: 120, params: { volume: -8 }, locked: true },
],
target: { build: [], duration: 3 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sine', frequency: 262, detune: 0 } },
],
effects: [
{ type: 'reverb', decay: 1.5, wet: 0.4 },
],
envelope: { attack: 0.07, decay: 0.4, sustain: 0.35, release: 0.25 },
duration: 3,
},
checks: [
{
star: 1,
@@ -262,7 +294,16 @@ export const WORLD_10 = {
preplacedModules: [
{ id: 1, type: 'output', x: 700, y: 120, params: { volume: -8 }, locked: true },
],
target: { build: [], duration: 4 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sine', frequency: 196, detune: 0 } },
],
effects: [
{ type: 'reverb', decay: 4.2, wet: 0.65 },
],
envelope: { attack: 0.06, decay: 0.8, sustain: 0.4, release: 0.5 },
duration: 4,
},
checks: [
{
star: 1,
@@ -317,7 +358,16 @@ export const WORLD_10 = {
preplacedModules: [
{ id: 1, type: 'output', x: 800, y: 140, params: { volume: -8 }, locked: true },
],
target: { build: [], duration: 3 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'square', frequency: 220, detune: 0 } },
],
effects: [
{ type: 'delay', delayTime: 0.15, feedback: 0.08, wet: 0.75 },
],
envelope: { attack: 0.05, decay: 0.35, sustain: 0.4, release: 0.2 },
duration: 3,
},
checks: [
{
star: 1,
@@ -374,7 +424,19 @@ export const WORLD_10 = {
preplacedModules: [
{ id: 1, type: 'output', x: 900, y: 140, params: { volume: -8 }, locked: true },
],
target: { build: [], duration: 4 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sawtooth', frequency: 280, detune: 0 } },
],
filter: { type: 'lowpass', frequency: 3500, Q: 1.5 },
effects: [
{ type: 'distortion', distortion: 0.45, wet: 0.5 },
{ type: 'delay', delayTime: 0.3, feedback: 0.35, wet: 0.55 },
{ type: 'reverb', decay: 2.2, wet: 0.45 },
],
envelope: { attack: 0.08, decay: 0.45, sustain: 0.25, release: 0.3 },
duration: 4,
},
checks: [
{
star: 1,
@@ -442,7 +504,21 @@ export const WORLD_10 = {
preplacedModules: [
{ id: 1, type: 'output', x: 950, y: 160, params: { volume: -8 }, locked: true },
],
target: { build: [], duration: 5 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sine', frequency: 110, detune: 0 } },
{ type: 'oscillator', params: { waveform: 'sine', frequency: 110, detune: 10 } },
{ type: 'oscillator', params: { waveform: 'sawtooth', frequency: 220, detune: 0 } },
],
filter: { type: 'lowpass', frequency: 4000, Q: 1.3 },
lfo: { frequency: 0.6, type: 'sine', min: 2000, max: 5000, target: 'frequency' },
effects: [
{ type: 'delay', delayTime: 0.25, feedback: 0.4, wet: 0.6 },
{ type: 'reverb', decay: 3, wet: 0.55 },
],
envelope: { attack: 0.1, decay: 0.5, sustain: 0.3, release: 0.4 },
duration: 5,
},
checks: [
{
star: 1,

View File

@@ -25,7 +25,15 @@ export const WORLD_11 = {
preplacedModules: [
{ id: 1, type: 'output', x: 700, y: 120, params: { volume: -6 }, locked: true },
],
target: { build: [], duration: 3 },
target: {
build: [
{ type: 'noise', params: { type: 'white' } },
],
filter: { type: 'lowpass', frequency: 1500, Q: 9.5 },
lfo: { frequency: 1, type: 'sine', min: 600, max: 3500, target: 'frequency' },
envelope: { attack: 0.1, decay: 0.4, sustain: 0.3, release: 0.25 },
duration: 3,
},
checks: [
{
star: 1,
@@ -80,7 +88,14 @@ export const WORLD_11 = {
preplacedModules: [
{ id: 1, type: 'output', x: 700, y: 120, params: { volume: -8 }, locked: true },
],
target: { build: [], duration: 3 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sine', frequency: 200, detune: 0 } },
{ type: 'oscillator', params: { waveform: 'sine', frequency: 8, detune: 0 } },
],
envelope: { attack: 0.08, decay: 0.35, sustain: 0.35, release: 0.2 },
duration: 3,
},
checks: [
{
star: 1,
@@ -140,7 +155,21 @@ export const WORLD_11 = {
preplacedModules: [
{ id: 1, type: 'output', x: 800, y: 140, params: { volume: -8 }, locked: true },
],
target: { build: [], duration: 5 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sine', frequency: 60, detune: 0 } },
{ type: 'oscillator', params: { waveform: 'sine', frequency: 60, detune: -4 } },
],
filter: { type: 'lowpass', frequency: 2500, Q: 0.85 },
lfo: [
{ frequency: 0.3, type: 'sine', min: 1000, max: 4000, target: 'frequency' },
{ frequency: 0.15, type: 'sine', min: 0.3, max: 0.9, target: 'amplitude' },
],
effects: [
{ type: 'reverb', decay: 5, wet: 0.7 },
],
duration: 5,
},
checks: [
{
star: 1,
@@ -196,7 +225,17 @@ export const WORLD_11 = {
preplacedModules: [
{ id: 1, type: 'output', x: 900, y: 140, params: { volume: -8 }, locked: true },
],
target: { build: [], duration: 4 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sawtooth', frequency: 220, detune: 0 } },
{ type: 'oscillator', params: { waveform: 'sawtooth', frequency: 220, detune: 3 } },
{ type: 'oscillator', params: { waveform: 'square', frequency: 220, detune: -2 } },
{ type: 'oscillator', params: { waveform: 'square', frequency: 220, detune: 5 } },
],
filter: { type: 'lowpass', frequency: 3500, Q: 1.2 },
envelope: { attack: 0.07, decay: 0.4, sustain: 0.35, release: 0.25 },
duration: 4,
},
checks: [
{
star: 1,
@@ -266,7 +305,15 @@ export const WORLD_11 = {
preplacedModules: [
{ id: 1, type: 'output', x: 800, y: 120, params: { volume: -8 }, locked: true },
],
target: { build: [], duration: 3 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sawtooth', frequency: 150, detune: 0 } },
],
filter: { type: 'lowpass', frequency: 2800, Q: 1.3 },
lfo: { frequency: 2.5, type: 'square', min: 0.1, max: 0.95, target: 'amplitude' },
envelope: { attack: 0.03, decay: 0.25, sustain: 0.1, release: 0.15 },
duration: 3,
},
checks: [
{
star: 1,
@@ -319,7 +366,18 @@ export const WORLD_11 = {
preplacedModules: [
{ id: 1, type: 'output', x: 800, y: 140, params: { volume: -10 }, locked: true },
],
target: { build: [], duration: 4 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sine', frequency: 120, detune: 0 } },
],
filter: { type: 'lowpass', frequency: 2000, Q: 1.5 },
effects: [
{ type: 'delay', delayTime: 0.5, feedback: 0.8, wet: 0.9 },
{ type: 'reverb', decay: 3.5, wet: 0.6 },
],
envelope: { attack: 0.1, decay: 1, sustain: 0.4, release: 0.5 },
duration: 4,
},
checks: [
{
star: 1,
@@ -375,7 +433,18 @@ export const WORLD_11 = {
preplacedModules: [
{ id: 1, type: 'output', x: 700, y: 120, params: { volume: -8 }, locked: true },
],
target: { build: [], duration: 3 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sine', frequency: 100, detune: 0 } },
],
filter: { type: 'lowpass', frequency: 2500, Q: 1.2 },
lfo: [
{ frequency: 0.4, type: 'sine', min: 1.5, max: 6.5, target: 'frequency' },
{ frequency: 4.5, type: 'sine', min: 1000, max: 4500, target: 'frequency' },
],
envelope: { attack: 0.08, decay: 0.4, sustain: 0.3, release: 0.25 },
duration: 3,
},
checks: [
{
star: 1,
@@ -440,7 +509,26 @@ export const WORLD_11 = {
preplacedModules: [
{ id: 1, type: 'output', x: 950, y: 160, params: { volume: -10 }, locked: true },
],
target: { build: [], duration: 5 },
target: {
build: [
{ type: 'noise', params: { type: 'white' } },
{ type: 'oscillator', params: { waveform: 'sine', frequency: 80, detune: 0 } },
{ type: 'oscillator', params: { waveform: 'sine', frequency: 80, detune: -3 } },
{ type: 'oscillator', params: { waveform: 'sine', frequency: 7, detune: 0 } },
],
filter: { type: 'lowpass', frequency: 2200, Q: 8 },
lfo: [
{ frequency: 0.25, type: 'sine', min: 1000, max: 3500, target: 'frequency' },
{ frequency: 2, type: 'sine', min: 0.2, max: 0.9, target: 'amplitude' },
],
effects: [
{ type: 'distortion', distortion: 0.4, wet: 0.35 },
{ type: 'delay', delayTime: 0.4, feedback: 0.65, wet: 0.7 },
{ type: 'reverb', decay: 3.2, wet: 0.5 },
],
envelope: { attack: 0.12, decay: 0.6, sustain: 0.25, release: 0.4 },
duration: 5,
},
checks: [
{
star: 1,

View File

@@ -25,7 +25,19 @@ export const WORLD_12 = {
preplacedModules: [
{ id: 1, type: 'output', x: 800, y: 120, params: { volume: -8 }, locked: true },
],
target: { build: [], duration: 5 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sine', frequency: 55, detune: 0 } },
{ type: 'oscillator', params: { waveform: 'sine', frequency: 55, detune: -5 } },
],
filter: { type: 'lowpass', frequency: 1800, Q: 0.9 },
lfo: { frequency: 0.2, type: 'sine', min: 800, max: 3200, target: 'frequency' },
effects: [
{ type: 'reverb', decay: 5.5, wet: 0.65 },
],
envelope: { attack: 0.01, decay: 2, sustain: 0.8, release: 0.6 },
duration: 5,
},
checks: [
{
star: 1,
@@ -86,7 +98,16 @@ export const WORLD_12 = {
preplacedModules: [
{ id: 1, type: 'output', x: 800, y: 140, params: { volume: -6 }, locked: true },
],
target: { build: [], duration: 4 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sine', frequency: 55, detune: 0 } },
{ type: 'oscillator', params: { waveform: 'sawtooth', frequency: 82, detune: 0 } },
{ type: 'oscillator', params: { waveform: 'sawtooth', frequency: 82, detune: 4 } },
],
filter: { type: 'lowpass', frequency: 4500, Q: 1.1 },
envelope: { attack: 0.01, decay: 0.18, sustain: 0.05, release: 0.1 },
duration: 4,
},
checks: [
{
star: 1,
@@ -146,7 +167,18 @@ export const WORLD_12 = {
preplacedModules: [
{ id: 1, type: 'output', x: 850, y: 140, params: { volume: -8 }, locked: true },
],
target: { build: [], duration: 5 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'square', frequency: 440, detune: 0 } },
],
filter: { type: 'lowpass', frequency: 3800, Q: 3 },
lfo: { frequency: 0.5, type: 'sine', min: 2000, max: 5500, target: 'frequency' },
effects: [
{ type: 'reverb', decay: 2.8, wet: 0.45 },
],
envelope: { attack: 0.04, decay: 0.5, sustain: 0.5, release: 0.3 },
duration: 5,
},
checks: [
{
star: 1,
@@ -206,7 +238,19 @@ export const WORLD_12 = {
preplacedModules: [
{ id: 1, type: 'output', x: 850, y: 140, params: { volume: -8 }, locked: true },
],
target: { build: [], duration: 5 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sine', frequency: 110, detune: 0 } },
{ type: 'oscillator', params: { waveform: 'sine', frequency: 110, detune: -6 } },
],
filter: { type: 'lowpass', frequency: 2500, Q: 0.95 },
lfo: { frequency: 0.15, type: 'sine', min: 1200, max: 3800, target: 'frequency' },
effects: [
{ type: 'reverb', decay: 4.5, wet: 0.7 },
],
envelope: { attack: 0.15, decay: 1.5, sustain: 0.6, release: 0.5 },
duration: 5,
},
checks: [
{
star: 1,
@@ -265,7 +309,20 @@ export const WORLD_12 = {
preplacedModules: [
{ id: 1, type: 'output', x: 850, y: 140, params: { volume: -6 }, locked: true },
],
target: { build: [], duration: 5 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sine', frequency: 130, detune: 0 } },
{ type: 'oscillator', params: { waveform: 'sawtooth', frequency: 165, detune: 0 } },
{ type: 'oscillator', params: { waveform: 'sawtooth', frequency: 165, detune: 3 } },
],
filter: { type: 'lowpass', frequency: 3000, Q: 1.4 },
lfo: { frequency: 0.4, type: 'sine', min: 1500, max: 5000, target: 'frequency' },
effects: [
{ type: 'reverb', decay: 2, wet: 0.35 },
],
envelope: { attack: 0.08, decay: 0.6, sustain: 0.4, release: 0.3 },
duration: 5,
},
checks: [
{
star: 1,
@@ -323,7 +380,22 @@ export const WORLD_12 = {
preplacedModules: [
{ id: 1, type: 'output', x: 950, y: 160, params: { volume: -10 }, locked: true },
],
target: { build: [], duration: 6 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sine', frequency: 55, detune: 0 } },
{ type: 'oscillator', params: { waveform: 'sine', frequency: 55, detune: -5 } },
{ type: 'oscillator', params: { waveform: 'sawtooth', frequency: 110, detune: 0 } },
{ type: 'oscillator', params: { waveform: 'sawtooth', frequency: 110, detune: 4 } },
{ type: 'oscillator', params: { waveform: 'square', frequency: 220, detune: 0 } },
],
filter: { type: 'lowpass', frequency: 3500, Q: 1.2 },
lfo: { frequency: 0.35, type: 'sine', min: 1500, max: 4500, target: 'frequency' },
effects: [
{ type: 'reverb', decay: 2.5, wet: 0.5 },
],
envelope: { attack: 0.1, decay: 0.6, sustain: 0.35, release: 0.4 },
duration: 6,
},
checks: [
{
star: 1,
@@ -380,7 +452,20 @@ export const WORLD_12 = {
preplacedModules: [
{ id: 1, type: 'output', x: 850, y: 140, params: { volume: -10 }, locked: true },
],
target: { build: [], duration: 5 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sine', frequency: 50, detune: 0 } },
{ type: 'oscillator', params: { waveform: 'sine', frequency: 50, detune: -7 } },
],
filter: { type: 'lowpass', frequency: 1500, Q: 0.85 },
lfo: { frequency: 0.12, type: 'sine', min: 600, max: 2500, target: 'frequency' },
effects: [
{ type: 'delay', delayTime: 0.6, feedback: 0.5, wet: 0.6 },
{ type: 'reverb', decay: 6, wet: 0.75 },
],
envelope: { attack: 0.05, decay: 1.5, sustain: 0.2, release: 1 },
duration: 5,
},
checks: [
{
star: 1,
@@ -441,7 +526,27 @@ export const WORLD_12 = {
preplacedModules: [
{ id: 1, type: 'output', x: 1000, y: 160, params: { volume: -8 }, locked: true },
],
target: { build: [], duration: 8 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sine', frequency: 50, detune: 0 } },
{ type: 'oscillator', params: { waveform: 'sine', frequency: 50, detune: -5 } },
{ type: 'oscillator', params: { waveform: 'sawtooth', frequency: 110, detune: 0 } },
{ type: 'oscillator', params: { waveform: 'sawtooth', frequency: 110, detune: 4 } },
{ type: 'oscillator', params: { waveform: 'square', frequency: 220, detune: 0 } },
{ type: 'oscillator', params: { waveform: 'square', frequency: 220, detune: -3 } },
],
filter: { type: 'lowpass', frequency: 3800, Q: 1.5 },
lfo: [
{ frequency: 0.3, type: 'sine', min: 1500, max: 4500, target: 'frequency' },
{ frequency: 0.8, type: 'sine', min: 0.3, max: 0.9, target: 'amplitude' },
],
effects: [
{ type: 'delay', delayTime: 0.35, feedback: 0.45, wet: 0.5 },
{ type: 'reverb', decay: 3, wet: 0.55 },
],
envelope: { attack: 0.1, decay: 0.7, sustain: 0.4, release: 0.5 },
duration: 8,
},
checks: [
{
star: 1,

View File

@@ -80,7 +80,13 @@ export const WORLD_3 = {
{ id: 2, type: 'vca', x: 400, y: 60, params: { gain: 0 }, locked: false },
{ id: 3, type: 'output', x: 620, y: 80, params: { volume: -6 }, locked: true },
],
target: { build: [], duration: 2 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'square', frequency: 440 } },
],
envelope: { attack: 0.2, decay: 0.15, sustain: 0.6, release: 0.5 },
duration: 2,
},
checks: [
{
star: 1,
@@ -135,7 +141,13 @@ export const WORLD_3 = {
{ id: 2, type: 'vca', x: 400, y: 60, params: { gain: 0 }, locked: false },
{ id: 3, type: 'output', x: 620, y: 80, params: { volume: -6 }, locked: true },
],
target: { build: [], duration: 2 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sine', frequency: 440 } },
],
envelope: { attack: 0.005, decay: 0.15, sustain: 0, release: 0.1 },
duration: 2,
},
checks: [
{
star: 1,
@@ -191,7 +203,13 @@ export const WORLD_3 = {
{ id: 2, type: 'vca', x: 400, y: 60, params: { gain: 0 }, locked: false },
{ id: 3, type: 'output', x: 620, y: 80, params: { volume: -6 }, locked: true },
],
target: { build: [], duration: 2 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sawtooth', frequency: 220 } },
],
envelope: { attack: 1.2, decay: 0.3, sustain: 0.75, release: 2.5 },
duration: 2,
},
checks: [
{
star: 1,
@@ -243,7 +261,14 @@ export const WORLD_3 = {
{ id: 2, type: 'vca', x: 500, y: 60, params: { gain: 0 }, locked: false },
{ id: 3, type: 'output', x: 760, y: 80, params: { volume: -6 }, locked: true },
],
target: { build: [], duration: 2 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'triangle', frequency: 440 } },
],
filter: { type: 'lowpass', frequency: 3000, Q: 2 },
envelope: { attack: 0.008, decay: 0.5, sustain: 0.05, release: 0.2 },
duration: 2,
},
checks: [
{
star: 1,
@@ -300,7 +325,14 @@ export const WORLD_3 = {
{ id: 2, type: 'vca', x: 520, y: 40, params: { gain: 0 }, locked: false },
{ id: 3, type: 'output', x: 760, y: 80, params: { volume: -6 }, locked: true },
],
target: { build: [], duration: 2 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sawtooth', frequency: 220 } },
],
filter: { type: 'lowpass', frequency: 800, Q: 4 },
envelope: { attack: 0.01, decay: 0.3, sustain: 0.4, release: 0.2 },
duration: 2,
},
checks: [
{
star: 1,
@@ -357,7 +389,13 @@ export const WORLD_3 = {
{ id: 2, type: 'vca', x: 340, y: 60, params: { gain: 0.7 }, locked: false },
{ id: 3, type: 'output', x: 580, y: 80, params: { volume: -6 }, locked: true },
],
target: { build: [], duration: 3 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sine', frequency: 440 } },
],
lfo: { frequency: 6, type: 'sine', min: 0.2, max: 1.0, target: 'amplitude' },
duration: 3,
},
checks: [
{
star: 1,
@@ -408,7 +446,14 @@ export const WORLD_3 = {
preplacedModules: [
{ id: 1, type: 'output', x: 800, y: 120, params: { volume: -6 }, locked: true },
],
target: { build: [], duration: 3 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sawtooth', frequency: 220 } },
],
filter: { type: 'lowpass', frequency: 2000, Q: 6 },
envelope: { attack: 0.05, decay: 0.3, sustain: 0.5, release: 0.6 },
duration: 3,
},
checks: [
{
star: 1,

View File

@@ -25,7 +25,13 @@ export const WORLD_4 = {
{ id: 1, type: 'oscillator', x: 80, y: 80, params: { waveform: 'sine', frequency: 440, detune: 0 }, locked: true },
{ id: 2, type: 'output', x: 500, y: 100, params: { volume: -6 }, locked: true },
],
target: { build: [], duration: 3 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sine', frequency: 440 } },
],
lfo: { frequency: 6, type: 'sine', min: 420, max: 460, target: 'frequency' },
duration: 3,
},
checks: [
{
star: 1,
@@ -74,7 +80,13 @@ export const WORLD_4 = {
{ id: 1, type: 'oscillator', x: 80, y: 80, params: { waveform: 'square', frequency: 440, detune: 0 }, locked: false },
{ id: 2, type: 'output', x: 500, y: 100, params: { volume: -6 }, locked: true },
],
target: { build: [], duration: 4 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'square', frequency: 440 } },
],
lfo: { frequency: 0.3, type: 'sine', min: 200, max: 800, target: 'frequency' },
duration: 4,
},
checks: [
{
star: 1,
@@ -124,7 +136,14 @@ export const WORLD_4 = {
{ id: 2, type: 'filter', x: 300, y: 60, params: { type: 'lowpass', frequency: 600, Q: 4 }, locked: false },
{ id: 3, type: 'output', x: 560, y: 80, params: { volume: -8 }, locked: true },
],
target: { build: [], duration: 3 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sawtooth', frequency: 110 } },
],
filter: { type: 'lowpass', frequency: 800, Q: 5 },
lfo: { frequency: 3, type: 'square', min: 400, max: 4000, target: 'frequency' },
duration: 3,
},
checks: [
{
star: 1,
@@ -178,7 +197,13 @@ export const WORLD_4 = {
{ id: 1, type: 'oscillator', x: 80, y: 80, params: { waveform: 'sine', frequency: 440, detune: 0 }, locked: true },
{ id: 2, type: 'output', x: 600, y: 100, params: { volume: -6 }, locked: true },
],
target: { build: [], duration: 3 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sine', frequency: 440 } },
],
lfo: { frequency: 2, type: 'sine', min: 0.3, max: 1.0, target: 'amplitude' },
duration: 3,
},
checks: [
{
star: 1,
@@ -232,7 +257,14 @@ export const WORLD_4 = {
{ id: 3, type: 'vca', x: 480, y: 40, params: { gain: 0.6 }, locked: false },
{ id: 4, type: 'output', x: 680, y: 60, params: { volume: -8 }, locked: true },
],
target: { build: [], duration: 3 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sawtooth', frequency: 110 } },
],
filter: { type: 'lowpass', frequency: 1200, Q: 6 },
lfo: { frequency: 2.5, type: 'sine', min: 400, max: 3500, target: 'frequency' },
duration: 3,
},
checks: [
{
star: 1,
@@ -288,7 +320,13 @@ export const WORLD_4 = {
preplacedModules: [
{ id: 1, type: 'output', x: 600, y: 120, params: { volume: -8 }, locked: true },
],
target: { build: [], duration: 3 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sine', frequency: 220 } },
{ type: 'oscillator', params: { waveform: 'sine', frequency: 880 } },
],
duration: 3,
},
checks: [
{
star: 1,
@@ -354,7 +392,15 @@ export const WORLD_4 = {
{ id: 3, type: 'vca', x: 480, y: 40, params: { gain: 0 }, locked: false },
{ id: 4, type: 'output', x: 680, y: 60, params: { volume: -6 }, locked: true },
],
target: { build: [], duration: 3 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sawtooth', frequency: 220 } },
],
filter: { type: 'lowpass', frequency: 1500, Q: 5 },
envelope: { attack: 0.1, decay: 0.3, sustain: 0.5, release: 0.4 },
lfo: { frequency: 3, type: 'sine', min: 600, max: 3000, target: 'frequency' },
duration: 3,
},
checks: [
{
star: 1,
@@ -418,7 +464,15 @@ export const WORLD_4 = {
preplacedModules: [
{ id: 1, type: 'output', x: 800, y: 120, params: { volume: -8 }, locked: true },
],
target: { build: [], duration: 4 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sawtooth', frequency: 55 } },
],
filter: { type: 'lowpass', frequency: 400, Q: 10 },
envelope: { attack: 0.02, decay: 0.2, sustain: 0.7, release: 0.3 },
lfo: { frequency: 1.5, type: 'sine', min: 200, max: 2000, target: 'frequency' },
duration: 4,
},
checks: [
{
star: 1,

View File

@@ -26,7 +26,15 @@ export const WORLD_5 = {
{ id: 2, type: 'delay', x: 340, y: 80, params: { time: 0.3, feedback: 0.3, mix: 0.5 }, locked: false },
{ id: 3, type: 'output', x: 600, y: 100, params: { volume: -6 }, locked: true },
],
target: { build: [], duration: 3 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sine', frequency: 440 } },
],
effects: [
{ type: 'delay', time: 0.35, feedback: 0.4, wet: 0.6 },
],
duration: 3,
},
checks: [
{
star: 1,
@@ -77,7 +85,15 @@ export const WORLD_5 = {
{ id: 1, type: 'oscillator', x: 80, y: 80, params: { waveform: 'square', frequency: 330, detune: 0 }, locked: true },
{ id: 2, type: 'output', x: 600, y: 100, params: { volume: -6 }, locked: true },
],
target: { build: [], duration: 2 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'square', frequency: 330 } },
],
effects: [
{ type: 'delay', time: 0.08, feedback: 0.05, wet: 0.5 },
],
duration: 2,
},
checks: [
{
star: 1,
@@ -129,7 +145,15 @@ export const WORLD_5 = {
{ id: 2, type: 'reverb', x: 340, y: 80, params: { decay: 2, mix: 0.4 }, locked: false },
{ id: 3, type: 'output', x: 600, y: 100, params: { volume: -6 }, locked: true },
],
target: { build: [], duration: 3 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'triangle', frequency: 440 } },
],
effects: [
{ type: 'reverb', decay: 5.5, wet: 0.55 },
],
duration: 3,
},
checks: [
{
star: 1,
@@ -179,7 +203,15 @@ export const WORLD_5 = {
{ id: 1, type: 'oscillator', x: 80, y: 80, params: { waveform: 'sine', frequency: 220, detune: 0 }, locked: true },
{ id: 2, type: 'output', x: 600, y: 100, params: { volume: -10 }, locked: true },
],
target: { build: [], duration: 2.5 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sine', frequency: 220 } },
],
effects: [
{ type: 'distortion', amount: 6 },
],
duration: 2.5,
},
checks: [
{
star: 1,
@@ -229,7 +261,16 @@ export const WORLD_5 = {
{ id: 1, type: 'oscillator', x: 60, y: 80, params: { waveform: 'sawtooth', frequency: 220, detune: 0 }, locked: true },
{ id: 2, type: 'output', x: 740, y: 100, params: { volume: -10 }, locked: true },
],
target: { build: [], duration: 3 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sawtooth', frequency: 220 } },
],
effects: [
{ type: 'distortion', amount: 3 },
{ type: 'delay', time: 0.35, feedback: 0.35, wet: 0.5 },
],
duration: 3,
},
checks: [
{
star: 1,
@@ -289,7 +330,16 @@ export const WORLD_5 = {
{ id: 1, type: 'oscillator', x: 60, y: 80, params: { waveform: 'square', frequency: 330, detune: 0 }, locked: true },
{ id: 2, type: 'output', x: 720, y: 100, params: { volume: -8 }, locked: true },
],
target: { build: [], duration: 3 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'square', frequency: 330 } },
],
filter: { type: 'lowpass', frequency: 850, Q: 2 },
effects: [
{ type: 'delay', time: 0.4, feedback: 0.6, wet: 0.6 },
],
duration: 3,
},
checks: [
{
star: 1,
@@ -343,7 +393,16 @@ export const WORLD_5 = {
{ id: 1, type: 'oscillator', x: 60, y: 80, params: { waveform: 'sawtooth', frequency: 220, detune: 0 }, locked: false },
{ id: 2, type: 'output', x: 720, y: 100, params: { volume: -10 }, locked: true },
],
target: { build: [], duration: 4 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sawtooth', frequency: 220 } },
],
effects: [
{ type: 'distortion', amount: 5 },
{ type: 'reverb', decay: 6.5, wet: 0.65 },
],
duration: 4,
},
checks: [
{
star: 1,
@@ -398,7 +457,19 @@ export const WORLD_5 = {
preplacedModules: [
{ id: 1, type: 'output', x: 900, y: 120, params: { volume: -8 }, locked: true },
],
target: { build: [], duration: 5 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sine', frequency: 110 } },
],
filter: { type: 'lowpass', frequency: 1200, Q: 3 },
envelope: { attack: 0.5, decay: 0.3, sustain: 0.6, release: 1.5 },
lfo: { frequency: 0.5, type: 'sine', min: 400, max: 4000, target: 'frequency' },
effects: [
{ type: 'delay', time: 0.5, feedback: 0.5, wet: 0.5 },
{ type: 'reverb', decay: 5, wet: 0.6 },
],
duration: 5,
},
checks: [
{
star: 1,

View File

@@ -24,7 +24,13 @@ export const WORLD_6 = {
preplacedModules: [
{ id: 1, type: 'output', x: 700, y: 120, params: { volume: -6 }, locked: true },
],
target: { build: [], duration: 2 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sine', frequency: 55 } },
],
envelope: { attack: 0, decay: 0.25, sustain: 0, release: 0.1 },
duration: 2,
},
checks: [
{
star: 1,
@@ -84,7 +90,14 @@ export const WORLD_6 = {
preplacedModules: [
{ id: 1, type: 'output', x: 700, y: 120, params: { volume: -10 }, locked: true },
],
target: { build: [], duration: 2 },
target: {
build: [
{ type: 'noise', params: { type: 'white' } },
],
filter: { type: 'highpass', frequency: 7000, Q: 2 },
envelope: { attack: 0, decay: 0.08, sustain: 0, release: 0 },
duration: 2,
},
checks: [
{
star: 1,
@@ -135,7 +148,15 @@ export const WORLD_6 = {
preplacedModules: [
{ id: 1, type: 'output', x: 800, y: 140, params: { volume: -8 }, locked: true },
],
target: { build: [], duration: 2 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sine', frequency: 200 } },
{ type: 'noise', params: { type: 'white' } },
],
filter: { type: 'highpass', frequency: 3000, Q: 1.5 },
envelope: { attack: 0, decay: 0.12, sustain: 0, release: 0.05 },
duration: 2,
},
checks: [
{
star: 1,
@@ -194,7 +215,19 @@ export const WORLD_6 = {
preplacedModules: [
{ id: 1, type: 'output', x: 900, y: 140, params: { volume: -8 }, locked: true },
],
target: { build: [], duration: 5 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sawtooth', frequency: 110, detune: -8 } },
{ type: 'oscillator', params: { waveform: 'sawtooth', frequency: 110, detune: 8 } },
],
filter: { type: 'lowpass', frequency: 1500, Q: 3 },
envelope: { attack: 1, decay: 0.4, sustain: 0.7, release: 2 },
lfo: { frequency: 0.6, type: 'sine', min: 600, max: 3500, target: 'frequency' },
effects: [
{ type: 'reverb', decay: 5.5, wet: 0.6 },
],
duration: 5,
},
checks: [
{
star: 1,
@@ -250,7 +283,16 @@ export const WORLD_6 = {
preplacedModules: [
{ id: 1, type: 'output', x: 800, y: 120, params: { volume: -8 }, locked: true },
],
target: { build: [], duration: 4 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sawtooth', frequency: 55, detune: -9 } },
{ type: 'oscillator', params: { waveform: 'sawtooth', frequency: 55, detune: 9 } },
],
filter: { type: 'lowpass', frequency: 400, Q: 8 },
lfo: { frequency: 0.7, type: 'sine', min: 200, max: 2000, target: 'frequency' },
envelope: { attack: 0.05, decay: 0.2, sustain: 0.6, release: 0.3 },
duration: 4,
},
checks: [
{
star: 1,
@@ -303,7 +345,13 @@ export const WORLD_6 = {
preplacedModules: [
{ id: 1, type: 'output', x: 700, y: 120, params: { volume: -8 }, locked: true },
],
target: { build: [], duration: 2 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'square', frequency: 440 } },
],
envelope: { attack: 0.01, decay: 0.15, sustain: 0.05, release: 0.1 },
duration: 2,
},
checks: [
{
star: 1,
@@ -368,7 +416,19 @@ export const WORLD_6 = {
preplacedModules: [
{ id: 1, type: 'output', x: 900, y: 140, params: { volume: -8 }, locked: true },
],
target: { build: [], duration: 4 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sawtooth', frequency: 330 } },
],
filter: { type: 'lowpass', frequency: 2000, Q: 4 },
envelope: { attack: 0.005, decay: 0.15, sustain: 0.1, release: 0.08 },
lfo: { frequency: 1.5, type: 'sine', min: 1000, max: 4000, target: 'frequency' },
effects: [
{ type: 'delay', time: 0.25, feedback: 0.35, wet: 0.45 },
],
triggerPattern: { interval: 0.25, count: 16 },
duration: 4,
},
checks: [
{
star: 1,
@@ -425,7 +485,22 @@ export const WORLD_6 = {
preplacedModules: [
{ id: 1, type: 'output', x: 950, y: 160, params: { volume: -8 }, locked: true },
],
target: { build: [], duration: 5 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sawtooth', frequency: 165, detune: -6 } },
{ type: 'oscillator', params: { waveform: 'square', frequency: 165, detune: 6 } },
{ type: 'noise', params: { type: 'white' } },
],
filter: { type: 'lowpass', frequency: 1800, Q: 6 },
envelope: { attack: 0.2, decay: 0.4, sustain: 0.5, release: 0.8 },
lfo: { frequency: 2, type: 'sine', min: 0.3, max: 1.2, target: 'amplitude' },
effects: [
{ type: 'distortion', amount: 2 },
{ type: 'delay', time: 0.3, feedback: 0.4, wet: 0.4 },
{ type: 'reverb', decay: 3.5, wet: 0.45 },
],
duration: 5,
},
checks: [
{
star: 1,

View File

@@ -25,7 +25,14 @@ export const WORLD_7 = {
preplacedModules: [
{ id: 1, type: 'output', x: 700, y: 120, params: { volume: -6 }, locked: true },
],
target: { build: [], duration: 2 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sine', frequency: 330 } },
],
envelope: { attack: 0.01, decay: 0.12, sustain: 0, release: 0.05 },
triggerPattern: { interval: 0.5, count: 4 },
duration: 2,
},
checks: [
{
star: 1,
@@ -81,7 +88,17 @@ export const WORLD_7 = {
preplacedModules: [
{ id: 1, type: 'output', x: 800, y: 120, params: { volume: -8 }, locked: true },
],
target: { build: [], duration: 3 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sawtooth', frequency: 55, detune: -8 } },
{ type: 'oscillator', params: { waveform: 'sawtooth', frequency: 55, detune: 8 } },
],
filter: { type: 'lowpass', frequency: 600, Q: 5 },
envelope: { attack: 0.02, decay: 0.15, sustain: 0.3, release: 0.1 },
lfo: { frequency: 1, type: 'sine', min: 300, max: 1500, target: 'frequency' },
triggerPattern: { interval: 1, count: 3 },
duration: 3,
},
checks: [
{
star: 1,
@@ -137,7 +154,16 @@ export const WORLD_7 = {
preplacedModules: [
{ id: 1, type: 'output', x: 750, y: 120, params: { volume: -8 }, locked: true },
],
target: { build: [], duration: 2.5 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'square', frequency: 220 } },
],
filter: { type: 'lowpass', frequency: 2000, Q: 2 },
envelope: { attack: 0.005, decay: 0.15, sustain: 0.05, release: 0.08 },
lfo: { frequency: 2.5, type: 'sine', min: 1000, max: 4000, target: 'frequency' },
triggerPattern: { interval: 0.375, count: 7 },
duration: 2.5,
},
checks: [
{
star: 1,
@@ -194,7 +220,15 @@ export const WORLD_7 = {
preplacedModules: [
{ id: 1, type: 'output', x: 700, y: 120, params: { volume: -8 }, locked: true },
],
target: { build: [], duration: 2 },
target: {
build: [
{ type: 'noise', params: { type: 'white' } },
],
filter: { type: 'lowpass', frequency: 1000, Q: 3.5 },
envelope: { attack: 0, decay: 0.1, sustain: 0, release: 0 },
triggerPattern: { interval: 0.5, count: 4 },
duration: 2,
},
checks: [
{
star: 1,
@@ -250,7 +284,14 @@ export const WORLD_7 = {
preplacedModules: [
{ id: 1, type: 'output', x: 700, y: 120, params: { volume: -8 }, locked: true },
],
target: { build: [], duration: 2 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sine', frequency: 50 } },
],
envelope: { attack: 0, decay: 0.3, sustain: 0, release: 0.1 },
triggerPattern: { interval: 1, count: 2 },
duration: 2,
},
checks: [
{
star: 1,
@@ -308,7 +349,16 @@ export const WORLD_7 = {
preplacedModules: [
{ id: 1, type: 'output', x: 750, y: 120, params: { volume: -8 }, locked: true },
],
target: { build: [], duration: 2.5 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sine', frequency: 55 } },
{ type: 'noise', params: { type: 'white' } },
],
filter: { type: 'highpass', frequency: 6500, Q: 1.5 },
envelope: { attack: 0, decay: 0.08, sustain: 0, release: 0 },
triggerPattern: { interval: 0.5, count: 5 },
duration: 2.5,
},
checks: [
{
star: 1,
@@ -362,7 +412,18 @@ export const WORLD_7 = {
preplacedModules: [
{ id: 1, type: 'output', x: 800, y: 120, params: { volume: -8 }, locked: true },
],
target: { build: [], duration: 3 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sine', frequency: 440 } },
],
filter: { type: 'lowpass', frequency: 1500, Q: 2 },
envelope: { attack: 0.01, decay: 0.12, sustain: 0, release: 0.05 },
effects: [
{ type: 'delay', time: 0.35, feedback: 0.5, wet: 0.55 },
],
triggerPattern: { interval: 0.5, count: 6 },
duration: 3,
},
checks: [
{
star: 1,
@@ -417,7 +478,22 @@ export const WORLD_7 = {
preplacedModules: [
{ id: 1, type: 'output', x: 900, y: 140, params: { volume: -8 }, locked: true },
],
target: { build: [], duration: 5 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sine', frequency: 50 } },
{ type: 'noise', params: { type: 'white' } },
{ type: 'oscillator', params: { waveform: 'sawtooth', frequency: 55, detune: -8 } },
{ type: 'oscillator', params: { waveform: 'sawtooth', frequency: 55, detune: 8 } },
],
filter: { type: 'highpass', frequency: 7000, Q: 1.5 },
envelope: { attack: 0, decay: 0.15, sustain: 0, release: 0.05 },
effects: [
{ type: 'delay', time: 0.3, feedback: 0.4, wet: 0.35 },
{ type: 'reverb', decay: 2.5, wet: 0.25 },
],
triggerPattern: { interval: 1, count: 5 },
duration: 5,
},
checks: [
{
star: 1,

View File

@@ -26,7 +26,13 @@ export const WORLD_8 = {
preplacedModules: [
{ id: 1, type: 'output', x: 700, y: 120, params: { volume: -8 }, locked: true },
],
target: { build: [], duration: 1.5 },
target: {
build: [
{ type: 'noise', params: { type: 'white' } },
],
envelope: { attack: 0.1, decay: 0.3, sustain: 0.1, release: 0.2 },
duration: 1.5,
},
checks: [
{
star: 1,
@@ -79,7 +85,14 @@ export const WORLD_8 = {
preplacedModules: [
{ id: 1, type: 'output', x: 700, y: 120, params: { volume: -8 }, locked: true },
],
target: { build: [], duration: 1.5 },
target: {
build: [
{ type: 'noise', params: { type: 'white' } },
],
filter: { type: 'bandpass', frequency: 3000, Q: 4 },
envelope: { attack: 0.15, decay: 0.6, sustain: 0.05, release: 0.3 },
duration: 1.5,
},
checks: [
{
star: 1,
@@ -135,7 +148,15 @@ export const WORLD_8 = {
preplacedModules: [
{ id: 1, type: 'output', x: 750, y: 120, params: { volume: -8 }, locked: true },
],
target: { build: [], duration: 2 },
target: {
build: [
{ type: 'noise', params: { type: 'white' } },
],
filter: { type: 'lowpass', frequency: 1200, Q: 1 },
lfo: { frequency: 0.3, type: 'sine', min: 500, max: 2500, target: 'frequency' },
envelope: { attack: 0.2, decay: 0.5, sustain: 0.3, release: 0.4 },
duration: 2,
},
checks: [
{
star: 1,
@@ -191,7 +212,14 @@ export const WORLD_8 = {
preplacedModules: [
{ id: 1, type: 'output', x: 700, y: 120, params: { volume: -10 }, locked: true },
],
target: { build: [], duration: 1.5 },
target: {
build: [
{ type: 'noise', params: { type: 'white' } },
],
envelope: { attack: 0.01, decay: 0.06, sustain: 0, release: 0.02 },
triggerPattern: { interval: 0.15, count: 1 },
duration: 1.5,
},
checks: [
{
star: 1,
@@ -246,7 +274,16 @@ export const WORLD_8 = {
preplacedModules: [
{ id: 1, type: 'output', x: 700, y: 120, params: { volume: -12 }, locked: true },
],
target: { build: [], duration: 1.5 },
target: {
build: [
{ type: 'noise', params: { type: 'white' } },
],
effects: [
{ type: 'distortion', distortion: 0.75, wet: 0.7 },
],
envelope: { attack: 0.08, decay: 0.6, sustain: 0.1, release: 0.25 },
duration: 1.5,
},
checks: [
{
star: 1,
@@ -299,7 +336,13 @@ export const WORLD_8 = {
preplacedModules: [
{ id: 1, type: 'output', x: 700, y: 120, params: { volume: -8 }, locked: true },
],
target: { build: [], duration: 1.5 },
target: {
build: [
{ type: 'noise', params: { type: 'pink' } },
],
lfo: { frequency: 1.5, type: 'square', min: 0.2, max: 1, target: 'amplitude' },
duration: 1.5,
},
checks: [
{
star: 1,
@@ -351,7 +394,17 @@ export const WORLD_8 = {
preplacedModules: [
{ id: 1, type: 'output', x: 800, y: 120, params: { volume: -8 }, locked: true },
],
target: { build: [], duration: 2.5 },
target: {
build: [
{ type: 'noise', params: { type: 'brown' } },
],
filter: { type: 'lowpass', frequency: 900, Q: 0.8 },
effects: [
{ type: 'delay', delayTime: 0.4, feedback: 0.45, wet: 0.6 },
{ type: 'reverb', decay: 4.5, wet: 0.7 },
],
duration: 2.5,
},
checks: [
{
star: 1,
@@ -406,7 +459,25 @@ export const WORLD_8 = {
preplacedModules: [
{ id: 1, type: 'output', x: 900, y: 140, params: { volume: -8 }, locked: true },
],
target: { build: [], duration: 6 },
target: {
build: [
{ type: 'noise', params: { type: 'white' } },
{ type: 'noise', params: { type: 'pink' } },
{ type: 'noise', params: { type: 'brown' } },
{ type: 'noise', params: { type: 'white' } },
],
filter: { type: 'bandpass', frequency: 2800, Q: 3.5 },
lfo: [
{ frequency: 0.35, type: 'sine', min: 600, max: 2200, target: 'frequency' },
{ frequency: 1.2, type: 'square', min: 0.1, max: 0.9, target: 'amplitude' },
],
effects: [
{ type: 'delay', delayTime: 0.35, feedback: 0.5, wet: 0.5 },
{ type: 'reverb', decay: 3.5, wet: 0.55 },
],
envelope: { attack: 0.12, decay: 0.4, sustain: 0.2, release: 0.3 },
duration: 6,
},
checks: [
{
star: 1,

View File

@@ -24,7 +24,14 @@ export const WORLD_9 = {
preplacedModules: [
{ id: 1, type: 'output', x: 700, y: 120, params: { volume: -6 }, locked: true },
],
target: { build: [], duration: 3 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sawtooth', frequency: 220, detune: 0 } },
],
filter: { type: 'lowpass', frequency: 4000, Q: 1.2 },
envelope: { attack: 0.05, decay: 0.3, sustain: 0.4, release: 0.2 },
duration: 3,
},
checks: [
{
star: 1,
@@ -83,7 +90,15 @@ export const WORLD_9 = {
preplacedModules: [
{ id: 1, type: 'output', x: 700, y: 120, params: { volume: -6 }, locked: true },
],
target: { build: [], duration: 3 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sawtooth', frequency: 165, detune: 0 } },
],
filter: { type: 'lowpass', frequency: 2500, Q: 6 },
lfo: { frequency: 0.8, type: 'sine', min: 1000, max: 4500, target: 'frequency' },
envelope: { attack: 0.08, decay: 0.4, sustain: 0.3, release: 0.25 },
duration: 3,
},
checks: [
{
star: 1,
@@ -139,7 +154,14 @@ export const WORLD_9 = {
preplacedModules: [
{ id: 1, type: 'output', x: 700, y: 120, params: { volume: -8 }, locked: true },
],
target: { build: [], duration: 3 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'square', frequency: 330, detune: 0 } },
],
filter: { type: 'lowpass', frequency: 1800, Q: 2 },
envelope: { attack: 0.01, decay: 0.35, sustain: 0.1, release: 0.15 },
duration: 3,
},
checks: [
{
star: 1,
@@ -197,7 +219,14 @@ export const WORLD_9 = {
preplacedModules: [
{ id: 1, type: 'output', x: 700, y: 120, params: { volume: -6 }, locked: true },
],
target: { build: [], duration: 3 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sawtooth', frequency: 55, detune: 0 } },
],
filter: { type: 'lowpass', frequency: 800, Q: 9 },
envelope: { attack: 0.02, decay: 0.25, sustain: 0.05, release: 0.15 },
duration: 3,
},
checks: [
{
star: 1,
@@ -256,7 +285,16 @@ export const WORLD_9 = {
preplacedModules: [
{ id: 1, type: 'output', x: 800, y: 120, params: { volume: -8 }, locked: true },
],
target: { build: [], duration: 4 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sawtooth', frequency: 110, detune: 0 } },
{ type: 'oscillator', params: { waveform: 'sawtooth', frequency: 110, detune: 5 } },
{ type: 'oscillator', params: { waveform: 'sawtooth', frequency: 110, detune: -7 } },
],
filter: { type: 'lowpass', frequency: 3500, Q: 0.9 },
envelope: { attack: 0.08, decay: 0.8, sustain: 0.5, release: 0.4 },
duration: 4,
},
checks: [
{
star: 1,
@@ -316,7 +354,16 @@ export const WORLD_9 = {
preplacedModules: [
{ id: 1, type: 'output', x: 800, y: 120, params: { volume: -8 }, locked: true },
],
target: { build: [], duration: 3 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'square', frequency: 220, detune: 0 } },
{ type: 'oscillator', params: { waveform: 'square', frequency: 220, detune: 4 } },
],
filter: { type: 'lowpass', frequency: 3000, Q: 1.5 },
lfo: { frequency: 0.6, type: 'sine', min: 2500, max: 4500, target: 'frequency' },
envelope: { attack: 0.06, decay: 0.35, sustain: 0.35, release: 0.2 },
duration: 3,
},
checks: [
{
star: 1,
@@ -372,7 +419,15 @@ export const WORLD_9 = {
preplacedModules: [
{ id: 1, type: 'output', x: 700, y: 120, params: { volume: -8 }, locked: true },
],
target: { build: [], duration: 4 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sawtooth', frequency: 130, detune: 0 } },
],
filter: { type: 'lowpass', frequency: 2000, Q: 2 },
lfo: { frequency: 1, type: 'sine', min: 500, max: 5000, target: 'frequency' },
envelope: { attack: 0.07, decay: 0.5, sustain: 0.2, release: 0.25 },
duration: 4,
},
checks: [
{
star: 1,
@@ -427,7 +482,19 @@ export const WORLD_9 = {
preplacedModules: [
{ id: 1, type: 'output', x: 900, y: 140, params: { volume: -8 }, locked: true },
],
target: { build: [], duration: 5 },
target: {
build: [
{ type: 'oscillator', params: { waveform: 'sawtooth', frequency: 110, detune: 0 } },
{ type: 'oscillator', params: { waveform: 'square', frequency: 110, detune: 3 } },
],
filter: { type: 'lowpass', frequency: 3000, Q: 6 },
lfo: { frequency: 0.5, type: 'sine', min: 1000, max: 4000, target: 'frequency' },
effects: [
{ type: 'reverb', decay: 2.5, wet: 0.4 },
],
envelope: { attack: 0.08, decay: 0.5, sustain: 0.3, release: 0.3 },
duration: 5,
},
checks: [
{
star: 1,

View File

@@ -1,12 +1,18 @@
/**
* targetAudio.js — Plays the "target" sound for a puzzle level
* Builds a temporary Tone.js graph from the level's target config
*
* Extended to support:
* - Envelopes (amplitude shaping)
* - LFO (modulation)
* - Effects (delay, reverb, distortion)
*/
import * as Tone from 'tone';
let _activeNodes = [];
let _isPlaying = false;
let _stopTimeout = null;
let _loops = []; // Track Tone.Loop instances for cleanup
export function isTargetPlaying() {
return _isPlaying;
@@ -25,19 +31,87 @@ export async function playTarget(target) {
const output = new Tone.Gain(0.5).toDestination();
nodes.push(output);
// Build effects chain (will connect to this)
let effectChain = output;
// Effects array (in order: distortion → delay → reverb)
if (target.effects && target.effects.length > 0) {
const effectNodes = [];
for (const effect of target.effects) {
if (effect.type === 'distortion') {
const distortion = new Tone.Distortion(effect.amount ?? 0.4);
effectNodes.push(distortion);
} else if (effect.type === 'delay') {
const delay = new Tone.Delay(effect.time ?? 0.3);
delay.feedback.value = effect.feedback ?? 0.3;
delay.wet.value = effect.wet ?? 0.5;
effectNodes.push(delay);
} else if (effect.type === 'reverb') {
const reverb = new Tone.Reverb(effect.decay ?? 2.5);
reverb.wet.value = effect.wet ?? 0.5;
effectNodes.push(reverb);
}
}
// Chain effects together, then to output
if (effectNodes.length > 0) {
for (let i = 0; i < effectNodes.length - 1; i++) {
effectNodes[i].connect(effectNodes[i + 1]);
}
effectNodes[effectNodes.length - 1].connect(output);
effectChain = effectNodes[0];
nodes.push(...effectNodes);
}
}
// Optional filter in the chain
let destination = output;
let destination = effectChain;
if (target.filter) {
const filter = new Tone.Filter({
type: target.filter.type || 'lowpass',
frequency: target.filter.frequency || 1000,
Q: target.filter.Q || 1,
});
filter.connect(output);
filter.connect(effectChain);
destination = filter;
nodes.push(filter);
}
// Optional envelope
let envelope = null;
if (target.envelope) {
envelope = new Tone.AmplitudeEnvelope({
attack: target.envelope.attack ?? 0.01,
decay: target.envelope.decay ?? 0.1,
sustain: target.envelope.sustain ?? 0.3,
release: target.envelope.release ?? 0.5,
});
envelope.connect(destination);
destination = envelope;
nodes.push(envelope);
}
// Optional LFO for modulation
let lfo = null;
if (target.lfo) {
lfo = new Tone.LFO({
frequency: target.lfo.frequency ?? 5,
type: target.lfo.type ?? 'sine',
min: target.lfo.min ?? 0.5,
max: target.lfo.max ?? 1.5,
});
// Route LFO to the specified target
if (target.lfo.target === 'amplitude' && envelope) {
lfo.connect(envelope.gain);
} else if (target.lfo.target === 'frequency' && target.build.length > 0) {
// LFO will be connected to oscillators below
}
lfo.start();
nodes.push(lfo);
}
// Build oscillators / noise from target.build
for (const spec of target.build) {
if (spec.type === 'oscillator') {
@@ -47,6 +121,12 @@ export async function playTarget(target) {
detune: spec.params.detune || 0,
});
osc.connect(destination);
// Connect LFO to frequency if specified
if (lfo && target.lfo?.target === 'frequency') {
lfo.connect(osc.frequency);
}
osc.start();
nodes.push(osc);
} else if (spec.type === 'noise') {
@@ -57,6 +137,27 @@ export async function playTarget(target) {
}
}
// Handle envelope retriggering with triggerPattern
if (envelope && target.triggerPattern) {
const pattern = target.triggerPattern;
const interval = pattern.interval ?? 0.5;
const count = pattern.count ?? Math.ceil((target.duration || 2) / interval);
const loop = new Tone.Loop((time) => {
envelope.triggerAttackRelease(
target.envelope.attack + target.envelope.decay + target.envelope.release,
time
);
}, interval);
loop.start(0);
nodes.push(loop);
_loops.push(loop);
} else if (envelope) {
// Single trigger if no pattern
envelope.triggerAttack();
}
_activeNodes = nodes;
// Auto-stop after duration
@@ -69,6 +170,17 @@ export function stopTarget() {
clearTimeout(_stopTimeout);
_stopTimeout = null;
}
// Stop and cleanup loops
for (const loop of _loops) {
try {
loop.stop();
loop.dispose();
} catch {}
}
_loops = [];
// Stop and cleanup nodes
for (const node of _activeNodes) {
try {
if (node.stop) node.stop();