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 → (Ctrl+W) ) and put a file into it via drag and drop, or you can
open a file through the menu with → (Ctrl+O)
or one of the last recently opened files under →
save the current file with → (Ctrl+S),
save under a different name with → → (Shift+Ctrl+S)
save all areas that are separated by markers, each one to an own file, with → →
or only the current selection with → →
Kwave supports the following file formats:
The favourite file format of Kwave is (like you can guess from the name)
.wav. This format is very common to other "operating systems" and also is commonly used within the KDE environment.
The second format that Kwave supports is "ASCII". You can export to ASCII, but currently not import from it (this is currently not implemented). Please be aware that storing in this format might produce very large files! The file format will be described below.
*.ogg) import and export. See http://www.xiph.org for details.
*.flac) import and export. See http://flac.sourceforge.net/ for details.
Additionally Kwave supports many other common formats through the audiofile plugin. You can import files like
*.aiff(Audio Interchange Format) and
*.sf(Berkeley,IRCAM,Carl Sound Format).
The best way to work with formats other than those supported by Kwave 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!
The plans for future include support for import and also export filters
for more formats and maybe some filter that uses a user-defineable script
with a call to an external filter, so that even formats not supported
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 some 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:
At the start of the file comes a block of properties, with one property per line.
Each property line starts with
After the properties comes a list of samples, with one sample per line. When using multiple channels, the samples are separated by commas.
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.
Empty lines and characters after a
#are treated as comments and are ignored.
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 integer format with a 24 bit range.
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.
When importing, 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 and scaling it.
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 eleven samples:
Example 4.1. content of an ASCII file with a single sine wave
## 'rate'=44100 ## 'tracks'=2 ## 'bits'=16 ## 'length'=11 ## 'Date'='2007-04-22' ## 'Software'='Kwave-0.7.9 for KDE 3.5.5' 5930496, 5930496 # 0 0, 8388352 # 1 -5930752, 5930496 # 2 -8388608, 0 # 3 -5930752, -5930752 # 4 0, -8388608 # 5 5930496, -5930752 # 6 8388352, 0 # 7 5930496, 5930496 # 8 0, 8388352 # 9 -5930752, 5930496 # 10 # EOF