SCRIPTS 2

superflowyouniverse.primaryprolaw.com/SpiralParticleAnimation01.html

https://superflowyouniverse.primaryprolaw.com/DoublingGoldenToneGenerator.html

Overview

​The application is titled “Sine Tone Doubler / Golden Ratio Oscillator”. It creates rhythmic, multi-step sound sequences where each step alters the frequency and duration based on a mathematical relationship (either multiplying the frequency by 2 for octave doubling or by the golden ratio \phi \approx 1.618).

​Key Components

​1. Document Structure & Styling (<head>)

  • ​Responsive Meta Tags: Sets up proper mobile scaling (viewport).
  • ​Dark Theme UI: Uses a clean, minimalist dark-mode layout (#111 background with #eee text) styled with CSS Grid for the control panel.

​2. Control Panel (<body>)

​The user interface provides real-time adjustment sliders and dropdowns:

  • ​Base Hz: Sets the starting frequency (80\text{ Hz} to 800\text{ Hz}).
  • ​Length ms: Sets the duration of each tone step (60\text{ ms} to 1200\text{ ms}).
  • ​Steps: Controls how many progressive tones play in a single sequence (1 to 16).
  • ​Timing accel: An acceleration or deceleration factor (0.7 to 1.3) scaling the duration per step.
  • ​Mode: Switches between doubling (octave jumps) and golden ratio (\phi-scaling).
  • ​Wave: Selects the oscillator waveform (sine, triangle, square, or sawtooth).
  • ​Repeat: A toggle to loop the sequence continuously.
  • ​Start / Stop: Triggers and halts the audio context and scheduling.

​3. Audio Engine & Logic (<script>)

  • ​Web Audio API (AudioContext): Initialized on user interaction to comply with browser autoplay policies.
  • ​Tone Generation Function (tone):
    • ​Dynamically creates an OscillatorNode and a GainNode.
    • ​Sets volume/gain to a safe level (0.25).
    • ​Connects the oscillator through the gain node to ctx.destination (speakers).
    • ​Automatically stops the oscillator using setTimeout after the specified duration.
  • ​Sequencing Algorithm (sequence&step):
    • ​Reads current slider values.
    • ​Plays the primary tone based on the selected waveform and frequency.
    • ​Plays a secondary tactile click/beep sound (1400 Hz square wave, 15\text{ ms}) alongside it for rhythm.
    • ​Mathematical Transformation: Multiplies the frequency f by 2 (double) or 1.61803398875 (phi) on each step, while scaling the time step using the acceleration factor.
    • ​Loops back to the beginning if the loop checkbox is active.

The Geometry of Sound: Algorithmic Resonance in Nature

​This audio generator operates as more than a simple web synthesizer; it functions as an acoustic lens designed to reveal the invisible numerical scaffolding that underpins both the physical universe and human physiology. By translating sacred mathematical constants into auditory waveforms, it creates a deeply meditative space where listeners can perceive the rhythms of nature mirrored directly in sound.

​Key Mechanisms and Universal Parallels

​1. The Golden Ratio (\phi \approx 1.618) and Natural Growth

  • ​The Mechanism: When set to the “golden ratio” mode, each successive step in the sequence multiplies the base frequency by \phi.
  • ​Universal Parallel: This constant is nature’s ultimate blueprint for efficiency and aesthetic harmony. It dictates the spiral configurations of sunflower seeds, the chamber arrangements of nautilus shells, the branching of trees, and the proportions of the human body. Sonifying this ratio allows the ear to track the exact mathematical curve found in organic growth, evoking a subconscious sense of natural order and visual symmetry.

​2. Octave Doubling and Harmonic Fractals

  • ​The Mechanism: In “doubling” mode, frequencies scale by a factor of 2, climbing precise octaves with each step.
  • ​Universal Parallel: Octave duplication is the foundational law of musical frequency across virtually all cultures. It mirrors fractal geometry—where patterns repeat at different scales—and reflects the physical behavior of vibrating strings and columns of air, mirroring how light and sound cascade through harmonic intervals.

​3. Temporal Acceleration and Biological Rhythms

  • ​The Mechanism: The timing acceleration parameter (acc) dynamically scales the duration of each step, compressing or expanding the rhythm as the sequence progresses.
  • ​Universal Parallel: This dynamic pacing mimics natural biological processes, such as the acceleration and deceleration of breath (respiratory sinus arrhythmia), heart rate variability, and the velocity of falling bodies under gravity. It moves the listener away from rigid, metronomic machine time and toward organic, breathing time.

​The Psyche-Soothing Auditory Experience

​As the sequence unfolds, the interplay between the primary tone and the subtle, high-frequency rhythmic click (\text{1400 Hz} square wave) creates an immersive psychoacoustic environment:

  • ​Cognitive Entrainment: The predictable yet evolving mathematical progression allows the conscious mind to let go of analytical processing. Because the steps follow an absolute universal law (rather than random chaos), the brain effortlessly anticipates the pattern, inducing a state of calm focus similar to deep meditation or breathwork.
  • ​Cellular Resonance: Soft waveforms like sine and triangle bypass harsh overtones, delivering smooth, sinusoidal vibrations that feel physically grounding. When layered with the golden ratio, these frequencies encourage a sense of spatial expansion.
  • ​Reconnection with the Cosmos: By listening to the unfolding algorithm, the audience experiences a moment of profound alignment. The boundary between the internal self and external reality dissolves, leaving the listener with the visceral realization that their own heartbeat, cellular structure, and breath operate on the exact same harmonic frequencies singing out through the speakers.

Spiral Board Game v7

Spiral Ratio Game

Roll DiceMove Player