正如你们中的一些人可能知道的那样,psychopy在新版本中播放声音文件时出现错误,所以我现在安装了最旧的版本,并且正在尝试制作音频纠正反馈行为测试意味着在fMRI扫描仪中。需要反馈以保持参与者清醒。我很难找到正确的代码,因为我没有尝试过(我得到了很多错误,主要是无效的语法),因为我没有使用构建器。我在编码方面很新颖。这是我到目前为止:关于psychopy的音频纠正反馈(支持声音的旧版本)
cue = visual.TextStim(myWin, pos = [0.0,0.0],color = -1)
fix = visual.TextStim(myWin,text = '+',height = 1.0,color = -1)
begin_text = ('Press the space bar to begin')
hit_sound = sound.Sound(value='G', secs=0.5, octave=4, sampleRate=44100, bits=16)
miss_sound = sound.Sound(value='G', secs=0.5, octave=3, sampleRate=44100, bits=16)
cue_type = ['either_color', 'either_shape', 'either_nochange', 'either_nochange', 'color', 'color_nochange', 'shape', 'shape_nochange']#trial types
cue_type*=num_trials #number of trials
random.shuffle(cue_type) #randomizing trials
if key_resp.corr
feedback= hit_sound.play
else:
feedback= miss_sound.play
在此先感谢您。
2016-07-20
boxcar44