Sine Wave Generator

Visualize and generate pure sine wave tones. Adjustable frequency, amplitude, and phase for physics students, audio engineers, and math enthusiasts.

Visualize the Mathematics of Sound

Explore the fundamental building block of audio and trigonometry. Our real-time Sine Wave Generator lets you manipulate frequency, amplitude, and phase to see how they affect the waveform and hear the resulting pure tone.

Real-time Visualization
y = 1sin(2π440t + 0°)

Wave Parameters

Careful with volume, start low!

How this Sine Wave Generator works

This visual synthesis tool generates adjustable sine wave animations using the HTML5 Canvas API, allowing users to explore wave physics concepts like amplitude, frequency, phase, and speed in real-time. The generator renders the mathematical function y(t) = A * sin(2πft + φ), where users dynamically control variables to observe immediate visual feedback, transforming abstract equations into tangible oscillating patterns.

The visualizer draws a continuous path by calculating y-coordinates for every x-pixel across the canvas width, connecting them to form smooth curves. Animation is achieved by incrementing the phase offset in a requestAnimationFrame loop, creating the illusion of lateral motion. Users can customize the wave's appearance with adjustable line thickness, colors, and grid overlays, making it suitable for educational demonstrations, audio visualization concepts, or generating cool abstract backgrounds.

A key feature is the high-resolution export capability, which renders the current wave state as a transparent PNG image. This allows designers, students, and educators to capture specific waveforms for use in presentations, textbooks, or graphic design projects without needing complex plotting software. The tool operates entirely client-side, ensuring smooth performance even on lower-end devices.

How to Use

1

Set Frequency

Adjust the Hz value to change the pitch (e.g., 440Hz is A4).

2

Adjust Curve

Change Amplitude (height) and Phase (shift) to visualize the wave.

3

Play Tone

Click play to hear the sine wave at the set frequency.

Example Usage

Generating a standard tuning pitch reference.

Input
Frequency: 440Hz
Output
Pure Tone (A4)

Frequently Asked Questions

What is a Sine Wave?
A sine wave is a mathematical curve that describes a smooth periodic oscillation. It is the purest tone in audio engineering.
What is 440Hz?
440Hz is the standard tuning pitch (musical note A above middle C) used as a reference for tuning musical instruments.
Why can't I hear very low or high frequencies?
Human hearing range is typically 20Hz to 20,000Hz. Frequencies outside this range are inaudible to most people.

Related Tools

The Sine Wave Generator is maintained by CodeItBro. We aim to provide the best free developer tools on the web. If you have feedback or suggestions, please visit our contact page.

Featured on

CodeItBro - Free dev tools + practical guides to help you ship faster | Product HuntCodeItBro - Free Online Developer Tools badgeCodeItBro badge