About | Download | Documentation | News | Screenshots

What is ttyWaveEdit

ttyWaveEdit is probably the lightest and most portable solution in order to graphically view and edit sound.

ttyWaveEdit has two modes, the first turns an uncompressed Wave file into a series of spaces and stars that reveals graphically the shape of the sound, and outputs it to a text file or directly to the screen (see the Screenshots section).

Unlike traditional sound editors, here the sound is represented vertically. A line thus represent one sample, which value can be deduced by how far it goes towards the left (if it's negative) or the right (if it's positive). The top represents the beginning of the sound, and it scrolls down to its end.

The second mode consists in turning back a file containing those spaces and stars into a Wave file.

ttyWaveEdit is not in itself an editor, but enables you to edit sound files with such an editor as vi.

What's the use?

Due to its low requirements (a 80x25 terminal, a C89 compiler and barely 1 MB of RAM (depending on the implementation and the length of the sound files used)) and its great portability, it can be in certain environments the only available solution to make yourself an idea of what a Wave file looks like, and even the only way to edit/create from scratch a sound file without having to use an hexadecimal editor.


Because it's fun to program in a couple of days (4-5 hours, multi-platform testing included) a very portable and theorically useful and funny looking program, and make the code nice looking and see it running even on 15 year old Macintosh systems, period.

You didn't really think I programmed it because I find it actually useful, did you? By the way I gotta say thank you to the guys who did ttyquake and the text mode Unreal Tournament for getting me started.

Compilation & Usage

-With your favorite Unix, just compile it with gcc or your favorite C compiler (example : gcc twe.c -o twe)
-In cygwin, append -mno-cygwin to the compilation arguments to have a standalone Windows program
-In Mac OS (7.0.1 to 9.2.2), compile with Apple's MPW and MrC or SC and compile it as a SIOW

ttyWaveEdit doesn't take any arguments but one, although not recommended to use. That argument is -n, or --nonorm, it prevents the signal from being normalized. If the signal is too faint and not normalized, then it will loose much more in quality, since ttyWaveEdit allows 79 possible levels, instead of respectively 256 and 65536 for 8-bit and 16-bit sounds.

ttyWaveEdit can run on little endian platforms, such as 68k and PowerPC Macs, however, only 8-bit and 16-bit files will be parsed and written properly, not 32-bit IEEE 754 float files.

When choosing "stdout" as the output in mode 1, you are then prompted for a number. This number will be used to make the displaying of the wave go slower, thus better looking. My personal favorite is around 1000 on my 2 GHz Windows box.

Technical details

-Because it displays the value of each sample using 79 characters (plus one for the line break) so a sound can be properly displayed on a 80x25 terminal, ttyWaveEdit uses 79 levels for each sample value, which is the equivalent of a sound sampled on 6.3 bits instead of 8 or 16 bits. The result is a lower quality sound, usually with a -34 dB white noise.

-The memory usage equals the size of the sound in the float format (or the size of a 16-bit sound multiplied by 2) plus a few hundred kilobytes. However it seems that on Mac OS 7-9 it satisfies itself with only about 150 kB no matter what.


Feb. 14, 2006 : 1.0.1 released
























©2006 Michel Rouzic