Hi again,
Further to my previous post, my task now plays the image sequences and I am trying to get it to play a tone (high or low) at the start of frame 17. However, this does not seem to work consistently. For example, in the script below, it will play the tone at the correct time on the first two trials, then on subsequent trials it plays the tone on every single frame.
My understanding is that because Inquisit works with objects, once you link the sound to the trial on frame 17, it stays there unless you remove it. I tried using these lines to remove the sound at the end of each trial, but with no success:
/ ontrialend = [if (values.count > 16) trial.cig_light.removestimulustime(0);]
/ ontrialend = [if (values.count > 16) trial.cig_light.clearstimulusframes();]
I also tried using sound-only video files (mp4) instead of sound files, as suggested in another post, with limited success. When I did this, the first two trials were fine, then on subsequent trials the sound played on the first, seventh and 17th frames (the frames with the longer durations).
I have attached a link to my script and relevant files, in case my description is not very clear. Any suggestions as to how I can fix this problem with the audio tones would be greatly appreciated.
Thank you!
Charlotte
https://www.dropbox.com/sh/1xw2mxvqjqd3g9j/AABI4-ZL41LjVO2Q2mOHmNj7a?dl=0 **********************************************************************************
DEFAULTS
**********************************************************************************
<defaults>
/ canvassize = (100%, 100%)
/ minimumversion = "5.0.0.0"
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ inputdevice = mouse
/ screencolor = (0,0,0)
/ txbgcolor = black
/ txcolor = white
</defaults>
<values>
/ short = 30
/ long = 2000
/ duration = 0
/ count = 0
/ currentset = 0
</values>
**********************************************************************************
Lists
**********************************************************************************
<list timings>
/ items = (values.long,
values.short, values.short, values.short, values.short, values.short,
values.long,
values.short, values.short, values.short, values.short, values.short,
values.short, values.short, values.short, values.short,
values.long)
/ selectionmode = sequence
/ selectionrate = always
</list>
<list selectset>
/ items = (1,2)
</list>
<list cig_apple>
/ items = (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17)
/ selectionmode = sequence
</list>
<list cig_light>
/ items = (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17)
/ selectionmode = sequence
</list>
<list blocks>
/ items = (trial.start1, trial.start2, trial.start3, trial.start4)
/ itemprobabilities = (0.25, 0.25, 0.25, 0.25)
/ poolsize = 8
/ resetinterval = 200
</list>
**********************************************************************************
Fixation screen
**********************************************************************************
<text fixation>
/ items = ("+")
/ color = (255, 255, 255)
/ txbgcolor = (0, 0, 0)
/ fontstyle = ("Arial", 60pt)
/ erase = false
</text>
**********************************************************************************
Stimuli
**********************************************************************************
<sound high>
/items = high
/playthrough = true
/select = noreplace
</sound>
<item high>
/1 = "wave_high_fr1000.wav"
</item>
<sound low>
/items = low
/playthrough = true
/select = noreplace
</sound>
<item low>
/1 = "wave_low_fr500.wav"
</item>
<picture cig_apple>
/ items = cig_apple
/ select = list.cig_apple.nextvalue
/ size = (100%, 100%)
/ erase = false
</picture>
<item cig_apple>
/1 = "cig_apple_grape_01.PNG"
/2 = "cig_apple_grape_06.PNG"
/3 = "cig_apple_grape_11.PNG"
/4 = "cig_apple_grape_16.PNG"
/5 = "cig_apple_grape_21.PNG"
/6 = "cig_apple_grape_26.PNG"
/7 = "cig_apple_grape_31.PNG"
/8 = "cig_apple_grape_36.PNG"
/9 = "cig_apple_grape_41.PNG"
/10 = "cig_apple_grape_46.PNG"
/11 = "cig_apple_grape_51.PNG"
/12 = "cig_apple_grape_56.PNG"
/13 = "cig_apple_grape_61.PNG"
/14 = "cig_apple_grape_66.PNG"
/15 = "cig_apple_grape_71.PNG"
/16 = "cig_apple_grape_76.PNG"
/17 = "cig_apple_grape_81.PNG"
</item>
<picture cig_light>
/ items = cig_light
/ select = list.cig_light.nextvalue
/ size = (100%, 100%)
/ erase = false
</picture>
<item cig_light>
/1 = "cig_light_notepad_01.PNG"
/2 = "cig_light_notepad_06.PNG"
/3 = "cig_light_notepad_11.PNG"
/4 = "cig_light_notepad_16.PNG"
/5 = "cig_light_notepad_21.PNG"
/6 = "cig_light_notepad_26.PNG"
/7 = "cig_light_notepad_31.PNG"
/8 = "cig_light_notepad_36.PNG"
/9 = "cig_light_notepad_41.PNG"
/10 = "cig_light_notepad_46.PNG"
/11 = "cig_light_notepad_51.PNG"
/12 = "cig_light_notepad_56.PNG"
/13 = "cig_light_notepad_61.PNG"
/14 = "cig_light_notepad_66.PNG"
/15 = "cig_light_notepad_71.PNG"
/16 = "cig_light_notepad_76.PNG"
/17 = "cig_light_notepad_81.PNG"
</item>
<text end>
/ items = ("End of sequence. Press SPACE.")
</text>
**********************************************************************************
Trials - High
**********************************************************************************
<trial start1>
/ ontrialbegin =
[values.currentset = list.selectset.nextvalue;
values.count = 0;]
/ stimulusframes = [1=clearscreen; 2 = fixation]
/ validresponse = (0)
/ trialduration = 1000
/ branch = [trial.cig_apple_high;]
</trial>
<trial cig_apple_high>
/ ontrialbegin =
[values.duration = list.timings.nextvalue;
values.count += 1;]
/ ontrialbegin = [if (values.count > 16) trial.cig_apple_high.insertstimulustime(sound.high, 0);]
/ stimulusframes = [1=cig_apple]
/ validresponse = (0)
/ trialduration = values.duration
/ branch = [if (values.count < 17) trial.cig_apple_high else trial.end]
</trial>
<trial start2>
/ ontrialbegin =
[values.currentset = list.selectset.nextvalue;
values.count = 0;]
/ stimulusframes = [1=clearscreen; 2 = fixation]
/ validresponse = (0)
/ trialduration = 1000
/ branch = [trial.cig_light_high;]
</trial>
<trial cig_light_high>
/ ontrialbegin =
[values.duration = list.timings.nextvalue;
values.count += 1;]
/ ontrialbegin = [if (values.count > 16) trial.cig_light_high.insertstimulustime(sound.high, 0);]
/ stimulusframes = [1=cig_light]
/ validresponse = (0)
/ trialduration = values.duration
/ branch = [if (values.count < 17) trial.cig_light_high else trial.end]
</trial>
**********************************************************************************
Trials - Low
**********************************************************************************
<trial start3>
/ ontrialbegin =
[values.currentset = list.selectset.nextvalue;
values.count = 0;]
/ stimulusframes = [1=clearscreen; 2 = fixation]
/ validresponse = (0)
/ trialduration = 1000
/ branch = [trial.cig_apple_low;]
</trial>
<trial cig_apple_low>
/ ontrialbegin =
[values.duration = list.timings.nextvalue;
values.count += 1;]
/ ontrialbegin = [if (values.count > 16) trial.cig_apple_low.insertstimulustime(sound.low, 0);]
/ stimulusframes = [1=cig_apple]
/ validresponse = (0)
/ trialduration = values.duration
/ branch = [if (values.count < 17) trial.cig_apple_low else trial.end]
</trial>
<trial start4>
/ ontrialbegin =
[values.currentset = list.selectset.nextvalue;
values.count = 0;]
/ stimulusframes = [1=clearscreen; 2 = fixation]
/ validresponse = (0)
/ trialduration = 1000
/ branch = [trial.cig_light_low;]
</trial>
<trial cig_light_low>
/ ontrialbegin =
[values.duration = list.timings.nextvalue;
values.count += 1;]
/ ontrialbegin = [if (values.count > 16) trial.cig_light_low.insertstimulustime(sound.low, 0);]
/ stimulusframes = [1=cig_light]
/ validresponse = (0)
/ trialduration = values.duration
/ branch = [if (values.count < 17) trial.cig_light_low else trial.end]
</trial>
<trial end>
/ stimulusframes = [1=clearscreen, end]
/ timeout = (5000)
/ inputdevice = keyboard
/ validresponse = (57)
</trial>
<block example>
/ trials = [1-8 = list.blocks]
</block>