cube

cube · sources · schema v1

3D wavetable-navigator oscillator. Builds a 3D scalar field — "the cube," a space that is a mix of solid and filled — out of THREE e352 wavetables (FLOOR / WALL / CEILING, each independently chosen from WAVESCULPT's full preset set, defaults FLOOR=basic-shapes, WALL=harmonic-sweep, CEILING=basic-shapes), then flies an arbitrary planar SLICE through the field and reads it back as the played waveform via a SURFACE-HEIGHT SCAN: for each of 256 x-positions the sample = how far the solid extends along the slice (intersection depth), so the cube's shape literally becomes the wave. MORPH connects the wall to the floor (at min) or the ceiling (at max), weighted-averaged in between; CONNECT morphs the connecting curve from a circle arc to a sawtooth-V touching the floor, and CONNECT STRENGTH overshoots the connector's interior control point "out of the cube" for a dramatic swell of the solid base (0 = today's exact shape). The slice navigates with Y (up/down) + Rot X/Y/Z (Euler rotation on all 3 axes). MATERIAL switches SMOOTH (continuous density) ↔ HARD (binary solid in/out). CRUSH is a 3D bitcrush reducing spatial-grid + amplitude resolution (default 0 = transparent → blocky/steppy at max); SPACE CRUSH is an independent spatial voxelization of just the FIELD lookup coordinates (chunky voxels, 0 = transparent), and SPACE DIFFUSE applies a gravity that pulls the sampled cloud toward the cube's lowest-information (emptiest) wall — the target wall latches when the tables/morph change, not as the knob moves (0 = off). WRAP toggles whether a slice extending outside the cube is silent (default) or mirror-folds back to the opposite side. A V/oct pitched oscillator (pitch input + tune/fine) with stereo L/R SPREAD on SEPARATE L and R output ports (max ±18% of the cube depth between channels — the L slice is read below center, the R above, so the spread is clearly audible and survives patching into mono inputs). View-only Zoom + Rot X/Y/Z orbit the WebGL2 3D cube visualization (the scalar field rendered as a translucent voxel slice-stack with the live selection slice shown as a square plane cutting through it) without affecting the sound or the selected slice. CV inputs cover the expressive params (slice Y/rotation, morph, connect, connect strength, crush, space crush, space diffuse, fold, tune). A POLY input (polyPitchGate) accepts the 5-voice chord bus from MIDI LANE (mode=poly) or POLYSEQZ: when any lane is gated CUBE runs one phase accumulator per gated lane through the SAME posted slice waves at that lane's pitch and sums them — polyphonic, with the slice/field timbre shared across voices; with nothing patched to poly the mono `pitch` path runs unchanged. A per-voice amplitude ADSR (Attack / Decay / Sustain / Release) plus a BASE VOL knob shape each voice. GATING is decided by what is PATCHED: when the POLY bus OR the mono TRIGGER is connected, CUBE is a GATED voice — a lane/voice sounds only while it is gated-or-releasing, and a never-gated lane is SILENT (patching poly never auto-drones). When NEITHER is patched, CUBE is a continuous raw VCO. BASE VOL is a per-voice VCA FLOOR the envelope rides on top of: gain = base + (1-base)·env per ACTIVE voice — base=1 (default) means the env does nothing (full gain), base=0 is pure ADSR (silent between notes), 0.5 floors at 0.5 and rises to 1.0 at the env peak. For the raw-VCO case (nothing patched) the env is idle so the gain is exactly BASE VOL, so the default of 1 is the legacy continuous drone (byte-identical) and BASE VOL doubles as the raw-VCO level. In poly mode each lane's gate edge drives its own envelope (one per voice, soft/click-safe retrigger), and the mix is normalized over ACTIVE voices (1/sqrt(N)) so a sustain=0 held note doesn't pump and a releasing tail doesn't pop. The ADSR + BASE VOL params read live (continuous k-rate) across all stages. Edge detection is block-rate (retrigger granularity floor ≈ one audio block); connectedness (poly/trigger patched) is read from the live patch edges, not bus presence. Pure deterministic field/slice DSP in cube-dsp.ts is reused verbatim by node-ART AND by the card's 3D render, and the surface-height scan runs OFF the audio thread (computed on the main thread, posted to the worklet) so sweeping params never drops the audio out. v1 is audio-only; a cross-domain viz_out video raster is a planned follow-up.

A 3D wavetable-terrain oscillator. CUBE stacks THREE e352-style wavetables — FLOOR, WALL, and CEILING (each chosen from a factory table, a baked preset, or a loaded .wav) — into a solid 3D scalar field, then plays the heightmap of an arbitrary flat plane sliced through that field as its waveform. You aim the slicing plane with one height knob (Y) and three rotation knobs (Rot X / Y / Z); as the plane tilts and rises it carves a different surface contour, so sweeping those knobs (or their CV inputs) morphs the timbre continuously. MORPH cross-fades the floor↔ceiling layers, CONNECT (with CONNECT STRENGTH) bulges the field's interior, CRUSH bit-reduces the read-out waveform while SPACE CRUSH voxelizes and SPACE DIFFUSE warps the 3D lookup coordinates, and FOLD is a west-coast wavefolder on the output — together they sculpt the slice from clean to mangled. It is a pitched V/oct oscillator with a stereo ±5% SPREAD (the L and R taps read slightly offset planes for width) and an internal per-voice A/D/S/R envelope that, riding a BASE volume floor, shapes amplitude once a note arrives on the poly bus or the TRIG gate; with nothing patched there it free-runs as a continuous drone. A live WebGL 3D render of the cube, the cut plane, the slice cross-section, and the output waveform is shown on the card and can be sent out the VIDEO port; the screen can be switched off to save GPU when you only want sound.

the faceplate

cubepitchcvpolypolyPitchGatetriggergateslice_ycvslice_rxcvslice_rycvslice_rzcvmorph_fccvconnectcvconnect_strengthcvcrushcvspace_crushcvspace_diffusecvfold_cvcvtunecvLaudioRaudiosyncaudiovideo_outmono-videoaudiocvgatepitch
15 inputs · 4 outputs · 27 params

inputs

idcablewhat it does
pitchcvMono V/oct pitch control voltage — the standard 1V-per-octave oscillator pitch input, read directly by the worklet. This is the fallback voice when nothing is patched into POLY; summed with the TUNE and FINE offsets to set the playback fundamental.
control voltage (CV)
polypolyPitchGatePolyphonic chord bus (the 10-channel pitch+gate cable from MIDI LANE in poly mode or POLYSEQZ). Each gated lane renders its own phase accumulator through the same sliced waveform at that lane's pitch and they sum — so CUBE plays a whole chord. While any lane is gated this bus drives the voices; with nothing patched here the mono PITCH path runs instead (back-compat).
poly pitch+gate bus; 10-channel poly bus (5 pitch + 5 gate lanes)
triggergateMono gate for the per-voice amplitude envelope: while the level is high the ADSR holds open (attack→decay→sustain) and on the falling edge it releases. The first rising edge ever seen converts CUBE from a free-running drone into a gated voice shaped by the lane-0 envelope; before any note (and when unpatched) it drones continuously.
gate / trigger
slice_ycvCV that offsets the Y param — raises or lowers the slicing plane's height through the cube, scanning it across the floor→ceiling stack.
control voltage (CV); modulates slice_y (additive offset — ±1 CV sweeps the full range, centered on the knob)
slice_rxcvCV that offsets the Rot X param — tilts the slicing plane about the X axis (±π), changing the surface contour it reads.
control voltage (CV); modulates slice_rx (additive offset — ±1 CV sweeps the full range, centered on the knob)
slice_rycvCV that offsets the Rot Y param — tilts the slicing plane about the Y axis (±π).
control voltage (CV); modulates slice_ry (additive offset — ±1 CV sweeps the full range, centered on the knob)
slice_rzcvCV that offsets the Rot Z param — rotates the slicing plane about the Z axis (±π).
control voltage (CV); modulates slice_rz (additive offset — ±1 CV sweeps the full range, centered on the knob)
morph_fccvCV that offsets the Morph param, cross-fading the floor↔ceiling wavetable layers of the field.
control voltage (CV); modulates morph_fc (additive offset — ±1 CV sweeps the full range, centered on the knob)
connectcvCV that offsets the Connect param, blending the floor and ceiling into a connected interior shape.
control voltage (CV); modulates connect (additive offset — ±1 CV sweeps the full range, centered on the knob)
connect_strengthcvCV that offsets the Connect Strength param, pushing the connector's interior control point further out for a more dramatic swell.
control voltage (CV); modulates connect_strength (additive offset — ±1 CV sweeps the full range, centered on the knob)
crushcvCV that offsets the Crush param, driving the bit/sample reduction applied to the slice's read-out waveform.
control voltage (CV); modulates crush (additive offset — ±1 CV sweeps the full range, centered on the knob)
space_crushcvCV that offsets the Space Crush param, quantizing (voxelizing) the 3D field-lookup coordinates into chunky blocks.
control voltage (CV); modulates space_crush (additive offset — ±1 CV sweeps the full range, centered on the knob)
space_diffusecvCV that offsets the Space Diffuse param, warping the lookup coordinates toward the cube's emptiest wall.
control voltage (CV); modulates space_diffuse (additive offset — ±1 CV sweeps the full range, centered on the knob)
fold_cvcvCV that offsets the Fold param, modulating the output wavefolder depth (added harmonics).
control voltage (CV); modulates fold (additive offset — ±1 CV sweeps the full range, centered on the knob)
tunecvCV that offsets the Tune param, shifting pitch in semitones around the base note (summed with the PITCH input and the FINE knob).
control voltage (CV); modulates tune (additive offset — ±1 CV sweeps the full range, centered on the knob)

outputs

idcablewhat it does
LaudioLeft audio channel of the sliced oscillator, including the −5% SPREAD plane offset, post-FOLD and post-LEVEL. Split out as its own mono port so the stereo width survives even when patched into a mono input.
audio signal
RaudioRight audio channel, including the +5% SPREAD plane offset (the partner of L). Together L and R carry the spread stereo image; pan/mix them to keep the width.
audio signal
syncaudioA pure SINE at the playback fundamental, phase-locked to the L/R slice read-out (it reads off the same phase accumulator). Use it to hard-sync another oscillator to CUBE, or as a clean reference / sub-oscillator tone.
audio signal
video_outmono-videoA mono-video output carrying a live render of the 3D cube view — the translucent field volume, the cut plane positioned by Y + the rotation knobs, and the output waveform. Patch it into VIDEOOUT or any video module; it keeps emitting frames even when the on-card SCREEN is switched off.
mono video stream

params

idlabelrangedefaultcurve
tuneTune-36..36st0linear
fineFine-100..100¢0linear
morph_fcMorph0..10linear
connectConnect0..10linear
connect_strengthCnct Str0..10linear
crushCrush0..10linear
space_crushSpace Crush0..10linear
space_diffuseSpace Diffuse0..10linear
foldFold0..10linear
spreadSpread0..10linear
slice_yY0..10.5linear
slice_rxRot X-3.1416..3.14160linear
slice_ryRot Y-3.1416..3.14160linear
slice_rzRot Z-3.1416..3.14160linear
levelLevel0..21linear
attackA0.001..5s0.001log
decayD0.001..5s0.1log
sustainS0..11linear
releaseR0.001..5s0.005log
base_volBase0..11linear
wrapWrap0..10discrete
materialMaterial0..10discrete
view_zoomZoom0.3..31log
view_rot_xView X-3.1416..3.14160.6linear
view_rot_yView Y-3.1416..3.14160.7linear
view_rot_zView Z-3.1416..3.14160linear
screen_onScreen0..11discrete

controls

controlwhat it does
APer-voice amplitude envelope ATTACK time (0.001..5 s, log) — how long each note takes to rise to full from note-on. Drives both the poly lane envelopes and the mono TRIG voice.
BasePer-voice VCA floor the ADSR rides on top of (gain = base + (1−base)·env). 1 (default) = the envelope does nothing and CUBE plays its raw drone; 0 = pure ADSR (silent between notes); 0.5 = floors at 0.5 and rises to 1.0 as the envelope peaks.
ConnectBlends the floor and ceiling layers into a single connected interior shape (0 = today's separate shape, 1 = fully connected); CV via the CONNECT input.
Cnct StrOvershoots the connector's interior control point 'out of the cube' for a dramatic base swell (0 = the exact CONNECT shape, max = pushed furthest out). Works alongside CONNECT.
CrushBit/sample reduction applied to the slice's read-out waveform (0 = clean, max = heavily crushed) for digital grit.
DPer-voice envelope DECAY time (0.001..5 s, log) — how long the level falls from the attack peak down to the SUSTAIN level.
FineFine pitch trim in cents (−100..+100) for tuning between the semitone steps of TUNE.
FoldWest-coast wavefolder on the output (0 = pass-through, max = hard fold), applied after the slice is sampled and before LEVEL on both L and R, adding harmonics; CV via the FOLD input.
LevelOutput gain on the sliced audio (0..2, applied after FOLD); 1 = unity, above 1 boosts.
MaterialField density model: SMOOTH (0) = continuous density gradients, HARD (1) = a binary solid (sharp inside/outside), which makes the sliced waveform edgier.
MorphCross-fades the FLOOR↔CEILING wavetable layers of the 3D field (0 = floor, 1 = ceiling), reshaping the terrain the plane slices through.
RPer-voice envelope RELEASE time (0.001..5 s, log) — how long the level fades to silence after the note's gate falls.
ScreenTurns the on-card 3D viz screen on/off. When OFF and the VIDEO output is unpatched, the card skips all visual computation (the render loop and the field/slice/wave draws) to save GPU — audio keeps running untouched. A patched VIDEO output still receives live frames even with the screen off.
Rot XRotation of the slicing plane about the X axis (±π radians), tilting which surface contour it reads. CV via the ROT X input.
Rot YRotation of the slicing plane about the Y axis (±π radians). CV via the ROT Y input.
Rot ZRotation of the slicing plane about the Z axis (±π radians). CV via the ROT Z input.
YHeight of the slicing plane through the cube (0..1) — scans the cut from the floor up to the ceiling. CV via the Y input.
Space CrushVoxelizes the 3D field-lookup coordinates into chunky blocks (0 = transparent/smooth, max = blocky), aliasing the spatial sampling for a chunkier timbre.
Space DiffuseAdds a 'gravity' that pulls the field sample cloud toward the cube's emptiest wall (0 = off), smearing the lookup coordinates.
SpreadStereo width: at higher values the L and R taps read planes offset by up to ±5% of depth, so the two channels diverge (0 = mono, both channels identical).
SPer-voice envelope SUSTAIN level (0..1) — the level held while the note's gate stays high after the decay stage.
TuneCoarse pitch in semitones (−36..+36), summed with the FINE offset and the PITCH/TUNE CV to set the oscillator fundamental.
View XVisualization-only camera rotation about X — orbits the 3D view (no effect on audio).
View YVisualization-only camera rotation about Y — orbits the 3D view (no effect on audio).
View ZVisualization-only camera rotation about Z — orbits the 3D view (no effect on audio).
ZoomVisualization-only camera zoom for the 3D cube view (does not affect the sound or the selected slice).
WrapWhat happens when the slicing plane reads outside the cube: OFF = those regions are silent, ON = the coordinates mirror-fold back inside so the slice stays full.

source

cube.ts on GitHub.

Generated from packages/web/src/lib/{audio,video}/module-registry.ts · repo