CORTEX / 65
A local musical phase instrument. The point cloud contains all 65,536 individually simulated oscillators. Their state controls the sound. The surface is sampled from BodyParts3D cerebral-hemisphere anatomy. The phase dynamics, sixteen musical regions, excitation waves, and colors are instrument design layers; they do not represent measured neural activity or anatomical functional regions.
Anatomical geometry and credit
BodyParts3D, © The Database Center for Life Science, licensed under CC Attribution 4.0 International. Source: BodyParts3D dataset, source license notice, and CC BY 4.0.
The instrument uses the left and right cerebral-hemisphere constituents in the BodyParts3D 4.0 PART-OF OBJ archive at 99% polygon reduction. Each hemisphere contributes 32,768 triangle-area-weighted surface samples. Coordinates were translated, uniformly scaled, and reordered into compact musical groups; the folds are from the source anatomy. Per-point normals come from the sampled triangles. The cerebellum and brainstem are not included. This is an anatomical reference surface, not a patient reconstruction or a clinical simulation.
The default view is gently oblique from above. Source-left anatomy is on screen-right (groups 01–08); source-right anatomy is on screen-left (groups 09–16). Screen labels reverse when the brain rotates to the opposite side. The sixteen balanced musical regions are not the atlas's anatomical parcellation. Every point remains linked to its own phase state, and pointer picking uses the projected anatomical vertices.
Full attribution and adaptation notes · Source IDs, geometry hashes, and provenance.
The field
2,048 rings contain 32 phase oscillators each. Every node has its own phase and natural-frequency offset. A worker updates all nodes around 30 times per second using an explicit stochastic phase step. Measured update frequency and computation time appear in the instrument; a slow machine may update less often.
- Islands: each node couples to its two neighbors around its ring.
- Global: 40% local coupling and 60% global mean-field coupling encourage shared alignment.
- Modular: 55% local coupling, 70% alignment within one of 16 regions, and 35% repulsion from the opposite region.
Coupling scales these interactions. Noise adds independent stochastic phase increments; drift spreads the natural frequencies. Excitation begins at one actual anatomical point. Only that phase receives an immediate kick. The remaining points in its 4,096-node region receive bounded, delayed phase kicks as a distance-based front expands during Attack. Changing a mode or projection preserves phase state. Pause freezes phase evolution, ends active excitation waves and clears their queued joins. Audio fades to silence. Clicking while paused perturbs a region and flashes it, but does not queue a wave or sound to replay on resume.
The readout
Global coherence is the magnitude of the whole field's ordinary mean phase vector. Local coherence is the average ring projection magnitude. RAW measures alignment. SPIRAL +1 and −1 remove a positive or negative full turn around each ring before measuring alignment, revealing winding-sensitive patterns. Color follows each node's actual phase; brightness combines local projection coherence with fixed geometric shading.
Traveling excitation
The field starts quiet. Excite one region by clicking the brain or pressing E, or enable Regional Pulses. A finite musical excitation wave recruits linked regions after a delay; each region joins at most once per seed, then fades. This envelope-and-routing model is deliberately layered on the oscillator phases. It is not a claim that neural propagation emerges from the phase equations.
Islands propagates to the two adjacent regions on an eight-region hemisphere loop. Modular adds a delayed opposite-hemisphere bridge. Global uses a sixteen-region loop with an additional delayed four-region bridge. Coupling controls transmitted strength; zero coupling stops recruitment of other regions. Attack controls spreading time within a region and the ordinary delay before neighbors join. At default coupling 2.4 and Attack 0.38 seconds, each ordinary hop takes 380 ms and carries 67.2% of the previous strength. Waves stop below 12% strength, and a region has a 280 ms refractory interval. A maximum of 64 wave IDs may have pending joins.
Regional Pulses seeds a random region at 0.25–12 Hz. Timing Jitter varies the spacing by up to 90% around the selected interval. Strength controls both the phase displacement and the audible/visible envelope. The default is 2 Hz, 30% jitter, 65% strength, with the pulse clock off. This is a free-running simulation clock, with no host tempo or BPM synchronization. Disabling pulses allows existing finite waves to finish. Pausing advances no simulation time and clears pending per-point kicks as well as queued regional joins.
Pulse modes
Regional is the existing default: each clock pulse seeds one region and the current connection model can recruit its neighbors. Manual clicks and EXCITE REGION always use this regional behavior, regardless of the selected pulse mode.
Brainstorm schedules 14–16 distinct regions across both hemispheres for each pulse, staggered within 65% of Attack. Each starts at a random anatomical point with 75–100% of the Strength setting. This is explicit broad external stimulation, so it works at zero Coupling and does not create extra neighbor cascades. The normal per-point spreading front and ADSR still apply. Amber emphasizes the actual storm excitation.
Brain Rain seeds one random anatomical point per drop, at 25–70% of Strength, without neighbor propagation even at high Coupling. Rate is drops per second; Jitter controls timing irregularity, including exactly regular timing at zero. Icy cyan emphasizes these softer regional droplets. This is a musical pulse pattern, not a weather simulation.
Pattern choices use an independent seeded random generator. Both modes respect the 280 ms regional refractory interval, so a recently excited target may skip a requested hit. Pending events are capped at 1,024 across at most 64 wave IDs, and each anatomical point has only one pending arrival. Changing Pulse Mode clears old pending waves and per-point kicks, preserves phase values, and resets the pulse clock. Existing audio tails may finish naturally. Disabling pulses lets the current finite pattern finish; pausing cancels queued activity. Broad stimulation never overrides the selected audio voice or pair budget.
The sound
Sixteen spatial regions of 128 rings can request the available audio slots. Every manual seed, random seed, and delayed join sends the same identified event, anatomical seed index, spread radius, and envelope settings to the phase engine, visible spreading front, and audio voice. The seed appears as a bright dot. Each point receives its phase kick and begins its local visual envelope after a delay proportional to Euclidean distance from the seed, reaching the farthest point of that musical region after Attack. This is a bounded musical spreading model, not a geodesic or biological conduction simulation. A new trigger in a region replaces its older pending arrivals. Local phase projection modulates the hit's level and stereo position. The default has no continuous background sound. The optional Continuous Bed control in Advanced adds the original continuously sounding field and starts off. It is separate from ADSR Sustain.
The four compact envelope controls are Attack/Spread (0.03–2 seconds), Decay (0.03–4 seconds), Sustain (0–100%), and Release (0.03–5 seconds). Default values are 0.38 s, 0.22 s, 25%, and 0.40 s. Browser clicks and random pulses are one-shot events: a short audible attack, decay from peak to Sustain, a 150 ms Sustain plateau, then release to silence. Audible attack is 5 ms plus 4% of Attack/Spread (capped at 85 ms), so slow spatial spreading does not remove the audible start. Release follows a squared fade. The native companion also supports holding Sustain while a MIDI note is held; browser clicks do not hold notes.
Scale Lock puts all sixteen voice fundamentals on Natural Minor, Major, or Open Fifths relative to Root. The scale sequence repeats after three octaves to keep every region in range. With Detune at zero, fundamentals are exact scale notes. Free Oscillators uses deterministic continuous regional frequency ratios anchored to Root. Detune supplies stable bipolar offsets up to the selected 0–100 cents in either mode; it does not redraw pitches every block.
In normal mode, Tone mixes second and third harmonics only while they remain below the audio Nyquist margin. Scale Lock has no broadband noise transient; Free Oscillators adds a small noisy attack. Phase Noise always belongs to the simulation, independently of pitch tuning. Space widens stereo placement and adds a short feedback delay. Output is smoothed and softly limited. These are up to sixteen audio-rate voice slots controlled by 65,536 slow-time phase states and explicit regional excitation envelopes, not 65,536 audio-rate oscillators.
Record captures the instrument's stereo output using the browser's MediaRecorder. The downloaded format is WebM/Opus or M4A, depending on browser support. Recording begins only when explicitly selected and stops when you press STOP REC. No microphone is accessed.
Pitch variation and binaural pairs
Variation and Octaves choose a fresh base pitch for each excitation, including delayed regional joins. Scale Lock chooses notes in the selected scale; the region's measured projection coherence slightly biases the note choice. Octaves selects an octave from zero through the chosen range above Root. With the range at zero, the original regional octave remains. Free mode adds a continuous pitch offset and octave variation. Each choice stays with its voice slot until the next excitation; pitches are not randomized every audio block. Variation 0 and Octaves 0 recover the original regional mapping exactly. Defaults are 50% Variation and two octaves.
Binaural mode gives each occupied slot two matched sinusoidal carriers: the left channel plays the selected base frequency and the right plays that frequency plus Difference. Difference runs logarithmically from 2 to 50 Hz, initially 8 Hz. Scale locking and Detune apply to the base before that deliberate Hz offset. Both carriers share the same note choice and envelope. Binaural mode starts off.
In this mode the voice budget is labeled PAIRS: 4, 8, or 16 stereo pairs, with no extra unbounded voices. The output uses fundamental-only, linearly summed carriers with fixed gain normalization. Tone, broadband attack noise, and stereo delay/crossfeed are bypassed. Tone and Space controls are disabled until normal mode returns. Pitch and Difference changes are smoothed; mode changes fade down, switch paths, and fade back up without resetting active envelopes. Use headphones for separate left/right carriers. This is a musical feature with no medical claims.
Spread moves the two displayed hemispheres outward along anatomical X before view rotation, and picking uses the identical translated coordinates. Source geometry, source normals, and the distances used for phase spreading stay unchanged. The view fits both hemispheres even on narrow screens. In normal audio mode Spread increases stereo width. Binaural carriers remain strictly separated between ears at every Spread setting. Default Spread is zero.
Headphone orbit
HEAD ORBIT moves each active voice around the listener using lightweight analytic headphone cues: a fractional interaural delay up to 0.65 ms, ear-level differences, and far-ear/rear spectral shading. This is not the measured SADIE HRIR renderer used by Fractal Recall, and it does not promise individualized front/back localization. Headphones reveal the effect best. Each region starts at a different angle with alternating direction. Rate runs logarithmically from 0.01 to 0.5 Hz (default 0.07); Depth runs from 0 to 100% (default 70%).
Orbit starts off and is mutually exclusive with binaural frequency pairs. It uses the existing 4/8/16 voice slots, bypasses the normal Space crossfeed, and feeds the independent stereo reverb afterward. Tone remains available. Cue buffers are preallocated, cleared on voice replacement and pause, and mode transitions fade before switching. Older complete preset files without the three orbit fields load with orbit off; partial orbit settings are rejected. If an imported file enables both spatial modes, Orbit takes precedence.
Reverb
Reverb blends in a diffuse tail; Size changes its feedback and decay character. Defaults are 18% Amount and 75% Size. The browser uses fixed, preallocated comb and all-pass delay networks, separately for left and right. Amount and Size changes are smoothed. Natural note endings leave the reverb tail running, while Pause fades the output and clears both tails.
Reverb remains available in binaural mode, but never feeds one ear into the other. Binaural output has a 6 dB gain increase over the earlier local build. An independent output ceiling in each ear acts only above 0.85 amplitude, with or without reverb; levels below that threshold remain linear and the two ears remain separate. Size is a character control, not an exact reverberation-time readout. The wet return is calibrated for an audible musical tail rather than an almost silent impulse response.
Advanced randomization and preset recall
RANDOMIZE FIELD changes Drift and Phase Projection only. Drift uses the same curved 0–2 response as its slider, while projection chooses Raw, +1, or −1. The visible controls and engine update together. Current phase values, transport, and Continuous Bed are preserved.
LOAD D MAJOR DRIFT recalls the supplied screenshot's D2/Major parameter setup from the saved preset. It sets Islands, zero Coupling/Noise, Drift 2, Raw projection, pulses off, locked D2 Major, and the captured ADSR/tone/space/output values. Variation, Octaves, binaural mode, and Reverb use neutral settings to retain the historical patch. Loading preserves the current running/muted state and current oscillator phases; it does not reconstruct a previous random phase trajectory or camera pose.
Your preset files
In Advanced, enter a name and choose SAVE PRESET to download a .cortex65.json file containing all thirty-three musical settings. LOAD PRESET opens a file chooser and recalls the saved combination, including pulse mode, ADSR, pitch variation, binaural settings, voice limit, reverb, and Continuous Bed. The existing D Major Drift factory button remains available.
The complete file is validated before any setting changes. Malformed, incomplete, unsupported, oversized, or out-of-range files leave the current patch unchanged. Files are limited to 256 KiB; preset names contain 1–80 characters. Unknown extra fields are discarded. Import and export preserve the current running/muted state and phase trajectory, and never save or replace the exact phases, pending excitation events, or effect buffers.
These files use the shared cortex65-preset version 1 format and can be exchanged with the native instrument. The browser adds a labeled root option when an imported native root is not already in the menu. The native instrument maps imported Hz roots to its nearest supported MIDI note. Presets remain ordinary named files; there is no hidden local preset library or account dependency.
Voice budget and CPU work
VOICES limits simultaneous audio synthesis to 4, 8, or 16 slots, with 8 as the default; the limit counts stereo pairs in binaural mode. All sixteen musical regions can still trigger, and the 65,536 phase states and anatomical points remain intact. If every slot is occupied, the quietest available voice fades out over 5 ms before its replacement begins its attack. Retriggering the same region uses this handoff too. Each slot has at most one pending replacement; no growing audio queue is created.
Continuous Bed shares the selected voice budget. Reducing the budget fades the surplus old voices for 5 ms before retiring them, so that brief transition may use the previous number of slots, never more than sixteen. Finished or unallocated slots skip oscillator synthesis. Paused or hidden views stop unnecessary brain redraws; running visible animation keeps its existing frame rate. These changes reduce measured work, but an offline benchmark does not by itself prove that a particular audible glitch was a CPU dropout.
Slider response
Rate, Difference, and the three envelope times use logarithmic response. Coupling, Noise, and Drift use an exponential curve that includes exact zero, giving more travel at low values. Output maps the slider's position to squared amplitude over 0–1. Jitter, Strength, Sustain, Tone, Space, Spread, Variation, Reverb, and Size remain linear percentages; Detune remains linear cents. The displayed numbers and engine parameters are the actual physical values, while browser range inputs use normalized 0–1 positions internally.
Controls and requirements
SPACE starts or pauses, E excites a random region, and M toggles audio. Drag the brain to rotate it, double-click to restore its view, or click a visible region to excite it. Keyboard shortcuts are disabled while a form control has focus.
Serve this folder over HTTPS or localhost for AudioWorklet access. Audio creation and resume begin directly in the Play gesture; an interrupted audio context can be resumed by the next Play tap. Safari/iPhone startup and touch handling have received source review and mocked lifecycle tests, not device listening certification. Requires WebGL, Web Workers, and AudioWorklet support. Everything runs on the device with no network assets, accounts, analytics, or external services. Browser suspension, background throttling, and device performance can affect timing.
Verification
Run node engine-check.mjs, node cascade-check.mjs, node tuning-check.mjs, node anatomy-check.mjs, node controls-check.mjs, node envelope-check.mjs, node voice-limit-check.mjs, node binaural-check.mjs, node pulse-mode-check.mjs, node field-controls-check.mjs, node reverb-check.mjs, node reverb-worklet-check.mjs, node user-preset-check.mjs, and node binaural-gain-check.mjs in this folder to verify exact node count, deterministic seeded evolution, finite bounded phases, winding-sensitive readout, strong global synchronization under a noise-free test condition, finite delayed cascades, bounded seeded pulse routing, scale-grid accuracy, detune bounds, the exact anatomical asset counts, normals, and provenance hashes, slider mapping round-trips, finite ADSR stages, and localized per-point phase arrival, bounded voice allocation, inactive synthesis skipping, smooth voice-handoff starts, reproducible scale/free pitch variation, stereo-pair frequency differences, the shared spread transform, seeded brainstorm coverage, isolated rain drops, pattern bounds, pulse-mode cleanup, actual preset-control recall, restricted Advanced randomization, audible decaying reverb tails, independent channels, bounded full-wet output, pause cleanup, complete user-preset round-trips, strict validation before mutation, default-control capture, browser/native file interoperability, the measured twofold binaural gain change, and aligned sixteen-pair output bounds. Runtime diagnostics are available at window.cortexDiagnostics, including an audio RMS/peak measurement after playback starts.