
Show HN: A virtual oscilloscope using Web Audio and live microphone input - outputchannel
https://academo.org/demos/virtual-oscilloscope/
======
vonmoltke
Nice tool. I don't think I have seen a web-based version yet.

Line-in and microphone oscope applications have been around for a long time.
There is one for Linux
([http://xoscope.sourceforge.net/](http://xoscope.sourceforge.net/), sorry for
the Sourceforge link) that can go up to eight channels if you have the audio
inputs for it. Note that you can get two channels on a stereo line-in (see
[http://www.ledametrix.com/oscope/](http://www.ledametrix.com/oscope/) for a
two channel probe circuit).

Edit: Further note, these types of scopes typically have their bandwidth
limited to the range 20Hz - 20kHz. These are audio channels, after all.

~~~
marcosdumay
You can usually take 96kSps from a sound card, much more than 20kSps, but
still around a thousand of times less than a normal oscilloscope. And you can
measure signals with less than 20Hz too. You can't generate them, but can
measure.

There are also restrictive voltage limits, variable latency, and lost of
readings due to the non-realtime nature of the OS to deal with.

But where sound cards shine is on precision. If you can even find it, an
oscilloscope with 24 bits resolution costs tens of thousands of dollars. A 32
bits sound card is a couple hundred. Although, for showing it at the screen, 8
bits are often good enough.

~~~
vonmoltke
96kSps only allows you to capture 48kHz signals in the ideal case. Practical
limits are lower.

Of course, that assumes your audio hardware does not have a bandpass filter
tuned to the range of human hearing. Making the range as tight as you can
lessens the noise at other frequencies that the processing hardware has to
deal with. Plus, it ensures you get a minimum of four samples per cycle for
any audio signal.

Same thing on the low end. Without a high-pass cutoff you are going to get a
whole lot of noise from mechanical sources.

------
ideonexus
The rest of this site is awesome too. I love love love the mathematical
explanation you have for the relationships between notes and octaves:

[https://academo.org/demos/19-tet-keyboard/](https://academo.org/demos/19-tet-
keyboard/)

------
bozdar
I am afraid, if you record your readers voices for further experiments. ;)

