Millisecond Forums

Random background stimuli

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

By matt_bic - 3/21/2020

Hi all!
I'm struggling to create a study in which subjects are asked to rate a series of faces on a Likert scale while in the background is played a sequence of random sounds. Specifically, I don't understand how to create a pool from which randomly picking out one sound per time until the end of the block. I don't want to set any limit to the sampling of sounds, just to be sure that the subject listens continuously to a random series until he rates all the faces of the list.
Has anyone ever tried to create something like this?

Here's my code:

######items##############################################################

<item pictureitems>
/ 1 = "c0_p1_t2.jpg"
/ 2 = "c0_p1_t-2.jpg"
/ 3 = "c0_p1_t3.jpg"
/ 4 = "c0_p1_t-3.jpg"
/ 5 = "c0_p2_t2.jpg"
/ 6 = "c0_p2_t-2.jpg"
/ 7 = "c0_p2_t3.jpg"
/ 8 = "c0_p2_t-3.jpg"
/ 9 = "c0_p3_t2.jpg"
/ 10 = "c0_p3_t-2.jpg"
/ 11 = "c0_p3_t3.jpg"
/ 12 = "c0_p3_t-3.jpg"
/ 13 = "c0_p4_t2.jpg"
/ 14 = "c0_p4_t-2.jpg"
/ 15 = "c0_p4_t3.jpg"
/ 16 = "c0_p4_t-3.jpg"
/ 17 = "c0_p5_t2.jpg"
/ 18 = "c0_p5_t-2.jpg"
/ 19 = "c0_p5_t3.jpg"
/ 20 = "c0_p5_t-3.jpg"
/ 21 = "c0_p6_t2.jpg"
/ 22 = "c0_p6_t-2.jpg"
/ 23 = "c0_p6_t3.jpg"
/ 24 = "c0_p6_t-3.jpg"
</item>

<item soundsitems_threat>
/1 = "threat1.mp3"
/2 = "threat2.mp3"
/3 = "threat3.mp3"
</item>

<item soundsitems_neutral>
/1 = "neutral1.mp3"
/2 = "neutral2.mp3"
/3 = "neutral3.mp3"
</item>

<item soundsitems_negative>
/1 = "negativw1.mp3"
/2 = "negative2.mp3"
/3 = "negative3.mp3"
</item>

#video and picture elements###############################################

<picture faces>
/ items = pictureitems
/ position = (50, 40)
</picture>

<video sounds_threat>
/ erase = false
/ items = soundsitems_threat
/ playthrough = true
/ selectionrate = block
/ resetinterval = 0
/ size = (2,2)
/ position = (1,1)
/ select = noreplace
</video>

<video sounds_neutral>
/ erase = false
/ items = soundsitems_neutral
/ playthrough = true
/ selectionrate = block
/ resetinterval = 0
/ size = (2,2)
/ position = (1,1)
/ select = noreplace
</video>

<video sounds_negative>
/ erase = false
/ items = soundsitems_negative
/ playthrough = true
/ selectionrate = block
/ resetinterval = 0
/ size = (2,2)
/ position = (1,1)
/ select = noreplace
</video>

###########################trials########################################

<likert face_rate>
/ stimulusframes = [1=faces]
/ position = (50, 80)
/ anchorwidth = (10%)
/ anchors = [1 = "DISONESTO"; 4 = "Né DISONESTO Né ONESTO"; 7 = "ONESTO"]
/ buttonvalues = [1="-3", 2="-2", 3="-1", 4="0", 5="1", 6="2", 7="3"]
/ numpoints = 7
</likert>

################blocks######################################################
<block threat>
/ trials = [1 - 24 = noreplace(face_rate)]
/ preinstructions = (instruction)
/ postinstructions = (post)
/ bgstim = (sounds_threat)
</block>

<block neutral>
/ trials = [1 - 24 = noreplace(face_rate)]
/ preinstructions = (instruction)
/ postinstructions = (post)
/ bgstim = (sounds_neutral)
</block>

<block negative>
/ trials = [1 - 24 = noreplace(face_rate)]
/ preinstructions = (instruction)
/ postinstructions = (post)
/ bgstim = (sounds_negative)
</block>

################experiment##################################################

<expt face_sounds>
/ blocks = [ 1-3 = noreplace(negative, threat, neutral); 4= Demographic]
/ preinstructions = (intro_1, intro_2)
/ postinstructions = (end)
</expt>

By Dave - 3/23/2020

Matteo Masi - 3/21/2020
Hi all!
I'm struggling to create a study in which subjects are asked to rate a series of faces on a Likert scale while in the background is played a sequence of random sounds. Specifically, I don't understand how to create a pool from which randomly picking out one sound per time until the end of the block. I don't want to set any limit to the sampling of sounds, just to be sure that the subject listens continuously to a random series until he rates all the faces of the list.
Has anyone ever tried to create something like this?

Here's my code:

######items##############################################################

<item pictureitems>
/ 1 = "c0_p1_t2.jpg"
/ 2 = "c0_p1_t-2.jpg"
/ 3 = "c0_p1_t3.jpg"
/ 4 = "c0_p1_t-3.jpg"
/ 5 = "c0_p2_t2.jpg"
/ 6 = "c0_p2_t-2.jpg"
/ 7 = "c0_p2_t3.jpg"
/ 8 = "c0_p2_t-3.jpg"
/ 9 = "c0_p3_t2.jpg"
/ 10 = "c0_p3_t-2.jpg"
/ 11 = "c0_p3_t3.jpg"
/ 12 = "c0_p3_t-3.jpg"
/ 13 = "c0_p4_t2.jpg"
/ 14 = "c0_p4_t-2.jpg"
/ 15 = "c0_p4_t3.jpg"
/ 16 = "c0_p4_t-3.jpg"
/ 17 = "c0_p5_t2.jpg"
/ 18 = "c0_p5_t-2.jpg"
/ 19 = "c0_p5_t3.jpg"
/ 20 = "c0_p5_t-3.jpg"
/ 21 = "c0_p6_t2.jpg"
/ 22 = "c0_p6_t-2.jpg"
/ 23 = "c0_p6_t3.jpg"
/ 24 = "c0_p6_t-3.jpg"
</item>

<item soundsitems_threat>
/1 = "threat1.mp3"
/2 = "threat2.mp3"
/3 = "threat3.mp3"
</item>

<item soundsitems_neutral>
/1 = "neutral1.mp3"
/2 = "neutral2.mp3"
/3 = "neutral3.mp3"
</item>

<item soundsitems_negative>
/1 = "negativw1.mp3"
/2 = "negative2.mp3"
/3 = "negative3.mp3"
</item>

#video and picture elements###############################################

<picture faces>
/ items = pictureitems
/ position = (50, 40)
</picture>

<video sounds_threat>
/ erase = false
/ items = soundsitems_threat
/ playthrough = true
/ selectionrate = block
/ resetinterval = 0
/ size = (2,2)
/ position = (1,1)
/ select = noreplace
</video>

<video sounds_neutral>
/ erase = false
/ items = soundsitems_neutral
/ playthrough = true
/ selectionrate = block
/ resetinterval = 0
/ size = (2,2)
/ position = (1,1)
/ select = noreplace
</video>

<video sounds_negative>
/ erase = false
/ items = soundsitems_negative
/ playthrough = true
/ selectionrate = block
/ resetinterval = 0
/ size = (2,2)
/ position = (1,1)
/ select = noreplace
</video>

###########################trials########################################

<likert face_rate>
/ stimulusframes = [1=faces]
/ position = (50, 80)
/ anchorwidth = (10%)
/ anchors = [1 = "DISONESTO"; 4 = "Né DISONESTO Né ONESTO"; 7 = "ONESTO"]
/ buttonvalues = [1="-3", 2="-2", 3="-1", 4="0", 5="1", 6="2", 7="3"]
/ numpoints = 7
</likert>

################blocks######################################################
<block threat>
/ trials = [1 - 24 = noreplace(face_rate)]
/ preinstructions = (instruction)
/ postinstructions = (post)
/ bgstim = (sounds_threat)
</block>

<block neutral>
/ trials = [1 - 24 = noreplace(face_rate)]
/ preinstructions = (instruction)
/ postinstructions = (post)
/ bgstim = (sounds_neutral)
</block>

<block negative>
/ trials = [1 - 24 = noreplace(face_rate)]
/ preinstructions = (instruction)
/ postinstructions = (post)
/ bgstim = (sounds_negative)
</block>

################experiment##################################################

<expt face_sounds>
/ blocks = [ 1-3 = noreplace(negative, threat, neutral); 4= Demographic]
/ preinstructions = (intro_1, intro_2)
/ postinstructions = (end)
</expt>


This can't be done with /bgstim, /bgstim will pick and play one sound item during a given block, it can't be used to play a series of items during the block.
By matt_bic - 3/23/2020

Dave - 3/23/2020
Matteo Masi - 3/21/2020
Hi all!
I'm struggling to create a study in which subjects are asked to rate a series of faces on a Likert scale while in the background is played a sequence of random sounds. Specifically, I don't understand how to create a pool from which randomly picking out one sound per time until the end of the block. I don't want to set any limit to the sampling of sounds, just to be sure that the subject listens continuously to a random series until he rates all the faces of the list.
Has anyone ever tried to create something like this?

Here's my code:

######items##############################################################

<item pictureitems>
/ 1 = "c0_p1_t2.jpg"
/ 2 = "c0_p1_t-2.jpg"
/ 3 = "c0_p1_t3.jpg"
/ 4 = "c0_p1_t-3.jpg"
/ 5 = "c0_p2_t2.jpg"
/ 6 = "c0_p2_t-2.jpg"
/ 7 = "c0_p2_t3.jpg"
/ 8 = "c0_p2_t-3.jpg"
/ 9 = "c0_p3_t2.jpg"
/ 10 = "c0_p3_t-2.jpg"
/ 11 = "c0_p3_t3.jpg"
/ 12 = "c0_p3_t-3.jpg"
/ 13 = "c0_p4_t2.jpg"
/ 14 = "c0_p4_t-2.jpg"
/ 15 = "c0_p4_t3.jpg"
/ 16 = "c0_p4_t-3.jpg"
/ 17 = "c0_p5_t2.jpg"
/ 18 = "c0_p5_t-2.jpg"
/ 19 = "c0_p5_t3.jpg"
/ 20 = "c0_p5_t-3.jpg"
/ 21 = "c0_p6_t2.jpg"
/ 22 = "c0_p6_t-2.jpg"
/ 23 = "c0_p6_t3.jpg"
/ 24 = "c0_p6_t-3.jpg"
</item>

<item soundsitems_threat>
/1 = "threat1.mp3"
/2 = "threat2.mp3"
/3 = "threat3.mp3"
</item>

<item soundsitems_neutral>
/1 = "neutral1.mp3"
/2 = "neutral2.mp3"
/3 = "neutral3.mp3"
</item>

<item soundsitems_negative>
/1 = "negativw1.mp3"
/2 = "negative2.mp3"
/3 = "negative3.mp3"
</item>

#video and picture elements###############################################

<picture faces>
/ items = pictureitems
/ position = (50, 40)
</picture>

<video sounds_threat>
/ erase = false
/ items = soundsitems_threat
/ playthrough = true
/ selectionrate = block
/ resetinterval = 0
/ size = (2,2)
/ position = (1,1)
/ select = noreplace
</video>

<video sounds_neutral>
/ erase = false
/ items = soundsitems_neutral
/ playthrough = true
/ selectionrate = block
/ resetinterval = 0
/ size = (2,2)
/ position = (1,1)
/ select = noreplace
</video>

<video sounds_negative>
/ erase = false
/ items = soundsitems_negative
/ playthrough = true
/ selectionrate = block
/ resetinterval = 0
/ size = (2,2)
/ position = (1,1)
/ select = noreplace
</video>

###########################trials########################################

<likert face_rate>
/ stimulusframes = [1=faces]
/ position = (50, 80)
/ anchorwidth = (10%)
/ anchors = [1 = "DISONESTO"; 4 = "Né DISONESTO Né ONESTO"; 7 = "ONESTO"]
/ buttonvalues = [1="-3", 2="-2", 3="-1", 4="0", 5="1", 6="2", 7="3"]
/ numpoints = 7
</likert>

################blocks######################################################
<block threat>
/ trials = [1 - 24 = noreplace(face_rate)]
/ preinstructions = (instruction)
/ postinstructions = (post)
/ bgstim = (sounds_threat)
</block>

<block neutral>
/ trials = [1 - 24 = noreplace(face_rate)]
/ preinstructions = (instruction)
/ postinstructions = (post)
/ bgstim = (sounds_neutral)
</block>

<block negative>
/ trials = [1 - 24 = noreplace(face_rate)]
/ preinstructions = (instruction)
/ postinstructions = (post)
/ bgstim = (sounds_negative)
</block>

################experiment##################################################

<expt face_sounds>
/ blocks = [ 1-3 = noreplace(negative, threat, neutral); 4= Demographic]
/ preinstructions = (intro_1, intro_2)
/ postinstructions = (end)
</expt>


This can't be done with /bgstim, /bgstim will pick and play one sound item during a given block, it can't be used to play a series of items during the block.

Thanks Dave,
I'll find an alternative solution. 

Matteo
By Dave - 3/23/2020

Matteo Masi - 3/23/2020

Thanks Dave,
I'll find an alternative solution. 

Matteo

If you're having trouble finding a workable solution, let me know. I might have a couple of ideas. (It would be great if you could attach the full script and files -- mp3s and images -- in that case; you can do so by zipping them up and then uploading the ZIP archive via +Insert -> Add File).
By matt_bic - 3/23/2020

Dave - 3/23/2020
Matteo Masi - 3/23/2020

Thanks Dave,
I'll find an alternative solution. 

Matteo

If you're having trouble finding a workable solution, let me know. I might have a couple of ideas. (It would be great if you could attach the full script and files -- mp3s and images -- in that case; you can do so by zipping them up and then uploading the ZIP archive via +Insert -> Add File).

Thanks a lot, I really can't figure it out. I'm attaching the .zip archive. If you ever need anything else let me know. 
Matteo
By Dave - 3/23/2020

Matteo Masi - 3/23/2020
Dave - 3/23/2020
Matteo Masi - 3/23/2020

Thanks Dave,
I'll find an alternative solution. 

Matteo

If you're having trouble finding a workable solution, let me know. I might have a couple of ideas. (It would be great if you could attach the full script and files -- mp3s and images -- in that case; you can do so by zipping them up and then uploading the ZIP archive via +Insert -> Add File).

Thanks a lot, I really can't figure it out. I'm attaching the .zip archive. If you ever need anything else let me know. 
Matteo

The attached approach is the best / closest thing I can come up with.
By matt_bic - 3/23/2020

Dave - 3/23/2020
Matteo Masi - 3/23/2020
Dave - 3/23/2020
Matteo Masi - 3/23/2020

Thanks Dave,
I'll find an alternative solution. 

Matteo

If you're having trouble finding a workable solution, let me know. I might have a couple of ideas. (It would be great if you could attach the full script and files -- mp3s and images -- in that case; you can do so by zipping them up and then uploading the ZIP archive via +Insert -> Add File).

Thanks a lot, I really can't figure it out. I'm attaching the .zip archive. If you ever need anything else let me know. 
Matteo

The attached approach is the best / closest thing I can come up with.

Thank you, Dave!
that's amazing! I've runned it and seemed to work pretty well. Great. 

Matteo