PyScope

September 15th, 2015 (8th grade)

PyScope generates wireframe 3D vector graphics on an oscilloscope.

The short rise and meteoric fall of vector graphics

I have always had a soft spot for the Vectrex, a poorly selling home game console from the 80’s with a really weird feature set. The Vectrex has hardware overlays—not some sort of graphics chip in a cartridge, but a plastic transparency that fits over the display—included with every game. A CRT monitor is built into the case like old iMacs. Due to shoddy wiring, the console emits a faint constant buzz when running. Needless to say, this is a very weird machine. Most importantly, however, its built-in monitor is a vector display. Think Asteroids, with crisp phosphorescent green lines drawing the outlines of your ship.

While commercially it was a flop, the Vectrex game console was notable for displaying vector graphics on an integrated display.

I had wanted to develop a game for the Vectrex just for the sheer absurdity of making a new game for the console (in the same category as ports to the Zune, GameCube, TI-84, ternary computer, or Soviet water integrator). Ironically the Vectrex is worth much more now than it was at release. At launch time, the console was a total flop, not to mention how they dropped the price by 75% in a desperate attempt to rid themselves of Vectrices after the great video game crash of 1983. Anyway, I was never able to get my hands on a Vectrex.

Oscilloscope music

Fortunately I found an alternate outlet for my vectorial vision: When I discovered “oscilloscope music” I was blown away. Not because the music was the greatest thing I had heard—the sharp square & triangle waves involved in the visuals sound a little bit grating. (I did come around eventually; I even bought an oscilloscope music album.) The real beauty was how the audio created the visualization of the music. In a way, it turned the Vectrex’s signature buzz into a feature, drawing wireframes on the screen such that when interpreted as sound, the visuals themselves made music. (For the electronically challenged among us, imagine an Etch-a-Sketch where the little knobs you twiddle also function as individual volume knobs for each ear) I was no musician, but I could appreciate some electronic audiovisual wizardry.

This second video by one of the most prolific oscilloscope musicians explains what an oscilloscope is, and what exactly is happening to draw those mushrooms:

I had no Vectrex, but no one dabbling in electronics would be caught dead without an oscilloscope.12 Mine was up to the task of the visualizations like the one above, albeit lacking in style compared to the circular-displayed kits of yore. I made a 3.5mm to BNC cable to connect my sound card to my oscilloscope and set to work on PyScope.

PyScope

In case it wasn’t already clear, PyScope generates wireframe 3D graphics on an oscilloscope in XY mode. When finished I had an entire graphics engine, wireframe reader, MIDI parser, and other effects. While not as advanced as most oscilloscope music made “by hand,” PyScope can render its output somewhat musical. Using PyScope is simple: setting up the scene in the first video on the page only took four lines of code:

viewer.addEffect(fx.MIDIModulator("milkey.uss"))
viewer.addWireframe('head', shape.Spheroid((0,)*3, (150,)*3, resolution=5))
viewer.addWireframe('left_ear', shape.Spheroid((0,)*3, (75,)*3, resolution=3))
viewer.addWireframe('right_ear', shape.Spheroid((0,)*3, (75,)*3, resolution=3))

PyScope is dead, long live PyScope

Nowadays, PyScope is virtually obsolete. An enterpring Austrian developed OsciStudio, a relatively full-fledged DAW of sorts for oscilloscope music to create the audio and visual experiences at the same time. (OsciStudio was even used to create the entire oscilloscope music album I mentioned earlier.) While OsciStudio is great, it isn’t open source or nearly as simple as PyScope.

Also see lazor-fps, a from-scratch game engine I built around the same concepts.

  1. When I was in first grade, a TV repairman came to our house and saved our TV with a careful eye and a single replacement capacitor. While he was trying to work I excitedly talked about oscilloscopes—I didn’t have one yet. He came back a few days later and gave me his old portable oscilloscope, which I was very grateful for. I still use it to this day. 

  2. If you don’t have an oscilloscope and just want to see oscilloscope music in its natural habitat, see how to buy an oscilloscope [for oscilloscope music]