Engineering Design NIDisk Guia do Utilizador Página 7

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 34
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 6
SIGNAL Sound File Format
Application Note 5 3
Header Section
The header is a mixture of 4-byte numerical (N) and literal (L) elements. Numerical
elements contain one real number in 32-bit floating-point format, and literal elements contain
4 or fewer ASCII characters. Fewer than 4 ASCII characters are left justified with trailing
spaces. Elements marked with an asterisk (*) are mandatory in the header. Optional (non-*)
elements are filled with spaces (decimal 32) if type L, or zeroes if type N. Reserved elements
are filled with zeroes.
The header specifies the lengths of the header and data sections in blocks (NHBLKS and
NDBLKS), where 1 block = 512 bytes. The header section must contain an integral number
of blocks. Through version 2.2, the SIGNAL data section contains an integral number of
blocks, by padding the last block with zeroes. In SIGNAL versions 3.0 and later, and in the
RTS, the final data block is not padded.
The default header is two blocks long, but the user may extend the header with additional
blocks of information (such as demographic data or notes) by adjusting NHBLKS
accordingly. SIGNAL will read the first two header blocks, skip (NHBLKS-2) blocks, then
read NDBLKS blocks of data.
The first section in the header contains file attributes. See the detailed outline below.
PGM_STAMP specifies which program created the file, and PGM_VERSION specifies the
program (and file) version. NHBLKS and NDBLKS specify the number of header and data
blocks in the file (see above). BUFFER_TYPE specifies the buffer type (T, F, or FT) and
DATA_TYPE specifies the type of the data (integer or real).
For integer time files, CNVFAC and OFFSET specify the conversion factor and offset of
the data, used to convert the integer data values to voltages. CNVFAC and OFFSET depend
on the A/D converter. CNVFAC expresses Volts/bit, equal to the converter's input in Volts
divided by its output in bits, for example, 10 Volts / 2048 = .00488 Volts/bit. OFFSET is the
offset of the data from binary 0. For example, 12-bit data may be coded between either
-2048 and +2047 or 0 and 4095. OFFSET expresses the midpoint of the coding range, e.g.,
2048 for 0 to 4095 data. These factors are applied when the data is read into a SIGNAL
buffer:
Buffer value (Volts) = (File value - OFFSET) * CNVFAC
Beginning with SIGNAL 4.02, SIGNAL sound files may contain multi-channel data. Data
channels are interleaved – point 1 of channel 1, point 1 of channel 2, …, point 1 of channel
N, point 2 of channel 1, etc. NCHAN specifies the number of data channels in the file.
The next section in the header contains buffer attributes. Again, see the detailed outline
below. SIGNAL reads these directly into the Buffer Directory, so that the BD is completely
recovered when a file is read in. For a complete description of these attributes, see the
SIGNAL User Guide. Mandatory header elements for all buffer types (T, F, and FT) are
TPNTS, the number of data points per channel (not the total number of data points in the
file), SRATE, the sample rate of the data in points/sec, and XLOW and XRANGE, the time
origin and time range of the data in msec. FT buffers also require NTIME and NFREQ, the
Vista de página 6
1 2 3 4 5 6 7 8 9 10 11 12 ... 33 34

Comentários a estes Manuais

Sem comentários