Using an oscilloscope as a graphics display device…
I’ve been meaning to do a project like this for quite some time. The basic idea is to write a program which can generate sounds which drive the oscilloscope in X/Y mode so that it will draw graphics on the screen. After an hours worth of tinkering:
There is obviously some bugs, so I am not going to put up any code or the sound file right at the moment, but here’s what I learned:
- Choice of sound card matters. The default sound card in my laptop does a really crappy job. I’m not sure whether it is resampling the audio at some lower rate, but it never worked properly. I dusted off my EMU 0202 USB based card to do this demo, which works much better.
- My oscilloscope doesn’t have a Z input, so it’s always drawing. To hide the “moveto” bits, you probably want them to be as quick as possible, which means that if you have two contours, the best way to draw them is to draw one starting at one extrema of the outline, and then connecting it to the most distant point of the other loop when you shift to drawing it. While drawing, you go at a much slower rate, and try to maintain a constant velocity.
- I’m not sure why the inner loops of the B overlap the outer outline: I’m suspecting that the oscilloscope may be in some sort of AC mode, where a cap is stripping some part of the DC component. I’ll have to think of this some more.
- I obviously have a bug in my outlines as well.
When I get a better written and more illustrative chunk of code, you can expect it to show up here.
Addendum: I worked on it a tiny bit more, and found a bug in my program, and that I had left the scope in “AC” mode for XY, which meant that it was passing the input through some kind of capacitor to strip the DC component. When I toggled that off, I got a much better version, where the inner loops of the B don’t cross the outer loops. Still not sure why the trailing edge of the W rings so badly.