Once you have selected a channel, you can refresh the waveform by tapping the display. (I've experimented with higher bandwidth communication but find it to be sporadic on the phone.)
This is what the Ruby (Sinatra) request handler looks like:
The punctuation here is a little hard to defend except to say that it is idiomatic jQuery. The third line is where the client hits the server to get samples from channel ch. And remember, this works on the phone.
The signal above is my favorite source, the 60Hz hum floating around my house. Here is what it looks like in the frequency domain:
The two large low peaks are 60Hz and 120Hz respectively. (I don't have the horizontal axis right here yet.)
This web server approach adds some installation complexity that can be avoided by working on the desktop. I've explored that option with a system I've called Javascope.