To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

The primary repository for this project is hosted at git://github.com/rmeddis/MAP.git .
This repository is a read-only copy which is updated automatically every hour.

Statistics Download as Zip
| Branch: | Revision:

root / multiThreshold 1.46 / OHIOtest.m @ 38:c2204b18f4a2

History | View | Annotate | Download (3.4 KB)

1 38:c2204b18f4a2 rmeddis
dbstop if error
2
path=pathdef;
3
restorePath=path;
4
addpath (['..' filesep 'utilities']) % model physiology tests
5
6
globalStimParams.FS=100000;
7
doPlot=0;
8
9
stim.type='OHIO';
10
stim.OHIOtype='OHIOrand';
11
stim.phases='sin';
12
stim.beginSilence=0;
13
stim.endSilence=-1;
14
stim.rampOnDur=.002;
15
stim.rampOffDur=-1;
16
17
% 1. ?OHIOabs? paradigm is a baseline procedure for measuring absolute
18
% thresholds (in dB SPL) of the single tone with 12 frequencies:
19
%    1   2    3     4    5     6     7     8     9     10     11    12
20
% 494, 663, 870, 1125, 1442, 1838, 2338, 2957, 3725, 4689, 5866, 7334
21
22
% 2. ?OHIOtemp? is for measuring thresholds for temporally integrated
23
% combinations of 2, 4, 8, and 12 tones presented simultaneously.
24
% In our experiment, we used 4680Hz frequency.
25
26
% 3. ?OHIOspec? is for measuring thresholds for spectrally integrated
27
% combinations of 2(7335 and 5866Hz), 4(7334, 5866, 4680, and 3725Hz),
28
% 8(7334, 5866, 4680, 3725, 2957, 2338, 1838, and
29
% 1442Hz), and
30
% 12(all 12 frequencies) tones presented simultaneously.
31
32
% 4. ?OHIOspectemp? is for measuring thresholds for patterned signals
33
% differing in both the spectral and temporal domains.
34
% The frequency conditions are the same as that of ?OHIOspec?.
35
36
% 5. ?OHIOrand? is for measuring thresholds for spectrotemporally varying
37
% signals with random frequency presentation.
38
39
nTonesList=[2 4 8 12];
40
allFreqs=[494, 663, 870, 1125, 1442, 1838, 2338, 2957, 3725, 4689, 5866, 7334];
41
absThresholds= 50*ones(1,12);   % protem
42
43
for nTones=nTonesList
44
    switch stim.OHIOtype
45
        case ' OHIOabs'
46
            % one tone frequency at a time
47
            stim.frequencies=allFreqs(1);
48
            stim.amplitudesdB=0;
49
50
        case 'OHIOrand'
51
            % chose nTones frequencies at random
52
            x=rand(1,12);
53
            [sorted idx]=sort(x);
54
            stim.frequencies=allFreqs(idx(1:nTones));
55
            stim.amplitudesdB=absThresholds(idx);
56
57
        case 'OHIOtemp'
58
            % 4680 Hz repeated nTones times
59
            stim.frequencies=4680*ones(1,nTones);
60
            stim.amplitudesdB=repmat(absThresholds(10),1,nTones);
61
62
        case {'OHIOspect',  'OHIOspectemp'}
63
            % nTones frequencies either simulataneously or sequentially
64
            switch nTones
65
                case 2
66
                    stim.frequencies=[7335 5866];
67
                    idx=[12 11];
68
                    stim.amplitudesdB=absThresholds(idx);
69
                case 4
70
                    stim.frequencies=[7334, 5866, 4680, 3725];
71
                    idx=[12:-1:9 ];
72
                    stim.amplitudesdB=absThresholds(idx);
73
                case 8
74
                    stim.frequencies=...
75
                        [7334, 5866, 4680, 3725, 2957, 2338, 1838, 1442];
76
                    idx=[12:-1:5 ];
77
                    stim.amplitudesdB=absThresholds(idx);
78
                case 12
79
                    stim.frequencies=allFreqs;
80
                    idx=[12:-1:1 ];
81
                    stim.amplitudesdB=absThresholds(idx);
82
            end
83
    end
84
85
    switch stim.OHIOtype
86
        case {'OHIOabs', 'OHIOspect'}
87
            stim.toneDuration=.02;
88
            globalStimParams.overallDuration=stim.toneDuration;
89
        otherwise
90
            stim.toneDuration=nTones*0.02;
91
            globalStimParams.overallDuration=stim.toneDuration;
92
    end
93
94
    disp(num2str(stim.frequencies))
95
96
    [audio, msg]=stimulusCreate(globalStimParams, stim, doPlot);
97
    wavplay(audio,globalStimParams.FS)
98
end
99
path=restorePath;