Skip to content

Commit

Permalink
Staging point while getting MLST up and running. Not game ready yet.
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswbishop committed Aug 20, 2014
1 parent 174fd3d commit 4255072
Show file tree
Hide file tree
Showing 8 changed files with 69 additions and 300 deletions.
Binary file modified HINT_GUI.fig
Binary file not shown.
2 changes: 1 addition & 1 deletion HINT_GUI.m
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function HINT_GUI_OpeningFcn(hObject, eventdata, handles, varargin)
% Misc defaults
global max_words; % the maximum number of scorable words
global max_options; % the maximum number of options for each word.
max_words=7;
max_words=8;
max_options=2;

% Error check for p.words. GUI is designed to support 6 words, so throw an
Expand Down
102 changes: 63 additions & 39 deletions SIN_TestSetup.m
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
% University of Washington
% 5/14

if ~exist('testID', 'var') || isempty(testID), testID='testlist'; end
if ~exist('testID', 'var') || isempty(testID),
testID='testlist';
end

switch testID;

Expand Down Expand Up @@ -350,7 +352,9 @@

% Change step size to 2 dB
warning('Hard coded modifier number');
if ~isfield(opts.player.modifier{2}, 'dBstep'), error('Something wrong here'); end
if ~isfield(opts.player.modifier{2}, 'dBstep'),
error('Something wrong here');
end
opts.player.modifier{2}.dBstep = 2;

% Set mixer
Expand Down Expand Up @@ -387,6 +391,53 @@

% Set mixer
opts.player.mod_mixer=fillPlaybackMixer(opts.player.playback.device, [ [0.5; 0.5] [0; 0 ] ], 0); % discourse channel and babble to first channel only
case 'MLST (Audio)'

% Configured to administer the (audio only) MLST. Different
% parameters required for the audiovisual version

% Use the HINT as a starting point
% - The HINT is quite similar to the MLST in many ways, so let's
% use this as a starting point.
opts = SIN_TestSetup('HINT (SNR-50, Sentence-Based)', subjectID);

% Change the test ID
opts.specific.testID = testID;

% Change root directory
opts.specific.root=fullfile(opts.general.root, 'playback', 'MLST (Adult)');

% Change the wav_regexp
% We are using MP3 format here.
warning('We might need to use MP4s instead of MP3s if we alter the timing and rewrite files for AV playback');
opts.specific.wav_regexp = '[0-9]{1,2}_T[0-9]{1,2}_[0-9]{3}_[HL][DS].mp3$';

% Change list_regexp
% MLST has an underscore in list directories.
opts.specific.list_regexp='List_[0-9]{2}';

% Change sentence lookup information
% This is used for scoring purposes
opts.specific.hint_lookup.filename=fullfile(opts.specific.root, 'MLST (Adult).xlsx');
opts.specific.hint_lookup.sheetnum=1;

% Change mod_mixer to work with single channel data
opts.player.mod_mixer = fillPlaybackMixer(opts.player.playback.device, [ 0.5 0], 0);

% Remove the modiier_dbBscale_mixer
ind = getMatchingStruct(opts.player.modifier, 'fhandle', @modifier_dBscale_mixer);
mask = 1:length(opts.player.modifier);
mask = mask~=ind;
opts.player.modifier = {opts.player.modifier{mask}};

% For plotting purposes, track the first channel
opts.player.modcheck.data_channels = 1;

case 'MLST (AV)'

% Configured to adminster the audiovisual (AV) MLST.

error('Not yet developed');

case 'ANL (BNL-Estimate)'

Expand All @@ -401,13 +452,15 @@

% Change step size to 2 dB and other information
warning('Hard coded modifier number');
if ~isfield(opts.player.modifier{2}, 'dBstep'), error('Something wrong here'); end
if ~isfield(opts.player.modifier{2}, 'dBstep'),
error('Something wrong here');
end % if ~isfield(opts.player ...
opts.player.modifier{2}.dBstep = 2;
opts.player.modifier{2}.data_channels=2;

% Set mixer
opts.player.mod_mixer=fillPlaybackMixer(opts.player.playback.device, [ [0.5; 0.5] [0; 0 ] ], 0); % discourse channel and babble to first channel only
opts.player.mod_mixer=fillPlaybackMixer(opts.player.playback.device, [ [0.5; 0.5] [0; 0 ] ], 0); % discourse channel and babble to first channel only

case 'ANL (base)' % base settings for sequence of tests comprising ANL
% ANL is administered differently than HINT or PPT. Here's a
% very basic breakdown of the procedure.
Expand Down Expand Up @@ -543,40 +596,9 @@
'fhandle', @modifier_trackMixer, ...
'mod_stage', 'premix'); % track mod_mixer

case 'MLST (Audio)'

% Configured to administer the (audio only) MLST. Different
% parameters required for the audiovisual version

% Use the HINT as a starting point
% - The HINT is quite similar to the MLST in many ways, so let's
% use this as a starting point.
opts = SIN_TestSetup('HINT (SNR-50, Sentence-Based)', subjectID);

% Change the test ID
opts.specific.testID = testID;

% Change root directory
opts.specific.root=fullfile(opts.general.root, 'playback', 'MLST (Adult)');

% Change the wav_regexp
% We are using MP3 format here.
opts.specific.wav_regexp = '[0-9]{1,2}_T[0-9]{1,2}_[0-9]{3}_[HL][DS].mp3$';

% Change list_regexp
% MLST has an underscore in list directories.
opts.specific.list_regexp='List_[0-9]{2}';

% Change sentence lookup information
% This is used for scoring purposes
opts.specific.hint_lookup.filename=fullfile(opts.specific.root, 'MLST (Adult).xlsx');
opts.specific.sheetnum=1; % Check.

case 'MLST (AV)'

% Configured to adminster the audiovisual (AV) MLST.


error('Not yet developed');

otherwise

error('unknown testID')
Expand All @@ -602,4 +624,6 @@
% For multi-part tests, use the same UUID and the same saveData2mat file.
for i=1:length(opts)
opts(i).specific.saveData2mat = fullfile(opts(1).subject.subjectDir, [opts(1).specific.uuid '-' opts(1).subject.subjectID '-' opts(1).specific.testID]);
end %
end %

end % function end
2 changes: 1 addition & 1 deletion SIN_loaddata.m
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@

% Determine file type to load.
switch lower(ext)
case {'.wav'}
case {'.wav' '.mp3'}
% If this is a WAV file
DTYPE=2;
[tx, FS]=audioread(X{n});
Expand Down
5 changes: 3 additions & 2 deletions createMLSTlookup.m
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@

% Note that the file extension (.mp3 or .mp4) is omitted. This
% makes data lookup easier down the road (CWB thinks, at least).
FilePath{end+1, 1} = fullfile(PATHSTR(end-6:end), NAME);
% FilePath{end+1, 1} = fullfile(PATHSTR(end-6:end), NAME);
FilePath{end+1, 1} = fullfile(PATHSTR(end-6:end), [NAME EXT]);
Sentence{end+1, 1} = sentence;
ScoringUnits(end+1, 1) = numel(keywords); % this should always be 3 for MLST
% FilePath(end+1, 1
Expand All @@ -149,4 +150,4 @@
t = table(ID, FilePath, Sentence, ScoringUnits);

% Write table to XLSX file
writetable(t, fullfile(opts.specific.root, 'MLST.xlsx'));
writetable(t, fullfile(opts.specific.root, 'MLST (Adult).xlsx'));
122 changes: 0 additions & 122 deletions frequency_linconv.m

This file was deleted.

Loading

0 comments on commit 4255072

Please sign in to comment.