📄 s16record.1
字号:
.\" Copyright (c) 1992 Entropic Research Laboratory, Inc.; All rights reserved.\" @(#)s16record.1 1.2 4/3/97 ERL.ds ]W (c) 1993 Entropic Research Laboratory, Inc..TH S16RECORD 1\-ESPS 4/3/97.SH NAMEs16record - mono or stereo record to disk or pipe for Sparc 16 bit A/D converter.PP.SH SYNOPSIS.B s16record[.BI \-s " duration"] [.BI \-f " sample rate"] [.BI \-c " channel"] [.BI \-S] [.BI \-W " xwaves display args."] [.BI \-P] [.BI \-p " prompt string"] [.BI \-x " debug-level"] [.BI \-H] [[.BI \-o].I file].PP.SH DESCRIPTION.PP.PP\fIS16record\fP provides mono or stereo sampling at selected rates up to at least 48kHz whenrecording to local disk. Direct recording onto network disks is oftenfeasible as well. Output files have ESPS FEA_SD headers, or,optionally, no headers. Output may optionally be directed to\fIstdout\fP. \fIS16record\fP has special adaptations that permit tightcoupling with \fIxwaves\fP (see \fIINTERACTION WITH XWAVES\fP below)..PPWhen no output file is specified, \fIs16record\fP will, by default, write a FEA_SD fileto standard output. When stereo recordingis selected (see the -c option) channels 0 and 1 alternate in the file, withchannel 0 being first. Note that processes consuming the output of\fIs16record\fP on a pipe must be able to keep up with the average aggregatesampling frequency. Options are available to control the sampling rate, recording duration, prompting, header suppression, and immediate display by \fIxwaves\fP..PPThis program is for Sun Sparc systems with the 16 bit audio. It supportssystems with an external speakerbox (such as SS10), the SS5, and those machinesusing theinternal dbri codec and optional external speakerbox (such as LX). Itis not for the 8 bit codec such as the SS1, SS1+, SS2, SLC, and Classic.The ESPS program \fIsrecord\fR supports those machines..PPOn a Sparcstation LX, the optional speakerbox must be attached at boottime in order to be usable. If the speakerbox is not attached, then theonly available input port is the microphone input jack.The microphone input is singlechannel only.You cannot do dual channel recordings on an LX without the optional speakerbox. .PPOn a SS10, or an LX with the speakerbox, the input options are amicrophone input jack and a line level input jack. The microphone jackis single channel and the line input is dual channel. .PPOn a SS5 the input options are the microphone or line level jack. .PPThere is modified version of the Sun \fIgaintool\fR program in the Entropicbin directory. This program must be used to set the input gain, monitor the input, and select the input (microphonejack vs. line jack)..PP.SH OPTIONS.PPThe following options are supported:.TP.BI \-s " duration" [10]Specifies the maximum duration of the recording session in seconds.Recording may be interrupted before this time expires with SIGINT,SIGQUIT or SIGUSR1 (see below). The default \fIduration\fP is 10 seconds.The upper limit is set only by disk space..TP.BI \-f " frequency" [16000]Specifies the sampling frequency. The closest frequency to thatrequested will be selected from those available and the user will be notifiedif the selected value differs from that requested. If -f is notspecified, the default sampling frequency of 16kHz is used..TP.BI \-c " channel" [1]By default s16record samples and stores single-channel data from the left channel.Dual-channel (stereo) recording is selected by setting \fIchannel\fP to 2..TP.BI \-SEnable the \fIxwaves\fP (1-ESPS) "make" command via \fIsend_xwaves2\fP (3-ESPS) when therequested recording time has elapsed or when recording is interrupted. This permits immediate examination of the recorded passage using \fIxwaves\fP. See \fIINTERACTION WITH XWAVES\fP below..TP.BI \-WThe argument to this option will be appended to the \fIsend_xwaves\fP"make" command to permit display customization (e.g. viawindow location and size specifications). See \fIINTERACTIONWITH XWAVES\fP below..TP.BI \-PEnable a prompt message when A/D has actually commenced. The default messageis a "bell ring" and the text "Start recording now ...." This prompt may be changedwith the \-p option..TP.BI \-p " prompt string"\fIPrompt string\fP will be used as the alert that recording is commencing. Specifying\-p forces -P..TP.BI \-HSuppresses header creation. A "bare" sample stream will result. The default isto produce an ESPS FEA_SD file with one or two channels depending on the\-c option..TP.BI \-x " debug_level"Setting debug_level nonzero causes several messages to be printed asinternal processing proceeds. The default is level 0, which causes no debugoutput..TP.BI -o " output"Specifies a file for output. Use of -\fIo\fP before the file designation is optionalif the filename is the last command-line component. If no output file isspecified or if "-" is specified, output will go to \fIstdout\fP..PP.SH "INTERACTION WITH XWAVES".PP\fIS16record\fP is designed to optionally use the server mode of \fIxwaves\fP (1-ESPS) fordisplay of its output file on completion of the record operation.This is implemented using \fIsend_xwaves2\fP (3u-ESPS). The followingconditions must be met for this feature to work. (1) \fIXwaves\fP must berunning in the server mode. (2) The environment variables WAVES_PORTand WAVES_HOST must be correctly defined (see \fIespsenv\fP (1-ESPS)). (3)The record operation must be interrupted with a SIGUSR1 signalor if \fIs16record\fP is not thus interrupted, the -\fIS\fP flag must havebeen set. (4) Output must be to a file..PPAn example \fImbuttons\fP (1-ESPS) script to implement a primitive recordcontrol panel follows:.PP.nf.na.ne 10"RECORD Mono" exec s16record -P -s60 -S -W"name $$ loc_y 150" \\ xx$$& echo $! > foo"RECORD Stereo" exec s16record -P -c2 -s60 -S -W"name $$ loc_y 150" \\ xx$$& echo $! > foo"STOP" kill -16 `cat foo`"ERASE" f=`cat foo` ; k=`echo $f 1 - p q | dc` ; \\ kill -2 $f ; rm -f xx$k ; send_xwaves kill name $k.fi.ad.PPNote how the -\fIW\fP option is used to name the display ensemble and to fixthe vertical location of the waveform at the same place on consecutiveinvocations. In general, the -\fIW\fP option can be used to augment thedisplay generation as described under the "make" command in the \fIxwaves\fPmanual. Note that the "STOP" function is implemented with a "kill-16" (SIGUSR1). This causes \fIs16record\fP to send the "make" command to\fIxwaves\fP. If either kill -2 (SIGINT) or kill -3 (SIGQUIT) is sent to\fIs16record\fP, it will terminate gracefully, but will not send any messagesto \fIxwaves\fP. The -\fIS\fP option causes the \fIxwaves\fP display operation to occureven in the non-interrupted case (i.e. after 60 sec of recording).The above script is not robust, but may serve as a useful startingpoint for more serious attempts..PP.SH ESPS PARAMETERS.PPThe parameter file is not read. .PP.SH ESPS COMMON.PPESPS Common is not read or written..PP.SH WARNINGS.PPWhen output is to a file, the ESPS header, if it is present, willcorrectly reflect the absolute maximum sample value encountered duringrecording and the number of samples recorded. If output is to a pipe,these values are not recorded in the header..PPIf the output of \fIs16record\fP goes to the terminal, bad things willhappen to the terminal configuration and you may not be able to regaincontrol of the terminal. In this case, kill the window or kill therecord process remotely from another window..PP\fIS16record\fP supports only the dbri 16 bit sampling rates. Theseare (in Hz): 48000 44100 37800 32000 22050 18900 16000 11025 9600 8000.If you try to record a file atan unsupported rate, \fIs16record\fP records the data at the closestsupported rate and issues a warning..PPThe maximum rate over the network is unpredictable in general, but weroutinely achieve 16kHz stereo at Entropic Research Laboratory. Ofcourse rate limitations due to network speed will be less severe forsingle-channel recording..PP.SH FILES.PP.SH BUGS.PP.PP.SH SEE ALSO.PPFEA_SD (5\-\s-1ESPS\s+1), \fItestsd\fP (1\-\s-1ESPS\s+1), \fIcopysd\fP(1\-\s-1ESPS\s+1), .br\fIs16play\fP (1\-\s-1ESPS\s+1), \fIsfconvert\fP (1\-\s-1ESPS\s+1),\fIsgram\fP (1\-\s-1ESPS\s+1), .br\fIgaintool\fP (1).PP.SH AUTHORS.PPDavid Talkin and Alan Parker at Entropic Research Laboratory.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -