man.diff

来自「speech signal process tools」· DIFF 代码 · 共 458 行 · 第 1/2 页

DIFF
458
字号
.\" Copyright (c) 1992 Entropic Research Laboratory, Inc.; All rights reserved.\" @(#)sfconvert.1	1.1 11/10/92 ERL.ds ]W (c) 1992 Entropic Research Laboratory, Inc..TH  SFCONVERT 1\-ESPS 11/10/92.SH NAMEsfconvert \- converts sampling frequency in a sampled data file by using alowpass interpolation filter designed by the windowing method.SH SYNOPSIS.Bsfconvert [.BI \-P "param_file"] [.BI \-s " new_sample_freq"] [.BI \-r " range"] [.BI \-v " deviation"] [.BI \-c " corner_freq"] [.BI \-R " rej_db"] [.BI \-t " trans_band"] [.BI \-w " sfwin_type"] [.BI" \-l " sfwin_len"] [.BI \-e " channels"] [.BI \-o " output_type"] [.BI \-d] [.BI \-f] [.BI \-x " debug_level"] [.I input.sd].I output.sd.SH DESCRIPTION.PP.I Sfconverttakes an input ESPS Sampled Data (FEA_SD) file,.I input.sd,and resamples it with a new sampling frequency specified by.B \-sand.B \-voptions to produce an ESPS FEA_SD file,.I output.sd.By default, the new sampling frequency is the input sampling frequency.  .PPIf \fIinput.sd\fR is replaced by "\-", the standard input is read.  If \fIoutput.sd\fRis replaced by "\-", the standard output is written.  If \fIinput.sd\fRis missing from the command line, \fIsfconvert\fR gets its name fromESPS Common..PPThe actual new sampling frequency is of the form (\fIup\fR/\fIdown\fR)*\fIsf_in\fR.  The variable \fIsf_in\fR is the sampling rate ofthe input file and the variables \fIup\fR and \fIdown\fR are interpolation and decimation factors.  They are the smallest integers such that the actual new sampling frequency is deviated from \fInew_sample_freq\fR with the maximum tolerable deviation in percent, \fIdeviation,\fR from \fInew_sample_freq\fR.  The default of \fIdeviation\fR is zero..PP\fISfconvert\fR supports multichannel input data.  Single or multiple channels selected are extracted from \fIinput.sd\fR, resampled, and written in a single ormultichannel \fIoutput.sd\fR.  Channels are selected with the \fB\-e\fR options.  Default is all channels..PP\fISfconvert\fR supports data types of DOUBLE, FLOAT, LONG, SHORT, BYTE,DOUBLE_CPLX, FLOAT_CPLX, LONG_CPLX, SHORT_CPLX, and BYTE_CPLX.  The data typeof \fIouput.sd\fR by default is the same as that of \fIinput.sd\fR.  But itcan be set to any data type by \fB\-o\fR option.  If input data type is complexand output data type is set to real, imaginary part of input data is discarded.  Ifinput data type is real and output data type is set to complex, zeros are filled in the imaginary part of output data.  Converting one data type toanother with less dynamic range will result in clipping..PPActual resampling iscomputed via floating point or double precision operation.  By default, if \fIinput.sd\fRis of any data types other than DOUBLE or DOUBLE_CPLX, resampling is carried out infloating point computation.  Otherwise, double precision is used.\fB\-d\fR option forces all computation to be carried out in double precision,regardless of input data types..PP\fISfconvert\fR first designs a non-causal type I lowpass FIR filter (afilter with odd length and with filter shape symmetrical about its centerpoint) by the windowing method.  By default, the Kaiser windowing method is used to design the lowpass filter with the transition bandwidth, \fItrans_band\fR by the \fB-t\fR option, betweenpassband and stopband, and with the rejection ratio, \fIrej_db\fR by the \fB-R\fR option, in dB valuesfrom passband to stopband.  Such filter is then convoluted withinput sampled data.  .PPThe parameters,\fItrans_band\fR and \fIrej_db\fR determine the filter length designed by  the Kaiser windowing method and they have direct impacton computational time.The filter length is directly proportional to \fIrej_db\fR and inversely proportional to \fItrans_band\fR..PPThe lowpass filter can be designed by the windowing method using other window types,such as rectangular, Hanning, Hamming, triangular, and cosine^4 windows.The \fB-w\fR option specifies which window type to use and the \fB-l\fR option specifies the time duration of the filter length in seconds.   Kaiser windowing method allows the lowpass filter to be designed from the criteria of stopband rejection ratio and transition bandwidth, but these other windowing methods do not use suchcriteria..PPThe paramters \fIrej_db\fR and \fItrans_band\fR for the Kaiser windowingdesign method may coexist with \fIsfwin_type\fR and \fIsfwin_len\fR forother windowing design method in command line or in paramter file.A non-Kaiser windowing design is used only when the \fB-w\fR optionexists on command line, or when the \fIsfwin_type\fR paramter in a paramterfile is set to a non-Kaiser window and \fIKaiserflag\fR is set to zero in a paramter file.  Otherwise, Kaiser windowing design method is used..PPIn the case when the input data is too short to convolute with the designedfilter, zeros are padded to input data..PPBy default the corner frequency or cutoff frequency for thelowpass filter is the Nyquist frequency,(the output sampling frequency divided by two).  Since the transitionbandwidth must be nonzero, in many casesit is desirable to have a broad transition region that occursentirely below Nyquist frequency.  The \fB-c\fR option sets the cornerfrequency, \fIcorner_freq\fR, in Hertz..PP.SH OPTIONS.PPThe following options are supported:.TP.BI \-P " param_file"The file \fIparam_file\fR is used for the parameter file instead of the default, which is \fIparams\fR..TP.BI \-s " new_sample_freq \fR[input sampling frequency]\fP"Sampling frequency of \fIoutput.sd\fR.  Default is the input samplingfrequency..TP.BI \-v " deviation \fR[0]\fP"Maximum tolerable frequency deviation from \fInew_sample_freq\fR in percent.For example, \fIdeviation=2\fR means the actual output sampling frequency isthe requested sampling frequency plus or minus 2%.  This options allows \fIsfcovnert\fR to find the smallest integer conversion factors, \fIup\fR and \fIdown\fR, within the allowable range, and therebyreduce the problem of generating long filter lengths in the Kaiser windowingmethod due to a large interpolation factor.  Note that this only affectsmemory requirement..TP.BI \-r " first:last".TP.BI \-r " first:+incr"Determines the range of points from input file for frequency conversion.  Inthe first form, a pair of unsigned integers gives the first and last pointsof the range.  If \fIfirst\fR is omitted, 1 is used.  If \fIlast\fR isomitted, the last point in the file is used.  The second form is equivalentto the first with \fIlast = first + incr\fR..TP.BI \-c " corner_freq \fR[output sampling frequency/2]\fP"Corner frequency of the lowpass interpolation filter designed by the windowing method.  If this paramter is not specified or a value of zero is given, adefault value of the Nyquist rate of output data file is used..TP.BI \-R " rej_db \fR[60]\fP"Rejection ratio in dB values from passband to stopband in the lowpass filterdesigned by the Kaiser windowing method.  \fISfconvert\fR ignores this optionif a non-Kaiser windowing design method is used..TP.BI \-t " trans_band \fR[200]\fP"Transition bandwidth in Hertz from passband to stopband in the lowpass filterdesigned by the Kaiser windowing method.  \fISfconvert\fR ignores this optionif a non-Kaiser windowing filter design method is used..TP.BI \-w " sfwin_type"If Kaiser windowing method is not desired in designing the lowpass filter, anotherwindow type can be used.  \fIsfwin_type\fR can be set to any of thesewindow types: WT_RECT (rectangular), WT_HAMMING (Hamming), WT_TRIANG(triangular), WT_HANNING (Hanning), andWT_COS4 (cosine^4).  If this option is selected, the \fB-R\fR and \fB-t\fRare ignored..TP.BI \-l " sfwin_len"Time duration in seconds of the window selected by \fB-w\fR option. \fISfconvert\fRensures the window length in samples is an odd number by adding 1 to the multiplication product of \fIsfwin_len\fR and the maximum of \fIup\fR or \fIdown\fR, if the productis even.  This is to ensure the lowpass interpolation filter isa type I filter.  \fISfwin_len\fR must be greater than zero.  \fISfconvert\fRignores this option if the Kaiser windowing filter design method is used..TP.BI \-e " channels \fR[all channels]\fP"Determines which channels are extracted out of \fIinput.sd\fR forsampling frequency conversion.  The format is that of a comma separatedlist of integers and pairs \fIa:b\fR, where \fIa\fR and \fIb\fR are integers.This specifies the channel numbers that are selected for output.  For example, \fI2,5:8,12\fR specifieschannel 2, channels 5 through 8, and channel 12.  Additionally, an expression\fIa:+c\fR may be written instead of \fIa:b\fR where \fIc\fR is an integersuch that \fIa+c=b\fR.  Thus \fI5:8\fR could be replaced with \fI5:+3\fRin the example.The numbering of channels begins with 0.  The channel numbers must bespecified in increasing order without repetitions.  If this option is notspecified, the default is to select all channels in the input file..TP.BI \-o " output_type \fR[input data type]\fP"This option specifies the data type of \fIoutput.sd\fR.  Available data typesare DOUBLE, FLOAT, LONG, SHORT, BYTE, DOUBLE_CPLX, FLOAT_CPLX, LONG_CPLX, SHORT_CPLX, and BYTE_CPLX.  By default, output data type is the same asinput data type..TP.B \-d

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?