## Description
The Sound Generator Tool is a simple web-based application for generating basic sound waves using the Web Audio API. Users can choose between different waveform types (Sine, Square, Sawtooth, Triangle), control the frequency (from 20 Hz to 2000 Hz), and adjust the volume. Additionally, it includes a code generation feature that outputs JavaScript code reflecting the current sound settings.
Features
- Waveform Selection: Choose from four waveform types: Sine, Square, Sawtooth, and Triangle.
- Frequency Control: Adjust the frequency between 20 Hz and 2000 Hz using a slider.
- Volume Control: Modify the output volume (gain) between 0.0 and 1.0.
- Play Sound: Play the generated sound immediately.
- Code Generation: Generate JavaScript code based on the current sound configuration.
Usage
- Select the desired waveform from the dropdown menu.
- Adjust the frequency and volume using the sliders.
- Click “Play Sound” to hear the generated sound.
- Click “Generate Code” to produce the JavaScript code for the current sound settings, which will be displayed in the output area.