From 774190d46202276b232883751cbca1ddf26ba374 Mon Sep 17 00:00:00 2001 From: aem28 Date: Thu, 4 Feb 2021 11:52:43 +0000 Subject: [PATCH] Update huggins_3AFC.m Edit to how the calibration sound it created. Now creates 5 intervals of 1s sound with 1s silent interval (same as in main test). Added code: signal = []; for i = 1:5 %5 intervals of sound sig = makeNoise(burstLength,SampFreq);%Make noise burst signal = [signal;sig;zeros(SampFreq*intervalLength,2)]; end --- generateStim_HugginsPitch/huggins_3AFC.m | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/generateStim_HugginsPitch/huggins_3AFC.m b/generateStim_HugginsPitch/huggins_3AFC.m index ee213f4..38c54f6 100644 --- a/generateStim_HugginsPitch/huggins_3AFC.m +++ b/generateStim_HugginsPitch/huggins_3AFC.m @@ -46,7 +46,11 @@ %% Make an pure noise example to calibrate sound level fname = 'HugginsPitch_calibration.flac'; -signal = makeNoise(10,SampFreq); +signal = []; +for i = 1:5 %5 intervals of sound + sig = makeNoise(burstLength,SampFreq);%Make noise burst + signal = [signal;sig;zeros(SampFreq*intervalLength,2)]; +end audiowrite([path_out fname], signal, SampFreq); %% Make an example with the tone present in the 2nd noise @@ -93,4 +97,4 @@ end end -fprintf('+++ Special note from Sijia: If you saw a warning saying "Warning: Data clipped when writing file.". Ignore it, not a problem here. +++\n'); \ No newline at end of file +fprintf('+++ Special note from Sijia: If you saw a warning saying "Warning: Data clipped when writing file.". Ignore it, not a problem here. +++\n');