This week I used the p5 sound library to map an oscilloscope to the microphone on my computer. This came after a week of frustration trying to work with RGB pixel tape and p5. I definitely need some more time to get that working! I decided learning about routing sound in p5 would be a good fall back.
The code used the waveform generator in the p5 sound library to draw three waveforms:
By toggling a DOM button, you can switch between two visualizations.
The slider controls the volume / amplitude.
Here is the sketch: