Skip to content

Commit

Permalink
changed stim duration to stimFrameLen
Browse files Browse the repository at this point in the history
stimFrameLen is the stimuli duration frames; this is applied to duration
dependent if/else statements
  • Loading branch information
ctmdev committed Jan 2, 2013
1 parent 8af8413 commit bcdee79
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/MegProsodyAutoFrame.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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
Expand Down

0 comments on commit bcdee79

Please sign in to comment.