I need a stand alone web app that can be opened in a web browser to run it.
It needs to syntheses a waveform from up to 15 individual sine waves.
The app should display the waveform graphically at the top of the window. The definition of each individual component should be shown below that, 1 per line.
The first component should have entries for frequency in Hz and magnitude. Defaults should be 1kHz, and magnitude 1. Allowable frequency range should be 0 to 20kHz.
All subsequent components should have entries for:
- [ ] Frequency as a fraction of the first - default setting 1/1
- [ ] Magnitude as a fraction of the first - default setting 1/1
- [ ] Phase relative to the first, in the range -180 to +180 degrees. - Default setting 0 degrees.
- [ ] A check box to include or exclude the component from the waveform. By default the first 5 waveforms should be checked, the remainder unchecked.
Fractions should be enterable as two numbers : Numerator and Denominator, with enough space for 4 digits. Fractions which have numerator greater than denominator are allowed, which means frequencies of the components can be higher than the first component - but should be limited to a maximum of 80kHz.
Each component should also show the actual frequency and magnitude of the component result from the multiplication of the fractions.
Whenever a setting is changed, the waveform should be regenerated.
There should be a play button and a pause button to allow the created tone to be played to the default sound device.
There should be a volume control slider to allow the user to set the volume.
Whenever the play button is pressed, the volume should be set to zero, and a pop up should be generated warning the user not to play test tones too loud, and to turn the volume up slowly. It should not be possible to increase the volume until OK has been pressed on the pop up.
There should be a drop down to set a number of preset waveforms. These should include:
Sinewave
Square wave
Triangle wave
Sawtooth wave
15 tone multitone typical test signal
Please add up to 5 additional presets that you can think of.
A save and load button should be provided to allow all settings to be saved to a json file, or loaded back in from a previously saved file. Whenever settings are loaded, the waveform should be generated from the loaded settings.