⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 attachments.help.src

📁 speech signal process tools
💻 SRC
📖 第 1 页 / 共 2 页
字号:
If a label file exists, its contents will be read and displayed by thelabeler.  Otherwise, a new label file is created.  Label files areordinary text files with a short header followed by linescorresponding to each boundary marked.  These lines contain the timein seconds, a number indicating the color of the boundary marker andthe label text string.  Label files may be generated or edited at willusing any text manipulation program as long as the format is adheredto.  Boundary times need not be ordered chronologically.Labeling is best performed by moving the mouse, with no buttonspressed, in the label window.  When the label cursor is at theappropriate time location, depressing the right button will show thelabel menu.  The selected label will be applied at the location of thecursor upon release of of the right button.  The same operations maybe performed in any of the waveform windows by selecting the "label"menu item, but response is slower and two right button clicks will berequired.Labels and comment fields of arbitrary content and length may bedirectly typed in at the label cursor location without pressing anymouse buttons.  An existing label may be edited by placing the cursorexactly on its boundary mark and then using the keyboard.  The"Delete" key removes characters right to left; "Return" causesthe label file to be rewritten to reflect the current state of thedisplay (this is automatically done for menu-selected labels).Multiple, separately displayable label fields may be entered byseparating them with the "separator" character (generally asemi-colon, but any character may be used) specified in the label fileheader.  Selection of the menu item corresponding to "*DEL*" willcause the entire label nearest the cursor to be removed.Label "fields" are delimited in the label file by the "separator"character.  Blank or null fields are indicated by two or moreconsecutive (or blank-separated) delimiters.  Which fields will bedisplayed by the labeler is determined by the "Active fields:" item inthe Labeler panel.  The fields are numbered consecutively starting atone.  Up to 32 space-separated numbers may be entered on one line inany order to indicate the corresponding active fields.  If the"Label File" item is blank when this is done, the display of all labelfiles will be effected, otherwise only the specified file's display willbe effected.Multiple label files are displayed time-aligned in the labeler windowwith the most recently created/loaded file at the top.  Enter therelative or absolute pathname of the label file(s) in the Label Filepanel item after the "Object" item has been correctly established.Alternately, one or more label files may be loaded with the "make"command via a "send" from a waves command file (see below).  If thelabels get crowded, the window may be resized with the usual Sunviewritual.  As the cursor is moved horizontally and vertically, the timeand corresponding label file name are displayed in the window's frame.Label files may be removed from the display (and saved in updatedfiles) by selecting the menu item corresponding to "*UNLOAD*" in thelabelmenu while the horizontal crosshair is in the file's display region.Two D/A playback features are supported in the labeler.  A left buttonpress while in the labeler window causes the marked segment containingthe cursor to be played.  A middle button press causes the segmentdelimited by the cursor and the label boundary immediately to the leftof the cursor to be played.All functions normally available in waves are active in conjunctionwith the labeler.  NOTE: The label file does NOT automatically adjustto time changes caused by waveform segment deletion or insertion.  Itis recommended that no waveform editing be performed on files beinglabeled.  Selecting the "QUIT" item in the Labeler panel will updateand close all label files and "disconnect" label from waves.Waves can be controlled by a command file (see$WAVES_DOC/waves.help: "COMMANDS AND COMMAND FILES").Commands in these files may be passed through to label via the "send"command to waves.  The following additional commands are recognized bylabel:----------------------------------------------------------------------message		keywords		arguments----------------------------------------------------------------------make			>> MAKE A NEW, OR LOAD AN EXISTING LABEL FILE <<		file		label file pathname to be displayed or created		color		colormap entry to use for the segment boundary				marks (new label files only).  Numbers in the				range of 115-125 are best.		name		name of a "waves" display object to synchronize				the labels with.	        signal		a particular signal in display object.  If				omitted, the label window will always attach to				the most recently displayed signal.activate		>> SET ACTIVE LABEL DISPLAY FIELDS <<		file		label file who's display is to be changed.		name		display object containing the file.  If file				and/or name is omitted, the Label File and/or				Object from the Labeler panel will be used.		fields		one or more blank-separated numbers specifying				the display fields to be enabled.unload			>> CLOSE, UNLOAD AND REMOVE DISPLAY OF A LABEL FILE <<		name		name of display object containing label file		file		name of the label file to be closedkill			>> REMOVE ALL OR PART OF A LABEL DISPLAY OBJECT <<		name		name of an existing label display object which				is to be partly, or completely distroyed.		file		file name of a particular label display to be				destroyed.  Note that the actual label file				is updated to reflect the state of the display				before the display is removed.  If file is				omitted, all of object <name> will be removed.labelmenu		>> SPECIFY AN ALTERNATE LABEL MENU SOURCE FILE <<		menufile	UNIX path name of the desired menu.  This				may be changed at any time while labeling.set			>> SET GLOBAL PARAMETERS IN LABELING PROGRAM <<		label_height	height (in pixels) of the labeling window		menufile	same as in "labelmenu" above and "Label				Menu File:" in control panel.		active_fields	same as "fields" above under "activate"				and "Active Fields:" in control panel.		object		same as "name" above under "make" and				"Object:" in control panel.		labelfile	same as "file" above under "make" and				"Label File:" in control panel.----------------------------------------------------------------------The following c-shell script demonstrates how label might be used witha waves command file:----------------------------------------------------------------------#!/bin/cshecho waves set middle_op 'blow up; function' > /tmp/wave$$echo waves set ref_size 3 ref_step 2.5 ref_start 0.0 >> /tmp/wave$$foreach f ($*)  set bn = `basename $f`  echo waves make name $bn file $f loc_x 0 loc_y 150 height 200 >> /tmp/wave$$  echo waves attach function label >> /tmp/wave$$  echo waves send activate name $bn fields 1 3 5 >> /tmp/wave$$  echo waves send make name $bn  file $f.1.lab color 125 >> /tmp/wave$$  echo waves send make name $bn  file $f.2.lab  color 118 >> /tmp/wave$$  echo waves pause >> /tmp/wave$$  echo waves kill >> /tmp/wave$$  echo waves detach >> /tmp/wave$$endwaves /tmp/wave$$rm -f /tmp/wave$$----------------------------------------------------------------------This above script is called with some signal file pathnames asarguments.  Lines 2-3 set some waves system globals; 5 generates anobject name which will be common to waves and label; 6 displays thesignal; 7 attaches the label program; 8 specifies to label that labelfields 1, 3 and 5 are to be displayed; 9-10 load (or generate) twolabel files with different colored markers; 11 pauses the commandscript to permit interaction with the programs; 12 destroys alldisplays; and 13 detaches label.  Note that the attach and detachoperations are performed within the loop to prevent label's defaultbehavior which is to generate a single label file with a name of theform $bn.lab.  If this behavior is desired, the script could berewritten:----------------------------------------------------------------------#!/bin/cshecho waves set middle_op 'blow up; function' > /tmp/wave$$echo waves set ref_size 3 ref_step 2.5 ref_start 0.0 >> /tmp/wave$$echo waves attach function label >> /tmp/wave$$echo waves send activate fields 1 3 5 >> /tmp/wave$$foreach f ($*)  set bn = `basename $f`  echo waves make name $bn file $f loc_x 0 loc_y 150 height 200 >> /tmp/wave$$  echo waves pause >> /tmp/wave$$  echo waves kill >> /tmp/wave$$endecho waves detach >> /tmp/wave$$waves /tmp/wave$$rm -f /tmp/wave$$----------------------------------------------------------------------++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++		SPECTRUM ANALYSIS: spectrum++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Attaching spectrum to waves provides spectral analysis facilities forone dimensional, short integer signals (e.g. standard PCM files).Spectrum also displays spectral "slices" from spectrograms andspectrogram-like signals (e.g. "eih-grams").  Spectra may be comparedby overlaying on a common plot.  Analysis is performed by selecting asignal segment with the waves waveform cursor or markers and thenselecting the "spectrum" menu item with the right mouse button.  Notethat this operation will only succeed if performed in a windowdisplaying a one-dimensional short-integer signal or a "spectrogram"for which a file exists on disc.  After the spectrum is computed anddisplayed, the right and left waves markers are moved to the analysiswindow limits.The spectrum analysis parameters are available for modification in acontrol panel.  When one of the analysis parameters is changed, theactive spectra are recomputed using the new parameters.  When spectral"slices" are being displayed from a "spectrogram" file, the analysisparameters in the panel have no affect.The "Function" item will cycle through the spectral estimation methodsavailable on left button clicks.  Currently available methods are: logmagnitude spectrum using a radix-2 FFT (log-mag-DFT), inverse logmagnitude spectrum of an autocorrelation LP model (log-mag-DFT-LPC);and inverse log magnitude of a covariance LP model (log-mag-DFT-CLPC).These spectra are all scaled to dB re unity.  All computations areperformed in double precision arithmetic.  The minimum size FFT usedis 512 points, zero-padded as necessary.The "Window type:" item permits selection of the time weightingfunction to be applied before analysis.  Note that for the covarianceLPC computation, rectangular weighting is always used."Window size(sec):" specifies the total window duration.  The size ofthe FFT used to perform the computations is expanded (in powers of 2)as necessary to accommodate the data.  The window size must be chosenso that no more than 4096 waveform samples are included (sample-ratedependent).  Note that the "Window size(sec):" item is only effectivefor input when the "Window limits from:" item is set to "Local."  Whenit is set to "Host," the window size and location are both determinedby the left and right marker positions in the waves windows when the"spectrum" item is selected from a waves menu.The "Preemphasis coeff:" item allows the coefficient, a, of the1st-order prefilter {H(z) = 1 - a*(z**-1)} to be adjusted.  Thispreemphasis is applied to all signals before spectrum computation.When this preemphasis is applied, one extra sample is used from theinput sequence to initialize the filter memory and maintain therequested window size."Analysis order:" sets the order for LPC analysis (if specified by"Function").  The maximum order available is 30.Left mousing the "Reticle:" item will toggle the spectrum reticle onand off.  Note that the reticle dynamically adjusts itself to thewindow size."Filt. Int:" and "Int. Coef:" are explained below.The spectrum display window has a frequency/amplitude cursor which maybe moved with the mouse.  Numeric display of frequency and amplitudeare available in the upper-left corner of the window.  The timecorresponding to the center of the analysis window is printed in thedisplay's frame.  The cursor may be left at a particular frequency byremoving the mouse pointer from the window with the middle buttondepressed.  The spectrum display window may be resized at will using thestandard Sun ritual.The currently displayed spectrum (in blue) will be copied into thereference spectrum (in red) if the right mouse button is pressed insidethe spectrum display window.  The reference spectrum will then remainunchanged, permitting comparison with other spectra, until the rightbutton is again pressed.  The amplitude at the spectrum cursorlocation for the reference spectrum is also printed (in red) in theupper left of the spectrum window.When linear prediction has been used to compute an all-pole spectrum,the LP coefficients may be used to inverse filter the original signal(yielding a residual signal).  This operation can be initiated bypressing the left mouse button in the spectrum window after either"log-mag-DFT-LPC" or "log-mag-DFT-CLPC" computations have beenperformed.  The amount of the original signal (centered on theanalysis window) to be inverse filtered is determined by the "Filt.Int:" panel item (sec).  The inverse filtered signal is integrated (toconvert pressure to volume velocity) using a leaky integrator with thecoefficient determined by the "Int. Coef:" panel item (0.0 implies nointegration).  The resultant signal is then stored in a file anddisplayed in a regular waves waveform window.The program "spectrum" was written as an example of how attachmentswork.  It is well documented and can be adapted to a variety of needs.Feel free to copy and modify it to your needs.  It may be found in$WAVES_SRC/c/spectrum.c.++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++			DEBUGGING, ETC.: stub++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++When debugging waves or an attachment, it is often handy to see justwhat messages are being sent in various contexts.  Sometimes it may behandy to have "mark" messages sent directly to a file or some"non-attachment-like" unix process.  The "stub" facility provides thiscapability.  When "stub" is entered as the attachment name (either inthe waves control panel or in a command file), waves sends messagespretty much as it would to a real attached process, except that theyare written to stdout.  When stub is "attached," waves does not expect anyresponse to its messages (i.e. it does not block as usual in return_value()waiting for "ok," "null" or "returned" responses).When stub is attached, waves accepts messages (of the type specified above)directly from stdin and responds exactly as it would to an attachedprocess sending the same messages.

⌨️ 快捷键说明

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