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

📄 test_waves

📁 speech signal process tools
💻
📖 第 1 页 / 共 2 页
字号:
# This shows view-specific setting of button modes.sx $oname set file $fb left_op "zoom in"sx $oname set file $fb middle_op zoom outecho The multi-trace view should now have ZOOM IN and ZOOM OUT bound to theecho left and middle buttons.pausx $oname activate file $fb num 0 1 2 3sx $oname set file $fb background 121sx $oname set file $fb channels \"0 1\" line_type 2sx $oname set file $fb channel 2 line_type 3 plot_min 0sx $oname set file $fb channel 3 line_type 4 plot_min 0sx $oname bracket file $fb start 1 end 2echo The multi trace view should now show channels 0,1,2,3 on a colorecho background.  Channels 0 and 1 should be displayed with line typeecho 2\; channel 2 with line type 3\; and channel 3 with line_type 4.echo The minimum data value plotted on channels 2 and 3 should be zero.pausx set all t middle_op foo barsx set all t spec_middle_op buff carecho This should be preceded by three error messages.echo \(The middle op in all views should now be NO OP.\)pausx add_op menu wave name \"show variables\" op /tmp/myecho$$ _variables \; echosx add_op menu spect name \"show settables\" op /tmp/myecho$$ _settables \; echosx add_op menu none name \"show operators\" op /tmp/myecho$$ _operators \; echosx add_op menu none name \"show w_ops\" op /tmp/myecho$$ _waves_commands \; echosx add_op menu all  name \"show object commands\" op /tmp/myecho$$ _object_commands \; echosx key_map key o op show object commandssx key_map key w op \"show w_ops\"sx $oname set file $fb middle_op \"show variables\"sx $oname set file $fi middle_op \"show operators\"sx $oname set file $sg left_op \"show w_ops\"sx $oname set file $sg middle_op show settablesecho Hit \"o\" key to see commands for display objects.echo Hit the left mouse button in the spectrogram to see waves commands.echo Hit the middle button in the single-trace view to see view operators.echo Hit the middle button in the multi-trace view to see variable names.echo Hit the middle button in the spectrogram to see view settables.pausx add_op name testit menu DT op send_xwaves save_add_ops output ops$$ \; cat ops$$sx key_map key _ op testitecho Hit the space bar to see all current add_op commands.pausx add_op name log menu wave op echo _cursor_valuessx key_map key _ menu wave op logecho Hit space bar in waveform views to log data values.pauecho ' '`send_xwaves $oname get aname variables` | sed 's/ / _/g' > vars$$sx add_op name WORLD op /tmp/myecho$$ `cat vars$$`echo Select WORLD from the view menus to see all variable values.pausx set xspectrum_datwin_x \"500\" xspectrum_datwin_y \"400\" xspectrum_datwin_width \"500\" xspectrum_datwin_height \"400\" xspectrum_window_limits \"0\" xspectrum_window_size .1sx attach function xspectrumecho Waiting for xspectrum to attach.set foundit = 255while ( $foundit != 0 )  sx save_menus menu wave output /tmp/tmp$$  grep xspectrum /tmp/tmp$$  set foundit = $statusendecho Xspectrum should now be operating.  Space bar should cause newecho spectrum computation when cursor is in single-trace view.sx send function xspectrum op $oname mark file $fi time 1.5sx key_map key _ op xspectrumpausx delete_all_items menu waveecho 'The waveform menu should now be empty (i.e. It should no longer appear'echo 'when the right button is pressed). The spectrogram menu should be'echo  'unchanged.'pausx @/tmp/tmp$$echo The waveform menu should now be restored to its previous state.pausx save_menus menu spect output /tmp/tmp$$sx delete_all_items menu spectecho The spectrogram menu should now be empty.pausx @/tmp/tmp$$echo The spectrogram menu should now be restored.paurm -f /tmp/tmp$$sx send set xspectrum_cep_liftering 1 xspectrum_cep_cutoff .005 xspectrum_analysis_type 10echo Xspectrum should now be operating in the cepstral smoothing mode.paurm -f $bn.labsx set xlabel_ctlwin_y 750sx $oname bracket start .5 end 2.5 file $fisx attach function xlabelsx send function xlabel op xlabel make name $oname file $bn.lab signal $sgsx send function xlabel op $oname mark time 1.5 label Hello Worldecho Xlabel should now be attached.  Its control panel should be nearecho the bottom of the screen.  Hello World should appear in the labelecho window.  The label window should be attached to the spectrogram view.pausx detach function xlabelecho Xlabel should have gone away.  Xspectrum should still be there.pausx detachecho All attachments should now be absent.pausx kill name $oname file $sgecho The spectrogram should have disappeared.pauecho 'send_xwaves $1 bracket file $2 start $3 end $4' > zoom$$echo 'send_xwaves $1 set file $2 channels $5 plot_min $6 plot_max $7' >> zoom$$chmod +x zoom$$echo 'send_xwaves $1 op file $2 op zoom full out' > zout$$echo 'send_xwaves $1 set file $2 v_rescale 1' >> zout$$chmod +x zout$$sx add_op name MAGNIFY menu wave op zoom$$ _name _file _l_marker_time _r_marker_time _t_marker_chan _b_marker_yval _t_marker_yvalsx add_op name zout menu none op zout$$ _name _fileforeach f (`sx $oname get aname files`)   sx $oname set file $f left_op \"up/down move\" middle_op zoutendecho There should now be a menu item called MAGNIFY on the waveform menus.echo Using the left mouse button, position the abscissa markers and \(withecho the shift key depressed\) the ordinate markers to bracket a region toecho magnify.  Then select MAGNIFY.  Press the middle button to zoom fullecho out.pauforeach f (`sx $oname get aname files`)	sx $oname op file $f op zout	sx $oname set file $f line_type 1endecho All waveforms should now be zoomed full out.  The multi-traceecho view should now be plotted with line type 1.pausx set output_dir /tmp append_extensions 0sx add_op name SAVE menu none op send_xwaves _name save file _file start _l_marker_time end _r_marker_time outputname _out.g.testsx key_map key _ op SAVEsx set all t middle_op play between marksecho The middle button should now be bound to \"play between marks\" andecho the space bar should save the currently-marked segment in a file andecho then display the segment.pausx killecho All data views should now be absentpausx set xspectrum_window_limits 1sx attach function xspectrumsx make name $oname file $fi loc_x 10 loc_y 200 width 1100 height 200sx add_op name \"mark\" menu all op \# _name mark time _cursor_timesx add_op name \"clear\" menu all op \#_name unmark all tsx add_op name \"foo\" menu all op \# _name play start _l_mark_time end _r_mark_timesx set samp_range_prefix -rset pp = `sx get aname play_prog`sx add_op name \"eplay\" menu all op $pp _mark_range_samp _filesx add_op name \"s\" menu all op \#send function xspectrum op _name mark signal _file rstart _l_mark_time rend _r_mark_timesx add_op name \"xspectrum\" menu all op \#send function xspectrum prognum 90245 versnum 15 command _name mark signal _file time _cursor_time rstart _l_marker_time rend _r_marker_timesx key_map key s op ssx key_map key x op eplaysx key_map key z op foosx key_map key c op clearsx key_map key _ op marksx set blowup_op marksx $oname set file $fi middle_op 'blow up; function'echo The space bar should now apply marks wherever the cursor is at the timeecho the bar is hit.  The \"z\" and \"x\" keys should both play the regionecho delimited by the two marks closest to the cursor when the key is hit.echo Xspectrum should be attached.  Hitting the \"s\" key should cause theecho region delimited by the nearest marks to have its spectrum computedecho and displayed.  Hitting the \"c\" key should erase all marks.echoecho The middle mouse button should be bound to \"blow up\; function\" and,echo when pressed, should expand the waveform.  When the middle button isecho released, a mark should be applied.pauecho After you hit the next \"CONTINUE\", the following files created byecho xwaves during this test will be deleted\:echo `sx get aname new_files`pausx killrm -f `sx get aname new_files`rm -f zoom$$ zout$$ ops$$ vars$$ /tmp/myecho$$ $bn.*echo All signal files created during this test should have now been deleted.pausx quitecho Xwaves should have exited.  The test is complete.

⌨️ 快捷键说明

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