Sine Wave Generator

by Nu Lambda Scientific Co.,Ltd.

Sound Mode

Frequency Control

Amplitude Control

Output Channel

This tool generates a pure sine wave audio signal using the Web Audio API. You can operate it in two modes:

  • Constant Tone: Generates a continuous sound at a specific, fixed frequency.
  • Frequency Sweep: Dynamically changes the frequency from a starting value to a final value over time. You set the start frequency, final frequency, frequency step size (in Hz), and step duration (in seconds). This type of sweeping signal is commonly known in physics and engineering as a chirp.

You can control the fundamental properties of the wave:

  • Frequency (Hz): Determines the pitch of the sound. Higher frequency means a higher pitch. The range 0.5Hz to 20,000Hz covers and extends past the typical range of human hearing (approx. 20Hz-20kHz).
  • Amplitude (%): Controls the loudness (intensity) of the sound. Higher amplitude means a louder sound. Note that this control is linear, while human perception of loudness is logarithmic (decibels).
  • Output Channel: Selects whether the sound plays equally in both speakers ("Both"), only in the left speaker ("Left"), or only in the right speaker ("Right"). This uses a StereoPannerNode.

Physics & Engineering Concepts Illustrated:

  • Wave Properties: Directly demonstrates the relationship between frequency and pitch, and amplitude and perceived loudness.
  • Chirp Signals: Frequency sweeps are used in nature (e.g., bat echolocation calls) and technology (e.g., radar, active sonar, and seismic exploration) to measure distances, velocities, and medium properties.
  • Resonance and System Response: A frequency sweep can be used to find the natural resonant frequencies of objects, rooms, or speakers. When the sweep frequency matches the resonant frequency of a physical system, the sound will suddenly get noticeably louder or vibrate the system more strongly.
  • Sound Perception: Explore the limits of human hearing and notice how your ears have different sensitivities to different frequencies (e.g., humans are highly sensitive to frequencies between 2 kHz and 4 kHz).
  • Doppler Effect (Conceptual): Moving sources of sound create a perceived frequency sweep. As an ambulance approaches, you hear a higher frequency, which drops to a lower frequency as it passes.

Classroom Application Ideas:

  • Hearing Range Test: Cautiously test the approximate hearing range of the class using a sweep from 20 Hz to 20 kHz. Have students raise their hands when they start hearing the sound and lower them when it disappears. (Note: Speaker and headphone quality significantly impacts results).
  • Resonance Finder: Do a slow, low-frequency sweep (e.g., 30 Hz to 200 Hz, step 2 Hz, duration 0.2s) in a room. Listen for frequencies where the room itself or nearby objects begin to vibrate or sound unusually loud. This demonstrates acoustic resonance!
  • Echo-location (Chirp) Demonstration: Discuss how bats use frequency-swept "chirps" to map their surroundings, allowing them to distinguish between multiple targets and measure distances with high accuracy.
  • Stereo Sound: Use the channel buttons to discuss how stereo audio works and how our brains perceive sound direction using differences in timing and volume.