Millisecond Forums

Audio and Photo stimuli with text response

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

By veera1997 - 7/5/2021

Hi!

I'm trying to create an experiment that loosely imitates a conversation. I'd like to have photo stimuli that has audio playing silmuntaneously. After that I'd like to insert a textbox for the participants to reply and then have another audio + photo, then another textbox etc. I've tried to look through the tutorials but I'm not sure what to do. Does anyone have any tips?

Thanks in advance :)
By Dave - 7/5/2021

veera1997 - 7/5/2021
Hi!

I'm trying to create an experiment that loosely imitates a conversation. I'd like to have photo stimuli that has audio playing silmuntaneously. After that I'd like to insert a textbox for the participants to reply and then have another audio + photo, then another textbox etc. I've tried to look through the tutorials but I'm not sure what to do. Does anyone have any tips?

Thanks in advance :)

Use a <trial> displaying a <picture> and <video> element to display the image and sound simultaneously. Follow that up with an <openended> trial for the textbox input. Repeat until done.
By veera1997 - 7/5/2021

Dave - 7/5/2021
veera1997 - 7/5/2021
Hi!

I'm trying to create an experiment that loosely imitates a conversation. I'd like to have photo stimuli that has audio playing silmuntaneously. After that I'd like to insert a textbox for the participants to reply and then have another audio + photo, then another textbox etc. I've tried to look through the tutorials but I'm not sure what to do. Does anyone have any tips?

Thanks in advance :)

Use a <trial> displaying a <picture> and <video> element to display the image and sound simultaneously. Follow that up with an <openended> trial for the textbox input. Repeat until done.

Thanks so much for the quick reply!! Sorry, I'm still really new to inquisit, how does the script go for that?

Veera
By Dave - 7/5/2021

veera1997 - 7/5/2021
Dave - 7/5/2021
veera1997 - 7/5/2021
Hi!

I'm trying to create an experiment that loosely imitates a conversation. I'd like to have photo stimuli that has audio playing silmuntaneously. After that I'd like to insert a textbox for the participants to reply and then have another audio + photo, then another textbox etc. I've tried to look through the tutorials but I'm not sure what to do. Does anyone have any tips?

Thanks in advance :)

Use a <trial> displaying a <picture> and <video> element to display the image and sound simultaneously. Follow that up with an <openended> trial for the textbox input. Repeat until done.

Thanks so much for the quick reply!! Sorry, I'm still really new to inquisit, how does the script go for that?

Veera

<block example>
/ trials = [1-4=sequence(playaudio,getresponse)]
</block>

<trial playaudio>
/ stimulusframes = [1=pic, audio]
/ validresponse = (0)
/ trialduration = 100
</trial>

<openended getresponse>
/ stimulusframes = [1=pic]
/ size = (60%, 40%)
/ position = (50%, 90%)
</openended>

<picture pic>
/ items = ("face.jpg")
/ erase = false
/ position = (50%, 30%)
/ size = (20%, 20%)
</picture>

<video audio>
/ items = audioitems
/ playthrough = true
/ select = sequence
</video>

<item audioitems>
/ 1 = "audio01.mp3"
/ 2 = "audio02.mp3"
/ 3 = "audio03.mp3"
/ 4 = "audio04.mp3"
</item>
By veera1997 - 7/6/2021

Hi!

Thank you so much for your help. I got it to work (tried with one audio+pic+textbox), but now I don't know what I've done since I can't get it to work again.


<block strat1>
/ trials = [1-3=sequence(playaudio, getresponse)]
</block>

<trial OliviaWilson1>
/ stimulusframes = [1=Olivia_Wilson, OliviaWilson001]
/ validresponse = (0)
/ trialduration = 7000
</trial>

<openended getresponse1>
/ stimulusframes = [1=Olivia_Wilson]
/ size = (60%, 40%)
/ position = (50%, 90%)
</openended>


<picture OliviaWilson>
/ items = ("Olivia_Wilson.jpg")
/ erase = false
/ position = (50%, 30%)
/ size = (20%, 20%)
</picture>


<video audio>
/ items = audioitems
/ playthrough = true
/select=sequence
</video>

<item audioitems>
/ 1 = "OliviaWilson001 (online-audio-converter.com).mp3"
/ 2 = "OliviaWilson002 (online-audio-converter.com).mp3"
/ 3 = "OliviaWilson003 (online-audio-converter.com).mp3"
</item>



Is there something wrong with the script? It keeps saying trial 1 is unassigned and "Could not locate element 'playaudio'. "
By veera1997 - 7/6/2021

Sorry I figured it out actually! Thanks haha
By Dave - 7/6/2021

veera1997 - 7/6/2021
Hi!

Thank you so much for your help. I got it to work (tried with one audio+pic+textbox), but now I don't know what I've done since I can't get it to work again.


<block strat1>
/ trials = [1-3=sequence(playaudio, getresponse)]
</block>

<trial OliviaWilson1>
/ stimulusframes = [1=Olivia_Wilson, OliviaWilson001]
/ validresponse = (0)
/ trialduration = 7000
</trial>

<openended getresponse1>
/ stimulusframes = [1=Olivia_Wilson]
/ size = (60%, 40%)
/ position = (50%, 90%)
</openended>


<picture OliviaWilson>
/ items = ("Olivia_Wilson.jpg")
/ erase = false
/ position = (50%, 30%)
/ size = (20%, 20%)
</picture>


<video audio>
/ items = audioitems
/ playthrough = true
/select=sequence
</video>

<item audioitems>
/ 1 = "OliviaWilson001 (online-audio-converter.com).mp3"
/ 2 = "OliviaWilson002 (online-audio-converter.com).mp3"
/ 3 = "OliviaWilson003 (online-audio-converter.com).mp3"
</item>



Is there something wrong with the script? It keeps saying trial 1 is unassigned and "Could not locate element 'playaudio'. "

<block strat1>
/ trials = [1-3=sequence(playaudio, getresponse)]
</block>

There is no <trial playaudio> in your code anymore, and there isn't any <trial getresponse> either. You gave the trials different names, and obviously your code in the above will have to reflect that.

Similarly,

<trial OliviaWilson1>
/ stimulusframes = [1=Olivia_Wilson, OliviaWilson001]
/ validresponse = (0)
/ trialduration = 7000
</trial>

there is no stimulus of any kind called "OliviaWilson001" anywhere in the code you posted.
By veera1997 - 7/6/2021

Sorry, I accidentally did not attach the full thing. This script works, but how do I get the next audio clip to play after the first response box? So far I've only gotten the audio to play at the same time, and if I Try to repeat it says "<trial playaudio> is defined more than once. "<openended getresponse> is defined more than once.". Sorry for all of these questions haha I've had no one to teach me. 


<sound OliviaWilson001>
/ items = ("OliviaWilson001 (online-audio-converter.com).mp3")
</sound>

<sound OliviaWilson002>
/ items = ("OliviaWilson002 (online-audio-converter.com).mp3")
</sound>

<picture Olivia_Wilson>
/ items = ("Olivia_Wilson.jpg")
/ size = (40%, 40%)
</picture>



<block strat1>
/ trials = [1-3=sequence(playaudio, getresponse)]
</block>

<trial playaudio>
/ stimulusframes = [1=Olivia_Wilson, OliviaWilson001;]
/ validresponse = (0)
/ trialduration = 7000
</trial>

<openended getresponse>
/ stimulusframes = [1=Olivia_Wilson]
/ size = (60%, 40%)
/ position = (50%, 90%)
</openended>


<picture OliviaWilson>
/ items = ("Olivia_Wilson.jpg")
/ erase = false
/ position = (50%, 30%)
/ size = (20%, 20%)
</picture>


<video audio>
/ items = audioitems
/ playthrough = true
/select=sequence
</video>




<item audioitems>
/ 1 = "OliviaWilson001 (online-audio-converter.com).mp3"
/ 2 = "OliviaWilson002 (online-audio-converter.com).mp3"
</item>
By Dave - 7/6/2021

veera1997 - 7/6/2021
Sorry, I accidentally did not attach the full thing. This script works, but how do I get the next audio clip to play after the first response box? So far I've only gotten the audio to play at the same time, and if I Try to repeat it says "<trial playaudio> is defined more than once. "<openended getresponse> is defined more than once.". Sorry for all of these questions haha I've had no one to teach me. 


<sound OliviaWilson001>
/ items = ("OliviaWilson001 (online-audio-converter.com).mp3")
</sound>

<sound OliviaWilson002>
/ items = ("OliviaWilson002 (online-audio-converter.com).mp3")
</sound>

<picture Olivia_Wilson>
/ items = ("Olivia_Wilson.jpg")
/ size = (40%, 40%)
</picture>



<block strat1>
/ trials = [1-3=sequence(playaudio, getresponse)]
</block>

<trial playaudio>
/ stimulusframes = [1=Olivia_Wilson, OliviaWilson001;]
/ validresponse = (0)
/ trialduration = 7000
</trial>

<openended getresponse>
/ stimulusframes = [1=Olivia_Wilson]
/ size = (60%, 40%)
/ position = (50%, 90%)
</openended>


<picture OliviaWilson>
/ items = ("Olivia_Wilson.jpg")
/ erase = false
/ position = (50%, 30%)
/ size = (20%, 20%)
</picture>


<video audio>
/ items = audioitems
/ playthrough = true
/select=sequence
</video>




<item audioitems>
/ 1 = "OliviaWilson001 (online-audio-converter.com).mp3"
/ 2 = "OliviaWilson002 (online-audio-converter.com).mp3"
</item>

The two sound elements are completely unnecessary and serve no purpose whatsoever. Just like in the example code I gave you, you do:

<trial playaudio>
/ stimulusframes = [1=Olivia_Wilson, audio]
/ validresponse = (0)
/ trialduration = 7000
</trial>

with

<video audio>
/ items = audioitems
/ playthrough = true
/select=sequence
</video>

<item audioitems>
/ 1 = "OliviaWilson001 (online-audio-converter.com).mp3"
/ 2 = "OliviaWilson002 (online-audio-converter.com).mp3"
</item>
By veera1997 - 7/28/2021

Dave - 7/6/2021
veera1997 - 7/6/2021
Sorry, I accidentally did not attach the full thing. This script works, but how do I get the next audio clip to play after the first response box? So far I've only gotten the audio to play at the same time, and if I Try to repeat it says "<trial playaudio> is defined more than once. "<openended getresponse> is defined more than once.". Sorry for all of these questions haha I've had no one to teach me. 


<sound OliviaWilson001>
/ items = ("OliviaWilson001 (online-audio-converter.com).mp3")
</sound>

<sound OliviaWilson002>
/ items = ("OliviaWilson002 (online-audio-converter.com).mp3")
</sound>

<picture Olivia_Wilson>
/ items = ("Olivia_Wilson.jpg")
/ size = (40%, 40%)
</picture>



<block strat1>
/ trials = [1-3=sequence(playaudio, getresponse)]
</block>

<trial playaudio>
/ stimulusframes = [1=Olivia_Wilson, OliviaWilson001;]
/ validresponse = (0)
/ trialduration = 7000
</trial>

<openended getresponse>
/ stimulusframes = [1=Olivia_Wilson]
/ size = (60%, 40%)
/ position = (50%, 90%)
</openended>


<picture OliviaWilson>
/ items = ("Olivia_Wilson.jpg")
/ erase = false
/ position = (50%, 30%)
/ size = (20%, 20%)
</picture>


<video audio>
/ items = audioitems
/ playthrough = true
/select=sequence
</video>




<item audioitems>
/ 1 = "OliviaWilson001 (online-audio-converter.com).mp3"
/ 2 = "OliviaWilson002 (online-audio-converter.com).mp3"
</item>

The two sound elements are completely unnecessary and serve no purpose whatsoever. Just like in the example code I gave you, you do:

<trial playaudio>
/ stimulusframes = [1=Olivia_Wilson, audio]
/ validresponse = (0)
/ trialduration = 7000
</trial>

with

<video audio>
/ items = audioitems
/ playthrough = true
/select=sequence
</video>

<item audioitems>
/ 1 = "OliviaWilson001 (online-audio-converter.com).mp3"
/ 2 = "OliviaWilson002 (online-audio-converter.com).mp3"
</item>

Hi again! Many thanks for all the help, this doesn't come naturally to me so I have a lot to learn.

One more thing: Using the same script, I now have 10 audio clips that are played in the experiment, but want to randomize the order of the audio clip so that audio clip 1 (i.e. OliviaWilson001) is always played first and then clips 2-10 are played in a randomized order. So far the only thing I've found is the noreplace function like this;


<video audio2>
/ items = audioitems2
/ playthrough = true
/select= noreplace
</video>

but this plays all the clips in a random order and I would need the one clip to be played first always and then the rest randomly. Hope this makes sense. Any help would be greatly appreciated!!

Thanks :)
By Dave - 7/28/2021

veera1997 - 7/28/2021
Dave - 7/6/2021
veera1997 - 7/6/2021
Sorry, I accidentally did not attach the full thing. This script works, but how do I get the next audio clip to play after the first response box? So far I've only gotten the audio to play at the same time, and if I Try to repeat it says "<trial playaudio> is defined more than once. "<openended getresponse> is defined more than once.". Sorry for all of these questions haha I've had no one to teach me. 


<sound OliviaWilson001>
/ items = ("OliviaWilson001 (online-audio-converter.com).mp3")
</sound>

<sound OliviaWilson002>
/ items = ("OliviaWilson002 (online-audio-converter.com).mp3")
</sound>

<picture Olivia_Wilson>
/ items = ("Olivia_Wilson.jpg")
/ size = (40%, 40%)
</picture>



<block strat1>
/ trials = [1-3=sequence(playaudio, getresponse)]
</block>

<trial playaudio>
/ stimulusframes = [1=Olivia_Wilson, OliviaWilson001;]
/ validresponse = (0)
/ trialduration = 7000
</trial>

<openended getresponse>
/ stimulusframes = [1=Olivia_Wilson]
/ size = (60%, 40%)
/ position = (50%, 90%)
</openended>


<picture OliviaWilson>
/ items = ("Olivia_Wilson.jpg")
/ erase = false
/ position = (50%, 30%)
/ size = (20%, 20%)
</picture>


<video audio>
/ items = audioitems
/ playthrough = true
/select=sequence
</video>




<item audioitems>
/ 1 = "OliviaWilson001 (online-audio-converter.com).mp3"
/ 2 = "OliviaWilson002 (online-audio-converter.com).mp3"
</item>

The two sound elements are completely unnecessary and serve no purpose whatsoever. Just like in the example code I gave you, you do:

<trial playaudio>
/ stimulusframes = [1=Olivia_Wilson, audio]
/ validresponse = (0)
/ trialduration = 7000
</trial>

with

<video audio>
/ items = audioitems
/ playthrough = true
/select=sequence
</video>

<item audioitems>
/ 1 = "OliviaWilson001 (online-audio-converter.com).mp3"
/ 2 = "OliviaWilson002 (online-audio-converter.com).mp3"
</item>

Hi again! Many thanks for all the help, this doesn't come naturally to me so I have a lot to learn.

One more thing: Using the same script, I now have 10 audio clips that are played in the experiment, but want to randomize the order of the audio clip so that audio clip 1 (i.e. OliviaWilson001) is always played first and then clips 2-10 are played in a randomized order. So far the only thing I've found is the noreplace function like this;


<video audio2>
/ items = audioitems2
/ playthrough = true
/select= noreplace
</video>

but this plays all the clips in a random order and I would need the one clip to be played first always and then the rest randomly. Hope this makes sense. Any help would be greatly appreciated!!

Thanks :)

To do this, you need to work with nested lists.

<video audio2>
/ items = audioitems2
/ playthrough = true
/select= list.audio2list.nextvalue
</video>

<list audio2list>
/ items = (1, list.audio2random.nextvalue, list.audio2random.nextvalue, list.audio2random.nextvalue, list.audio2random.nextvalue,
    list.audio2random.nextvalue, list.audio2random.nextvalue, list.audio2random.nextvalue, list.audio2random.nextvalue, list.audio2random.nextvalue)
/ selectionmode = sequence
</list>

<list audio2random>
/ items = (2,3,4,5,6,7,8,9,10)
/ selectionmode = random
/ replace = false
</list>
By veera1997 - 7/28/2021

Dave - 7/28/2021
veera1997 - 7/28/2021
Dave - 7/6/2021
veera1997 - 7/6/2021
Sorry, I accidentally did not attach the full thing. This script works, but how do I get the next audio clip to play after the first response box? So far I've only gotten the audio to play at the same time, and if I Try to repeat it says "<trial playaudio> is defined more than once. "<openended getresponse> is defined more than once.". Sorry for all of these questions haha I've had no one to teach me. 


<sound OliviaWilson001>
/ items = ("OliviaWilson001 (online-audio-converter.com).mp3")
</sound>

<sound OliviaWilson002>
/ items = ("OliviaWilson002 (online-audio-converter.com).mp3")
</sound>

<picture Olivia_Wilson>
/ items = ("Olivia_Wilson.jpg")
/ size = (40%, 40%)
</picture>



<block strat1>
/ trials = [1-3=sequence(playaudio, getresponse)]
</block>

<trial playaudio>
/ stimulusframes = [1=Olivia_Wilson, OliviaWilson001;]
/ validresponse = (0)
/ trialduration = 7000
</trial>

<openended getresponse>
/ stimulusframes = [1=Olivia_Wilson]
/ size = (60%, 40%)
/ position = (50%, 90%)
</openended>


<picture OliviaWilson>
/ items = ("Olivia_Wilson.jpg")
/ erase = false
/ position = (50%, 30%)
/ size = (20%, 20%)
</picture>


<video audio>
/ items = audioitems
/ playthrough = true
/select=sequence
</video>




<item audioitems>
/ 1 = "OliviaWilson001 (online-audio-converter.com).mp3"
/ 2 = "OliviaWilson002 (online-audio-converter.com).mp3"
</item>

The two sound elements are completely unnecessary and serve no purpose whatsoever. Just like in the example code I gave you, you do:

<trial playaudio>
/ stimulusframes = [1=Olivia_Wilson, audio]
/ validresponse = (0)
/ trialduration = 7000
</trial>

with

<video audio>
/ items = audioitems
/ playthrough = true
/select=sequence
</video>

<item audioitems>
/ 1 = "OliviaWilson001 (online-audio-converter.com).mp3"
/ 2 = "OliviaWilson002 (online-audio-converter.com).mp3"
</item>

Hi again! Many thanks for all the help, this doesn't come naturally to me so I have a lot to learn.

One more thing: Using the same script, I now have 10 audio clips that are played in the experiment, but want to randomize the order of the audio clip so that audio clip 1 (i.e. OliviaWilson001) is always played first and then clips 2-10 are played in a randomized order. So far the only thing I've found is the noreplace function like this;


<video audio2>
/ items = audioitems2
/ playthrough = true
/select= noreplace
</video>

but this plays all the clips in a random order and I would need the one clip to be played first always and then the rest randomly. Hope this makes sense. Any help would be greatly appreciated!!

Thanks :)

To do this, you need to work with nested lists.

<video audio2>
/ items = audioitems2
/ playthrough = true
/select= list.audio2list.nextvalue
</video>

<list audio2list>
/ items = (1, list.audio2random.nextvalue, list.audio2random.nextvalue, list.audio2random.nextvalue, list.audio2random.nextvalue,
    list.audio2random.nextvalue, list.audio2random.nextvalue, list.audio2random.nextvalue, list.audio2random.nextvalue, list.audio2random.nextvalue)
/ selectionmode = sequence
</list>

<list audio2random>
/ items = (2,3,4,5,6,7,8,9,10)
/ selectionmode = random
/ replace = false
</list>

Amazing, thank you so much for the quick and helpful response!!!

One more question, I have two different sets of stimuli and instrcutions and I need to randomize the pairing of the instructions and the target (i.e. make both sets of stimuli appear with both types of instructions). i.e:

<block Olivia_Wilson>
/ preinstructions = (page.Rehearsal, page.Observer)
/ trials = [1-10=sequence(playaudio2, getresponse2); 11=surveypage.StrategiesA]
/select = noreplace
</block>

You can see both of the instructions there. How do I get it to randomly choose only one instruction to display?
By Dave - 7/28/2021

veera1997 - 7/28/2021
Dave - 7/28/2021
veera1997 - 7/28/2021
Dave - 7/6/2021
veera1997 - 7/6/2021
Sorry, I accidentally did not attach the full thing. This script works, but how do I get the next audio clip to play after the first response box? So far I've only gotten the audio to play at the same time, and if I Try to repeat it says "<trial playaudio> is defined more than once. "<openended getresponse> is defined more than once.". Sorry for all of these questions haha I've had no one to teach me. 


<sound OliviaWilson001>
/ items = ("OliviaWilson001 (online-audio-converter.com).mp3")
</sound>

<sound OliviaWilson002>
/ items = ("OliviaWilson002 (online-audio-converter.com).mp3")
</sound>

<picture Olivia_Wilson>
/ items = ("Olivia_Wilson.jpg")
/ size = (40%, 40%)
</picture>



<block strat1>
/ trials = [1-3=sequence(playaudio, getresponse)]
</block>

<trial playaudio>
/ stimulusframes = [1=Olivia_Wilson, OliviaWilson001;]
/ validresponse = (0)
/ trialduration = 7000
</trial>

<openended getresponse>
/ stimulusframes = [1=Olivia_Wilson]
/ size = (60%, 40%)
/ position = (50%, 90%)
</openended>


<picture OliviaWilson>
/ items = ("Olivia_Wilson.jpg")
/ erase = false
/ position = (50%, 30%)
/ size = (20%, 20%)
</picture>


<video audio>
/ items = audioitems
/ playthrough = true
/select=sequence
</video>




<item audioitems>
/ 1 = "OliviaWilson001 (online-audio-converter.com).mp3"
/ 2 = "OliviaWilson002 (online-audio-converter.com).mp3"
</item>

The two sound elements are completely unnecessary and serve no purpose whatsoever. Just like in the example code I gave you, you do:

<trial playaudio>
/ stimulusframes = [1=Olivia_Wilson, audio]
/ validresponse = (0)
/ trialduration = 7000
</trial>

with

<video audio>
/ items = audioitems
/ playthrough = true
/select=sequence
</video>

<item audioitems>
/ 1 = "OliviaWilson001 (online-audio-converter.com).mp3"
/ 2 = "OliviaWilson002 (online-audio-converter.com).mp3"
</item>

Hi again! Many thanks for all the help, this doesn't come naturally to me so I have a lot to learn.

One more thing: Using the same script, I now have 10 audio clips that are played in the experiment, but want to randomize the order of the audio clip so that audio clip 1 (i.e. OliviaWilson001) is always played first and then clips 2-10 are played in a randomized order. So far the only thing I've found is the noreplace function like this;


<video audio2>
/ items = audioitems2
/ playthrough = true
/select= noreplace
</video>

but this plays all the clips in a random order and I would need the one clip to be played first always and then the rest randomly. Hope this makes sense. Any help would be greatly appreciated!!

Thanks :)

To do this, you need to work with nested lists.

<video audio2>
/ items = audioitems2
/ playthrough = true
/select= list.audio2list.nextvalue
</video>

<list audio2list>
/ items = (1, list.audio2random.nextvalue, list.audio2random.nextvalue, list.audio2random.nextvalue, list.audio2random.nextvalue,
    list.audio2random.nextvalue, list.audio2random.nextvalue, list.audio2random.nextvalue, list.audio2random.nextvalue, list.audio2random.nextvalue)
/ selectionmode = sequence
</list>

<list audio2random>
/ items = (2,3,4,5,6,7,8,9,10)
/ selectionmode = random
/ replace = false
</list>

Amazing, thank you so much for the quick and helpful response!!!

One more question, I have two different sets of stimuli and instrcutions and I need to randomize the pairing of the instructions and the target (i.e. make both sets of stimuli appear with both types of instructions). i.e:

<block Olivia_Wilson>
/ preinstructions = (page.Rehearsal, page.Observer)
/ trials = [1-10=sequence(playaudio2, getresponse2); 11=surveypage.StrategiesA]
/select = noreplace
</block>

You can see both of the instructions there. How do I get it to randomly choose only one instruction to display?

If this is supposed to be a between-subjects manipulation, you need to set up multiple conditions. Beyond that, there's not enough information to provide a good answer. It's unclear what "I have two different sets of stimuli and instrcutions and I need to randomize the pairing of the instructions and the target (i.e. make both sets of stimuli appear with both types of instructions)" is supposed to mean exactly.
By veera1997 - 7/28/2021

Dave - 7/28/2021
veera1997 - 7/28/2021
Dave - 7/28/2021
veera1997 - 7/28/2021
Dave - 7/6/2021
veera1997 - 7/6/2021
Sorry, I accidentally did not attach the full thing. This script works, but how do I get the next audio clip to play after the first response box? So far I've only gotten the audio to play at the same time, and if I Try to repeat it says "<trial playaudio> is defined more than once. "<openended getresponse> is defined more than once.". Sorry for all of these questions haha I've had no one to teach me. 


<sound OliviaWilson001>
/ items = ("OliviaWilson001 (online-audio-converter.com).mp3")
</sound>

<sound OliviaWilson002>
/ items = ("OliviaWilson002 (online-audio-converter.com).mp3")
</sound>

<picture Olivia_Wilson>
/ items = ("Olivia_Wilson.jpg")
/ size = (40%, 40%)
</picture>



<block strat1>
/ trials = [1-3=sequence(playaudio, getresponse)]
</block>

<trial playaudio>
/ stimulusframes = [1=Olivia_Wilson, OliviaWilson001;]
/ validresponse = (0)
/ trialduration = 7000
</trial>

<openended getresponse>
/ stimulusframes = [1=Olivia_Wilson]
/ size = (60%, 40%)
/ position = (50%, 90%)
</openended>


<picture OliviaWilson>
/ items = ("Olivia_Wilson.jpg")
/ erase = false
/ position = (50%, 30%)
/ size = (20%, 20%)
</picture>


<video audio>
/ items = audioitems
/ playthrough = true
/select=sequence
</video>




<item audioitems>
/ 1 = "OliviaWilson001 (online-audio-converter.com).mp3"
/ 2 = "OliviaWilson002 (online-audio-converter.com).mp3"
</item>

The two sound elements are completely unnecessary and serve no purpose whatsoever. Just like in the example code I gave you, you do:

<trial playaudio>
/ stimulusframes = [1=Olivia_Wilson, audio]
/ validresponse = (0)
/ trialduration = 7000
</trial>

with

<video audio>
/ items = audioitems
/ playthrough = true
/select=sequence
</video>

<item audioitems>
/ 1 = "OliviaWilson001 (online-audio-converter.com).mp3"
/ 2 = "OliviaWilson002 (online-audio-converter.com).mp3"
</item>

Hi again! Many thanks for all the help, this doesn't come naturally to me so I have a lot to learn.

One more thing: Using the same script, I now have 10 audio clips that are played in the experiment, but want to randomize the order of the audio clip so that audio clip 1 (i.e. OliviaWilson001) is always played first and then clips 2-10 are played in a randomized order. So far the only thing I've found is the noreplace function like this;


<video audio2>
/ items = audioitems2
/ playthrough = true
/select= noreplace
</video>

but this plays all the clips in a random order and I would need the one clip to be played first always and then the rest randomly. Hope this makes sense. Any help would be greatly appreciated!!

Thanks :)

To do this, you need to work with nested lists.

<video audio2>
/ items = audioitems2
/ playthrough = true
/select= list.audio2list.nextvalue
</video>

<list audio2list>
/ items = (1, list.audio2random.nextvalue, list.audio2random.nextvalue, list.audio2random.nextvalue, list.audio2random.nextvalue,
    list.audio2random.nextvalue, list.audio2random.nextvalue, list.audio2random.nextvalue, list.audio2random.nextvalue, list.audio2random.nextvalue)
/ selectionmode = sequence
</list>

<list audio2random>
/ items = (2,3,4,5,6,7,8,9,10)
/ selectionmode = random
/ replace = false
</list>

Amazing, thank you so much for the quick and helpful response!!!

One more question, I have two different sets of stimuli and instrcutions and I need to randomize the pairing of the instructions and the target (i.e. make both sets of stimuli appear with both types of instructions). i.e:

<block Olivia_Wilson>
/ preinstructions = (page.Rehearsal, page.Observer)
/ trials = [1-10=sequence(playaudio2, getresponse2); 11=surveypage.StrategiesA]
/select = noreplace
</block>

You can see both of the instructions there. How do I get it to randomly choose only one instruction to display?

If this is supposed to be a between-subjects manipulation, you need to set up multiple conditions. Beyond that, there's not enough information to provide a good answer. It's unclear what "I have two different sets of stimuli and instrcutions and I need to randomize the pairing of the instructions and the target (i.e. make both sets of stimuli appear with both types of instructions)" is supposed to mean exactly.

Sorry, that was very unclear, I've been sitting at my computer for too long!

It's a within-subjects manipulation, I have two target faces (i.e. target A and target B) that give participants "spoken" information about themselves (for example their favourite food) through the audio files. The participants have to remember as much information as they can as they will be quizzed later on about the information they hear. Participants receive instrcutions for one of two memory strategies (i.e. strategy A and strategy B) before each target face to help them learn the information. I want to make the instrcutions appear randomly before the target face (so for example, you could randomly get strategy A before target B, or strategy B before target B etc.), but I'm not sure how to get only one of the instrcutions to appear randomly before the target face. I'll attach the script. I hope this is more clear, sorry again.

<page Observer>
Strategy A would be here
</page>

<page Rehearsal>
Strategy B would be here
</page>

<picture Joan_Gonzalez>
/ items = ("Joan_Gonzalez.jpg")
/ size = (40%, 40%)
</picture>

                    
<block Joan_Gonzalez>
/ preinstructions = (page.Rehearsal, page.Observer)
/ trials = [1-10= sequence(playaudio1, getresponse1); 11= surveypage.StrategiesA]
/select = noreplace
</block>

<trial playaudio1>
/ stimulusframes = [1-10=Joan_Gonzalez, audio1;]
/ validresponse = (0)
/ trialduration = 7000
</trial>

<openended getresponse1>
/ stimulusframes = [1-10=Joan_Gonzalez]
/ size = (50%, 10%)
/ position = (50%, 90%)
/ trialduration = 7000
</openended>



<picture JoanGonzalez>
/ items = ("Joan_Gonzalez.jpg")
/ erase = false
/ position = (50%, 30%)
/ size = (20%, 20%)
</picture>


<video audio1>
/ items = audioitems1
/ playthrough = true
/select= list.audio1list.nextvalue
</video>


<list audio1list>
/ items = (1, list.audio1random.nextvalue, list.audio1random.nextvalue, list.audio1random.nextvalue, list.audio1random.nextvalue,
  list.audio1random.nextvalue, list.audio1random.nextvalue, list.audio1random.nextvalue, list.audio1random.nextvalue, list.audio1random.nextvalue)
/ selectionmode = sequence
</list>

<list audio1random>
/ items = (2,3,4,5,6,7,8,9,10)
/ selectionmode = random
/ replace = false
</list>



<item audioitems1>
/ 1 = "Joan Gonzalez001 (online-audio-converter.com).mp3"
/ 2 = "Joan Gonzalez 002 (online-audio-converter.com).mp3"
/ 3 = "Joan Gonzalez 3 (online-audio-converter.com).mp3"
/ 4 = "Joan Gonzalez 004 (online-audio-converter.com).mp3"
/ 5 = "Joan Gonzalez 005 (online-audio-converter.com).mp3"
/ 6 = "Joan Gonzalez 006 (online-audio-converter.com).mp3"
/ 7 = "Joan Gonzalez 007 (online-audio-converter.com).mp3"
/ 8 = "Joan Gonzalez 008 (online-audio-converter.com).mp3"
/ 9 = "Joan Gonzalez 009 (online-audio-converter.com).mp3"
/10 = "Joan Gonzalez 010 (online-audio-converter.com).mp3"
</item>


<Slider Difficulty>
/ caption = "How difficult was it for you to follow the most recent instructions about what you were supposed to do when you were learning about the last person? "
/ labels = ("Not at all difficult", "Very difficult")
/ range = (1,100)
/ increment = 1
/ defaultresponse = "50"
</slider>

<checkboxes StrategiesA>
/ caption = "Which of the following strategies did you use whilst hearing about the last person?"
/ required = false
/ options = (
"Repeated what they said back to myself",
"Imagined seeing them in reference to what they said ",
)
/ other = "Something else"
</checkboxes>




<surveypage StrategiesA>
/ questions = [1 = Difficulty; 2 = StrategiesA]
/ showpagenumbers = false
</surveypage>

                                     
                    
<block Olivia_Wilson>
/ preinstructions = (page.Rehearsal, page.Observer)
/ trials = [1-10=sequence(playaudio2, getresponse2); 11=surveypage.StrategiesA]
/select = noreplace
</block>

<trial playaudio2>
/ stimulusframes = [1=Olivia_Wilson, audio2;]
/ validresponse = (0)
/ trialduration = 7000
</trial>

<openended getresponse2>
/ stimulusframes = [1=Olivia_Wilson]
/ size = (50%, 10%)
/ position = (50%, 90%)
</openended>



<picture Olivia_Wilson>
/ items = ("Olivia_Wilson.jpg")
/ erase = false
/ position = (50%, 30%)
/ size = (40%, 40%)
</picture>


<video audio2>
/ items = audioitems2
/ playthrough = true
/select= list.audio2list.nextvalue
</video>


<list audio2list>
/ items = (1, list.audio2random.nextvalue, list.audio2random.nextvalue, list.audio2random.nextvalue, list.audio2random.nextvalue,
  list.audio2random.nextvalue, list.audio2random.nextvalue, list.audio2random.nextvalue, list.audio2random.nextvalue, list.audio2random.nextvalue)
/ selectionmode = sequence
</list>

<list audio2random>
/ items = (2,3,4,5,6,7,8,9,10)
/ selectionmode = random
/ replace = false
</list>


<item audioitems2>
/ 1 = "OliviaWilson001 (online-audio-converter.com).mp3"
/ 2 = "OliviaWilson002 (online-audio-converter.com).mp3"
/ 3 = "OliviaWilson003 (online-audio-converter.com).mp3"
/ 4 = "OliviaWilson004 (online-audio-converter.com).mp3"
/ 5 = "OliviaWilson 005 (online-audio-converter.com).mp3"
/ 6 = "OliviaWilson006 (online-audio-converter.com).mp3"
/ 7 = "OliviaWilson007 (online-audio-converter.com).mp3"
/ 8 = "OliviaWilson008 (online-audio-converter.com).mp3"
/ 9 = "OliviaWilson009 (online-audio-converter.com).mp3"
/10 = "OliviaWilson010 (online-audio-converter.com).mp3"
</item>



<expt Test>

/ blocks = [

1-2 = noreplace(

Olivia_Wilson,

Joan_Gonzalez,

)

]

</expt>


By Dave - 7/28/2021

veera1997 - 7/28/2021
Dave - 7/28/2021
veera1997 - 7/28/2021
Dave - 7/28/2021
veera1997 - 7/28/2021
Dave - 7/6/2021
veera1997 - 7/6/2021
Sorry, I accidentally did not attach the full thing. This script works, but how do I get the next audio clip to play after the first response box? So far I've only gotten the audio to play at the same time, and if I Try to repeat it says "<trial playaudio> is defined more than once. "<openended getresponse> is defined more than once.". Sorry for all of these questions haha I've had no one to teach me. 


<sound OliviaWilson001>
/ items = ("OliviaWilson001 (online-audio-converter.com).mp3")
</sound>

<sound OliviaWilson002>
/ items = ("OliviaWilson002 (online-audio-converter.com).mp3")
</sound>

<picture Olivia_Wilson>
/ items = ("Olivia_Wilson.jpg")
/ size = (40%, 40%)
</picture>



<block strat1>
/ trials = [1-3=sequence(playaudio, getresponse)]
</block>

<trial playaudio>
/ stimulusframes = [1=Olivia_Wilson, OliviaWilson001;]
/ validresponse = (0)
/ trialduration = 7000
</trial>

<openended getresponse>
/ stimulusframes = [1=Olivia_Wilson]
/ size = (60%, 40%)
/ position = (50%, 90%)
</openended>


<picture OliviaWilson>
/ items = ("Olivia_Wilson.jpg")
/ erase = false
/ position = (50%, 30%)
/ size = (20%, 20%)
</picture>


<video audio>
/ items = audioitems
/ playthrough = true
/select=sequence
</video>




<item audioitems>
/ 1 = "OliviaWilson001 (online-audio-converter.com).mp3"
/ 2 = "OliviaWilson002 (online-audio-converter.com).mp3"
</item>

The two sound elements are completely unnecessary and serve no purpose whatsoever. Just like in the example code I gave you, you do:

<trial playaudio>
/ stimulusframes = [1=Olivia_Wilson, audio]
/ validresponse = (0)
/ trialduration = 7000
</trial>

with

<video audio>
/ items = audioitems
/ playthrough = true
/select=sequence
</video>

<item audioitems>
/ 1 = "OliviaWilson001 (online-audio-converter.com).mp3"
/ 2 = "OliviaWilson002 (online-audio-converter.com).mp3"
</item>

Hi again! Many thanks for all the help, this doesn't come naturally to me so I have a lot to learn.

One more thing: Using the same script, I now have 10 audio clips that are played in the experiment, but want to randomize the order of the audio clip so that audio clip 1 (i.e. OliviaWilson001) is always played first and then clips 2-10 are played in a randomized order. So far the only thing I've found is the noreplace function like this;


<video audio2>
/ items = audioitems2
/ playthrough = true
/select= noreplace
</video>

but this plays all the clips in a random order and I would need the one clip to be played first always and then the rest randomly. Hope this makes sense. Any help would be greatly appreciated!!

Thanks :)

To do this, you need to work with nested lists.

<video audio2>
/ items = audioitems2
/ playthrough = true
/select= list.audio2list.nextvalue
</video>

<list audio2list>
/ items = (1, list.audio2random.nextvalue, list.audio2random.nextvalue, list.audio2random.nextvalue, list.audio2random.nextvalue,
    list.audio2random.nextvalue, list.audio2random.nextvalue, list.audio2random.nextvalue, list.audio2random.nextvalue, list.audio2random.nextvalue)
/ selectionmode = sequence
</list>

<list audio2random>
/ items = (2,3,4,5,6,7,8,9,10)
/ selectionmode = random
/ replace = false
</list>

Amazing, thank you so much for the quick and helpful response!!!

One more question, I have two different sets of stimuli and instrcutions and I need to randomize the pairing of the instructions and the target (i.e. make both sets of stimuli appear with both types of instructions). i.e:

<block Olivia_Wilson>
/ preinstructions = (page.Rehearsal, page.Observer)
/ trials = [1-10=sequence(playaudio2, getresponse2); 11=surveypage.StrategiesA]
/select = noreplace
</block>

You can see both of the instructions there. How do I get it to randomly choose only one instruction to display?

If this is supposed to be a between-subjects manipulation, you need to set up multiple conditions. Beyond that, there's not enough information to provide a good answer. It's unclear what "I have two different sets of stimuli and instrcutions and I need to randomize the pairing of the instructions and the target (i.e. make both sets of stimuli appear with both types of instructions)" is supposed to mean exactly.

Sorry, that was very unclear, I've been sitting at my computer for too long!

It's a within-subjects manipulation, I have two target faces (i.e. target A and target B) that give participants "spoken" information about themselves (for example their favourite food) through the audio files. The participants have to remember as much information as they can as they will be quizzed later on about the information they hear. Participants receive instrcutions for one of two memory strategies (i.e. strategy A and strategy B) before each target face to help them learn the information. I want to make the instrcutions appear randomly before the target face (so for example, you could randomly get strategy A before target B, or strategy B before target B etc.), but I'm not sure how to get only one of the instrcutions to appear randomly before the target face. I'll attach the script. I hope this is more clear, sorry again.

<page Observer>
Strategy A would be here
</page>

<page Rehearsal>
Strategy B would be here
</page>

<picture Joan_Gonzalez>
/ items = ("Joan_Gonzalez.jpg")
/ size = (40%, 40%)
</picture>

                    
<block Joan_Gonzalez>
/ preinstructions = (page.Rehearsal, page.Observer)
/ trials = [1-10= sequence(playaudio1, getresponse1); 11= surveypage.StrategiesA]
/select = noreplace
</block>

<trial playaudio1>
/ stimulusframes = [1-10=Joan_Gonzalez, audio1;]
/ validresponse = (0)
/ trialduration = 7000
</trial>

<openended getresponse1>
/ stimulusframes = [1-10=Joan_Gonzalez]
/ size = (50%, 10%)
/ position = (50%, 90%)
/ trialduration = 7000
</openended>



<picture JoanGonzalez>
/ items = ("Joan_Gonzalez.jpg")
/ erase = false
/ position = (50%, 30%)
/ size = (20%, 20%)
</picture>


<video audio1>
/ items = audioitems1
/ playthrough = true
/select= list.audio1list.nextvalue
</video>


<list audio1list>
/ items = (1, list.audio1random.nextvalue, list.audio1random.nextvalue, list.audio1random.nextvalue, list.audio1random.nextvalue,
  list.audio1random.nextvalue, list.audio1random.nextvalue, list.audio1random.nextvalue, list.audio1random.nextvalue, list.audio1random.nextvalue)
/ selectionmode = sequence
</list>

<list audio1random>
/ items = (2,3,4,5,6,7,8,9,10)
/ selectionmode = random
/ replace = false
</list>



<item audioitems1>
/ 1 = "Joan Gonzalez001 (online-audio-converter.com).mp3"
/ 2 = "Joan Gonzalez 002 (online-audio-converter.com).mp3"
/ 3 = "Joan Gonzalez 3 (online-audio-converter.com).mp3"
/ 4 = "Joan Gonzalez 004 (online-audio-converter.com).mp3"
/ 5 = "Joan Gonzalez 005 (online-audio-converter.com).mp3"
/ 6 = "Joan Gonzalez 006 (online-audio-converter.com).mp3"
/ 7 = "Joan Gonzalez 007 (online-audio-converter.com).mp3"
/ 8 = "Joan Gonzalez 008 (online-audio-converter.com).mp3"
/ 9 = "Joan Gonzalez 009 (online-audio-converter.com).mp3"
/10 = "Joan Gonzalez 010 (online-audio-converter.com).mp3"
</item>


<Slider Difficulty>
/ caption = "How difficult was it for you to follow the most recent instructions about what you were supposed to do when you were learning about the last person? "
/ labels = ("Not at all difficult", "Very difficult")
/ range = (1,100)
/ increment = 1
/ defaultresponse = "50"
</slider>

<checkboxes StrategiesA>
/ caption = "Which of the following strategies did you use whilst hearing about the last person?"
/ required = false
/ options = (
"Repeated what they said back to myself",
"Imagined seeing them in reference to what they said ",
)
/ other = "Something else"
</checkboxes>




<surveypage StrategiesA>
/ questions = [1 = Difficulty; 2 = StrategiesA]
/ showpagenumbers = false
</surveypage>

                                     
                    
<block Olivia_Wilson>
/ preinstructions = (page.Rehearsal, page.Observer)
/ trials = [1-10=sequence(playaudio2, getresponse2); 11=surveypage.StrategiesA]
/select = noreplace
</block>

<trial playaudio2>
/ stimulusframes = [1=Olivia_Wilson, audio2;]
/ validresponse = (0)
/ trialduration = 7000
</trial>

<openended getresponse2>
/ stimulusframes = [1=Olivia_Wilson]
/ size = (50%, 10%)
/ position = (50%, 90%)
</openended>



<picture Olivia_Wilson>
/ items = ("Olivia_Wilson.jpg")
/ erase = false
/ position = (50%, 30%)
/ size = (40%, 40%)
</picture>


<video audio2>
/ items = audioitems2
/ playthrough = true
/select= list.audio2list.nextvalue
</video>


<list audio2list>
/ items = (1, list.audio2random.nextvalue, list.audio2random.nextvalue, list.audio2random.nextvalue, list.audio2random.nextvalue,
  list.audio2random.nextvalue, list.audio2random.nextvalue, list.audio2random.nextvalue, list.audio2random.nextvalue, list.audio2random.nextvalue)
/ selectionmode = sequence
</list>

<list audio2random>
/ items = (2,3,4,5,6,7,8,9,10)
/ selectionmode = random
/ replace = false
</list>


<item audioitems2>
/ 1 = "OliviaWilson001 (online-audio-converter.com).mp3"
/ 2 = "OliviaWilson002 (online-audio-converter.com).mp3"
/ 3 = "OliviaWilson003 (online-audio-converter.com).mp3"
/ 4 = "OliviaWilson004 (online-audio-converter.com).mp3"
/ 5 = "OliviaWilson 005 (online-audio-converter.com).mp3"
/ 6 = "OliviaWilson006 (online-audio-converter.com).mp3"
/ 7 = "OliviaWilson007 (online-audio-converter.com).mp3"
/ 8 = "OliviaWilson008 (online-audio-converter.com).mp3"
/ 9 = "OliviaWilson009 (online-audio-converter.com).mp3"
/10 = "OliviaWilson010 (online-audio-converter.com).mp3"
</item>



<expt Test>

/ blocks = [

1-2 = noreplace(

Olivia_Wilson,

Joan_Gonzalez,

)

]

</expt>



Okay, that is much clearer. The easiest way, then, is to put the two types of instructions into their own blocks, and then simply randomize the occurence of those two blocks before the Olivia_Wilson and Joan_Gonzalez blocks.

In short:

<block observerInstruction>
/ postinstructions = (page.oberserver)
/ trials = [1=instruction] //running a trial with 0 duration so we get a record of the block in the data file
</block>

<block rehearsalInstruction>
/ postinstructions = (page.rehearsal)
/ trials = [1=instruction] //running a trial with 0 duration so we get a record of the block in the data file
</block>

<trial instruction>
/ trialduration = 0
/ validresponse = (0)
</trial>

<block Joan_Gonzalez>
/ trials = [1-10= sequence(playaudio1, getresponse1); 11= surveypage.StrategiesA]
</block>

<block Olivia_Wilson>
/ trials = [1-10=sequence(playaudio2, getresponse2); 11=surveypage.StrategiesA]
</block>

<expt Test>
/ blocks = [1,3 = noreplace(observerInstruction, rehearsalInstruction); 2,4 = noreplace(Olivia_Wilson, Joan_Gonzalez)]
</expt>