Ver Fonte

Elimina 'Script task/Noise_Volume_regulation.m'

Giacomo Guidali há 1 ano atrás
pai
commit
2a49500a83
1 ficheiros alterados com 0 adições e 65 exclusões
  1. 0 65
      Script task/Noise_Volume_regulation.m

+ 0 - 65
Script task/Noise_Volume_regulation.m

@@ -1,65 +0,0 @@
-function [volume] = Noise_Volume_regulation()
-% 'AirCool_Magstim_48000.wav'
-% arrow right for increase
-% arrow left for decrease
-
-
-volume = 0.2;
-
-[audiodata, infreq] = psychwavread('AirCool_Magstim_48000.wav');
-
-noise_seconds  = 60;
-
-noise_short = audiodata(1:infreq*noise_seconds)';
-
-pasound2 = PsychPortAudio('Open', []);
-
-sound2 = [noise_short;  noise_short];
-
-PsychPortAudio('Volume', pasound2, volume);
-
-PsychPortAudio('FillBuffer', pasound2, sound2);
-
-noise_ts = PsychPortAudio('Start',pasound2, 1, 1);
-
-while 1
-
-[z key_tmp] = KbPressWait;
-
-key = find(key_tmp);
-
-if key == 37 % arrow left
-    
-PsychPortAudio('Stop', pasound2,0);    
-noise_ts = PsychPortAudio('Start',pasound2, 1, 0);
-
-   volume = volume-0.05; 
-   if volume <= 0
-       volume = 0;
-   end
-   PsychPortAudio('Volume', pasound2, volume);
-   disp(num2str(volume))
-end
-
-
-if key == 39 % arrow right (increases)
-PsychPortAudio('Stop', pasound2,0);    
-noise_ts = PsychPortAudio('Start',pasound2, 1, 0);
-   volume = volume+0.05; 
-   if volume >= 1
-       volume = 1;
-   end
-   PsychPortAudio('Volume', pasound2, volume);
-    disp(num2str(volume))
-end
-
-if key(1) == 27 || key(1) == 17 % esc
-  PsychPortAudio('Close');
-  break
-end
-
-
-end
-
-
-