240 likes | 338 Vues
Lecture 10 Experiment 2. Martin Giese. What you should remember. Function of the middle ear Traveling wave theory Audibility function Loudness perception Masking. What you should learn today. Programming of stimuli in MATLAB Data analysis Details about the experiments.
E N D
Lecture 10Experiment 2 Martin Giese
What you should remember • Function of the middle ear • Traveling wave theory • Audibility function • Loudness perception • Masking
What you should learn today • Programming of stimuli in MATLAB • Data analysis • Details about the experiments
Playsound • “High-level” function that plays a sinusoidal sound : • Playsound(f, A, t) plays sinusoidal tone with frequency with frequency f and amplitude A for t seconds • Playsound(f, A, t, An, fn, Bn) plays sinusoidal tone with band pass background noise with mid frequency fn and band width +/-Bn
f1 f2 f3 A11 A12 A21 A22 A31 A32 Randomization • Example: Randomize conditions for 3 different frequencies (f1, f2, f3) and 2 different amplitudes Aij per frequency • Systematic proceeding: • Design matrix: 2 x 3
Randomization • Build equally shaped matrices for A and f f1 f2 f3 Mf = f1 f2 f3 A12 A12 A21 A22 A31 A32 MA =
Randomization • Cast matrices into vectors:Mf = Mf(:);MA = MA(:); • Build a random integer vector with # of conditions:cond_index = randperm(length(Mf));
Randomization • Address MA and Mf through this index: MA(cond_index(n)) (Amplitude of trial n) Mf(cond_index(n)) (Frequency of trial n) • Loop over all trials:for n=1:length(cond_index), ….. some function dependent on MA(cond_index(n)) and Mf(cond_index(n)) …..end;
Reading In Key Presses Example: Check whether the key “a” or “l” has been pressed. If yes, print the letter, otherwise ignore the key press.
Reading In Key Presses Simple example function function key_demo(); % initialization ret_strg = ‘‘; % wait for a valid key press while strcmp(ret_strg, {'a', 'l'}) == 0, disp('Enter String.‘); ret_strg = getchar; end; % actions for admissible letters a and l if strcmp(ret_strg, 'a') == 1, disp('A'); elseif strcmp(ret_strg, 'l') == 1, disp('L'); end;
Data Analysis • Thresholds from probability data: • 50% threshold • Cool (optional): fit logistic threshold function • Thresholds directly from adjustment methods / stair case • Statistics for comparing thresholds: • t-test (pairwise comparisons) if enough items; watch for (de)pendent measures ! • non-parametric test for few items • ANOVA (next lecture) • Extremely cool (idea for final project):run 2AFC experiment and estimate d’
Data Analysis • Correction of the a level • Problem: test difference between 2 AFs • Given: N threshold values for K values of the frequency {Akn} and {Akn} • Possibilities: • t-test (pairwise comparisons) K independent tests • Better: ANOVA (next lecture !) • How can we combine the results from K independent tests?
Data Analysis • P(single test significant even though H0 true) < a P(single test non-significant if H0 true) >= 1- a • Tests independent P(all K tests non-significant if H0 true) >= (1- a)K P(at least one out of the K tests significant if H0 true) < 1 - (1- a)K= aeq
Data Analysis Equivalent significance level for K independent tests: aeq = 1 - (1- a)K a = 1 - (1- aeq)1/K For large K: aaeq/K(“Bonferoni correction”) Example: K = 4 aeq = 5 % a = 1.27 %
Method of Constant Stimuli • Frequencies: 30, 500, 2k, 10k, 18k Hz • Pilot: for each frequency regime find out approximately the threshold and set up 5 amplitudes around this value • 20 repetitions
Method of Limits • Frequencies: 30, 500, 2k, 10k, 18k Hz • Pilot: for each frequency regime find out approximately the threshold • Ascending block: Start always with a stimulus that Ss don’t hear; increase by factor 1.2 until they hear; store result and start next trialDescending block: start with stimulus that Ss hear a decrease by factor 1.2 until they don’t hear stimulus any more • 10 repetitions
Staircase Method • Frequencies: 30, 100, 200, 500, 1k, 2k, 5k, 10k, 15k, 18k Hz • Pilot: for each frequency regime find out approximately the threshold • Steps; multiply / divide by 1.2 • Cross threshold 8 times before next trial starts • 5 repetitions
Equal Loudness Contours • Frequency of reference stimuli: 1000 Hz • Test frequencies: 50, 100, 200, 500, 1k, 3k, 5k, 10k Hz • 3 different amplitudes of the reference: low / medium / high • Adjust amplitude of the test stimulus as to match loudness of reference • 5 repetitions
Difference Thresholds • Frequency of reference stimulus: 200 Hz • Test 5 different amplitudes of the reference in the regime between very low and (conveniently) high amplitudes • Measure for each amplitude difference thresholds using a method of constant stimuli • 15 repetitions for the method of constant stimuli
Masking I • Mask: narrowband noise with frequency 400 +/- 45 Hz • Test frequencies: 100, 250, 400, 1k, 2k Hz • Method of constant stimuli • Trials with and without mask • No time delay ! • 15 repetitions per condition
Masking II • Mid frequency of mask and test tone 400 Hz; bandwidth +/- 45 Hz • 5 different time delays: 0, 50, 100, 200 ad 500 ms • Method of constant stimuli • Trials with and without mask • 15 repetitions per trial