10.6 Interactive Playback of Multiple Files 93
narecord -s 8000 -t 1 >/dev/null
The output of the command is not imp ortant, it just forces the NetAudio
server to load the appropriate lters.
2. Run the program
nagetfilter
with either the
-P
or
-R
option to acquire the
playback or record lter respectively. To continue the ab ove example, type:
nagetfilter -R >filter.specs
The output from
nagetfilter
are ASCII oating point numbers, one per line.
The rst line contains the sampling rate of the discrete-time lter's impulse re-
sponse. The remaining lines are the values of the sampled impulse response. This
impulse resp onse completely characterizes the
DAT-Link
's lters. It can be used
as input to other analysis programs or custom software to derive the frequency re-
sponse of the system. An example script to do this conversion and plot the results
using
MATLAB
is included with the
DAT-Link
software. The script is called
IN-
STALLROOT/etc/dl/plotresp.m
, where
INSTALLROOT
is the directory where
the
DAT-Link
programs were installed. The plot generated byMATLAB after the
above commands are executed is shown in Figure 10.2.
10.6 Interactive Playback of Multiple Files
The
xnaplay
provides a simple interface to playbackmultiple les. It uses the X
Window System to display a control panel on the workstation screen with a number
of buttons lab elled with lenames. Clicking on any lename causes the le to be
played. An example panel is shown in Figure 10.3.
The
xnaplay
program is run with each lename to b e displayed as arguments. For
example, the panel shown in Figure 10.3 was generated using the command:
xnaplay mozart_orig mozart@64kbps beethoven speech_orig \
speech_LPC speech_CELP
When a button on the
xnaplay
panel is clicked, the
naplay
program is executed
using the named le as the argument. If it necessary to pass some ags to the
naplay
program, such as setting the sampling rate, they can be sp ecied along
with the lename. The command
xnaplay '-s 8000 file1' '-s 12000 file2'
will put up a display with buttons labelled
le1
and
le2
, but the playback of
le1
would be at 8,000 samples/second while
le2
will be played at 12,000 sam-
ples/second. Note that the quotes are necessary in the above command to group
the options with the appropriate le.