| 1 |
/* manual_soundFiles.cpp |
| 2 |
* |
| 3 |
* Copyright (C) 1992-2005,2007,2008,2010,2011,2014-2017,2019-2023,2025 Paul Boersma |
| 4 |
* |
| 5 |
* This code is free software; you can redistribute it and/or modify |
| 6 |
* it under the terms of the GNU General Public License as published by |
| 7 |
* the Free Software Foundation; either version 3 of the License, or (at |
| 8 |
* your option) any later version. |
| 9 |
* |
| 10 |
* This code is distributed in the hope that it will be useful, but |
| 11 |
* WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 13 |
* See the GNU General Public License for more details. |
| 14 |
* |
| 15 |
* You should have received a copy of the GNU General Public License |
| 16 |
* along with this work. If not, see <http://www.gnu.org/licenses/>. |
| 17 |
*/ |
| 18 |
|
| 19 |
#include "ManPagesM.h" |
| 20 |
|
| 21 |
void manual_soundFiles_init (ManPages me); |
| 22 |
void manual_soundFiles_init (ManPages me) { |
| 23 |
|
| 24 |
MAN_BEGIN (U"Sound files", U"ppgb", 20210603) |
| 25 |
INTRO (U"This tutorial describes the sound files that you can read " |
| 26 |
"and write with Praat. It assumes you are familiar with the @Intro.") |
| 27 |
NORMAL (U"You can read this tutorial sequentially with the help of the \"< 1\" and \"1 >\" buttons.") |
| 28 |
LIST_ITEM (U"1. @@Sound files 1. General structure|General structure@") |
| 29 |
LIST_ITEM1 (U"1.1. @@Sound files 1.1. Sampling|Sampling@ (sampling frequency)") |
| 30 |
LIST_ITEM1 (U"1.2. @@Sound files 1.2. Quantization|Quantization@ (linear, endian, μ-law, A-law)") |
| 31 |
LIST_ITEM1 (U"1.3. @@Sound files 1.3. Channels|Channels@ (mono, stereo)") |
| 32 |
LIST_ITEM1 (U"1.4. @@Sound files 1.4. The header|The header@") |
| 33 |
LIST_ITEM1 (U"1.5. @@Sound files 1.5. Size|Size@") |
| 34 |
LIST_ITEM1 (U"1.6. @@Sound files 1.6. Compression|Compression@") |
| 35 |
LIST_ITEM (U"2. @@Sound files 2. File types|File types@") |
| 36 |
LIST_ITEM1 (U"2.1. @@Sound files 2.1. WAV files|WAV files@") |
| 37 |
LIST_ITEM1 (U"2.2. @@Sound files 2.2. AIFF files|AIFF files@") |
| 38 |
LIST_ITEM1 (U"2.3. @@Sound files 2.3. AIFC files|AIFC files@") |
| 39 |
LIST_ITEM1 (U"2.4. @@Sound files 2.4. NeXT/Sun (.au) files|NeXT/Sun (.au) files@") |
| 40 |
LIST_ITEM1 (U"2.5. @@Sound files 2.5. NIST files|NIST files@") |
| 41 |
LIST_ITEM1 (U"2.6. @@Sound files 2.6. FLAC files|FLAC files@") |
| 42 |
LIST_ITEM1 (U"2.7. @@Sound files 2.7. MP3 files|MP3 files@") |
| 43 |
LIST_ITEM1 (U"2.8. @@Sound files 2.8. Ogg Vorbis files|Ogg Vorbis files@") |
| 44 |
LIST_ITEM1 (U"2.9. @@Sound files 2.9. Ogg Opus files|Ogg Opus files@") |
| 45 |
LIST_ITEM (U"3. @@Sound files 3. Files that Praat can read|Files that Praat can read@") |
| 46 |
LIST_ITEM (U"4. @@Sound files 4. Files that Praat can write|Files that Praat can write@") |
| 47 |
MAN_END |
| 48 |
|
| 49 |
MAN_BEGIN (U"Sound files 1. General structure", U"ppgb", 20000123) |
| 50 |
INTRO (U"This is chapter 1 of the @@Sound files@ tutorial. " |
| 51 |
"It describes the general structure of the headers and data parts of sound files.") |
| 52 |
LIST_ITEM (U"1.1. @@Sound files 1.1. Sampling|Sampling@ (sampling frequency)") |
| 53 |
LIST_ITEM (U"1.2. @@Sound files 1.2. Quantization|Quantization@ (linear, μ-law, A-law)") |
| 54 |
LIST_ITEM (U"1.3. @@Sound files 1.3. Channels|Channels@ (mono, stereo)") |
| 55 |
LIST_ITEM (U"1.4. @@Sound files 1.4. The header|The header@") |
| 56 |
LIST_ITEM (U"1.5. @@Sound files 1.5. Size|Size@") |
| 57 |
LIST_ITEM (U"1.6. @@Sound files 1.6. Compression|Compression@") |
| 58 |
MAN_END |
| 59 |
|
| 60 |
MAN_BEGIN (U"Sound files 1.1. Sampling", U"ppgb", 20220102) |
| 61 |
NORMAL (U"When a sound signal from a microphone or on a tape needs to be read into a computer, " |
| 62 |
"it is %digitized, which means that it is %sampled and %quantized.") |
| 63 |
NORMAL (U"Sampling is the discretization of the time domain of the signal: " |
| 64 |
"each second of the signal is divided up into 44100, 48000 or 96000 " |
| 65 |
"slices (or any other suitable number), and a %%sample value% is associated with " |
| 66 |
"each slice. For instance, a continuous 377-Hz sine wave is expressed by") |
| 67 |
EQUATION (U"%x(%t) = sin (2%π 377 %t)") |
| 68 |
NORMAL (U"If the %%sampling frequency% (or %%sample rate%) is 44100 Hz, this sine wave will be sampled at " |
| 69 |
"points spaced Δ%t = 1/44100 second apart, and the sample values will be") |
| 70 |
EQUATION (U"%x__%i_ = sin (2%π 377 (%t__0_ + %i Δ%t))") |
| 71 |
NORMAL (U"where %t__0_ is the time after which sampling begins. " |
| 72 |
"Δ%t is called the %%sample period%.") |
| 73 |
NORMAL (U"Quantization is handled in the next section (@@Sound files 1.2. Quantization|§1.2@).") |
| 74 |
MAN_END |
| 75 |
|
| 76 |
MAN_BEGIN (U"Sound files 1.2. Quantization", U"ppgb", 20190517) |
| 77 |
NORMAL (U"Apart from sampling (@@Sound files 1.1. Sampling|§1.1@), " |
| 78 |
"digitization also involves quantization, which is the conversion of a sample value " |
| 79 |
"into a number that fits into 8, 16, 24 or 32 bits.") |
| 80 |
ENTRY (U"Saving") |
| 81 |
NORMAL (U"When exporting a @Sound object as a 16-bit audio file on disk, " |
| 82 |
"Praat multiplies the samples of the Sound by 32768, and then rounds them to integer numbers, " |
| 83 |
"so that air pressure values between -1.0 and +1.0 Pa will end up being coded as integers between -32768 and +32767. " |
| 84 |
"Sample values below -1.0 will be coded as -32768, and sample values above +1.0 will be coded as +32767. " |
| 85 |
"To avoid such \"clipping\", keep the absolute amplitude in your @Sound object below 1.000, " |
| 86 |
"perhaps by using @@Sound: Scale peak...@ before you save.") |
| 87 |
NORMAL (U"When exporting a @Sound object as a 24-bit audio file on disk, " |
| 88 |
"Praat multiplies the samples of the Sound by 8388608 instead.") |
| 89 |
ENTRY (U"Opening") |
| 90 |
NORMAL (U"For a 16-bit sound file, the sample values on disk are integers between -32768 and +32767. " |
| 91 |
"When turning the file into a @Sound object, Praat converts these integers into real values between -1.0 and +1.0, " |
| 92 |
"by dividing the sample values by 32768.0 (i.e. 2^^(16 – 1)^). " |
| 93 |
"Praat subsequently regards these real values as air pressures in pascal (see @@sound pressure calibration@). " |
| 94 |
"For a 24-bit AIFF file, the sample values on disk are integers between -8388608 and +8388607, " |
| 95 |
"and Praat divides these by 8388608.0 to get values between -1.0 and +1.0 Pa in the @Sound object.") |
| 96 |
MAN_END |
| 97 |
|
| 98 |
MAN_BEGIN (U"Sound files 1.3. Channels", U"ppgb", 20000126) |
| 99 |
NORMAL (U"For most file types, Praat supports sounds with one channel (mono) and two channels (stereo).") |
| 100 |
MAN_END |
| 101 |
|
| 102 |
MAN_BEGIN (U"Sound files 1.4. The header", U"ppgb", 20040223) |
| 103 |
NORMAL (U"The bulk of most sound files is formed by the samples. " |
| 104 |
"The sample part is usually preceded by a header, which contains " |
| 105 |
"information about:") |
| 106 |
LIST_ITEM (U"1. The type of file (WAV, AIFF, AIFC, NeXT/Sun, NIST, Kay, FLAC...).") |
| 107 |
LIST_ITEM (U"2. The sampling frequency (@@Sound files 1.1. Sampling|§1.1@).") |
| 108 |
LIST_ITEM (U"3. The encoding (linear, 8 or 16 bit, byte order, μ-law, A-law, see @@Sound files 1.2. Quantization|§1.2@).") |
| 109 |
LIST_ITEM (U"4. The number of channels (mono, stereo, see @@Sound files 1.3. Channels|§1.3@).") |
| 110 |
LIST_ITEM (U"5. The duration (usually the number of samples).") |
| 111 |
MAN_END |
| 112 |
|
| 113 |
MAN_BEGIN (U"Sound files 1.5. Size", U"ppgb", 20000126) |
| 114 |
NORMAL (U"The size of a sound file is equal to the size of the header " |
| 115 |
"plus the product of the number of samples, the quantization size, " |
| 116 |
"and the number of channels.") |
| 117 |
NORMAL (U"For instance, a stereo sound with a duration of 3 seconds, sampled at 44100 Hz, " |
| 118 |
"would, when written into a 16-bit NeXT/Sun file, take up a disk space of") |
| 119 |
EQUATION (U"28 + 2 * 3.0 * 44100 * 2 = 529228 bytes") |
| 120 |
NORMAL (U"whereas the same sound, when averaged to mono, downsampled to 8000 Hz, " |
| 121 |
"and written into a μ-law NeXT/Sun file, take up only a disk space of") |
| 122 |
EQUATION (U"28 + 1 * 3.0 * 8000 * 1 = 24028 bytes") |
| 123 |
NORMAL (U"The first example is typical of CD quality, the second of telephone speech.") |
| 124 |
MAN_END |
| 125 |
|
| 126 |
MAN_BEGIN (U"Sound files 1.6. Compression", U"ppgb", 20210604) |
| 127 |
NORMAL (U"Praat used to be able to read some compressed sound file formats (shortened NIST, Polyphone), " |
| 128 |
"but because of licensing problems (Praat went open source, Shorten did not), " |
| 129 |
"you now need to use other (freely available) programs to do the conversion before reading them into Praat. " |
| 130 |
"Praat can decode (but not create) MP3 files, Ogg Vorbis files, and Ogg Opus files. " |
| 131 |
"Praat fully supports FLAC compressed files.") |
| 132 |
MAN_END |
| 133 |
|
| 134 |
MAN_BEGIN (U"Sound files 2. File types", U"ppgb", 20201229) |
| 135 |
LIST_ITEM (U"2.1. @@Sound files 2.1. WAV files|WAV files@") |
| 136 |
LIST_ITEM (U"2.2. @@Sound files 2.2. AIFF files|AIFF files@") |
| 137 |
LIST_ITEM (U"2.3. @@Sound files 2.3. AIFC files|AIFC files@") |
| 138 |
LIST_ITEM (U"2.4. @@Sound files 2.4. NeXT/Sun (.au) files|NeXT/Sun (.au) files@") |
| 139 |
LIST_ITEM (U"2.5. @@Sound files 2.5. NIST files|NIST files@") |
| 140 |
LIST_ITEM (U"2.6. @@Sound files 2.6. FLAC files|FLAC files@") |
| 141 |
LIST_ITEM (U"2.7. @@Sound files 2.7. MP3 files|MP3 files@") |
| 142 |
LIST_ITEM (U"2.8. @@Sound files 2.8. Ogg Vorbis files|Ogg Vorbis files@") |
| 143 |
LIST_ITEM (U"2.9. @@Sound files 2.9. Ogg Opus files|Ogg Opus files@") |
| 144 |
MAN_END |
| 145 |
|
| 146 |
MAN_BEGIN (U"Sound files 2.1. WAV files", U"ppgb", 20040223) |
| 147 |
NORMAL (U"The audio file type most commonly used on Windows computers, also very common on the Internet.") |
| 148 |
MAN_END |
| 149 |
|
| 150 |
MAN_BEGIN (U"Sound files 2.2. AIFF files", U"ppgb", 20190517) |
| 151 |
NORMAL (U"AIFF stands for: Audio Interchange File Format.") |
| 152 |
NORMAL (U"This standard format for sound files was defined by Apple. " |
| 153 |
"It is also the format of the sound files on the Iris Indigo, " |
| 154 |
"where each sample is quantized into 16 bits.") |
| 155 |
ENTRY (U"Reading") |
| 156 |
NORMAL (U"To open an AIFF file from disk, choose @@Read from file...@ from the Open menu. " |
| 157 |
"Praat recognizes AIFF and AIFC files with plain 8-bit, 16-bit, 24-bit or 32-bit encoding, " |
| 158 |
"but not compressed AIFC files. Praat recognizes any sampling frequency, and any number of channels.") |
| 159 |
NORMAL (U"The resulting Sound will appear in the List of Objects. " |
| 160 |
"Its name will be identical to the file name, without extension.") |
| 161 |
ENTRY (U"Saving") |
| 162 |
NORMAL (U"To export a @Sound object to a 16-bit AIFF file, select the @Sound and choose @@Save as AIFF file...@ from the Save menu.") |
| 163 |
MAN_END |
| 164 |
|
| 165 |
MAN_BEGIN (U"Sound files 2.3. AIFC files", U"ppgb", 20190517) |
| 166 |
NORMAL (U"AIFC is short for AIFF(C) or AIFF-C, i.e. the Audio Interchange File Format " |
| 167 |
"(@@Sound files 2.2. AIFF files|§2.2@) with optional compression.") |
| 168 |
NORMAL (U"Praat reads uncompressed AIFC files with plain 8-bit, 16-bit, 24-bit or 32-bit encoding, " |
| 169 |
"but does not support compressed AIFC files.") |
| 170 |
MAN_END |
| 171 |
|
| 172 |
MAN_BEGIN (U"Sound files 2.4. NeXT/Sun (.au) files", U"ppgb", 20210604) |
| 173 |
NORMAL (U"This is the format of the sound files on the Sun.") |
| 174 |
ENTRY (U"Reading") |
| 175 |
NORMAL (U"To read a #Sound from a Sun audio file on disk, use @@Read from file...@. " |
| 176 |
"Praat then asks you for a file name. " |
| 177 |
"After you click OK, Praat determines the encoding of the file. " |
| 178 |
"If the encoding is 16-bit linear, the 16-bit sample values are divided by 32768 so that the amplitude " |
| 179 |
"of the resulting Sound is between -1.0 and +1.0. " |
| 180 |
"If the encoding is 8-bit %μ-law, the 16-bit sample value is determined by table look-up first.") |
| 181 |
NORMAL (U"The resulting Sound will appear in the list of objects; " |
| 182 |
"its name will be identical to the file name, without extension.") |
| 183 |
ENTRY (U"Saving") |
| 184 |
NORMAL (U"Use @@Save as NeXT/Sun file...@. The samples of the Sound are multiplied by 32768 " |
| 185 |
"and quantized between -32768 and 32767; " |
| 186 |
"the result is written to the file in 16-bit mono Sun audio format.") |
| 187 |
NORMAL (U"To avoid clipping, keep the absolute amplitude below 1.000. " |
| 188 |
"If the maximum sound pressure level is 91 dB (top = 32767), " |
| 189 |
"the quantization threshold is (top = 1/2) -5 dB.") |
| 190 |
MAN_END |
| 191 |
|
| 192 |
MAN_BEGIN (U"Sound files 2.5. NIST files", U"ppgb", 20040223) |
| 193 |
NORMAL (U"An audio file type used by speech researchers. Used, for instance, in the TIMIT database. " |
| 194 |
"Praat reads several kinds of NIST files: big-endian, little-endian, μ-law, A-law, Polyphone. " |
| 195 |
"NIST files compressed with #shorten are no longer supported " |
| 196 |
"(see @@Sound files 1.6. Compression|§1.6@).") |
| 197 |
MAN_END |
| 198 |
|
| 199 |
MAN_BEGIN (U"Sound files 2.6. FLAC files", U"Erez Volk", 20070514) |
| 200 |
NORMAL (U"A lossless compressed audio format (see ##http://flac.sourceforge.net#). " |
| 201 |
"Praat reads FLAC files in all bitrate/frequency settings " |
| 202 |
"(see also @@Sound files 1.6. Compression|§1.6@).") |
| 203 |
MAN_END |
| 204 |
|
| 205 |
MAN_BEGIN (U"Sound files 2.7. MP3 files", U"Erez Volk", 20070601) |
| 206 |
NORMAL (U"A ubiquitous lossy audio compression format. " |
| 207 |
"Praat supports MP3 decoding through the MPEG Audio Decoder library " |
| 208 |
"##http://www.underbit.com/products/mad/#. " |
| 209 |
"(see also @@Sound files 1.6. Compression|§1.6@).") |
| 210 |
MAN_END |
| 211 |
|
| 212 |
MAN_BEGIN (U"Sound files 2.8. Ogg Vorbis files", U"djmw", 20210604) |
| 213 |
NORMAL (U"Vorbis is a general-purpose patent-free lossy audio compression format. " |
| 214 |
"Praat supports Ogg Vorbis decoding through open source code made available at " |
| 215 |
"##https://xiph.org/downloads/#. Praat uses libogg-1.3.4 and libvorbis-1.3.7 " |
| 216 |
"(see also @@Sound files 1.6. Compression|§1.6@).") |
| 217 |
MAN_END |
| 218 |
|
| 219 |
MAN_BEGIN (U"Sound files 2.9. Ogg Opus files", U"djmw", 20210604) |
| 220 |
NORMAL (U"Opus is a general-purpose patent-free lossy audio compression format, " |
| 221 |
"a successor to @@Sound files 2.8. Ogg Vorbis files|Vorbis@. " |
| 222 |
"According to Xiph.Org's website, this format \"was developed by the Xiph.Org Foundation and standardized by the Internet Engineering Task Force, designed to efficiently " |
| 223 |
"code speech and general audio in a single format, while remaining low-latency enough for real-time interactive communication " |
| 224 |
"and low-complexity enough for low-end embedded processors.\" " |
| 225 |
"Praat supports Ogg Opus decoding through open source code made available at " |
| 226 |
"##https://opus-codec.org/downloads/#. Praat uses opus-1.3.1 and opusfile-0.12 " |
| 227 |
"(see also @@Sound files 1.6. Compression|§1.6@).") |
| 228 |
MAN_END |
| 229 |
|
| 230 |
MAN_BEGIN (U"Sound files 3. Files that Praat can read", U"ppgb", 20210604) // 2025 |
| 231 |
INTRO (U"Praat can read five types of standard sound files in several formats, " |
| 232 |
"and a number of proprietary types of sound files as well.") |
| 233 |
ENTRY (U"Standard sound files") |
| 234 |
NORMAL (U"The @@Open menu@ contains two commands for opening sound files:") |
| 235 |
LIST_ITEM (U"• With @@Read from file...@, you read the entire file into memory. " |
| 236 |
"A @Sound object will appear in the list. " |
| 237 |
"This is appropriate if your sound is not too long to fit into memory. " |
| 238 |
"The advantage of having a @Sound object is that you can perform analysis " |
| 239 |
"on it directly.") |
| 240 |
LIST_ITEM (U"• With @@Open long sound file...@, you open a sound file that is too long " |
| 241 |
"to read into memory completely (i.e. several hours long). A @LongSound object will appear in the list. " |
| 242 |
"You will typically choose #View to view the contents of this sound and analyse it. " |
| 243 |
"Praat will only read as much of the file into memory as is needed to play or display " |
| 244 |
"parts of it.") |
| 245 |
NORMAL (U"Both commands understand the following six standard audio file formats:") |
| 246 |
LIST_ITEM (U"• WAV:") |
| 247 |
LIST_ITEM1 (U"• linear 16-bit little-endian") |
| 248 |
LIST_ITEM1 (U"• 8-bit μ-law") |
| 249 |
LIST_ITEM1 (U"• 8-bit A-law") |
| 250 |
LIST_ITEM1 (U"• linear 8-bit unsigned") |
| 251 |
LIST_ITEM (U"• AIFF or AIFC:") |
| 252 |
LIST_ITEM1 (U"• linear 16-bit big-endian") |
| 253 |
LIST_ITEM1 (U"• linear 8-bit signed") |
| 254 |
LIST_ITEM (U"• NeXT/Sun (.au):") |
| 255 |
LIST_ITEM1 (U"• linear 16-bit big-endian") |
| 256 |
LIST_ITEM1 (U"• 8-bit μ-law") |
| 257 |
LIST_ITEM1 (U"• 8-bit A-law") |
| 258 |
LIST_ITEM1 (U"• linear 8-bit signed") |
| 259 |
LIST_ITEM (U"• NIST:") |
| 260 |
LIST_ITEM1 (U"• linear 16-bit little-endian") |
| 261 |
LIST_ITEM1 (U"• linear 16-bit big-endian") |
| 262 |
LIST_ITEM1 (U"• 8-bit μ-law") |
| 263 |
LIST_ITEM1 (U"• 8-bit A-law") |
| 264 |
LIST_ITEM1 (U"• linear 8-bit signed") |
| 265 |
LIST_ITEM (U"• FLAC:") |
| 266 |
LIST_ITEM1 (U"• 8-bit, 16-bit, 24-bit or 32-bit") |
| 267 |
LIST_ITEM1 (U"• all sampling frequencies") |
| 268 |
LIST_ITEM (U"• MP3:") |
| 269 |
LIST_ITEM1 (U"• all constant or variable bitrates") |
| 270 |
LIST_ITEM (U"• Shorten:") |
| 271 |
LIST_ITEM1 (U"• 8-bit A-law") |
| 272 |
MAN_END |
| 273 |
|
| 274 |
MAN_BEGIN (U"Sound files 4. Files that Praat can write", U"ppgb", 20210604) |
| 275 |
INTRO (U"Praat can export a Sound to six types of standard sound files, in the appropriate linear 16-bit format:") |
| 276 |
LIST_ITEM (U"• @@Save as WAV file...@ (16-bit little-endian)") |
| 277 |
LIST_ITEM (U"• @@Save as AIFF file...@ (16-bit big-endian)") |
| 278 |
LIST_ITEM (U"• @@Save as AIFC file...@ (16-bit big-endian)") |
| 279 |
LIST_ITEM (U"• @@Save as NeXT/Sun file...@ (16-bit big-endian)") |
| 280 |
LIST_ITEM (U"• @@Save as NIST file...@ (16-bit little-endian)") |
| 281 |
LIST_ITEM (U"• @@Save as FLAC file...@ (16-bit)") |
| 282 |
MAN_END |
| 283 |
|
| 284 |
MAN_BEGIN (U"Save as WAV file...", U"ppgb", 20110129) |
| 285 |
INTRO (U"With this command, you save one or more selected @Sound and/or @LongSound objects " |
| 286 |
"as a single 16-bit little-endian WAV file on disk. See the @@Sound files@ tutorial for more information.") |
| 287 |
MAN_END |
| 288 |
|
| 289 |
MAN_BEGIN (U"Save as AIFF file...", U"ppgb", 20110129) |
| 290 |
INTRO (U"With this command, you save one or more selected @Sound and/or @LongSound objects " |
| 291 |
"as a single 16-bit big-endian AIFF file on disk. See the @@Sound files@ tutorial for more information.") |
| 292 |
/*ENTRY (U"AIFF file format for writing") |
| 293 |
NORMAL (U"Although")*/ |
| 294 |
MAN_END |
| 295 |
|
| 296 |
MAN_BEGIN (U"Save as AIFC file...", U"ppgb", 20110129) |
| 297 |
INTRO (U"With this command, you save one or more selected @Sound and/or @LongSound objects " |
| 298 |
"as a single 16-bit big-endian AIFC file on disk. See the @@Sound files@ tutorial for more information.") |
| 299 |
MAN_END |
| 300 |
|
| 301 |
MAN_BEGIN (U"Save as NeXT/Sun file...", U"ppgb", 20110129) |
| 302 |
INTRO (U"With this command, you save one or more selected @Sound and/or @LongSound objects " |
| 303 |
"as a single 16-bit big-endian NeXT/Sun (.au) file on disk. See the @@Sound files@ tutorial for more information.") |
| 304 |
MAN_END |
| 305 |
|
| 306 |
MAN_BEGIN (U"Save as NIST file...", U"ppgb", 20110129) |
| 307 |
INTRO (U"With this command, you save one or more selected @Sound and/or @LongSound objects " |
| 308 |
"as a single 16-bit little-endian NIST audio file on disk. See the @@Sound files@ tutorial for more information.") |
| 309 |
MAN_END |
| 310 |
|
| 311 |
MAN_BEGIN (U"Save as FLAC file...", U"ppgb", 20110129) |
| 312 |
INTRO (U"With this command, you save one or more selected @Sound and/or @LongSound objects " |
| 313 |
"as a single 16-bit FLAC audio file on disk. See the @@Sound files@ tutorial for more information.") |
| 314 |
MAN_END |
| 315 |
|
| 316 |
MAN_BEGIN (U"NIST files", U"Erez Volk", 20110131) |
| 317 |
INTRO (U"A way for storing a @Sound object on disk.") |
| 318 |
ENTRY (U"File format") |
| 319 |
NORMAL (U"The compressed sound files of the Timit database, and the Groningen speech corpus.") |
| 320 |
ENTRY (U"Reading") |
| 321 |
NORMAL (U"With @@Read from file...@.") |
| 322 |
ENTRY (U"Saving") |
| 323 |
NORMAL (U"With ##Save as NIST audio file...#.") |
| 324 |
MAN_END |
| 325 |
|
| 326 |
MAN_BEGIN (U"FLAC files", U"Erez Volk", 20110131) |
| 327 |
INTRO (U"A way for storing a @Sound object on disk.") |
| 328 |
ENTRY (U"File format") |
| 329 |
NORMAL (U"A lossless compressed audio file format.") |
| 330 |
ENTRY (U"Reading") |
| 331 |
NORMAL (U"With @@Read from file...@.") |
| 332 |
ENTRY (U"Saving") |
| 333 |
NORMAL (U"With ##Save as FLAC audio file...#.") |
| 334 |
MAN_END |
| 335 |
|
| 336 |
MAN_BEGIN (U"How to concatenate sound files", U"ppgb", 20110131) |
| 337 |
INTRO (U"You can concatenate any combination of AIFF, AIFC, WAV, NeXT/Sun, NIST " |
| 338 |
"and FLAC audio files, and other files that you have read into memory.") |
| 339 |
NORMAL (U"For instance, if you want to concatenate a 30-minute AIFF file, " |
| 340 |
"a 4-minute Kay sound file, and a 60-minute NeXT/Sun file, " |
| 341 |
"by saving them into a 94-minute WAV file, " |
| 342 |
"you do the following:") |
| 343 |
LIST_ITEM (U"1. Open the AIFF file with @@Open long sound file...@ from the @@Open menu@. " |
| 344 |
"A @LongSound object will appear in the list.") |
| 345 |
LIST_ITEM (U"2. Read the Kay sound file into memory with @@Read from file...@. " |
| 346 |
"A @Sound object will appear in the list.") |
| 347 |
LIST_ITEM (U"3. Open the AIFF file with @@Open long sound file...@ from the @@Open menu@. " |
| 348 |
"A second @LongSound object will appear in the list.") |
| 349 |
LIST_ITEM (U"4. Select the three objects and choose @@Save as WAV file...@ " |
| 350 |
"from the @@Save menu@.") |
| 351 |
NORMAL (U"This only works if all the sounds have the same sampling frequency " |
| 352 |
"and the same number of channels.") |
| 353 |
ENTRY (U"Available formats") |
| 354 |
NORMAL (U"The format of the original sound files may be 16-bit linear " |
| 355 |
"(with big-endian or little-endian byte order), 8-bit linear (signed or unsigned), " |
| 356 |
"8-bit μ-law, or 8-bit A-law. The format of the resulting sound file is always " |
| 357 |
"16-bit linear, with an appropriate default byte order. The following commands " |
| 358 |
"are available in the @@Save menu@ if you select any combination of @LongSound " |
| 359 |
"and/or @Sound objects:") |
| 360 |
LIST_ITEM (U"• @@Save as WAV file...@ (little-endian)") |
| 361 |
LIST_ITEM (U"• @@Save as AIFF file...@ (big-endian)") |
| 362 |
LIST_ITEM (U"• @@Save as AIFC file...@ (big-endian)") |
| 363 |
LIST_ITEM (U"• @@Save as NeXT/Sun file...@ (big-endian)") |
| 364 |
LIST_ITEM (U"• @@Save as NIST file...@ (little-endian)") |
| 365 |
LIST_ITEM (U"• @@Save as FLAC file...@") |
| 366 |
MAN_END |
| 367 |
|
| 368 |
MAN_BEGIN (U"LongSound", U"ppgb", 20110131) |
| 369 |
INTRO (U"One of the @@types of objects@ in Praat. See the @@Sound files@ tutorial.") |
| 370 |
NORMAL (U"A LongSound object gives you the ability to view and label " |
| 371 |
"a sound file that resides on disk. You will want to use it for sounds " |
| 372 |
"that are too long to read into memory as a @Sound object (typically, a few minutes).") |
| 373 |
ENTRY (U"How to create a LongSound object") |
| 374 |
NORMAL (U"You create a LongSound object with @@Open long sound file...@ from the @@Open menu@.") |
| 375 |
ENTRY (U"What you can do with a LongSound object") |
| 376 |
NORMAL (U"You can save a LongSound object to a new sound file, " |
| 377 |
"perhaps in a different format (AIFF, AIFC, WAV, NeXT/Sun, NIST, FLAC) " |
| 378 |
"with the commands in the Save menu. You can also concatenate several " |
| 379 |
"LongSound objects in this way. See @@How to concatenate sound files@.") |
| 380 |
ENTRY (U"How to view and edit a LongSound object") |
| 381 |
NORMAL (U"You can view a LongSound object in a @LongSoundEditor by choosing @@LongSound: View@. " |
| 382 |
"This also allows you to extract parts of the LongSound as @Sound objects, " |
| 383 |
"or save these parts as a sound file. " |
| 384 |
"There are currently no ways to actually change the data in the file.") |
| 385 |
ENTRY (U"How to annotate a LongSound object") |
| 386 |
NORMAL (U"You can label and segment a LongSound object after the following steps:") |
| 387 |
LIST_ITEM (U"1. Select the LongSound object.") |
| 388 |
LIST_ITEM (U"2. Choose @@LongSound: To TextGrid...@ and specify your tiers.") |
| 389 |
LIST_ITEM (U"3. Select the resulting @TextGrid object together with the LongSound object, and click ##View & Edit#.") |
| 390 |
NORMAL (U"A @TextGridEditor will appear on the screen, with a copy of the LongSound object in it.") |
| 391 |
ENTRY (U"Limitations") |
| 392 |
NORMAL (U"The length of the sound file is limited to 2 gigabytes, which is 3 hours of CD-quality stereo, " |
| 393 |
"or 12 hours 16-bit mono sampled at 22050 Hz.") |
| 394 |
MAN_END |
| 395 |
|
| 396 |
MAN_BEGIN (U"LongSound: To TextGrid...", U"ppgb", 19980730) |
| 397 |
INTRO (U"A command to create a @TextGrid without any labels, copying the time domain from the selected @LongSound.") |
| 398 |
NORMAL (U"See @@Sound: To TextGrid...@ for the settings.") |
| 399 |
MAN_END |
| 400 |
|
| 401 |
MAN_BEGIN (U"LongSound: View", U"ppgb", 19980730) |
| 402 |
INTRO (U"A command to view the selected @LongSound object in a @LongSoundEditor.") |
| 403 |
MAN_END |
| 404 |
|
| 405 |
MAN_BEGIN (U"LongSoundEditor", U"ppgb", 20041124) |
| 406 |
INTRO (U"One of the @Editors in Praat, for viewing a @LongSound object.") |
| 407 |
NORMAL (U"This viewer allows you:") |
| 408 |
LIST_ITEM (U"• to view and hear parts of the sound as it is on disk;") |
| 409 |
LIST_ITEM (U"• to copy a selected part as a @Sound object to the list of objects, so that you " |
| 410 |
"can perform analyses on it or save it to a smaller sound file;") |
| 411 |
LIST_ITEM (U"• to copy a selected part as a @Sound object to the @Sound clipboard, " |
| 412 |
"so that you can paste it into another Sound object that you are viewing in a @SoundEditor.") |
| 413 |
NORMAL (U"To label and segment the LongSound object, use the @TextGridEditor instead (see @LongSound).") |
| 414 |
NORMAL (U"The display and playback of the samples is restricted to 60 seconds at a time, for reasons of speed " |
| 415 |
"(although you can change this number with ##LongSound prefs# from the main #Preferences menu; " |
| 416 |
"the sound file itself can contain several hours of sound.") |
| 417 |
MAN_END |
| 418 |
|
| 419 |
MAN_BEGIN (U"Open long sound file...", U"ppgb", 19980730) |
| 420 |
INTRO (U"A command in the @@Open menu@ that creates a @LongSound object.") |
| 421 |
NORMAL (U"The file will be opened for reading only. The file stays open until you remove the LongSound object.") |
| 422 |
MAN_END |
| 423 |
|
| 424 |
MAN_BEGIN (U"Sesam/LVS files", U"ppgb", 20170828) |
| 425 |
INTRO (U"A way for storing a @Sound object on disk.") |
| 426 |
ENTRY (U"File format") |
| 427 |
NORMAL (U"The sound files used by the SESAM and LVS programs. Each sample is normally quantized into 12 bits.") |
| 428 |
ENTRY (U"Reading") |
| 429 |
NORMAL (U"To read a #Sound from a Sesam file on disk, use @@Read from file...@. " |
| 430 |
"The file name is expected to end in \".sdf\" or \".SDF\".") |
| 431 |
NORMAL (U"The 12-bit sample values are divided by 2048 so that the amplitude " |
| 432 |
"of the resulting Sound is between -1.0 and +1.0.") |
| 433 |
NORMAL (U"The resulting #Sound will appear in the List of Objects; " |
| 434 |
"its name will be equal to the file name, without extension.") |
| 435 |
NORMAL (U"If the sound was encoded in 16 bits per sample, you should divide by 16 after reading " |
| 436 |
"(with `Formula: ~ self / 16`)") |
| 437 |
ENTRY (U"Saving") |
| 438 |
NORMAL (U"With ##Save as Sesam file...#. Praat then asks you for a file name. " |
| 439 |
"After you click OK, the samples of the Sound are multiplied by 2048 " |
| 440 |
"and quantized between -2048 and 2047; " |
| 441 |
"the result is written to the file in 12-bit LVS and Sesam format.") |
| 442 |
NORMAL (U"To avoid clipping, keep the absolute amplitude below 1.000. " |
| 443 |
"If the maximum sound pressure level is 91 dB (top = 2047), " |
| 444 |
"the quantization threshold is (top = 1/2) 19 dB.") |
| 445 |
NORMAL (U"If you prefer 16-bit encoding, you should multiply by 16 before saving " |
| 446 |
"(with `Formula: ~ self * 16`)") |
| 447 |
MAN_END |
| 448 |
|
| 449 |
} |
| 450 |
|
| 451 |
/* End of file manual_soundFiles.cpp */ |