FFT of Waveform Types MicroSim
Run the FFT Waveform Types MicroSim
FFT Waveform TYpes HTML Full Edit this MicroSim
About this MicroSim
This MicroSim teaches us how to specify the drawing of a static filled circle.
Sample Prompt
Prompt
Please create a new MicroSim using the p5.js library. Start with the fft-basic.js example in the project knowledge area. Also pay attention to the microsim-rules.md file in the Project knowledge area.
In this variation, I would like the top 1/2 of the drawing region to display a fixed waveform such as:
- Sine wave
- Square wave
- Sawtooth wave
In the bottom 1/2 of the drawing region, show the FFT of this static waveform.
In the controls area add a radio button to allow the user to change the waveform type. Also allow the user to change the frequency of the waveform on the top. The frequency range of the slider is from 0 to 2000 Hz with the default value of 500 Hz.
Use an FFT of size 8192.
Only return the fft-waveform-type.js file so it can be easily pasted into the p5.js online editor for testing.