Skip to content

kosma/bakingbread

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

[Ba]king [Br]ead

CircleCI

Sound cards have been used as oscilloscopes for a really long time. Why not connect them in reverse? If the input can work, the output should too. Let's draw pretty pictures! Or, more accurately, ugly clocks.

ScreenShot

Usage

Connect your stereo sound card output to your oscilloscope in XY mode. Note: when preparing the cable, don't remove insulation with your teeth - you'll damage the enamel.

If you have libao, compile with make and run with:

./baking.py | ./bread

If you don't, substitute any other player capable of reading raw audio in unsigned, 8-bit, stereo, 44100Hz sample rate mode. Linux example:

./baking.py | aplay -f U8 -c 2 -r 44100

which works exactly the same but isn't as hip.

Why?

Because I was bored; because no one did it before (as far as I searched).

Limitations

Sound card output is band-limited. The implications, amongst others, are that it's really hard to just draw in a goto(x,y) manner. I used some crude tricks to prevent the dot from swinging wildly around the screen; alas, they are not perfect and may cause flickering as a result. See this presentation to learn enough DSP basics to know how band-limiting affects signals (especially square waves).

The program was tested on a really old analog oscilloscope. If you own a digital one, you may be disappointed. They don't really make good oscilloscopes anymore.

About

Analog clock on an oscilloscope using sound card output.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published