Permalink
Browse files

changed stim duration to stimFrameLen

stimFrameLen is the stimuli duration frames; this is applied to duration
dependent if/else statements
  • Loading branch information...
1 parent 8af8413 commit bcdee79f027306867de48b4a836f6796fc121b22 ctmdev committed Jan 2, 2013
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/MegProsodyAutoFrame.py
@@ -173,6 +173,7 @@
#TIMEFIX: gets the duration of the wav file for bawaSound
stimLength = megStim.getDuration()
+ stimFrameLen = stimLength * 60 # gives the stim duration in frames (60 Hz)
#-------Start Routine "soundPresent"-------
continueRoutine = True
@@ -188,7 +189,7 @@
fixation.tStart = t # underestimates by a little under one frame
fixation.frameNStart = frameN # exact frame index
fixation.setAutoDraw(True)
- elif fixation.status == STARTED and frameN >= stimLength:
+ elif fixation.status == STARTED and frameN >= stimFrameLen:
fixation.setAutoDraw(False)
# start/stop megStim
if frameN >= 0 and megStim.status == NOT_STARTED:
@@ -209,7 +210,7 @@
parallel.setData(0)
#TIMEFIX: changes megStim.status to FINISHED after duration
- if frameN >= stimLength * 60 and megStim.status == STARTED:
+ if frameN >= stimFrameLen and megStim.status == STARTED:
megStim.status = FINISHED
# check if all components have finished

0 comments on commit bcdee79

Please sign in to comment.