|
bernsee.com > The DSP Dimension > Fun Stuff > Ascii Art |
||
I often run into the problem of showing people, either personally or on remotely through email or usenet groups, a certain output of a DSP process. But: some people work on UNIX, others on Windows or on the Mac. Writing code that draws on the screen for each platform is tedious, and unnerving if you only want to display some basic things like waveforms or spectra at a reasonably coarse resolution. Also, when posting to usenet news groups, binary attachments are either not permitted or not possible, and are stripped off the message when it is stored in an archive. Therefore, most people "draw" their waveforms by typing appropriate characters for each point, which we call "ASCII Art". smbPlotWave() does exactly that. It draws a discrete signal, stored in a float buffer, via ASCII Art on the screen. It does this at a fairly coarse resolution, but it does it nicely and is entirely cross platform. Make sure you use a monospace font, though! The resulting "image" can be copied and pasted into an email, which is very convenient. It is also great for debugging purposes, when you don't have the time to bother with graphics. smbPlotWave()
only uses stdio commands, which are available on all
platforms.
|
||
|
|