wave_viewer_params and default audioGUI parameters

How wave_viewer_params works

While doing data analysis, have you ever asked yourself...

  • Why didn't the LPC Order I picked on one trial carry over to the next trial?
  • How come audioGUI asks me if I want to overwrite "wave_viewer_params.mat"?

This KB doc, along with the info in [Link for document 114231 is unavailable at this time], answers these questions.

How is data structured?

Trial files

Any time you make changes to the parameters in audioGUI (such as LPC Order or amplitude threshold), you are editing that trial's trial file. Trial files are called things like 1.mat, 2.mat, and 312.mat. There is one trial file per trial. They are saved in a folder called "trials" alongside data.mat and expt.mat. Specifically, the trial file contains a variable called trialparams, which contains a struct called sigproc_params, which contains fields for LPC Order, etc.

When you click Continue or End on a trial, it will either automatically save your current parameters to the trial file, or ask "Do you want to overwrite (trial file name)?"

wave_viewer_params

Separately, a file called wave_viewer_params exists in the same location as data.mat and expt.mat. wave_viewer_params has a variable called sigproc_params, which is structured the same way as the trial file's trialparams.sigproc_params. wave_viewer_params is used when running waverunner. It is not associated with any individual trial.

When you click End in audioGUI, if there is no wave_viewer_params file yet, it will make one based on the last trial's parameters. When you click End in audioGUI, if a wave_viewer_params file already exists, it will ask if wave_viewer_params should be overwritten with the last trial's parameters.

More info about these two files is in [Link for document 114231 is unavailable at this time].

What happens when you click Continue/End in audioGUI

This section essentially reiterates the info above, but describes it in context.

If this is the first time you are loading into audioGUI and wave_viewer_params.mat doesn't exists yet, making changes to parameters will change the current file's sigproc_params, and these parameters will carry forward to subsequent trials when you press Continue. When you click End, the parameters from the last trial you looked at will be saved in wave_viewer_params.mat.

If wave_viewer_params already exists when you open audioGUI, and there are already trial files (a folder called "trials" exists), changing parameters and clicking Continue/End will still change the current trial file's sigproc_params. But when you click End, you will get a prompt asking if you want to save wave_viewer_params.mat. If you say yes, wave_viewer_params.mat will be updated to the settings from the current trial file.

How this interacts with running waverunner, and what to do if you need to run waverunner again

When you run waverunner (for example, in step #4 of the General analysis guide for formant tracking), the computer creates a trial file for each trial in your experiment, and copies the parameters in wave_viewer_params to each trial file's parameters. Waverunner will overwrite a trial file's original parameters if they existed. Now, all of your trial files will have the same parameters as what's in wave_viewer_params.

If you want to run waverunner again, but only want to change certain settings, you can include the parameters you want to change in the "params2overwrite" input argument (5th input arg). Add them as a cell array of strings, for example, waverunner([], [], [], [], {'nlpc', 'preemph'})  . 

If you want to run waverunner again, and are ok with discarding all previous settings and work, do this:

  1. Delete the folder called "trials"
  2. Delete the file called "wave_viewer_params.mat"
  3. Open audioGUI and start fresh



Keywords:
wave, wave viewer, wave viewer params, params, wave_viewer, wave_viewer_params 
Doc ID:
135024
Owned by:
Chris N. in SMNG Lab Manual
Created:
2024-01-25
Updated:
2024-01-25
Sites:
Speech Motor Neuroscience Group