Opening files with Kwave works like in most other applications, you can
specify a list of files on the command line when starting Kwave,
open an empty Kwave window (for example with File->New... (Ctrl-W) ) and put a file into it via drag and drop, or you can
or one of the last recently opened files under File->Open Recent
save under a different name with File->Save->As (Shift-Ctrl-S)
The fovourite file format of Kwave is (like you can guess from the name) ".wav". This format is very common to other "operating systems" but also is used within the KDE environment.
The second format that Kwave supports is "ASCII". You can import from and export to ASCII, but always be aware that storing in this format might produce very large files! Currently Kwave only supports ASCII files with only one channel (mono), support for multiple channels will be added in some future version. The file format will be described below.
For the moment, the best way to work with formats other than .wav is to use an external converter program. A good set of tools for this is in the SoX package, they have also some nice documentation! Take a look at http://home.sprynet.com/~cbagwell/sox.html.
The plans for future include support for import filters for other formats and maybe some filter that uses a user-defineable script with a call to an external filter, so that even formats not supported by SoX (like MP3) can be read and/or written.
The ASCII format is quite useful for scientific and educational purposes. Due to it's simple format, you can either write simple files on your own with a text editor or you can use the output of an other application and convert it into ASCII. As the format is really simple, you should not have big problems in writing a converter and most scientific applications use to have some kind of their own ASCII format for export.
The format of an ASCII file is quite simple and has the following rules:
Lines might end with a carriage return and/or a line feed character (so DOS files are supported too). But when saving, files will always be saved with line feed character as the end of the line.
Values can be are given in any format that the C library of your system is able to read and interprete as a floating point or integer number. But when saving, Kwave will save as in signed floating point format with 9 decimals.
Example: -7.06999982e-01
All values are expected to be in signed format. So if you import a file with only positive values, you will only see samples that are above the zero line.
Values can be specified in any range, Kwave always does a first pass over the file to get the highest absolute value and defines that value as "100%" before really reading in the file.
Internally all values are stored with 24 bit precision (signed).
Here is an example of a simple ASCII file that represents a sine wave with nine samples: