Yes they are.
Audacity works internally with 32-bit floating point sample values (IEEE 754). This is a really nice format for working with audio. Sample values are literally numeric values. A signal level of 0 dB has a peak value of +/- 1.0 (that is the +/- 1.0 vertical scale that is shown by default on the left end of an audio track). Obviously IEEE 754 supports values much greater/smaller than +/- 1.0, which means that audio data within Audacity virtually never “clips”.
The downside of 32-bit float is that it makes file sizes large (double the size of “normal” 16-bit audio) and few media players support the format (though it is quite widely supported in audio editing software).
So “sample values” that lie in the “valid” range below 0 dB lie in the range -1.0 to +1.0.
Obviously it can’t work exactly like that for integer format…
How it works with integer formats is the the available range of integers is “normalized” to a range of +/-1.0.
Example, for signed 16-bit numbers, the range is -32768 to 32767. To “normalize” this range to +/- 1.0, the integer numeric value is divided by 32768 (see note-1 below).
One of the down sides of integer format audio is that, because the range of available values is finite, and all available values are normalized to lie in the range of +/- 1.0, it is impossible to represent values beyond the 0 dB limit - this is why “digital clipping” is inevitable for integer audio if the signal level exceeds 0 dB.
Audacity uses “libsndfile” to handle reading/writing audio data. When libsndfile “normalizes” integer values, it places the “zero bit” at zero and both positive and negative numbers are normalized exactly the same amount, but because there is always an even number of numbers, the maximum possible positive number is always a tiny fraction below 1.0. Other audio I/O libraries may handle this differently. See here for more information: libsndfile : Frequently Asked Questions.
For each of these snippets,
- Create a new track (Tracks menu > Add New > Mono Track / Stereo Track),
- Select part of the track,
- Open the “Nyquist Prompt” effect,
- Copy and paste the code snippet into the text window of the Nyquist Prompt and apply.
To create a constant level output of +0.4 for the length of the track selection:
To create a series of sample values, for example 0.3, -0.3, 0.2, -0.2, 0.1, -0.1, 0.0
(setf values #(0.3 -0.3 0.2 -0.2 0.1 -0.1 0.0))
(snd-from-array 0 *sound-srate* values)
To create a square wave at amplitude +/- 0.3 with a frequency of 12.5 Hz for the length of the track selection:
(osc-pulse (hz-to-step 12.5) 0))
To create a series of 1 second signals at levels from -1.0 to +1.0 at amplitude intervals of 0.1:
(simrep (i 20)
(snd-const (1- (* i 0.05)) i *sound-srate* 1.0))
To create a sine wave with a peak amplitude of 0.6 and a frequency of 1234 Hz:
(mult 0.6 (hzosc 1234))
If you need any other test signals, feel free to ask, or take a look at working with Nyquist: Missing features - Audacity Support (it’s an incredibly powerful tool for research work).
BTW, signed integer PCM audio is almost always “twos compliment”.