Millisecond Forums

Varying presentation times within a set of items

https://forums.millisecond.com/Topic18330.aspx

By Mham - 2/14/2016

Hi,
I'm pretty new to Inquisit and still trying to figure some basic stuff out.
I was wondering if it is possible to present a list of words with varying (fixed) presentation times. 
For example: say I want to present a list of 10 words. The 1st word would be presented 2,3 seconds, the 2nd word 2,7 seconds, the 3rd word 3,6 seconds, the 4th word 3,7 seconds etc..
I understand how to vary the time in a over different trials, but is it possible to present every item for a different (fixed) amount of time within a trial, without treating every item as a seperate trial (which is a bit too much work).

Can't seem to find the answer to this anywhere so i figured I'd try it here, thanks in advance!
By Dave - 2/14/2016

Yes, you can vary the <trial>'s /trialduration according to the item selected, you only need a single <trial> element to do that.

<block myblock>
/ trials = [1-4=mytrial]
</block>

<values>
/ myitem = 1
/ myduration = 0
</values>

<trial mytrial>
/ ontrialbegin = [values.myitem = list.itemnumbers.nextindex; values.myduration = list.itemdurations.nextvalue; ]
/ stimulusframes = [1=mytext]
/ validresponse = (0)
/ trialduration = values.myduration
</trial>

<text mytext>
/ items = myitems
/ select = values.myitem
</text>

<item myitems>
/ 1 = "A"
/ 2 = "B"
/ 3 = "C"
/ 4 = "D"
</item>

<list itemnumbers>
/ poolsize = 4
/ selectionmode = sequence
</list>

<list itemdurations>
/ items = (2300, 2700, 3600, 3700)
/ selectionmode = list.itemnumbers.currentindex
</list>

By Mham - 2/14/2016

Thank you so much for the quick response!
By Mham - 2/15/2016

Hi,

Your earlier suggestion worked wonderfully! But now there is another issue which I've not been able to solve. 
A quick description of the experiment: 

I'm programming a cued recall experiment where subjects learn foreign words with different presentation times. After the study block, there is a test block, where they receive the cue, and have to submit the correct target word/translation.
the first part is going great. The problem is that i can't seem to get the cues in recall test to appear in random order. I've tried several ways to implement the selectionmode etc but it doesnt seem to work. Maybe you can spot where ive messed up.

Here's a part of the exp where the problem seems to occur.

<expt >
/blocks = [1=studyred; 2=recallred]

</expt>

<block studyred>
/ trials = [1-24 = redA]
</block>

<block recallred>
/trials = [1-24 = cuedrecallred]
</block>

<values>
/ cueA = 1
/ cueB = 1
/ itemsdurationincrease = 0
</values>

<trial redA>
/ ontrialbegin = [values.cueA = list.itemnumbers.nextindex; values.itemsdurationincrease = list.itemdurationsincrease.nextvalue]
/ stimulusframes = [1=redcuetext, redtargettext]
/ validresponse = (0)
/ trialduration = values.itemsdurationincrease
</trial>

<list recallred>
/poolsize = 24
/selectionmode = random
</list>


<text redcuetext>
/items = cueA
/select = sequence
/position = (50%, 30%)
/txcolor = (0, 0, 255)
/txbgcolor = (218, 218, 218)
/fontstyle = ("Verdana", 5%)
</text>

<text redtargettext>
/items = targetA
/select = text.redcuetext.currentindex
/position = (50%, 40%)
/txcolor = (0, 0, 255)
/txbgcolor = (218, 218, 218)
/fontstyle = ("Verdana", 5%)
</text>

<openended cuedrecallred>
/stimulustimes =[0= redcuetext]
/ inputdevice = keyboard
/ buttonlabel = "Type your answer and press ENTER"
/iscorrectresponse = [openended.cuedrecallred.response == text.redtargettext.item(text.redcuetext.currentindex)]
/posttrialpause = 200
/required = true
</openended>

<list itemnumbers>
/ poolsize = 24
/ selectionmode = sequence
</list>

<list itemdurationsincrease>
/ items = (2830, 3200, 3300, 3380, 3450, 3550, 3600, 3620, 3680, 3810, 3840, 3880, 3930, 4007, 4100, 4170, 4300, 4420, 4460, 4530, 4570, 4770, 5008, 5350)
/ selectionmode = list.itemnumbers.currentindex
</list>


<item cueA>
/1 = "lova"
/2 = "upė"
/3 = "rūsys"
/4 = "palaidinė"
/5 = "karalius"
/6 = "batas"
/7 = "obuolys"
/8 = "ugnis"
/9 = "žirklės"
/10 = "langas"
/11 = "adata"
/12 = "žolė"
/13 = "puodelis"
/14 = "kėdė"
/15 = "kilimėlis"
/16 = "palėpštis"
/17 = "kepuraitė"
/18 = "šakutė"
/19 = "voras"
/20 = "vaistas"
/21 = "šalmas"
/22 = "kirvis"
/23 = "kamuolys"
/24 = "padažas"
</item>

<item targetA>
/1 = "bed"
/2 = "river"
/3 = "basement"
/4 = "shirt"
/5 = "king"
/6 = "shoe"
/7 = "apple"
/8 = "fire"
/9 = "scissors"
/10 = "window"
/11 = "needle"
/12 = "grass"
/13 = "cup"
/14 = "chair"
/15 = "rug"
/16 = "broom"
/17 = "hat"
/18 = "fork"
/19 = "spider"
/20 = "drug"
/21 = "helmet"
/22 = "axe"
/23 = "ball"
/24 = "gravy"
</item>



By Dave - 2/15/2016

#1: It's not clear whether you want cues to be selected randomly or sequentially in the *study phase*
#2: The purpose of <list recallred> is unclear. You are not using it anywhere in your code.
#3: Neither are you using values.cueA anywhere for selection, so I'm wondering what the intent behind it may be.
#4: The reason your cues are selected sequentially is that you told the script to do so:

<text redcuetext>
/items = cueA
/select = sequence
/position = (50%, 30%)
/txcolor = (0, 0, 255)
/txbgcolor = (218, 218, 218)
/fontstyle = ("Verdana", 5%)
</text>

Please elaborate.
By Mham - 2/15/2016

#1 -  Sorry, yes the cues in the study phase are supposed to be selected sequentially.
#2 - that list element wasn't supposed to be there, I used that in an earlier version and accidentally copied it to this one so please ignore it

<trial redA>
/ ontrialbegin = [values.cueA = list.itemnumbers.nextindex; values.itemsdurationincrease = list.itemdurationsincrease.nextvalue]

I figured this was linking the items to the corresponding presentation times. 

#4 I see. While I am typing this post, I think I may have found a solution by creating seperate text elements: one for the study phase and one for the test phase. The study phase: /select = sequential and the test phase: /select = noreplace.
This actually seems to be working. Don't know why I didn't think of this earlier!

If you have a better solution please let me know! I'm very new to this.

Once again, thank you for your time.
By Dave - 2/15/2016

Setting up separate <text> elements for the two phases is a perfectly fine solution. An alternative would have been using <values> and two separate <list> elements for selection. Basically

<values>
/ itemnumber = 1
</values>

<expt>
/ blocks = [1=studyblock; 2=recallblock]
</expt>

<block studyblock>
/ trials = [1-4 = studytrial]
</block>

<block recallblock>
/ trials = [1-4 = recalltrial]
</block>

<trial studytrial>
/ ontrialbegin = [values.itemnumber = list.studylist.nextindex]
/ stimulusframes = [1=mytext]
/ validresponse = (57)
</trial>

<trial recalltrial>
/ ontrialbegin = [values.itemnumber = list.recalllist.nextindex]
/ stimulusframes = [1=mytext]
/ validresponse = (57)
</trial>

<text mytext>
/ items = myitems
/ select = values.itemnumber
</text>

<item myitems>
/ 1 = "A"
/ 2 = "B"
/ 3 = "C"
/ 4 = "D"
</item>

<list studylist>
/ poolsize = 4
/ selectionmode = sequence
</list>

<list recalllist>
/ poolsize = 4
/ selectionmode = random
</list>

(example is only supposed to cover the selection aspect, nothing else)