psychopy 音频时长代码_关于psychopy的音频纠正反馈(支持声音的旧版本)

正如你们中的一些人可能知道的那样,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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值