Recording which BGSTIM plays


Author
Message
maya_mcg
maya_mcg
New Member (39 reputation)New Member (39 reputation)New Member (39 reputation)New Member (39 reputation)New Member (39 reputation)New Member (39 reputation)New Member (39 reputation)New Member (39 reputation)New Member (39 reputation)
Group: Forum Members
Posts: 12, Visits: 54
I have a list of sound items, which have different numbers play amidst the sound. During my block, my background stimuli is set to play a random soundclip from the file. I need to know which sound clip is played, so that I can record whether the participant gets the right numer on our control question. Does anyone know how I can record this data? 
My code is as follows:

<item soundclips_with_numbers>
/ 1 = "1cat.m4a"
/ 2 = "1chalk.m4a"
/ 3 = "1scream.m4a"
/ 4 = "2cat.m4a"
/ 5 = "2chalk.m4a"
/ 6 = "2scream.m4a"
/ 7 = "3cat.m4a"
/ 8 = "3chalk.m4a"
/ 9 = "3scream.m4a"
</item>
.... and so on (they continue until 10) 

<sound soundclips_with_numbers>
/ items = soundclips_with_numbers
/ select = replace
/ volume = 0
/ erase = false
</sound>

<block waldo_with_numbers>
/ onblockbegin = [
    values.attempts_left = 3;
    values.circle_x = -10%;
    values.circle_y = -10%;
]
/ timeout = 7000
/ trials = [
    1=clip_first;
]
/ bgstim = (sound.soundclips_with_numbers)
</block>

Dave
Dave
Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)
Group: Administrators
Posts: 11K, Visits: 67K
maya_mcg - 3/27/2021
I have a list of sound items, which have different numbers play amidst the sound. During my block, my background stimuli is set to play a random soundclip from the file. I need to know which sound clip is played, so that I can record whether the participant gets the right numer on our control question. Does anyone know how I can record this data? 
My code is as follows:

<item soundclips_with_numbers>
/ 1 = "1cat.m4a"
/ 2 = "1chalk.m4a"
/ 3 = "1scream.m4a"
/ 4 = "2cat.m4a"
/ 5 = "2chalk.m4a"
/ 6 = "2scream.m4a"
/ 7 = "3cat.m4a"
/ 8 = "3chalk.m4a"
/ 9 = "3scream.m4a"
</item>
.... and so on (they continue until 10) 

<sound soundclips_with_numbers>
/ items = soundclips_with_numbers
/ select = replace
/ volume = 0
/ erase = false
</sound>

<block waldo_with_numbers>
/ onblockbegin = [
    values.attempts_left = 3;
    values.circle_x = -10%;
    values.circle_y = -10%;
]
/ timeout = 7000
/ trials = [
    1=clip_first;
]
/ bgstim = (sound.soundclips_with_numbers)
</block>

You should be able to log the sound's currentitem property.


maya_mcg
maya_mcg
New Member (39 reputation)New Member (39 reputation)New Member (39 reputation)New Member (39 reputation)New Member (39 reputation)New Member (39 reputation)New Member (39 reputation)New Member (39 reputation)New Member (39 reputation)
Group: Forum Members
Posts: 12, Visits: 54
Dave - 3/29/2021
maya_mcg - 3/27/2021
I have a list of sound items, which have different numbers play amidst the sound. During my block, my background stimuli is set to play a random soundclip from the file. I need to know which sound clip is played, so that I can record whether the participant gets the right numer on our control question. Does anyone know how I can record this data? 
My code is as follows:

<item soundclips_with_numbers>
/ 1 = "1cat.m4a"
/ 2 = "1chalk.m4a"
/ 3 = "1scream.m4a"
/ 4 = "2cat.m4a"
/ 5 = "2chalk.m4a"
/ 6 = "2scream.m4a"
/ 7 = "3cat.m4a"
/ 8 = "3chalk.m4a"
/ 9 = "3scream.m4a"
</item>
.... and so on (they continue until 10) 

<sound soundclips_with_numbers>
/ items = soundclips_with_numbers
/ select = replace
/ volume = 0
/ erase = false
</sound>

<block waldo_with_numbers>
/ onblockbegin = [
    values.attempts_left = 3;
    values.circle_x = -10%;
    values.circle_y = -10%;
]
/ timeout = 7000
/ trials = [
    1=clip_first;
]
/ bgstim = (sound.soundclips_with_numbers)
</block>

You should be able to log the sound's currentitem property.

Thanks for the response!

I've added the current item property to the sound stimulus as pasted below.
I'm not sure how to see the currentitem information in the log when I run the experiment.
Could you let me know what else I am missing?

<sound soundclips_with_numbers>
/ items = soundclips_with_numbers
/ select = replace
/ volume = 0
/ erase = false
/ items = ("<%sound.soundclips_with_numbers.currentitem%>")
</sound>
Dave
Dave
Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)
Group: Administrators
Posts: 11K, Visits: 67K
maya_mcg - 3/30/2021
Dave - 3/29/2021
maya_mcg - 3/27/2021
I have a list of sound items, which have different numbers play amidst the sound. During my block, my background stimuli is set to play a random soundclip from the file. I need to know which sound clip is played, so that I can record whether the participant gets the right numer on our control question. Does anyone know how I can record this data? 
My code is as follows:

<item soundclips_with_numbers>
/ 1 = "1cat.m4a"
/ 2 = "1chalk.m4a"
/ 3 = "1scream.m4a"
/ 4 = "2cat.m4a"
/ 5 = "2chalk.m4a"
/ 6 = "2scream.m4a"
/ 7 = "3cat.m4a"
/ 8 = "3chalk.m4a"
/ 9 = "3scream.m4a"
</item>
.... and so on (they continue until 10) 

<sound soundclips_with_numbers>
/ items = soundclips_with_numbers
/ select = replace
/ volume = 0
/ erase = false
</sound>

<block waldo_with_numbers>
/ onblockbegin = [
    values.attempts_left = 3;
    values.circle_x = -10%;
    values.circle_y = -10%;
]
/ timeout = 7000
/ trials = [
    1=clip_first;
]
/ bgstim = (sound.soundclips_with_numbers)
</block>

You should be able to log the sound's currentitem property.

Thanks for the response!

I've added the current item property to the sound stimulus as pasted below.
I'm not sure how to see the currentitem information in the log when I run the experiment.
Could you let me know what else I am missing?

<sound soundclips_with_numbers>
/ items = soundclips_with_numbers
/ select = replace
/ volume = 0
/ erase = false
/ items = ("<%sound.soundclips_with_numbers.currentitem%>")
</sound>

You'll want to log the currentitem property to the data file, not in some way add it to the sound element.

Set up a <data> element in your script if you haven't already, define all the things you want logged in its /columns. That is where the relevant currentitem property ought to go.
Dave
Dave
Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)
Group: Administrators
Posts: 11K, Visits: 67K
Dave - 3/30/2021
maya_mcg - 3/30/2021
Dave - 3/29/2021
maya_mcg - 3/27/2021
I have a list of sound items, which have different numbers play amidst the sound. During my block, my background stimuli is set to play a random soundclip from the file. I need to know which sound clip is played, so that I can record whether the participant gets the right numer on our control question. Does anyone know how I can record this data? 
My code is as follows:

<item soundclips_with_numbers>
/ 1 = "1cat.m4a"
/ 2 = "1chalk.m4a"
/ 3 = "1scream.m4a"
/ 4 = "2cat.m4a"
/ 5 = "2chalk.m4a"
/ 6 = "2scream.m4a"
/ 7 = "3cat.m4a"
/ 8 = "3chalk.m4a"
/ 9 = "3scream.m4a"
</item>
.... and so on (they continue until 10) 

<sound soundclips_with_numbers>
/ items = soundclips_with_numbers
/ select = replace
/ volume = 0
/ erase = false
</sound>

<block waldo_with_numbers>
/ onblockbegin = [
    values.attempts_left = 3;
    values.circle_x = -10%;
    values.circle_y = -10%;
]
/ timeout = 7000
/ trials = [
    1=clip_first;
]
/ bgstim = (sound.soundclips_with_numbers)
</block>

You should be able to log the sound's currentitem property.

Thanks for the response!

I've added the current item property to the sound stimulus as pasted below.
I'm not sure how to see the currentitem information in the log when I run the experiment.
Could you let me know what else I am missing?

<sound soundclips_with_numbers>
/ items = soundclips_with_numbers
/ select = replace
/ volume = 0
/ erase = false
/ items = ("<%sound.soundclips_with_numbers.currentitem%>")
</sound>

You'll want to log the currentitem property to the data file, not in some way add it to the sound element.

Set up a <data> element in your script if you haven't already, define all the things you want logged in its /columns. That is where the relevant currentitem property ought to go.

Here's a basic example, works the same way with <sound> instead of <text> as /bgstim:

<expt>
/ blocks = [1-3=exampleblock]
</expt>

<block exampleblock>
/ preinstructions = (info)
/ bgstim = (examplebgstim)
/ trials = [1-4 = exampletrial]
</block>

<page info>
^new block starts now
</page>

<trial exampletrial>
/ pretrialpause = 500
/ stimulusframes = [1=exampletext]
/ validresponse = (57)
</trial>

<text exampletext>
/ items = ("Press SPACE")
</text>

<text examplebgstim>
/ items = exampleitems
/ select = replace
/ position = (50%, 5%)
</text>

<item exampleitems>
/ 1 = "1cat.m4a"
/ 2 = "1chalk.m4a"
/ 3 = "1scream.m4a"
/ 4 = "2cat.m4a"
/ 5 = "2chalk.m4a"
/ 6 = "2scream.m4a"
/ 7 = "3cat.m4a"
/ 8 = "3chalk.m4a"
/ 9 = "3scream.m4a"
</item>

<data>
/ columns = (date time subject group session blocknum blockcode trialnum trialcode response latency correct stimulusitem text.examplebgstim.currentitem)
/ separatefiles = true
</data>

maya_mcg
maya_mcg
New Member (39 reputation)New Member (39 reputation)New Member (39 reputation)New Member (39 reputation)New Member (39 reputation)New Member (39 reputation)New Member (39 reputation)New Member (39 reputation)New Member (39 reputation)
Group: Forum Members
Posts: 12, Visits: 54
Dave - 3/30/2021
Dave - 3/30/2021
maya_mcg - 3/30/2021
Dave - 3/29/2021
maya_mcg - 3/27/2021
I have a list of sound items, which have different numbers play amidst the sound. During my block, my background stimuli is set to play a random soundclip from the file. I need to know which sound clip is played, so that I can record whether the participant gets the right numer on our control question. Does anyone know how I can record this data? 
My code is as follows:

<item soundclips_with_numbers>
/ 1 = "1cat.m4a"
/ 2 = "1chalk.m4a"
/ 3 = "1scream.m4a"
/ 4 = "2cat.m4a"
/ 5 = "2chalk.m4a"
/ 6 = "2scream.m4a"
/ 7 = "3cat.m4a"
/ 8 = "3chalk.m4a"
/ 9 = "3scream.m4a"
</item>
.... and so on (they continue until 10) 

<sound soundclips_with_numbers>
/ items = soundclips_with_numbers
/ select = replace
/ volume = 0
/ erase = false
</sound>

<block waldo_with_numbers>
/ onblockbegin = [
    values.attempts_left = 3;
    values.circle_x = -10%;
    values.circle_y = -10%;
]
/ timeout = 7000
/ trials = [
    1=clip_first;
]
/ bgstim = (sound.soundclips_with_numbers)
</block>

You should be able to log the sound's currentitem property.

Thanks for the response!

I've added the current item property to the sound stimulus as pasted below.
I'm not sure how to see the currentitem information in the log when I run the experiment.
Could you let me know what else I am missing?

<sound soundclips_with_numbers>
/ items = soundclips_with_numbers
/ select = replace
/ volume = 0
/ erase = false
/ items = ("<%sound.soundclips_with_numbers.currentitem%>")
</sound>

You'll want to log the currentitem property to the data file, not in some way add it to the sound element.

Set up a <data> element in your script if you haven't already, define all the things you want logged in its /columns. That is where the relevant currentitem property ought to go.

Here's a basic example, works the same way with <sound> instead of <text> as /bgstim:

<expt>
/ blocks = [1-3=exampleblock]
</expt>

<block exampleblock>
/ preinstructions = (info)
/ bgstim = (examplebgstim)
/ trials = [1-4 = exampletrial]
</block>

<page info>
^new block starts now
</page>

<trial exampletrial>
/ pretrialpause = 500
/ stimulusframes = [1=exampletext]
/ validresponse = (57)
</trial>

<text exampletext>
/ items = ("Press SPACE")
</text>

<text examplebgstim>
/ items = exampleitems
/ select = replace
/ position = (50%, 5%)
</text>

<item exampleitems>
/ 1 = "1cat.m4a"
/ 2 = "1chalk.m4a"
/ 3 = "1scream.m4a"
/ 4 = "2cat.m4a"
/ 5 = "2chalk.m4a"
/ 6 = "2scream.m4a"
/ 7 = "3cat.m4a"
/ 8 = "3chalk.m4a"
/ 9 = "3scream.m4a"
</item>

<data>
/ columns = (date time subject group session blocknum blockcode trialnum trialcode response latency correct stimulusitem text.examplebgstim.currentitem)
/ separatefiles = true
</data>
Great that worked perfectly. Thanks!

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search