Ouverture et sauvegarde de fichiers
Prev
Next

Ouverture et sauvegarde de fichiers

L'ouverture des fichiers avec Kwave fonctionne comme dans toutes les autres applications de KDE. Vous pouvez :

Formats de fichiers supportés

Kwave supporte les formats de fichiers suivants :

  • Le meilleur format de fichier pour Kwave est (comme l'indique le nom de l'application) « .wav ». Ce format est très commun vis-à-vis d'autre « systèmes d'exploitation » mais aussi pour l'environnement de bureau KDE.

  • 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.

  • .mp3 et .mp2 pour l'importation est disponible grâce à la bibliothèque libmad pour le décodage des fichiers MP3 en combinaison avec la bibliothèque id3lib pour le décodage des marquages ID3.

  • Ogg / Vorbis (*.ogg) pour l'importation et l'exportation. Voir l'URL http://www.xiph.org pour plus de détails.

  • En plus, Kwave supporte plusieurs autres formats audio très communs via la bibliothèque audiofile. Vous pouvez importer les fichiers du type *.au et *.snd (NeXT, Sun Audio), *.aiff (Audio Interchange Format) et *.sf (Berkeley, IRCAM,Carl Sound Format).

Convertir vers ou à partir d'un fichier « .wav »

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!

Les prochaines versions incluront des filtres d'importation pour d'autres formats et peut être quelques filtres qui utiliseront des scripts définissables par les utilisateurs avec des appels à des outils de convertion externes pour le traitement en écriture ou en lecture des formats de fichiers non supportés par SoX (comme le MP3).

Format of ASCII files

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:

  1. At the start of the file comes a block of properties, with one property per line.

  2. Each property line starts with ##.

  3. After the properties comes a list of samples, with one sample per line. When using multiple channels, the samples are separated by commas.

  4. 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.

  5. Empty lines and characters after a # are treated as comments and are ignored.

  6. 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.

  7. 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.

  8. 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.

  9. 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

Prev
Next
Contents


Would you like to make a comment or contribute an update to this page?
Send feedback to the KDE Docs Team