From c6bde7c41af618406e90be5ed2d2fa695798d96e Mon Sep 17 00:00:00 2001 From: Chris Naber <50926971+cwnaber@users.noreply.github.com> Date: Tue, 4 Nov 2025 13:31:52 -0600 Subject: [PATCH 1/2] Notify if setting pitch tracking method for first time --- speech/audioGUI.m | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/speech/audioGUI.m b/speech/audioGUI.m index c6ad97f..1c3e062 100644 --- a/speech/audioGUI.m +++ b/speech/audioGUI.m @@ -149,6 +149,17 @@ bPraat = 0; end end + + % notify user if they loaded in an old wave_viewer_params folder that + % doesn't have ptrack_method as a field + if ~isfield(sigproc_params, 'ptrack_method') && ~exist('ptrack_method_checked','var') + ptrack_method_checked = true; %#ok + announcement = sprintf(['\nPreviously, pitch was tracked in this dataset using a custom MATLAB script. ' ... + 'Now, praat will be used instead. If you want to keep the old method, click the ' ... + '''pitch params'' button in audioGUI and enter ''MATLAB'' in the pitch track method field.\n'... + 'Press ENTER to continue to audioGUI.']); + input(announcement); + end %% call wave viewer endstate = wave_viewer(y,'fs',fs,'name',sprintf('trial(%d)',trialNum), ... From 00889b4c762d9b2ed282aa313dc878a5117db715 Mon Sep 17 00:00:00 2001 From: Chris Naber <50926971+cwnaber@users.noreply.github.com> Date: Tue, 4 Nov 2025 14:06:41 -0600 Subject: [PATCH 2/2] Only notify once --- speech/audioGUI.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/speech/audioGUI.m b/speech/audioGUI.m index 1c3e062..3c253d9 100644 --- a/speech/audioGUI.m +++ b/speech/audioGUI.m @@ -152,8 +152,9 @@ % notify user if they loaded in an old wave_viewer_params folder that % doesn't have ptrack_method as a field - if ~isfield(sigproc_params, 'ptrack_method') && ~exist('ptrack_method_checked','var') + if itrial == 1 && ~isfield(sigproc_params, 'ptrack_method') && ~exist('ptrack_method_checked','var') ptrack_method_checked = true; %#ok + sigproc_params.ptrack_method = 'praat'; announcement = sprintf(['\nPreviously, pitch was tracked in this dataset using a custom MATLAB script. ' ... 'Now, praat will be used instead. If you want to keep the old method, click the ' ... '''pitch params'' button in audioGUI and enter ''MATLAB'' in the pitch track method field.\n'...