Millisecond Forums

How to control when recording starts when using "input device = voicerecord"

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

By Musashi Jason - 5/13/2018

Hello,

I'm slowly plugging away with my familiarization with Inquist 5 but the process includes quite a few false starts. :-/

I am using voicerecord and want to record responses ater presenting two stimuli (first an image (led and followed by masks), and then an audio stimuli)....after which I want voicerecord to record the subject's response utterance. Currently it seems that voicecrecord begins immediately after the first mask (or image) as I can hear the audio stimulus being recorded...from headphones (I guess it's quiet enough to not be sensed as I have the voicekeythreshold at 15....or should that be voicerecordthreshold...?

Here is the stimulus line...maybe my error will be obvious here...?

/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = voicerecord
/ validresponse = (anyresponse)

Regards

Jason
By Dave - 5/14/2018

Musashi Jason - Sunday, May 13, 2018
Hello,

I'm slowly plugging away with my familiarization with Inquist 5 but the process includes quite a few false starts. :-/

I am using voicerecord and want to record responses ater presenting two stimuli (first an image (led and followed by masks), and then an audio stimuli)....after which I want voicerecord to record the subject's response utterance. Currently it seems that voicecrecord begins immediately after the first mask (or image) as I can hear the audio stimulus being recorded...from headphones (I guess it's quiet enough to not be sensed as I have the voicekeythreshold at 15....or should that be voicerecordthreshold...?

Here is the stimulus line...maybe my error will be obvious here...?

/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = voicerecord
/ validresponse = (anyresponse)

Regards

Jason

Use the <trial>'s /beginresponsetime attribute to specify when it should start accepting responses (here: recording audio). You may also want to set the /responseinterrupt mode to frames such as not to terminate the stimulus presentaation sequence once a response is first registered.
By Musashi Jason - 5/14/2018

Dave - Monday, May 14, 2018
Musashi Jason - Sunday, May 13, 2018
Hello,

I'm slowly plugging away with my familiarization with Inquist 5 but the process includes quite a few false starts. :-/

I am using voicerecord and want to record responses ater presenting two stimuli (first an image (led and followed by masks), and then an audio stimuli)....after which I want voicerecord to record the subject's response utterance. Currently it seems that voicecrecord begins immediately after the first mask (or image) as I can hear the audio stimulus being recorded...from headphones (I guess it's quiet enough to not be sensed as I have the voicekeythreshold at 15....or should that be voicerecordthreshold...?

Here is the stimulus line...maybe my error will be obvious here...?

/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = voicerecord
/ validresponse = (anyresponse)

Regards

Jason

Use the <trial>'s /beginresponsetime attribute to specify when it should start accepting responses (here: recording audio). You may also want to set the /responseinterrupt mode to frames such as not to terminate the stimulus presentaation sequence once a response is first registered.

Dave,

Thanks, this gets me on the right track it seems but I think I'm missing someting with the responseinterrupt setting. Is there a way to specify a record time interval in order to make sure the subject's entire response is recorded? For example, I have an audio prompt using the word "snail". When the subject repeats the word "snail" the response is being detected at the beginning of the aspirated fricative 's' and then moves on to the next item without recording the entire response...'snail'. I'm guessing I need to add a timing setting...delay of some sort to my trial?

Regards

Jason
By Dave - 5/14/2018

Musashi Jason - Monday, May 14, 2018
Dave - Monday, May 14, 2018
Musashi Jason - Sunday, May 13, 2018
Hello,

I'm slowly plugging away with my familiarization with Inquist 5 but the process includes quite a few false starts. :-/

I am using voicerecord and want to record responses ater presenting two stimuli (first an image (led and followed by masks), and then an audio stimuli)....after which I want voicerecord to record the subject's response utterance. Currently it seems that voicecrecord begins immediately after the first mask (or image) as I can hear the audio stimulus being recorded...from headphones (I guess it's quiet enough to not be sensed as I have the voicekeythreshold at 15....or should that be voicerecordthreshold...?

Here is the stimulus line...maybe my error will be obvious here...?

/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = voicerecord
/ validresponse = (anyresponse)

Regards

Jason

Use the <trial>'s /beginresponsetime attribute to specify when it should start accepting responses (here: recording audio). You may also want to set the /responseinterrupt mode to frames such as not to terminate the stimulus presentaation sequence once a response is first registered.

Dave,

Thanks, this gets me on the right track it seems but I think I'm missing someting with the responseinterrupt setting. Is there a way to specify a record time interval in order to make sure the subject's entire response is recorded? For example, I have an audio prompt using the word "snail". When the subject repeats the word "snail" the response is being detected at the beginning of the aspirated fricative 's' and then moves on to the next item without recording the entire response...'snail'. I'm guessing I need to add a timing setting...delay of some sort to my trial?

Regards

Jason

Try setting up your trial along the following lines

<trial example>
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = voicerecord
/ validresponse = (anyresponse)
/ beginresponsetime = 1700 <-- not sure when you want to start recording, change as needed. 1700 would coincide with the display of correctoption/distractoroption
/ responseinterrupt = frames <-- makes sure any remaining stimuli are displayed / the stimulus presentation is not interrupted by the response
/ trialduration = 3000 <-- set to a long enough value, theoretically the entire time starting from the value specified in /beginresponsetime until the value specified in trialduration should be recorded, i.e. with the values specified here you should get a recording of ~1300 ms duration.
...
</trial>

By Musashi Jason - 5/14/2018

Dave - Monday, May 14, 2018
Musashi Jason - Monday, May 14, 2018
Dave - Monday, May 14, 2018
Musashi Jason - Sunday, May 13, 2018
Hello,

I'm slowly plugging away with my familiarization with Inquist 5 but the process includes quite a few false starts. :-/

I am using voicerecord and want to record responses ater presenting two stimuli (first an image (led and followed by masks), and then an audio stimuli)....after which I want voicerecord to record the subject's response utterance. Currently it seems that voicecrecord begins immediately after the first mask (or image) as I can hear the audio stimulus being recorded...from headphones (I guess it's quiet enough to not be sensed as I have the voicekeythreshold at 15....or should that be voicerecordthreshold...?

Here is the stimulus line...maybe my error will be obvious here...?

/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = voicerecord
/ validresponse = (anyresponse)

Regards

Jason

Use the <trial>'s /beginresponsetime attribute to specify when it should start accepting responses (here: recording audio). You may also want to set the /responseinterrupt mode to frames such as not to terminate the stimulus presentaation sequence once a response is first registered.

Dave,

Thanks, this gets me on the right track it seems but I think I'm missing someting with the responseinterrupt setting. Is there a way to specify a record time interval in order to make sure the subject's entire response is recorded? For example, I have an audio prompt using the word "snail". When the subject repeats the word "snail" the response is being detected at the beginning of the aspirated fricative 's' and then moves on to the next item without recording the entire response...'snail'. I'm guessing I need to add a timing setting...delay of some sort to my trial?

Regards

Jason

Try setting up your trial along the following lines

<trial example>
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = voicerecord
/ validresponse = (anyresponse)
/ beginresponsetime = 1700 <-- not sure when you want to start recording, change as needed. 1700 would coincide with the display of correctoption/distractoroption
/ responseinterrupt = frames <-- makes sure any remaining stimuli are displayed / the stimulus presentation is not interrupted by the response
/ trialduration = 3000 <-- set to a long enough value, theoretically the entire time starting from the value specified in /beginresponsetime until the value specified in trialduration should be recorded, i.e. with the values specified here you should get a recording of ~1300 ms duration.
...
</trial>


Dave,

Thank you for your continued support. For some reason, this doesn't seem to work. I mean adding the /trialduration setting. Doing so makes the trial now run automatically without waiting for a recording at all....what have I done wrong? I started with 3250 to give me 1 second for response time but thought maybe that was too short so I changed it to 4250 which should give me 2 seconds for response time, correct? I was operating under the understanding that the 2 seconds would not start until sound was detected (as that seemed to be how it was working prior to entering the trialduration setting) but it appears to simply run automatically without waiting for sound...is there a way to secure a specified amount of time for response time but have that time begin from when sound is detected? Or maybe I simply need to allocate more time for response time....but I'd like the trial not to proceed until the subject has responded....

<trial mytrial>
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = voicerecord
/ beginresponsetime = 2250
/ responseinterrupt = frames
/ trialduration = 4250
/ validresponse = (anyresponse)

Jason

By Dave - 5/14/2018

Musashi Jason - Monday, May 14, 2018
Dave - Monday, May 14, 2018
Musashi Jason - Monday, May 14, 2018
Dave - Monday, May 14, 2018
Musashi Jason - Sunday, May 13, 2018
Hello,

I'm slowly plugging away with my familiarization with Inquist 5 but the process includes quite a few false starts. :-/

I am using voicerecord and want to record responses ater presenting two stimuli (first an image (led and followed by masks), and then an audio stimuli)....after which I want voicerecord to record the subject's response utterance. Currently it seems that voicecrecord begins immediately after the first mask (or image) as I can hear the audio stimulus being recorded...from headphones (I guess it's quiet enough to not be sensed as I have the voicekeythreshold at 15....or should that be voicerecordthreshold...?

Here is the stimulus line...maybe my error will be obvious here...?

/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = voicerecord
/ validresponse = (anyresponse)

Regards

Jason

Use the <trial>'s /beginresponsetime attribute to specify when it should start accepting responses (here: recording audio). You may also want to set the /responseinterrupt mode to frames such as not to terminate the stimulus presentaation sequence once a response is first registered.

Dave,

Thanks, this gets me on the right track it seems but I think I'm missing someting with the responseinterrupt setting. Is there a way to specify a record time interval in order to make sure the subject's entire response is recorded? For example, I have an audio prompt using the word "snail". When the subject repeats the word "snail" the response is being detected at the beginning of the aspirated fricative 's' and then moves on to the next item without recording the entire response...'snail'. I'm guessing I need to add a timing setting...delay of some sort to my trial?

Regards

Jason

Try setting up your trial along the following lines

<trial example>
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = voicerecord
/ validresponse = (anyresponse)
/ beginresponsetime = 1700 <-- not sure when you want to start recording, change as needed. 1700 would coincide with the display of correctoption/distractoroption
/ responseinterrupt = frames <-- makes sure any remaining stimuli are displayed / the stimulus presentation is not interrupted by the response
/ trialduration = 3000 <-- set to a long enough value, theoretically the entire time starting from the value specified in /beginresponsetime until the value specified in trialduration should be recorded, i.e. with the values specified here you should get a recording of ~1300 ms duration.
...
</trial>


Dave,

Thank you for your continued support. For some reason, this doesn't seem to work. I mean adding the /trialduration setting. Doing so makes the trial now run automatically without waiting for a recording at all....what have I done wrong? I started with 3250 to give me 1 second for response time but thought maybe that was too short so I changed it to 4250 which should give me 2 seconds for response time, correct? I was operating under the understanding that the 2 seconds would not start until sound was detected (as that seemed to be how it was working prior to entering the trialduration setting) but it appears to simply run automatically without waiting for sound...is there a way to secure a specified amount of time for response time but have that time begin from when sound is detected? Or maybe I simply need to allocate more time for response time....but I'd like the trial not to proceed until the subject has responded....

<trial mytrial>
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = voicerecord
/ beginresponsetime = 2250
/ responseinterrupt = frames
/ trialduration = 4250
/ validresponse = (anyresponse)

Jason


> I was operating under the understanding that the 2 seconds would not start until sound was detected

No. /trialduration specifies a fixed duration for the trial. The trial will terminate after that time has elapsed, whether a response was given / completed or not.

Only other way I can see is to forego /inputdevice = voicerecord and use /soundcapture instead as in

<trial example>
...
/ soundcapture = true
/ inputdevice = keyboard
/ validresponse = (57)
</trial>

In this case, audio should be captured for the entire trial, i.e. a participant can say their piece and when they're done press the space bar to end the trial.
By Musashi Jason - 5/15/2018

Dave - Monday, May 14, 2018
Musashi Jason - Monday, May 14, 2018
Dave - Monday, May 14, 2018
Musashi Jason - Monday, May 14, 2018
Dave - Monday, May 14, 2018
Musashi Jason - Sunday, May 13, 2018
Hello,

I'm slowly plugging away with my familiarization with Inquist 5 but the process includes quite a few false starts. :-/

I am using voicerecord and want to record responses ater presenting two stimuli (first an image (led and followed by masks), and then an audio stimuli)....after which I want voicerecord to record the subject's response utterance. Currently it seems that voicecrecord begins immediately after the first mask (or image) as I can hear the audio stimulus being recorded...from headphones (I guess it's quiet enough to not be sensed as I have the voicekeythreshold at 15....or should that be voicerecordthreshold...?

Here is the stimulus line...maybe my error will be obvious here...?

/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = voicerecord
/ validresponse = (anyresponse)

Regards

Jason

Use the <trial>'s /beginresponsetime attribute to specify when it should start accepting responses (here: recording audio). You may also want to set the /responseinterrupt mode to frames such as not to terminate the stimulus presentaation sequence once a response is first registered.

Dave,

Thanks, this gets me on the right track it seems but I think I'm missing someting with the responseinterrupt setting. Is there a way to specify a record time interval in order to make sure the subject's entire response is recorded? For example, I have an audio prompt using the word "snail". When the subject repeats the word "snail" the response is being detected at the beginning of the aspirated fricative 's' and then moves on to the next item without recording the entire response...'snail'. I'm guessing I need to add a timing setting...delay of some sort to my trial?

Regards

Jason

Try setting up your trial along the following lines

<trial example>
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = voicerecord
/ validresponse = (anyresponse)
/ beginresponsetime = 1700 <-- not sure when you want to start recording, change as needed. 1700 would coincide with the display of correctoption/distractoroption
/ responseinterrupt = frames <-- makes sure any remaining stimuli are displayed / the stimulus presentation is not interrupted by the response
/ trialduration = 3000 <-- set to a long enough value, theoretically the entire time starting from the value specified in /beginresponsetime until the value specified in trialduration should be recorded, i.e. with the values specified here you should get a recording of ~1300 ms duration.
...
</trial>


Dave,

Thank you for your continued support. For some reason, this doesn't seem to work. I mean adding the /trialduration setting. Doing so makes the trial now run automatically without waiting for a recording at all....what have I done wrong? I started with 3250 to give me 1 second for response time but thought maybe that was too short so I changed it to 4250 which should give me 2 seconds for response time, correct? I was operating under the understanding that the 2 seconds would not start until sound was detected (as that seemed to be how it was working prior to entering the trialduration setting) but it appears to simply run automatically without waiting for sound...is there a way to secure a specified amount of time for response time but have that time begin from when sound is detected? Or maybe I simply need to allocate more time for response time....but I'd like the trial not to proceed until the subject has responded....

<trial mytrial>
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = voicerecord
/ beginresponsetime = 2250
/ responseinterrupt = frames
/ trialduration = 4250
/ validresponse = (anyresponse)

Jason


> I was operating under the understanding that the 2 seconds would not start until sound was detected

No. /trialduration specifies a fixed duration for the trial. The trial will terminate after that time has elapsed, whether a response was given / completed or not.

Only other way I can see is to forego /inputdevice = voicerecord and use /soundcapture instead as in

<trial example>
...
/ soundcapture = true
/ inputdevice = keyboard
/ validresponse = (57)
</trial>

In this case, audio should be captured for the entire trial, i.e. a participant can say their piece and when they're done press the space bar to end the trial.

Dave,

Thanks for your help here. I'm curious about the voicerecord setting...it seems that without the trialduration setting but with the beginresponsetime setting, Inquisit waits after the final stimulus, for an audio response. I like that behavior and would like to keep it if possible but...given that setting, am I able to retain data about the timing of the audio response (in addition to recording the actual response)? I mean, will Inquisit keep data about how quickly after the final stimulus a subject begins his/her utterance? And, I think this is back to my original inquiry, is there a way that I can get Inquist to record for a set amount of time after initial detection of audio? 

Regards

Jason
By Musashi Jason - 5/15/2018

Musashi Jason - Tuesday, May 15, 2018
Dave - Monday, May 14, 2018
Musashi Jason - Monday, May 14, 2018
Dave - Monday, May 14, 2018
Musashi Jason - Monday, May 14, 2018
Dave - Monday, May 14, 2018
Musashi Jason - Sunday, May 13, 2018
Hello,

I'm slowly plugging away with my familiarization with Inquist 5 but the process includes quite a few false starts. :-/

I am using voicerecord and want to record responses ater presenting two stimuli (first an image (led and followed by masks), and then an audio stimuli)....after which I want voicerecord to record the subject's response utterance. Currently it seems that voicecrecord begins immediately after the first mask (or image) as I can hear the audio stimulus being recorded...from headphones (I guess it's quiet enough to not be sensed as I have the voicekeythreshold at 15....or should that be voicerecordthreshold...?

Here is the stimulus line...maybe my error will be obvious here...?

/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = voicerecord
/ validresponse = (anyresponse)

Regards

Jason

Use the <trial>'s /beginresponsetime attribute to specify when it should start accepting responses (here: recording audio). You may also want to set the /responseinterrupt mode to frames such as not to terminate the stimulus presentaation sequence once a response is first registered.

Dave,

Thanks, this gets me on the right track it seems but I think I'm missing someting with the responseinterrupt setting. Is there a way to specify a record time interval in order to make sure the subject's entire response is recorded? For example, I have an audio prompt using the word "snail". When the subject repeats the word "snail" the response is being detected at the beginning of the aspirated fricative 's' and then moves on to the next item without recording the entire response...'snail'. I'm guessing I need to add a timing setting...delay of some sort to my trial?

Regards

Jason

Try setting up your trial along the following lines

<trial example>
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = voicerecord
/ validresponse = (anyresponse)
/ beginresponsetime = 1700 <-- not sure when you want to start recording, change as needed. 1700 would coincide with the display of correctoption/distractoroption
/ responseinterrupt = frames <-- makes sure any remaining stimuli are displayed / the stimulus presentation is not interrupted by the response
/ trialduration = 3000 <-- set to a long enough value, theoretically the entire time starting from the value specified in /beginresponsetime until the value specified in trialduration should be recorded, i.e. with the values specified here you should get a recording of ~1300 ms duration.
...
</trial>


Dave,

Thank you for your continued support. For some reason, this doesn't seem to work. I mean adding the /trialduration setting. Doing so makes the trial now run automatically without waiting for a recording at all....what have I done wrong? I started with 3250 to give me 1 second for response time but thought maybe that was too short so I changed it to 4250 which should give me 2 seconds for response time, correct? I was operating under the understanding that the 2 seconds would not start until sound was detected (as that seemed to be how it was working prior to entering the trialduration setting) but it appears to simply run automatically without waiting for sound...is there a way to secure a specified amount of time for response time but have that time begin from when sound is detected? Or maybe I simply need to allocate more time for response time....but I'd like the trial not to proceed until the subject has responded....

<trial mytrial>
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = voicerecord
/ beginresponsetime = 2250
/ responseinterrupt = frames
/ trialduration = 4250
/ validresponse = (anyresponse)

Jason


> I was operating under the understanding that the 2 seconds would not start until sound was detected

No. /trialduration specifies a fixed duration for the trial. The trial will terminate after that time has elapsed, whether a response was given / completed or not.

Only other way I can see is to forego /inputdevice = voicerecord and use /soundcapture instead as in

<trial example>
...
/ soundcapture = true
/ inputdevice = keyboard
/ validresponse = (57)
</trial>

In this case, audio should be captured for the entire trial, i.e. a participant can say their piece and when they're done press the space bar to end the trial.

Dave,

Thanks for your help here. I'm curious about the voicerecord setting...it seems that without the trialduration setting but with the beginresponsetime setting, Inquisit waits after the final stimulus, for an audio response. I like that behavior and would like to keep it if possible but...given that setting, am I able to retain data about the timing of the audio response (in addition to recording the actual response)? I mean, will Inquisit keep data about how quickly after the final stimulus a subject begins his/her utterance? And, I think this is back to my original inquiry, is there a way that I can get Inquist to record for a set amount of time after initial detection of audio? 

Regards

Jason

Dave,

Sorry, I can't seem to figure out how to edit my post here. I see that there is, in fact, data about the timing of auditory responses recorded as 'latency'. I'm not sure of where this time starts but noneteless it is being recorded. So I guess my main query is about how to extend the recording duration while keeping the 'aduio detection' feature available when using voicerecord without trialduration.

Regards

Jason
By Dave - 5/17/2018

Musashi Jason - Tuesday, May 15, 2018
Musashi Jason - Tuesday, May 15, 2018
Dave - Monday, May 14, 2018
Musashi Jason - Monday, May 14, 2018
Dave - Monday, May 14, 2018
Musashi Jason - Monday, May 14, 2018
Dave - Monday, May 14, 2018
Musashi Jason - Sunday, May 13, 2018
Hello,

I'm slowly plugging away with my familiarization with Inquist 5 but the process includes quite a few false starts. :-/

I am using voicerecord and want to record responses ater presenting two stimuli (first an image (led and followed by masks), and then an audio stimuli)....after which I want voicerecord to record the subject's response utterance. Currently it seems that voicecrecord begins immediately after the first mask (or image) as I can hear the audio stimulus being recorded...from headphones (I guess it's quiet enough to not be sensed as I have the voicekeythreshold at 15....or should that be voicerecordthreshold...?

Here is the stimulus line...maybe my error will be obvious here...?

/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = voicerecord
/ validresponse = (anyresponse)

Regards

Jason

Use the <trial>'s /beginresponsetime attribute to specify when it should start accepting responses (here: recording audio). You may also want to set the /responseinterrupt mode to frames such as not to terminate the stimulus presentaation sequence once a response is first registered.

Dave,

Thanks, this gets me on the right track it seems but I think I'm missing someting with the responseinterrupt setting. Is there a way to specify a record time interval in order to make sure the subject's entire response is recorded? For example, I have an audio prompt using the word "snail". When the subject repeats the word "snail" the response is being detected at the beginning of the aspirated fricative 's' and then moves on to the next item without recording the entire response...'snail'. I'm guessing I need to add a timing setting...delay of some sort to my trial?

Regards

Jason

Try setting up your trial along the following lines

<trial example>
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = voicerecord
/ validresponse = (anyresponse)
/ beginresponsetime = 1700 <-- not sure when you want to start recording, change as needed. 1700 would coincide with the display of correctoption/distractoroption
/ responseinterrupt = frames <-- makes sure any remaining stimuli are displayed / the stimulus presentation is not interrupted by the response
/ trialduration = 3000 <-- set to a long enough value, theoretically the entire time starting from the value specified in /beginresponsetime until the value specified in trialduration should be recorded, i.e. with the values specified here you should get a recording of ~1300 ms duration.
...
</trial>


Dave,

Thank you for your continued support. For some reason, this doesn't seem to work. I mean adding the /trialduration setting. Doing so makes the trial now run automatically without waiting for a recording at all....what have I done wrong? I started with 3250 to give me 1 second for response time but thought maybe that was too short so I changed it to 4250 which should give me 2 seconds for response time, correct? I was operating under the understanding that the 2 seconds would not start until sound was detected (as that seemed to be how it was working prior to entering the trialduration setting) but it appears to simply run automatically without waiting for sound...is there a way to secure a specified amount of time for response time but have that time begin from when sound is detected? Or maybe I simply need to allocate more time for response time....but I'd like the trial not to proceed until the subject has responded....

<trial mytrial>
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = voicerecord
/ beginresponsetime = 2250
/ responseinterrupt = frames
/ trialduration = 4250
/ validresponse = (anyresponse)

Jason


> I was operating under the understanding that the 2 seconds would not start until sound was detected

No. /trialduration specifies a fixed duration for the trial. The trial will terminate after that time has elapsed, whether a response was given / completed or not.

Only other way I can see is to forego /inputdevice = voicerecord and use /soundcapture instead as in

<trial example>
...
/ soundcapture = true
/ inputdevice = keyboard
/ validresponse = (57)
</trial>

In this case, audio should be captured for the entire trial, i.e. a participant can say their piece and when they're done press the space bar to end the trial.

Dave,

Thanks for your help here. I'm curious about the voicerecord setting...it seems that without the trialduration setting but with the beginresponsetime setting, Inquisit waits after the final stimulus, for an audio response. I like that behavior and would like to keep it if possible but...given that setting, am I able to retain data about the timing of the audio response (in addition to recording the actual response)? I mean, will Inquisit keep data about how quickly after the final stimulus a subject begins his/her utterance? And, I think this is back to my original inquiry, is there a way that I can get Inquist to record for a set amount of time after initial detection of audio? 

Regards

Jason

Dave,

Sorry, I can't seem to figure out how to edit my post here. I see that there is, in fact, data about the timing of auditory responses recorded as 'latency'. I'm not sure of where this time starts but noneteless it is being recorded. So I guess my main query is about how to extend the recording duration while keeping the 'aduio detection' feature available when using voicerecord without trialduration.

Regards

Jason

By default, Inquisit will start accepting responses after all stimuli in the stimulus presentation sequence (as given in /stimulustimes) have been displayed. Latency is measure relative to that point. You can override that behavior via /beginresponsetime as explained further up in this thread.

> So I guess my main query is about how to extend the recording duration while keeping the 'aduio detection' feature available.

I don't think there is a way to do that, I'm afraid.
By Musashi Jason - 5/27/2018

Dave - Thursday, May 17, 2018
Musashi Jason - Tuesday, May 15, 2018
Musashi Jason - Tuesday, May 15, 2018
Dave - Monday, May 14, 2018
Musashi Jason - Monday, May 14, 2018
Dave - Monday, May 14, 2018
Musashi Jason - Monday, May 14, 2018
Dave - Monday, May 14, 2018
Musashi Jason - Sunday, May 13, 2018
Hello,

I'm slowly plugging away with my familiarization with Inquist 5 but the process includes quite a few false starts. :-/

I am using voicerecord and want to record responses ater presenting two stimuli (first an image (led and followed by masks), and then an audio stimuli)....after which I want voicerecord to record the subject's response utterance. Currently it seems that voicecrecord begins immediately after the first mask (or image) as I can hear the audio stimulus being recorded...from headphones (I guess it's quiet enough to not be sensed as I have the voicekeythreshold at 15....or should that be voicerecordthreshold...?

Here is the stimulus line...maybe my error will be obvious here...?

/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = voicerecord
/ validresponse = (anyresponse)

Regards

Jason

Use the <trial>'s /beginresponsetime attribute to specify when it should start accepting responses (here: recording audio). You may also want to set the /responseinterrupt mode to frames such as not to terminate the stimulus presentaation sequence once a response is first registered.

Dave,

Thanks, this gets me on the right track it seems but I think I'm missing someting with the responseinterrupt setting. Is there a way to specify a record time interval in order to make sure the subject's entire response is recorded? For example, I have an audio prompt using the word "snail". When the subject repeats the word "snail" the response is being detected at the beginning of the aspirated fricative 's' and then moves on to the next item without recording the entire response...'snail'. I'm guessing I need to add a timing setting...delay of some sort to my trial?

Regards

Jason

Try setting up your trial along the following lines

<trial example>
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = voicerecord
/ validresponse = (anyresponse)
/ beginresponsetime = 1700 <-- not sure when you want to start recording, change as needed. 1700 would coincide with the display of correctoption/distractoroption
/ responseinterrupt = frames <-- makes sure any remaining stimuli are displayed / the stimulus presentation is not interrupted by the response
/ trialduration = 3000 <-- set to a long enough value, theoretically the entire time starting from the value specified in /beginresponsetime until the value specified in trialduration should be recorded, i.e. with the values specified here you should get a recording of ~1300 ms duration.
...
</trial>


Dave,

Thank you for your continued support. For some reason, this doesn't seem to work. I mean adding the /trialduration setting. Doing so makes the trial now run automatically without waiting for a recording at all....what have I done wrong? I started with 3250 to give me 1 second for response time but thought maybe that was too short so I changed it to 4250 which should give me 2 seconds for response time, correct? I was operating under the understanding that the 2 seconds would not start until sound was detected (as that seemed to be how it was working prior to entering the trialduration setting) but it appears to simply run automatically without waiting for sound...is there a way to secure a specified amount of time for response time but have that time begin from when sound is detected? Or maybe I simply need to allocate more time for response time....but I'd like the trial not to proceed until the subject has responded....

<trial mytrial>
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = voicerecord
/ beginresponsetime = 2250
/ responseinterrupt = frames
/ trialduration = 4250
/ validresponse = (anyresponse)

Jason


> I was operating under the understanding that the 2 seconds would not start until sound was detected

No. /trialduration specifies a fixed duration for the trial. The trial will terminate after that time has elapsed, whether a response was given / completed or not.

Only other way I can see is to forego /inputdevice = voicerecord and use /soundcapture instead as in

<trial example>
...
/ soundcapture = true
/ inputdevice = keyboard
/ validresponse = (57)
</trial>

In this case, audio should be captured for the entire trial, i.e. a participant can say their piece and when they're done press the space bar to end the trial.

Dave,

Thanks for your help here. I'm curious about the voicerecord setting...it seems that without the trialduration setting but with the beginresponsetime setting, Inquisit waits after the final stimulus, for an audio response. I like that behavior and would like to keep it if possible but...given that setting, am I able to retain data about the timing of the audio response (in addition to recording the actual response)? I mean, will Inquisit keep data about how quickly after the final stimulus a subject begins his/her utterance? And, I think this is back to my original inquiry, is there a way that I can get Inquist to record for a set amount of time after initial detection of audio? 

Regards

Jason

Dave,

Sorry, I can't seem to figure out how to edit my post here. I see that there is, in fact, data about the timing of auditory responses recorded as 'latency'. I'm not sure of where this time starts but noneteless it is being recorded. So I guess my main query is about how to extend the recording duration while keeping the 'aduio detection' feature available when using voicerecord without trialduration.

Regards

Jason

By default, Inquisit will start accepting responses after all stimuli in the stimulus presentation sequence (as given in /stimulustimes) have been displayed. Latency is measure relative to that point. You can override that behavior via /beginresponsetime as explained further up in this thread.

> So I guess my main query is about how to extend the recording duration while keeping the 'aduio detection' feature available.

I don't think there is a way to do that, I'm afraid.

Dave,

Thanks for your reply here. I understand how latency is measured now and don't have any issues with it...actually, I would like to keep it in my trail if possible. My confusion is with the inability to set a desired recording duration which incorporates the latency measure...in other words, records for a set amount of time (3 seconds, 5 seconds, etc.). I see requests for such a feature here in the forums dating back to 2008 and wonder what solutions those individuals worked out...

If I use beginresponsetime I lose the latency measure, correct? I noticed here on the threads that voicerecord is explained as being used for recording a word or short sentence...but for some reason it does not allow me to record more than a very short one or two syllable word before it moves on to the next trial...Would a threshold setting help to ensure Inquisit doesn't move on even though audio is still being presented for recording? I guess what I'm trying to figure out is what condition Inquisit uses to move forward after detecting audio from voicerecord? Is is a hard coded preset amount of time? I'm guessing that is not the case but am not really sure. If it is something else related to threshold, maybe I can tweak it a bit to get something close to what I'm hoping for...sorry, I'm just thinking outloud a bit here in the hopes that doing so will trigger an idea. :-)

Regards

Jason
By Dave - 5/28/2018

Musashi Jason - Sunday, May 27, 2018
Dave - Thursday, May 17, 2018
Musashi Jason - Tuesday, May 15, 2018
Musashi Jason - Tuesday, May 15, 2018
Dave - Monday, May 14, 2018
Musashi Jason - Monday, May 14, 2018
Dave - Monday, May 14, 2018
Musashi Jason - Monday, May 14, 2018
Dave - Monday, May 14, 2018
Musashi Jason - Sunday, May 13, 2018
Hello,

I'm slowly plugging away with my familiarization with Inquist 5 but the process includes quite a few false starts. :-/

I am using voicerecord and want to record responses ater presenting two stimuli (first an image (led and followed by masks), and then an audio stimuli)....after which I want voicerecord to record the subject's response utterance. Currently it seems that voicecrecord begins immediately after the first mask (or image) as I can hear the audio stimulus being recorded...from headphones (I guess it's quiet enough to not be sensed as I have the voicekeythreshold at 15....or should that be voicerecordthreshold...?

Here is the stimulus line...maybe my error will be obvious here...?

/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = voicerecord
/ validresponse = (anyresponse)

Regards

Jason

Use the <trial>'s /beginresponsetime attribute to specify when it should start accepting responses (here: recording audio). You may also want to set the /responseinterrupt mode to frames such as not to terminate the stimulus presentaation sequence once a response is first registered.

Dave,

Thanks, this gets me on the right track it seems but I think I'm missing someting with the responseinterrupt setting. Is there a way to specify a record time interval in order to make sure the subject's entire response is recorded? For example, I have an audio prompt using the word "snail". When the subject repeats the word "snail" the response is being detected at the beginning of the aspirated fricative 's' and then moves on to the next item without recording the entire response...'snail'. I'm guessing I need to add a timing setting...delay of some sort to my trial?

Regards

Jason

Try setting up your trial along the following lines

<trial example>
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = voicerecord
/ validresponse = (anyresponse)
/ beginresponsetime = 1700 <-- not sure when you want to start recording, change as needed. 1700 would coincide with the display of correctoption/distractoroption
/ responseinterrupt = frames <-- makes sure any remaining stimuli are displayed / the stimulus presentation is not interrupted by the response
/ trialduration = 3000 <-- set to a long enough value, theoretically the entire time starting from the value specified in /beginresponsetime until the value specified in trialduration should be recorded, i.e. with the values specified here you should get a recording of ~1300 ms duration.
...
</trial>


Dave,

Thank you for your continued support. For some reason, this doesn't seem to work. I mean adding the /trialduration setting. Doing so makes the trial now run automatically without waiting for a recording at all....what have I done wrong? I started with 3250 to give me 1 second for response time but thought maybe that was too short so I changed it to 4250 which should give me 2 seconds for response time, correct? I was operating under the understanding that the 2 seconds would not start until sound was detected (as that seemed to be how it was working prior to entering the trialduration setting) but it appears to simply run automatically without waiting for sound...is there a way to secure a specified amount of time for response time but have that time begin from when sound is detected? Or maybe I simply need to allocate more time for response time....but I'd like the trial not to proceed until the subject has responded....

<trial mytrial>
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = voicerecord
/ beginresponsetime = 2250
/ responseinterrupt = frames
/ trialduration = 4250
/ validresponse = (anyresponse)

Jason


> I was operating under the understanding that the 2 seconds would not start until sound was detected

No. /trialduration specifies a fixed duration for the trial. The trial will terminate after that time has elapsed, whether a response was given / completed or not.

Only other way I can see is to forego /inputdevice = voicerecord and use /soundcapture instead as in

<trial example>
...
/ soundcapture = true
/ inputdevice = keyboard
/ validresponse = (57)
</trial>

In this case, audio should be captured for the entire trial, i.e. a participant can say their piece and when they're done press the space bar to end the trial.

Dave,

Thanks for your help here. I'm curious about the voicerecord setting...it seems that without the trialduration setting but with the beginresponsetime setting, Inquisit waits after the final stimulus, for an audio response. I like that behavior and would like to keep it if possible but...given that setting, am I able to retain data about the timing of the audio response (in addition to recording the actual response)? I mean, will Inquisit keep data about how quickly after the final stimulus a subject begins his/her utterance? And, I think this is back to my original inquiry, is there a way that I can get Inquist to record for a set amount of time after initial detection of audio? 

Regards

Jason

Dave,

Sorry, I can't seem to figure out how to edit my post here. I see that there is, in fact, data about the timing of auditory responses recorded as 'latency'. I'm not sure of where this time starts but noneteless it is being recorded. So I guess my main query is about how to extend the recording duration while keeping the 'aduio detection' feature available when using voicerecord without trialduration.

Regards

Jason

By default, Inquisit will start accepting responses after all stimuli in the stimulus presentation sequence (as given in /stimulustimes) have been displayed. Latency is measure relative to that point. You can override that behavior via /beginresponsetime as explained further up in this thread.

> So I guess my main query is about how to extend the recording duration while keeping the 'aduio detection' feature available.

I don't think there is a way to do that, I'm afraid.

Dave,

Thanks for your reply here. I understand how latency is measured now and don't have any issues with it...actually, I would like to keep it in my trail if possible. My confusion is with the inability to set a desired recording duration which incorporates the latency measure...in other words, records for a set amount of time (3 seconds, 5 seconds, etc.). I see requests for such a feature here in the forums dating back to 2008 and wonder what solutions those individuals worked out...

If I use beginresponsetime I lose the latency measure, correct? I noticed here on the threads that voicerecord is explained as being used for recording a word or short sentence...but for some reason it does not allow me to record more than a very short one or two syllable word before it moves on to the next trial...Would a threshold setting help to ensure Inquisit doesn't move on even though audio is still being presented for recording? I guess what I'm trying to figure out is what condition Inquisit uses to move forward after detecting audio from voicerecord? Is is a hard coded preset amount of time? I'm guessing that is not the case but am not really sure. If it is something else related to threshold, maybe I can tweak it a bit to get something close to what I'm hoping for...sorry, I'm just thinking outloud a bit here in the hopes that doing so will trigger an idea. :-)

Regards

Jason

> If I use beginresponsetime I lose the latency measure, correct?

No, /beginresponsetime merely specifies the point in time relative to which latency is measured, i.e. when the trial begins accepting responses.

As for the rest, I'll gladly think about it some more, but -- as indicated previously -- so far I don't see a way to get what you want. I.e. wait for the start of an utterance indefinitely and then record for a specified amount of time beginning with the start of the utterance.
By Musashi Jason - 5/28/2018

Dave - Monday, May 28, 2018
Musashi Jason - Sunday, May 27, 2018
Dave - Thursday, May 17, 2018
Musashi Jason - Tuesday, May 15, 2018
Musashi Jason - Tuesday, May 15, 2018
Dave - Monday, May 14, 2018
Musashi Jason - Monday, May 14, 2018
Dave - Monday, May 14, 2018
Musashi Jason - Monday, May 14, 2018
Dave - Monday, May 14, 2018
Musashi Jason - Sunday, May 13, 2018
Hello,

I'm slowly plugging away with my familiarization with Inquist 5 but the process includes quite a few false starts. :-/

I am using voicerecord and want to record responses ater presenting two stimuli (first an image (led and followed by masks), and then an audio stimuli)....after which I want voicerecord to record the subject's response utterance. Currently it seems that voicecrecord begins immediately after the first mask (or image) as I can hear the audio stimulus being recorded...from headphones (I guess it's quiet enough to not be sensed as I have the voicekeythreshold at 15....or should that be voicerecordthreshold...?

Here is the stimulus line...maybe my error will be obvious here...?

/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = voicerecord
/ validresponse = (anyresponse)

Regards

Jason

Use the <trial>'s /beginresponsetime attribute to specify when it should start accepting responses (here: recording audio). You may also want to set the /responseinterrupt mode to frames such as not to terminate the stimulus presentaation sequence once a response is first registered.

Dave,

Thanks, this gets me on the right track it seems but I think I'm missing someting with the responseinterrupt setting. Is there a way to specify a record time interval in order to make sure the subject's entire response is recorded? For example, I have an audio prompt using the word "snail". When the subject repeats the word "snail" the response is being detected at the beginning of the aspirated fricative 's' and then moves on to the next item without recording the entire response...'snail'. I'm guessing I need to add a timing setting...delay of some sort to my trial?

Regards

Jason

Try setting up your trial along the following lines

<trial example>
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = voicerecord
/ validresponse = (anyresponse)
/ beginresponsetime = 1700 <-- not sure when you want to start recording, change as needed. 1700 would coincide with the display of correctoption/distractoroption
/ responseinterrupt = frames <-- makes sure any remaining stimuli are displayed / the stimulus presentation is not interrupted by the response
/ trialduration = 3000 <-- set to a long enough value, theoretically the entire time starting from the value specified in /beginresponsetime until the value specified in trialduration should be recorded, i.e. with the values specified here you should get a recording of ~1300 ms duration.
...
</trial>


Dave,

Thank you for your continued support. For some reason, this doesn't seem to work. I mean adding the /trialduration setting. Doing so makes the trial now run automatically without waiting for a recording at all....what have I done wrong? I started with 3250 to give me 1 second for response time but thought maybe that was too short so I changed it to 4250 which should give me 2 seconds for response time, correct? I was operating under the understanding that the 2 seconds would not start until sound was detected (as that seemed to be how it was working prior to entering the trialduration setting) but it appears to simply run automatically without waiting for sound...is there a way to secure a specified amount of time for response time but have that time begin from when sound is detected? Or maybe I simply need to allocate more time for response time....but I'd like the trial not to proceed until the subject has responded....

<trial mytrial>
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = voicerecord
/ beginresponsetime = 2250
/ responseinterrupt = frames
/ trialduration = 4250
/ validresponse = (anyresponse)

Jason


> I was operating under the understanding that the 2 seconds would not start until sound was detected

No. /trialduration specifies a fixed duration for the trial. The trial will terminate after that time has elapsed, whether a response was given / completed or not.

Only other way I can see is to forego /inputdevice = voicerecord and use /soundcapture instead as in

<trial example>
...
/ soundcapture = true
/ inputdevice = keyboard
/ validresponse = (57)
</trial>

In this case, audio should be captured for the entire trial, i.e. a participant can say their piece and when they're done press the space bar to end the trial.

Dave,

Thanks for your help here. I'm curious about the voicerecord setting...it seems that without the trialduration setting but with the beginresponsetime setting, Inquisit waits after the final stimulus, for an audio response. I like that behavior and would like to keep it if possible but...given that setting, am I able to retain data about the timing of the audio response (in addition to recording the actual response)? I mean, will Inquisit keep data about how quickly after the final stimulus a subject begins his/her utterance? And, I think this is back to my original inquiry, is there a way that I can get Inquist to record for a set amount of time after initial detection of audio? 

Regards

Jason

Dave,

Sorry, I can't seem to figure out how to edit my post here. I see that there is, in fact, data about the timing of auditory responses recorded as 'latency'. I'm not sure of where this time starts but noneteless it is being recorded. So I guess my main query is about how to extend the recording duration while keeping the 'aduio detection' feature available when using voicerecord without trialduration.

Regards

Jason

By default, Inquisit will start accepting responses after all stimuli in the stimulus presentation sequence (as given in /stimulustimes) have been displayed. Latency is measure relative to that point. You can override that behavior via /beginresponsetime as explained further up in this thread.

> So I guess my main query is about how to extend the recording duration while keeping the 'aduio detection' feature available.

I don't think there is a way to do that, I'm afraid.

Dave,

Thanks for your reply here. I understand how latency is measured now and don't have any issues with it...actually, I would like to keep it in my trail if possible. My confusion is with the inability to set a desired recording duration which incorporates the latency measure...in other words, records for a set amount of time (3 seconds, 5 seconds, etc.). I see requests for such a feature here in the forums dating back to 2008 and wonder what solutions those individuals worked out...

If I use beginresponsetime I lose the latency measure, correct? I noticed here on the threads that voicerecord is explained as being used for recording a word or short sentence...but for some reason it does not allow me to record more than a very short one or two syllable word before it moves on to the next trial...Would a threshold setting help to ensure Inquisit doesn't move on even though audio is still being presented for recording? I guess what I'm trying to figure out is what condition Inquisit uses to move forward after detecting audio from voicerecord? Is is a hard coded preset amount of time? I'm guessing that is not the case but am not really sure. If it is something else related to threshold, maybe I can tweak it a bit to get something close to what I'm hoping for...sorry, I'm just thinking outloud a bit here in the hopes that doing so will trigger an idea. :-)

Regards

Jason

> If I use beginresponsetime I lose the latency measure, correct?

No, /beginresponsetime merely specifies the point in time relative to which latency is measured, i.e. when the trial begins accepting responses.

As for the rest, I'll gladly think about it some more, but -- as indicated previously -- so far I don't see a way to get what you want. I.e. wait for the start of an utterance indefinitely and then record for a specified amount of time beginning with the start of the utterance.

Dave,

Thank you for the clarification. I will toy around with the beginresponsetime and response duration settings some more to see if I can get a desired flow.

On a related topic, I've somehow managed to corrupt my script (I guess) and now for some reason on the first run through, the audio file is not getting played. It simply jumps forward to the 2nd trial... From the second trial the audio file plays and waits for a voicerecord response (still not using beginresponsetime and duration). It was working fine before...I'm not sure what I could have changed to cause this behavior. I restarted Inquisit just to make sure the problem was not related to the fact that I had left the software running for quite a long time but that didn't make a difference.

My current trial settings are:

<trial mytrial>
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = voicerecord
/ responseinterrupt = frames
/ validresponse = (anyresponse)

Regards

Jason

By Dave - 5/28/2018

Musashi Jason - Monday, May 28, 2018
Dave - Monday, May 28, 2018
Musashi Jason - Sunday, May 27, 2018
Dave - Thursday, May 17, 2018
Musashi Jason - Tuesday, May 15, 2018
Musashi Jason - Tuesday, May 15, 2018
Dave - Monday, May 14, 2018
Musashi Jason - Monday, May 14, 2018
Dave - Monday, May 14, 2018
Musashi Jason - Monday, May 14, 2018
Dave - Monday, May 14, 2018
Musashi Jason - Sunday, May 13, 2018
Hello,

I'm slowly plugging away with my familiarization with Inquist 5 but the process includes quite a few false starts. :-/

I am using voicerecord and want to record responses ater presenting two stimuli (first an image (led and followed by masks), and then an audio stimuli)....after which I want voicerecord to record the subject's response utterance. Currently it seems that voicecrecord begins immediately after the first mask (or image) as I can hear the audio stimulus being recorded...from headphones (I guess it's quiet enough to not be sensed as I have the voicekeythreshold at 15....or should that be voicerecordthreshold...?

Here is the stimulus line...maybe my error will be obvious here...?

/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = voicerecord
/ validresponse = (anyresponse)

Regards

Jason

Use the <trial>'s /beginresponsetime attribute to specify when it should start accepting responses (here: recording audio). You may also want to set the /responseinterrupt mode to frames such as not to terminate the stimulus presentaation sequence once a response is first registered.

Dave,

Thanks, this gets me on the right track it seems but I think I'm missing someting with the responseinterrupt setting. Is there a way to specify a record time interval in order to make sure the subject's entire response is recorded? For example, I have an audio prompt using the word "snail". When the subject repeats the word "snail" the response is being detected at the beginning of the aspirated fricative 's' and then moves on to the next item without recording the entire response...'snail'. I'm guessing I need to add a timing setting...delay of some sort to my trial?

Regards

Jason

Try setting up your trial along the following lines

<trial example>
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = voicerecord
/ validresponse = (anyresponse)
/ beginresponsetime = 1700 <-- not sure when you want to start recording, change as needed. 1700 would coincide with the display of correctoption/distractoroption
/ responseinterrupt = frames <-- makes sure any remaining stimuli are displayed / the stimulus presentation is not interrupted by the response
/ trialduration = 3000 <-- set to a long enough value, theoretically the entire time starting from the value specified in /beginresponsetime until the value specified in trialduration should be recorded, i.e. with the values specified here you should get a recording of ~1300 ms duration.
...
</trial>


Dave,

Thank you for your continued support. For some reason, this doesn't seem to work. I mean adding the /trialduration setting. Doing so makes the trial now run automatically without waiting for a recording at all....what have I done wrong? I started with 3250 to give me 1 second for response time but thought maybe that was too short so I changed it to 4250 which should give me 2 seconds for response time, correct? I was operating under the understanding that the 2 seconds would not start until sound was detected (as that seemed to be how it was working prior to entering the trialduration setting) but it appears to simply run automatically without waiting for sound...is there a way to secure a specified amount of time for response time but have that time begin from when sound is detected? Or maybe I simply need to allocate more time for response time....but I'd like the trial not to proceed until the subject has responded....

<trial mytrial>
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = voicerecord
/ beginresponsetime = 2250
/ responseinterrupt = frames
/ trialduration = 4250
/ validresponse = (anyresponse)

Jason


> I was operating under the understanding that the 2 seconds would not start until sound was detected

No. /trialduration specifies a fixed duration for the trial. The trial will terminate after that time has elapsed, whether a response was given / completed or not.

Only other way I can see is to forego /inputdevice = voicerecord and use /soundcapture instead as in

<trial example>
...
/ soundcapture = true
/ inputdevice = keyboard
/ validresponse = (57)
</trial>

In this case, audio should be captured for the entire trial, i.e. a participant can say their piece and when they're done press the space bar to end the trial.

Dave,

Thanks for your help here. I'm curious about the voicerecord setting...it seems that without the trialduration setting but with the beginresponsetime setting, Inquisit waits after the final stimulus, for an audio response. I like that behavior and would like to keep it if possible but...given that setting, am I able to retain data about the timing of the audio response (in addition to recording the actual response)? I mean, will Inquisit keep data about how quickly after the final stimulus a subject begins his/her utterance? And, I think this is back to my original inquiry, is there a way that I can get Inquist to record for a set amount of time after initial detection of audio? 

Regards

Jason

Dave,

Sorry, I can't seem to figure out how to edit my post here. I see that there is, in fact, data about the timing of auditory responses recorded as 'latency'. I'm not sure of where this time starts but noneteless it is being recorded. So I guess my main query is about how to extend the recording duration while keeping the 'aduio detection' feature available when using voicerecord without trialduration.

Regards

Jason

By default, Inquisit will start accepting responses after all stimuli in the stimulus presentation sequence (as given in /stimulustimes) have been displayed. Latency is measure relative to that point. You can override that behavior via /beginresponsetime as explained further up in this thread.

> So I guess my main query is about how to extend the recording duration while keeping the 'aduio detection' feature available.

I don't think there is a way to do that, I'm afraid.

Dave,

Thanks for your reply here. I understand how latency is measured now and don't have any issues with it...actually, I would like to keep it in my trail if possible. My confusion is with the inability to set a desired recording duration which incorporates the latency measure...in other words, records for a set amount of time (3 seconds, 5 seconds, etc.). I see requests for such a feature here in the forums dating back to 2008 and wonder what solutions those individuals worked out...

If I use beginresponsetime I lose the latency measure, correct? I noticed here on the threads that voicerecord is explained as being used for recording a word or short sentence...but for some reason it does not allow me to record more than a very short one or two syllable word before it moves on to the next trial...Would a threshold setting help to ensure Inquisit doesn't move on even though audio is still being presented for recording? I guess what I'm trying to figure out is what condition Inquisit uses to move forward after detecting audio from voicerecord? Is is a hard coded preset amount of time? I'm guessing that is not the case but am not really sure. If it is something else related to threshold, maybe I can tweak it a bit to get something close to what I'm hoping for...sorry, I'm just thinking outloud a bit here in the hopes that doing so will trigger an idea. :-)

Regards

Jason

> If I use beginresponsetime I lose the latency measure, correct?

No, /beginresponsetime merely specifies the point in time relative to which latency is measured, i.e. when the trial begins accepting responses.

As for the rest, I'll gladly think about it some more, but -- as indicated previously -- so far I don't see a way to get what you want. I.e. wait for the start of an utterance indefinitely and then record for a specified amount of time beginning with the start of the utterance.

Dave,

Thank you for the clarification. I will toy around with the beginresponsetime and response duration settings some more to see if I can get a desired flow.

On a related topic, I've somehow managed to corrupt my script (I guess) and now for some reason on the first run through, the audio file is not getting played. It simply jumps forward to the 2nd trial... From the second trial the audio file plays and waits for a voicerecord response (still not using beginresponsetime and duration). It was working fine before...I'm not sure what I could have changed to cause this behavior. I restarted Inquisit just to make sure the problem was not related to the fact that I had left the software running for quite a long time but that didn't make a difference.

My current trial settings are:

<trial mytrial>
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = voicerecord
/ responseinterrupt = frames
/ validresponse = (anyresponse)

Regards

Jason


I really can't answer that without the script (including all files it actually needs to run). You can put all of that in a ZIP and attach it here (click +Insert -> Add File), and I'll take a look (not sure if today, could be tomorrow).
By Musashi Jason - 5/28/2018

Dave - Monday, May 28, 2018
Musashi Jason - Monday, May 28, 2018
Dave - Monday, May 28, 2018
Musashi Jason - Sunday, May 27, 2018
Dave - Thursday, May 17, 2018
Musashi Jason - Tuesday, May 15, 2018
Musashi Jason - Tuesday, May 15, 2018
Dave - Monday, May 14, 2018
Musashi Jason - Monday, May 14, 2018
Dave - Monday, May 14, 2018
Musashi Jason - Monday, May 14, 2018
Dave - Monday, May 14, 2018
Musashi Jason - Sunday, May 13, 2018
Hello,

I'm slowly plugging away with my familiarization with Inquist 5 but the process includes quite a few false starts. :-/

I am using voicerecord and want to record responses ater presenting two stimuli (first an image (led and followed by masks), and then an audio stimuli)....after which I want voicerecord to record the subject's response utterance. Currently it seems that voicecrecord begins immediately after the first mask (or image) as I can hear the audio stimulus being recorded...from headphones (I guess it's quiet enough to not be sensed as I have the voicekeythreshold at 15....or should that be voicerecordthreshold...?

Here is the stimulus line...maybe my error will be obvious here...?

/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = voicerecord
/ validresponse = (anyresponse)

Regards

Jason

Use the <trial>'s /beginresponsetime attribute to specify when it should start accepting responses (here: recording audio). You may also want to set the /responseinterrupt mode to frames such as not to terminate the stimulus presentaation sequence once a response is first registered.

Dave,

Thanks, this gets me on the right track it seems but I think I'm missing someting with the responseinterrupt setting. Is there a way to specify a record time interval in order to make sure the subject's entire response is recorded? For example, I have an audio prompt using the word "snail". When the subject repeats the word "snail" the response is being detected at the beginning of the aspirated fricative 's' and then moves on to the next item without recording the entire response...'snail'. I'm guessing I need to add a timing setting...delay of some sort to my trial?

Regards

Jason

Try setting up your trial along the following lines

<trial example>
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = voicerecord
/ validresponse = (anyresponse)
/ beginresponsetime = 1700 <-- not sure when you want to start recording, change as needed. 1700 would coincide with the display of correctoption/distractoroption
/ responseinterrupt = frames <-- makes sure any remaining stimuli are displayed / the stimulus presentation is not interrupted by the response
/ trialduration = 3000 <-- set to a long enough value, theoretically the entire time starting from the value specified in /beginresponsetime until the value specified in trialduration should be recorded, i.e. with the values specified here you should get a recording of ~1300 ms duration.
...
</trial>


Dave,

Thank you for your continued support. For some reason, this doesn't seem to work. I mean adding the /trialduration setting. Doing so makes the trial now run automatically without waiting for a recording at all....what have I done wrong? I started with 3250 to give me 1 second for response time but thought maybe that was too short so I changed it to 4250 which should give me 2 seconds for response time, correct? I was operating under the understanding that the 2 seconds would not start until sound was detected (as that seemed to be how it was working prior to entering the trialduration setting) but it appears to simply run automatically without waiting for sound...is there a way to secure a specified amount of time for response time but have that time begin from when sound is detected? Or maybe I simply need to allocate more time for response time....but I'd like the trial not to proceed until the subject has responded....

<trial mytrial>
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = voicerecord
/ beginresponsetime = 2250
/ responseinterrupt = frames
/ trialduration = 4250
/ validresponse = (anyresponse)

Jason


> I was operating under the understanding that the 2 seconds would not start until sound was detected

No. /trialduration specifies a fixed duration for the trial. The trial will terminate after that time has elapsed, whether a response was given / completed or not.

Only other way I can see is to forego /inputdevice = voicerecord and use /soundcapture instead as in

<trial example>
...
/ soundcapture = true
/ inputdevice = keyboard
/ validresponse = (57)
</trial>

In this case, audio should be captured for the entire trial, i.e. a participant can say their piece and when they're done press the space bar to end the trial.

Dave,

Thanks for your help here. I'm curious about the voicerecord setting...it seems that without the trialduration setting but with the beginresponsetime setting, Inquisit waits after the final stimulus, for an audio response. I like that behavior and would like to keep it if possible but...given that setting, am I able to retain data about the timing of the audio response (in addition to recording the actual response)? I mean, will Inquisit keep data about how quickly after the final stimulus a subject begins his/her utterance? And, I think this is back to my original inquiry, is there a way that I can get Inquist to record for a set amount of time after initial detection of audio? 

Regards

Jason

Dave,

Sorry, I can't seem to figure out how to edit my post here. I see that there is, in fact, data about the timing of auditory responses recorded as 'latency'. I'm not sure of where this time starts but noneteless it is being recorded. So I guess my main query is about how to extend the recording duration while keeping the 'aduio detection' feature available when using voicerecord without trialduration.

Regards

Jason

By default, Inquisit will start accepting responses after all stimuli in the stimulus presentation sequence (as given in /stimulustimes) have been displayed. Latency is measure relative to that point. You can override that behavior via /beginresponsetime as explained further up in this thread.

> So I guess my main query is about how to extend the recording duration while keeping the 'aduio detection' feature available.

I don't think there is a way to do that, I'm afraid.

Dave,

Thanks for your reply here. I understand how latency is measured now and don't have any issues with it...actually, I would like to keep it in my trail if possible. My confusion is with the inability to set a desired recording duration which incorporates the latency measure...in other words, records for a set amount of time (3 seconds, 5 seconds, etc.). I see requests for such a feature here in the forums dating back to 2008 and wonder what solutions those individuals worked out...

If I use beginresponsetime I lose the latency measure, correct? I noticed here on the threads that voicerecord is explained as being used for recording a word or short sentence...but for some reason it does not allow me to record more than a very short one or two syllable word before it moves on to the next trial...Would a threshold setting help to ensure Inquisit doesn't move on even though audio is still being presented for recording? I guess what I'm trying to figure out is what condition Inquisit uses to move forward after detecting audio from voicerecord? Is is a hard coded preset amount of time? I'm guessing that is not the case but am not really sure. If it is something else related to threshold, maybe I can tweak it a bit to get something close to what I'm hoping for...sorry, I'm just thinking outloud a bit here in the hopes that doing so will trigger an idea. :-)

Regards

Jason

> If I use beginresponsetime I lose the latency measure, correct?

No, /beginresponsetime merely specifies the point in time relative to which latency is measured, i.e. when the trial begins accepting responses.

As for the rest, I'll gladly think about it some more, but -- as indicated previously -- so far I don't see a way to get what you want. I.e. wait for the start of an utterance indefinitely and then record for a specified amount of time beginning with the start of the utterance.

Dave,

Thank you for the clarification. I will toy around with the beginresponsetime and response duration settings some more to see if I can get a desired flow.

On a related topic, I've somehow managed to corrupt my script (I guess) and now for some reason on the first run through, the audio file is not getting played. It simply jumps forward to the 2nd trial... From the second trial the audio file plays and waits for a voicerecord response (still not using beginresponsetime and duration). It was working fine before...I'm not sure what I could have changed to cause this behavior. I restarted Inquisit just to make sure the problem was not related to the fact that I had left the software running for quite a long time but that didn't make a difference.

My current trial settings are:

<trial mytrial>
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = voicerecord
/ responseinterrupt = frames
/ validresponse = (anyresponse)

Regards

Jason


I really can't answer that without the script (including all files it actually needs to run). You can put all of that in a ZIP and attach it here (click +Insert -> Add File), and I'll take a look (not sure if today, could be tomorrow).

Dave,

Thanks...I don't think it has anythign to do with the files (audio or images) as they have not changed at all. I'm guessing I've corrupted something in terms of script syntax... Here is the entire script that I am testing with. I've made the beginresponsetime and trialduration changes and am getting close to a desired behavior...but that first audio file is not getting played, which is a new issue for me. :-(

<parameters>
/fontheight = 10%

/responsekeyleft = 30
/responsekeyleft_label = "A"
/responsekeyright = 40
/responsekeyright_label = "'"
</parameters>

<defaults>
/ screencolor = white
/ voicekeythreshold = 15
/ minimumversion = "5.0.0.0"
/ fontstyle = ("Arial", 3.5%, false, false, false, false, 5, 1)
</defaults>

<item instructions>

/1 = "This is a timed selection task. GO AS FAST AS YOU CAN but try not to make mistakes.

A series of asterisks, like the following, ******** will be displayed on the screen followed by a quick flash.

You will then see two words.

After the two words appear, you will hear a word.

Repeat the word you hear outloud immediately after you hear the word."

</item>

***************************VALUES**********************
<values>
/selectContinue = 1
</values>
***************************VALUES*********************

<item continue>
/1 = "Press the SPACE BAR to begin"
</item>

<picture mypicture>
/ items = pictureitems
</picture>

<item pictureitems>
/ 1 = "dog.jpg"
/ 2 = "cat.jpg"
/ 3 = "apple.jpg"
/ 4 = "house.jpg"
/ 5 = "ball.jpg"
/ 6 = "banana.jpg"
/ 7 = "boat.jpg"
/ 8 = "snail.jpg"
/ 9 = "tree.jpg"
/10 = "boat.jpg"
</item>

<sound mysound>
/ items = sounditems
/ select = picture.mypicture.currentindex
</sound>

<item sounditems>
/ 1 = "dog.wav"
/ 2 = "cat.wav"
/ 3 = "apple.wav"
/ 4 = "house.wav"
/ 5 = "ball.wav"
/ 6 = "banana.wav"
/ 7 = "boat.wav"
/ 8 = "snail.wav"
/ 9 = "tree.wav"
/ 10 = "car.wav"

</item>

<text correctoption>
/ items = correctitems
/ select = picture.mypicture.currentindex
/ vposition = 50%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = list.hpos.nextvalue
</text>

<item correctitems>
/ 1 = "Dog"
/ 2 = "Cat"
/ 3 = "Apple"
/ 4 = "House"
/ 5 = "Ball"
/ 6 = "Banana"
/ 7 = "Boat"
/ 8 = "Snail"
/ 9 = "Tree"
/ 10 = "Car"
</item>

<text distractoroption>
/ items = distractoritems
/ select = picture.mypicture.currentindex
/ vposition = 50%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = list.hpos.nextvalue
</text>

<item distractoritems>
/ 1 = "Cat"
/ 2 = "Dog"
/ 3 = "House"
/ 4 = "Apple"
/ 5 = "Banana"
/ 6 = "Ball"
/ 7 = "Snail"
/ 8 = "Boat"
/ 9 = "Car"
/ 10 = "Tree"
</item>

<item mask>
/1="*******
*******"
</item>

<text mask>
/items = mask
/select = 1
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ txcolor = black
/txbgcolor = white
/position = (50%, 50%)
</text>

<text maskeraser>
/items = mask
/select = 1
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ txcolor = white
/txbgcolor = white
/position = (50%, 50%)
</text>

// randomize the left-right position of the two response options
<list hpos>
/ items = (30%, 70%)
/ selectionrate = always
</list>

<text instructions>
/ items = item.instructions
/ hjustify = center
/ size = (90%, 60%)
/ position = (50%, 85%)
/ valign = bottom
/ txcolor = black
/ select = sequence
/ resetinterval = 20
</text>

<text spacebar>
/ items = continue
/ select = values.selectContinue
/ position = (50%, 95%)
/ valign = bottom
</text>

<trial instructions>
/ stimulustimes = [1=instructions, spacebar]
/ correctresponse = (" ")
/ errormessage = false
/ recorddata = false
</trial>

<trial mytrial>
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = voicerecord
/ validresponse = (anyresponse)
/ beginresponsetime = 2201
/ responseinterrupt = frames
/ trialduration = 6000
</trial>

<block myblock>
/ trials = [1 = instructions; 2-11 = mytrial]
</block>



By Dave - 5/28/2018

Musashi Jason - Monday, May 28, 2018
Dave - Monday, May 28, 2018
Musashi Jason - Monday, May 28, 2018
Dave - Monday, May 28, 2018
Musashi Jason - Sunday, May 27, 2018
Dave - Thursday, May 17, 2018
Musashi Jason - Tuesday, May 15, 2018
Musashi Jason - Tuesday, May 15, 2018
Dave - Monday, May 14, 2018
Musashi Jason - Monday, May 14, 2018
Dave - Monday, May 14, 2018
Musashi Jason - Monday, May 14, 2018
Dave - Monday, May 14, 2018
Musashi Jason - Sunday, May 13, 2018
Hello,

I'm slowly plugging away with my familiarization with Inquist 5 but the process includes quite a few false starts. :-/

I am using voicerecord and want to record responses ater presenting two stimuli (first an image (led and followed by masks), and then an audio stimuli)....after which I want voicerecord to record the subject's response utterance. Currently it seems that voicecrecord begins immediately after the first mask (or image) as I can hear the audio stimulus being recorded...from headphones (I guess it's quiet enough to not be sensed as I have the voicekeythreshold at 15....or should that be voicerecordthreshold...?

Here is the stimulus line...maybe my error will be obvious here...?

/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = voicerecord
/ validresponse = (anyresponse)

Regards

Jason

Use the <trial>'s /beginresponsetime attribute to specify when it should start accepting responses (here: recording audio). You may also want to set the /responseinterrupt mode to frames such as not to terminate the stimulus presentaation sequence once a response is first registered.

Dave,

Thanks, this gets me on the right track it seems but I think I'm missing someting with the responseinterrupt setting. Is there a way to specify a record time interval in order to make sure the subject's entire response is recorded? For example, I have an audio prompt using the word "snail". When the subject repeats the word "snail" the response is being detected at the beginning of the aspirated fricative 's' and then moves on to the next item without recording the entire response...'snail'. I'm guessing I need to add a timing setting...delay of some sort to my trial?

Regards

Jason

Try setting up your trial along the following lines

<trial example>
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = voicerecord
/ validresponse = (anyresponse)
/ beginresponsetime = 1700 <-- not sure when you want to start recording, change as needed. 1700 would coincide with the display of correctoption/distractoroption
/ responseinterrupt = frames <-- makes sure any remaining stimuli are displayed / the stimulus presentation is not interrupted by the response
/ trialduration = 3000 <-- set to a long enough value, theoretically the entire time starting from the value specified in /beginresponsetime until the value specified in trialduration should be recorded, i.e. with the values specified here you should get a recording of ~1300 ms duration.
...
</trial>


Dave,

Thank you for your continued support. For some reason, this doesn't seem to work. I mean adding the /trialduration setting. Doing so makes the trial now run automatically without waiting for a recording at all....what have I done wrong? I started with 3250 to give me 1 second for response time but thought maybe that was too short so I changed it to 4250 which should give me 2 seconds for response time, correct? I was operating under the understanding that the 2 seconds would not start until sound was detected (as that seemed to be how it was working prior to entering the trialduration setting) but it appears to simply run automatically without waiting for sound...is there a way to secure a specified amount of time for response time but have that time begin from when sound is detected? Or maybe I simply need to allocate more time for response time....but I'd like the trial not to proceed until the subject has responded....

<trial mytrial>
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = voicerecord
/ beginresponsetime = 2250
/ responseinterrupt = frames
/ trialduration = 4250
/ validresponse = (anyresponse)

Jason


> I was operating under the understanding that the 2 seconds would not start until sound was detected

No. /trialduration specifies a fixed duration for the trial. The trial will terminate after that time has elapsed, whether a response was given / completed or not.

Only other way I can see is to forego /inputdevice = voicerecord and use /soundcapture instead as in

<trial example>
...
/ soundcapture = true
/ inputdevice = keyboard
/ validresponse = (57)
</trial>

In this case, audio should be captured for the entire trial, i.e. a participant can say their piece and when they're done press the space bar to end the trial.

Dave,

Thanks for your help here. I'm curious about the voicerecord setting...it seems that without the trialduration setting but with the beginresponsetime setting, Inquisit waits after the final stimulus, for an audio response. I like that behavior and would like to keep it if possible but...given that setting, am I able to retain data about the timing of the audio response (in addition to recording the actual response)? I mean, will Inquisit keep data about how quickly after the final stimulus a subject begins his/her utterance? And, I think this is back to my original inquiry, is there a way that I can get Inquist to record for a set amount of time after initial detection of audio? 

Regards

Jason

Dave,

Sorry, I can't seem to figure out how to edit my post here. I see that there is, in fact, data about the timing of auditory responses recorded as 'latency'. I'm not sure of where this time starts but noneteless it is being recorded. So I guess my main query is about how to extend the recording duration while keeping the 'aduio detection' feature available when using voicerecord without trialduration.

Regards

Jason

By default, Inquisit will start accepting responses after all stimuli in the stimulus presentation sequence (as given in /stimulustimes) have been displayed. Latency is measure relative to that point. You can override that behavior via /beginresponsetime as explained further up in this thread.

> So I guess my main query is about how to extend the recording duration while keeping the 'aduio detection' feature available.

I don't think there is a way to do that, I'm afraid.

Dave,

Thanks for your reply here. I understand how latency is measured now and don't have any issues with it...actually, I would like to keep it in my trail if possible. My confusion is with the inability to set a desired recording duration which incorporates the latency measure...in other words, records for a set amount of time (3 seconds, 5 seconds, etc.). I see requests for such a feature here in the forums dating back to 2008 and wonder what solutions those individuals worked out...

If I use beginresponsetime I lose the latency measure, correct? I noticed here on the threads that voicerecord is explained as being used for recording a word or short sentence...but for some reason it does not allow me to record more than a very short one or two syllable word before it moves on to the next trial...Would a threshold setting help to ensure Inquisit doesn't move on even though audio is still being presented for recording? I guess what I'm trying to figure out is what condition Inquisit uses to move forward after detecting audio from voicerecord? Is is a hard coded preset amount of time? I'm guessing that is not the case but am not really sure. If it is something else related to threshold, maybe I can tweak it a bit to get something close to what I'm hoping for...sorry, I'm just thinking outloud a bit here in the hopes that doing so will trigger an idea. :-)

Regards

Jason

> If I use beginresponsetime I lose the latency measure, correct?

No, /beginresponsetime merely specifies the point in time relative to which latency is measured, i.e. when the trial begins accepting responses.

As for the rest, I'll gladly think about it some more, but -- as indicated previously -- so far I don't see a way to get what you want. I.e. wait for the start of an utterance indefinitely and then record for a specified amount of time beginning with the start of the utterance.

Dave,

Thank you for the clarification. I will toy around with the beginresponsetime and response duration settings some more to see if I can get a desired flow.

On a related topic, I've somehow managed to corrupt my script (I guess) and now for some reason on the first run through, the audio file is not getting played. It simply jumps forward to the 2nd trial... From the second trial the audio file plays and waits for a voicerecord response (still not using beginresponsetime and duration). It was working fine before...I'm not sure what I could have changed to cause this behavior. I restarted Inquisit just to make sure the problem was not related to the fact that I had left the software running for quite a long time but that didn't make a difference.

My current trial settings are:

<trial mytrial>
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = voicerecord
/ responseinterrupt = frames
/ validresponse = (anyresponse)

Regards

Jason


I really can't answer that without the script (including all files it actually needs to run). You can put all of that in a ZIP and attach it here (click +Insert -> Add File), and I'll take a look (not sure if today, could be tomorrow).

Dave,

Thanks...I don't think it has anythign to do with the files (audio or images) as they have not changed at all. I'm guessing I've corrupted something in terms of script syntax... Here is the entire script that I am testing with. I've made the beginresponsetime and trialduration changes and am getting close to a desired behavior...but that first audio file is not getting played, which is a new issue for me. :-(

<parameters>
/fontheight = 10%

/responsekeyleft = 30
/responsekeyleft_label = "A"
/responsekeyright = 40
/responsekeyright_label = "'"
</parameters>

<defaults>
/ screencolor = white
/ voicekeythreshold = 15
/ minimumversion = "5.0.0.0"
/ fontstyle = ("Arial", 3.5%, false, false, false, false, 5, 1)
</defaults>

<item instructions>

/1 = "This is a timed selection task. GO AS FAST AS YOU CAN but try not to make mistakes.

A series of asterisks, like the following, ******** will be displayed on the screen followed by a quick flash.

You will then see two words.

After the two words appear, you will hear a word.

Repeat the word you hear outloud immediately after you hear the word."

</item>

***************************VALUES**********************
<values>
/selectContinue = 1
</values>
***************************VALUES*********************

<item continue>
/1 = "Press the SPACE BAR to begin"
</item>

<picture mypicture>
/ items = pictureitems
</picture>

<item pictureitems>
/ 1 = "dog.jpg"
/ 2 = "cat.jpg"
/ 3 = "apple.jpg"
/ 4 = "house.jpg"
/ 5 = "ball.jpg"
/ 6 = "banana.jpg"
/ 7 = "boat.jpg"
/ 8 = "snail.jpg"
/ 9 = "tree.jpg"
/10 = "boat.jpg"
</item>

<sound mysound>
/ items = sounditems
/ select = picture.mypicture.currentindex
</sound>

<item sounditems>
/ 1 = "dog.wav"
/ 2 = "cat.wav"
/ 3 = "apple.wav"
/ 4 = "house.wav"
/ 5 = "ball.wav"
/ 6 = "banana.wav"
/ 7 = "boat.wav"
/ 8 = "snail.wav"
/ 9 = "tree.wav"
/ 10 = "car.wav"

</item>

<text correctoption>
/ items = correctitems
/ select = picture.mypicture.currentindex
/ vposition = 50%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = list.hpos.nextvalue
</text>

<item correctitems>
/ 1 = "Dog"
/ 2 = "Cat"
/ 3 = "Apple"
/ 4 = "House"
/ 5 = "Ball"
/ 6 = "Banana"
/ 7 = "Boat"
/ 8 = "Snail"
/ 9 = "Tree"
/ 10 = "Car"
</item>

<text distractoroption>
/ items = distractoritems
/ select = picture.mypicture.currentindex
/ vposition = 50%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = list.hpos.nextvalue
</text>

<item distractoritems>
/ 1 = "Cat"
/ 2 = "Dog"
/ 3 = "House"
/ 4 = "Apple"
/ 5 = "Banana"
/ 6 = "Ball"
/ 7 = "Snail"
/ 8 = "Boat"
/ 9 = "Car"
/ 10 = "Tree"
</item>

<item mask>
/1="*******
*******"
</item>

<text mask>
/items = mask
/select = 1
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ txcolor = black
/txbgcolor = white
/position = (50%, 50%)
</text>

<text maskeraser>
/items = mask
/select = 1
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ txcolor = white
/txbgcolor = white
/position = (50%, 50%)
</text>

// randomize the left-right position of the two response options
<list hpos>
/ items = (30%, 70%)
/ selectionrate = always
</list>

<text instructions>
/ items = item.instructions
/ hjustify = center
/ size = (90%, 60%)
/ position = (50%, 85%)
/ valign = bottom
/ txcolor = black
/ select = sequence
/ resetinterval = 20
</text>

<text spacebar>
/ items = continue
/ select = values.selectContinue
/ position = (50%, 95%)
/ valign = bottom
</text>

<trial instructions>
/ stimulustimes = [1=instructions, spacebar]
/ correctresponse = (" ")
/ errormessage = false
/ recorddata = false
</trial>

<trial mytrial>
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = voicerecord
/ validresponse = (anyresponse)
/ beginresponsetime = 2201
/ responseinterrupt = frames
/ trialduration = 6000
</trial>

<block myblock>
/ trials = [1 = instructions; 2-11 = mytrial]
</block>




There is nothing obviously wrong with the syntax. When the issue is that some file or files aren't getting played, I need those files. Please put the entire script, including all wav files and images, in a ZIP and attach it here. Thanks.
By Musashi Jason - 5/28/2018

Dave - Monday, May 28, 2018
Musashi Jason - Monday, May 28, 2018
Dave - Monday, May 28, 2018
Musashi Jason - Monday, May 28, 2018
Dave - Monday, May 28, 2018
Musashi Jason - Sunday, May 27, 2018
Dave - Thursday, May 17, 2018
Musashi Jason - Tuesday, May 15, 2018
Musashi Jason - Tuesday, May 15, 2018
Dave - Monday, May 14, 2018
Musashi Jason - Monday, May 14, 2018
Dave - Monday, May 14, 2018
Musashi Jason - Monday, May 14, 2018
Dave - Monday, May 14, 2018
Musashi Jason - Sunday, May 13, 2018
Hello,

I'm slowly plugging away with my familiarization with Inquist 5 but the process includes quite a few false starts. :-/

I am using voicerecord and want to record responses ater presenting two stimuli (first an image (led and followed by masks), and then an audio stimuli)....after which I want voicerecord to record the subject's response utterance. Currently it seems that voicecrecord begins immediately after the first mask (or image) as I can hear the audio stimulus being recorded...from headphones (I guess it's quiet enough to not be sensed as I have the voicekeythreshold at 15....or should that be voicerecordthreshold...?

Here is the stimulus line...maybe my error will be obvious here...?

/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = voicerecord
/ validresponse = (anyresponse)

Regards

Jason

Use the <trial>'s /beginresponsetime attribute to specify when it should start accepting responses (here: recording audio). You may also want to set the /responseinterrupt mode to frames such as not to terminate the stimulus presentaation sequence once a response is first registered.

Dave,

Thanks, this gets me on the right track it seems but I think I'm missing someting with the responseinterrupt setting. Is there a way to specify a record time interval in order to make sure the subject's entire response is recorded? For example, I have an audio prompt using the word "snail". When the subject repeats the word "snail" the response is being detected at the beginning of the aspirated fricative 's' and then moves on to the next item without recording the entire response...'snail'. I'm guessing I need to add a timing setting...delay of some sort to my trial?

Regards

Jason

Try setting up your trial along the following lines

<trial example>
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = voicerecord
/ validresponse = (anyresponse)
/ beginresponsetime = 1700 <-- not sure when you want to start recording, change as needed. 1700 would coincide with the display of correctoption/distractoroption
/ responseinterrupt = frames <-- makes sure any remaining stimuli are displayed / the stimulus presentation is not interrupted by the response
/ trialduration = 3000 <-- set to a long enough value, theoretically the entire time starting from the value specified in /beginresponsetime until the value specified in trialduration should be recorded, i.e. with the values specified here you should get a recording of ~1300 ms duration.
...
</trial>


Dave,

Thank you for your continued support. For some reason, this doesn't seem to work. I mean adding the /trialduration setting. Doing so makes the trial now run automatically without waiting for a recording at all....what have I done wrong? I started with 3250 to give me 1 second for response time but thought maybe that was too short so I changed it to 4250 which should give me 2 seconds for response time, correct? I was operating under the understanding that the 2 seconds would not start until sound was detected (as that seemed to be how it was working prior to entering the trialduration setting) but it appears to simply run automatically without waiting for sound...is there a way to secure a specified amount of time for response time but have that time begin from when sound is detected? Or maybe I simply need to allocate more time for response time....but I'd like the trial not to proceed until the subject has responded....

<trial mytrial>
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = voicerecord
/ beginresponsetime = 2250
/ responseinterrupt = frames
/ trialduration = 4250
/ validresponse = (anyresponse)

Jason


> I was operating under the understanding that the 2 seconds would not start until sound was detected

No. /trialduration specifies a fixed duration for the trial. The trial will terminate after that time has elapsed, whether a response was given / completed or not.

Only other way I can see is to forego /inputdevice = voicerecord and use /soundcapture instead as in

<trial example>
...
/ soundcapture = true
/ inputdevice = keyboard
/ validresponse = (57)
</trial>

In this case, audio should be captured for the entire trial, i.e. a participant can say their piece and when they're done press the space bar to end the trial.

Dave,

Thanks for your help here. I'm curious about the voicerecord setting...it seems that without the trialduration setting but with the beginresponsetime setting, Inquisit waits after the final stimulus, for an audio response. I like that behavior and would like to keep it if possible but...given that setting, am I able to retain data about the timing of the audio response (in addition to recording the actual response)? I mean, will Inquisit keep data about how quickly after the final stimulus a subject begins his/her utterance? And, I think this is back to my original inquiry, is there a way that I can get Inquist to record for a set amount of time after initial detection of audio? 

Regards

Jason

Dave,

Sorry, I can't seem to figure out how to edit my post here. I see that there is, in fact, data about the timing of auditory responses recorded as 'latency'. I'm not sure of where this time starts but noneteless it is being recorded. So I guess my main query is about how to extend the recording duration while keeping the 'aduio detection' feature available when using voicerecord without trialduration.

Regards

Jason

By default, Inquisit will start accepting responses after all stimuli in the stimulus presentation sequence (as given in /stimulustimes) have been displayed. Latency is measure relative to that point. You can override that behavior via /beginresponsetime as explained further up in this thread.

> So I guess my main query is about how to extend the recording duration while keeping the 'aduio detection' feature available.

I don't think there is a way to do that, I'm afraid.

Dave,

Thanks for your reply here. I understand how latency is measured now and don't have any issues with it...actually, I would like to keep it in my trail if possible. My confusion is with the inability to set a desired recording duration which incorporates the latency measure...in other words, records for a set amount of time (3 seconds, 5 seconds, etc.). I see requests for such a feature here in the forums dating back to 2008 and wonder what solutions those individuals worked out...

If I use beginresponsetime I lose the latency measure, correct? I noticed here on the threads that voicerecord is explained as being used for recording a word or short sentence...but for some reason it does not allow me to record more than a very short one or two syllable word before it moves on to the next trial...Would a threshold setting help to ensure Inquisit doesn't move on even though audio is still being presented for recording? I guess what I'm trying to figure out is what condition Inquisit uses to move forward after detecting audio from voicerecord? Is is a hard coded preset amount of time? I'm guessing that is not the case but am not really sure. If it is something else related to threshold, maybe I can tweak it a bit to get something close to what I'm hoping for...sorry, I'm just thinking outloud a bit here in the hopes that doing so will trigger an idea. :-)

Regards

Jason

> If I use beginresponsetime I lose the latency measure, correct?

No, /beginresponsetime merely specifies the point in time relative to which latency is measured, i.e. when the trial begins accepting responses.

As for the rest, I'll gladly think about it some more, but -- as indicated previously -- so far I don't see a way to get what you want. I.e. wait for the start of an utterance indefinitely and then record for a specified amount of time beginning with the start of the utterance.

Dave,

Thank you for the clarification. I will toy around with the beginresponsetime and response duration settings some more to see if I can get a desired flow.

On a related topic, I've somehow managed to corrupt my script (I guess) and now for some reason on the first run through, the audio file is not getting played. It simply jumps forward to the 2nd trial... From the second trial the audio file plays and waits for a voicerecord response (still not using beginresponsetime and duration). It was working fine before...I'm not sure what I could have changed to cause this behavior. I restarted Inquisit just to make sure the problem was not related to the fact that I had left the software running for quite a long time but that didn't make a difference.

My current trial settings are:

<trial mytrial>
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = voicerecord
/ responseinterrupt = frames
/ validresponse = (anyresponse)

Regards

Jason


I really can't answer that without the script (including all files it actually needs to run). You can put all of that in a ZIP and attach it here (click +Insert -> Add File), and I'll take a look (not sure if today, could be tomorrow).

Dave,

Thanks...I don't think it has anythign to do with the files (audio or images) as they have not changed at all. I'm guessing I've corrupted something in terms of script syntax... Here is the entire script that I am testing with. I've made the beginresponsetime and trialduration changes and am getting close to a desired behavior...but that first audio file is not getting played, which is a new issue for me. :-(

<parameters>
/fontheight = 10%

/responsekeyleft = 30
/responsekeyleft_label = "A"
/responsekeyright = 40
/responsekeyright_label = "'"
</parameters>

<defaults>
/ screencolor = white
/ voicekeythreshold = 15
/ minimumversion = "5.0.0.0"
/ fontstyle = ("Arial", 3.5%, false, false, false, false, 5, 1)
</defaults>

<item instructions>

/1 = "This is a timed selection task. GO AS FAST AS YOU CAN but try not to make mistakes.

A series of asterisks, like the following, ******** will be displayed on the screen followed by a quick flash.

You will then see two words.

After the two words appear, you will hear a word.

Repeat the word you hear outloud immediately after you hear the word."

</item>

***************************VALUES**********************
<values>
/selectContinue = 1
</values>
***************************VALUES*********************

<item continue>
/1 = "Press the SPACE BAR to begin"
</item>

<picture mypicture>
/ items = pictureitems
</picture>

<item pictureitems>
/ 1 = "dog.jpg"
/ 2 = "cat.jpg"
/ 3 = "apple.jpg"
/ 4 = "house.jpg"
/ 5 = "ball.jpg"
/ 6 = "banana.jpg"
/ 7 = "boat.jpg"
/ 8 = "snail.jpg"
/ 9 = "tree.jpg"
/10 = "boat.jpg"
</item>

<sound mysound>
/ items = sounditems
/ select = picture.mypicture.currentindex
</sound>

<item sounditems>
/ 1 = "dog.wav"
/ 2 = "cat.wav"
/ 3 = "apple.wav"
/ 4 = "house.wav"
/ 5 = "ball.wav"
/ 6 = "banana.wav"
/ 7 = "boat.wav"
/ 8 = "snail.wav"
/ 9 = "tree.wav"
/ 10 = "car.wav"

</item>

<text correctoption>
/ items = correctitems
/ select = picture.mypicture.currentindex
/ vposition = 50%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = list.hpos.nextvalue
</text>

<item correctitems>
/ 1 = "Dog"
/ 2 = "Cat"
/ 3 = "Apple"
/ 4 = "House"
/ 5 = "Ball"
/ 6 = "Banana"
/ 7 = "Boat"
/ 8 = "Snail"
/ 9 = "Tree"
/ 10 = "Car"
</item>

<text distractoroption>
/ items = distractoritems
/ select = picture.mypicture.currentindex
/ vposition = 50%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = list.hpos.nextvalue
</text>

<item distractoritems>
/ 1 = "Cat"
/ 2 = "Dog"
/ 3 = "House"
/ 4 = "Apple"
/ 5 = "Banana"
/ 6 = "Ball"
/ 7 = "Snail"
/ 8 = "Boat"
/ 9 = "Car"
/ 10 = "Tree"
</item>

<item mask>
/1="*******
*******"
</item>

<text mask>
/items = mask
/select = 1
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ txcolor = black
/txbgcolor = white
/position = (50%, 50%)
</text>

<text maskeraser>
/items = mask
/select = 1
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ txcolor = white
/txbgcolor = white
/position = (50%, 50%)
</text>

// randomize the left-right position of the two response options
<list hpos>
/ items = (30%, 70%)
/ selectionrate = always
</list>

<text instructions>
/ items = item.instructions
/ hjustify = center
/ size = (90%, 60%)
/ position = (50%, 85%)
/ valign = bottom
/ txcolor = black
/ select = sequence
/ resetinterval = 20
</text>

<text spacebar>
/ items = continue
/ select = values.selectContinue
/ position = (50%, 95%)
/ valign = bottom
</text>

<trial instructions>
/ stimulustimes = [1=instructions, spacebar]
/ correctresponse = (" ")
/ errormessage = false
/ recorddata = false
</trial>

<trial mytrial>
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = voicerecord
/ validresponse = (anyresponse)
/ beginresponsetime = 2201
/ responseinterrupt = frames
/ trialduration = 6000
</trial>

<block myblock>
/ trials = [1 = instructions; 2-11 = mytrial]
</block>




There is nothing obviously wrong with the syntax. When the issue is that some file or files aren't getting played, I need those files. Please put the entire script, including all wav files and images, in a ZIP and attach it here. Thanks.

Dave,

Thanks. Hmm, that is odd...I am attaching the entire package here. Thanks again for your time.

Jason

By Dave - 5/29/2018

Musashi Jason - Monday, May 28, 2018

Dave,

Thanks. Hmm, that is odd...I am attaching the entire package here. Thanks again for your time.

Jason


Hmm, I'm not seeing this oddly enough, audio files play fine from the 1st trial for me (i.e. the audio is not omitted during the 1st trial). I did have to change the format of the WAVs though for them to work across platforms.

There are a couple of possibilities: It may be that the 1st time the soundcard is initialized on your system creates some internal noise that the microphone picks up and the trial takes as an extremely quick response, cutting off the audio before it's played in full in the 1st trial. A higher /voicekeythreshold may avoid that, as may setting the <sound> element's /erase attribute to "false". I've attached a version with cross-platform compatible WAVs below and the erase setting mentioned above. I've left the /voicekeythreshold alone for the time being. If that doesn't resolve the problem, do you recall which changes you made between the version that was working before and the current one? That might give me an idea of what may be going wrong and where. Thanks!
By Musashi Jason - 5/29/2018

Dave - Tuesday, May 29, 2018
Musashi Jason - Monday, May 28, 2018

Dave,

Thanks. Hmm, that is odd...I am attaching the entire package here. Thanks again for your time.

Jason


Hmm, I'm not seeing this oddly enough, audio files play fine from the 1st trial for me (i.e. the audio is not omitted during the 1st trial). I did have to change the format of the WAVs though for them to work across platforms.

There are a couple of possibilities: It may be that the 1st time the soundcard is initialized on your system creates some internal noise that the microphone picks up and the trial takes as an extremely quick response, cutting off the audio before it's played in full in the 1st trial. A higher /voicekeythreshold may avoid that, as may setting the <sound> element's /erase attribute to "false". I've attached a version with cross-platform compatible WAVs below and the erase setting mentioned above. I've left the /voicekeythreshold alone for the time being. If that doesn't resolve the problem, do you recall which changes you made between the version that was working before and the current one? That might give me an idea of what may be going wrong and where. Thanks!

Dave,

Thanks again for your time. Oddly, the package that you sent back works fine...(scrtaching my head) while the one I sent still does not work for me. Rather than waste my time trying to figure out why, I think I'll just delete the old nonfunctioning one and move on. Possibly the wav files contained noise, as you mentioned, that was being picked up...? It's all still in the very early design phase so the audio files are basically dummy placeholders at the moment and not much care was taken when they were recorded.

Thanks again

Jason
By Musashi Jason - 6/7/2018

Musashi Jason - Tuesday, May 29, 2018
Dave - Tuesday, May 29, 2018
Musashi Jason - Monday, May 28, 2018

Dave,

Thanks. Hmm, that is odd...I am attaching the entire package here. Thanks again for your time.

Jason


Hmm, I'm not seeing this oddly enough, audio files play fine from the 1st trial for me (i.e. the audio is not omitted during the 1st trial). I did have to change the format of the WAVs though for them to work across platforms.

There are a couple of possibilities: It may be that the 1st time the soundcard is initialized on your system creates some internal noise that the microphone picks up and the trial takes as an extremely quick response, cutting off the audio before it's played in full in the 1st trial. A higher /voicekeythreshold may avoid that, as may setting the <sound> element's /erase attribute to "false". I've attached a version with cross-platform compatible WAVs below and the erase setting mentioned above. I've left the /voicekeythreshold alone for the time being. If that doesn't resolve the problem, do you recall which changes you made between the version that was working before and the current one? That might give me an idea of what may be going wrong and where. Thanks!

Dave,

Thanks again for your time. Oddly, the package that you sent back works fine...(scrtaching my head) while the one I sent still does not work for me. Rather than waste my time trying to figure out why, I think I'll just delete the old nonfunctioning one and move on. Possibly the wav files contained noise, as you mentioned, that was being picked up...? It's all still in the very early design phase so the audio files are basically dummy placeholders at the moment and not much care was taken when they were recorded.

Thanks again

Jason

Dave,

For some reason, it seems my system is 'evolving' back toward passing through the first trial without recording a response via inputdevice = voicerecord. I say "evolve" because the behavior is not quite as drastic as it was before. The first run through my trial produces the a. photo, b. two text items on screen, and c. audio file. There is a pause after the audio file is played but the spoken response is not recorded. This only happens for the first pass through...from the second pass onwards it functions as expected. As soon as the utterance is spoken (from the 2nd pass through onwards) the two text items disappear from the screen. This does not occur after the 1st one though. 

It seems like the microphone is not being initialized quickly enough or something...? I'm using an Apple MacBook Pro (with touch bar...a fairly new machine)...

I was about to post a question, moving forward for me, about how to now present 'negative' primes (i.e. have a mismatch between image flashed and audio file played) but then noticed this previous problem has crept back in. If you have any advice I would appreciate it.

Regards

Jason

P.S. I added a second trial to my script, which I don't think should affect the behavior of the first but, just in case, I am attaching the entire package here for reference.

By Musashi Jason - 6/7/2018

Musashi Jason - Thursday, June 7, 2018
Musashi Jason - Tuesday, May 29, 2018
Dave - Tuesday, May 29, 2018
Musashi Jason - Monday, May 28, 2018

Dave,

Thanks. Hmm, that is odd...I am attaching the entire package here. Thanks again for your time.

Jason


Hmm, I'm not seeing this oddly enough, audio files play fine from the 1st trial for me (i.e. the audio is not omitted during the 1st trial). I did have to change the format of the WAVs though for them to work across platforms.

There are a couple of possibilities: It may be that the 1st time the soundcard is initialized on your system creates some internal noise that the microphone picks up and the trial takes as an extremely quick response, cutting off the audio before it's played in full in the 1st trial. A higher /voicekeythreshold may avoid that, as may setting the <sound> element's /erase attribute to "false". I've attached a version with cross-platform compatible WAVs below and the erase setting mentioned above. I've left the /voicekeythreshold alone for the time being. If that doesn't resolve the problem, do you recall which changes you made between the version that was working before and the current one? That might give me an idea of what may be going wrong and where. Thanks!

Dave,

Thanks again for your time. Oddly, the package that you sent back works fine...(scrtaching my head) while the one I sent still does not work for me. Rather than waste my time trying to figure out why, I think I'll just delete the old nonfunctioning one and move on. Possibly the wav files contained noise, as you mentioned, that was being picked up...? It's all still in the very early design phase so the audio files are basically dummy placeholders at the moment and not much care was taken when they were recorded.

Thanks again

Jason

Dave,

For some reason, it seems my system is 'evolving' back toward passing through the first trial without recording a response via inputdevice = voicerecord. I say "evolve" because the behavior is not quite as drastic as it was before. The first run through my trial produces the a. photo, b. two text items on screen, and c. audio file. There is a pause after the audio file is played but the spoken response is not recorded. This only happens for the first pass through...from the second pass onwards it functions as expected. As soon as the utterance is spoken (from the 2nd pass through onwards) the two text items disappear from the screen. This does not occur after the 1st one though. 

It seems like the microphone is not being initialized quickly enough or something...? I'm using an Apple MacBook Pro (with touch bar...a fairly new machine)...

I was about to post a question, moving forward for me, about how to now present 'negative' primes (i.e. have a mismatch between image flashed and audio file played) but then noticed this previous problem has crept back in. If you have any advice I would appreciate it.

Regards

Jason

P.S. I added a second trial to my script, which I don't think should affect the behavior of the first but, just in case, I am attaching the entire package here for reference.


Dave,

For some reason the upload did not work...is there an upload filesize limit? The script package is 2.1 MB...?

Jason
By Dave - 6/7/2018

Musashi Jason - Thursday, June 7, 2018

Dave,

For some reason the upload did not work...is there an upload filesize limit? The script package is 2.1 MB...?

Jason

No, 2.1 MB should not be a problem (the archive you uploaded previously to this thread is larger). The problem description, specifically

> The first run through my trial produces the a. photo, b. two text items on screen, and c. audio file. There is a pause after the audio file is played
> but the spoken response is not recorded.

makes me think that some internal noise when initializing the microphone for the 1st time is mistaken as response, but I can't be sure. Perhaps try putting a simple check trial at the very beginning, i.e. before any of the critical trials, with /inputdevice = voicerecord or voicekey that takes any response. If the problem is related to the microphone's 1st time initialization, that should get rid of the problem for the "actual" trials.

As for presenting "mismatched" trials, I don't think there is any fundamental difference in setting those up compared to the "matched" trials, so I'm not sure what the specific question may be. Set up the <trial> and stimulus elements as needed for those trials, and you can use the /not attribute to prevent selection of identical item numbers in the respective stimulus elements if need be.

Generally, as for the audio files (WAVs), make sure they're saved as 16-bit PCM (not 32-bit) for them to work across platforms. If for some reason the file still fails to attach here, you can email it to support<at>millisecond.com instead.
By Musashi Jason - 6/7/2018

Dave - Thursday, June 7, 2018
Musashi Jason - Thursday, June 7, 2018

Dave,

For some reason the upload did not work...is there an upload filesize limit? The script package is 2.1 MB...?

Jason

No, 2.1 MB should not be a problem (the archive you uploaded previously to this thread is larger). The problem description, specifically

> The first run through my trial produces the a. photo, b. two text items on screen, and c. audio file. There is a pause after the audio file is played
> but the spoken response is not recorded.

makes me think that some internal noise when initializing the microphone for the 1st time is mistaken as response, but I can't be sure. Perhaps try putting a simple check trial at the very beginning, i.e. before any of the critical trials, with /inputdevice = voicerecord or voicekey that takes any response. If the problem is related to the microphone's 1st time initialization, that should get rid of the problem for the "actual" trials.

As for presenting "mismatched" trials, I don't think there is any fundamental difference in setting those up compared to the "matched" trials, so I'm not sure what the specific question may be. Set up the <trial> and stimulus elements as needed for those trials, and you can use the /not attribute to prevent selection of identical item numbers in the respective stimulus elements if need be.

Generally, as for the audio files (WAVs), make sure they're saved as 16-bit PCM (not 32-bit) for them to work across platforms. If for some reason the file still fails to attach here, you can email it to support<at>millisecond.com instead.

Dave,

Thanks, I managed to make a 'fake' trial that I put in my block prior to the 'read' voicerecord trial that serves to initialize the microphone. It seems to work well. I think I have it setup so it will not introduce errors elsewhere. My code is:

<trial micset>
/ validresponse = (anyresponse)
/ inputdevice = voicerecord
/ errormessage = false
/ recorddata = false

with it in the block as follows:

<block myblock>
/ trials = [1 = firstinstructions; 2 = micset; 3-12 = firsttrial; 13 = secondinstructions; 14-23 = secondtrial;]

The result is unnoticable from the experiment side but it does seem to get the mic up and running so I don't observe the odd behavior on that first run through the trial. :-)

Before I attempt to get my negative prime part set up, I see that I have the correct answer setting (for the second trial) wrong but I'm not sure how to fix it. I have the following code for the second trial (which involves selecting the word heard using the keyboard).

<trial secondtrial>
/ ontrialbegin = [
values.target = text.correctoption.currentitem;
]
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = keyboard
/ validresponse = (parameters.responsekeyleft, parameters.responsekeyright)
/ correctresponse = (values.target)
/ recorddata = true

It works in the sense that the script runs without errors from the subjects' perspective but the value stored in correctresponse is not the value I want so I'm getting a

--> "Response property 'values.target' returned an invalid value 'Tree' etc. for each absolute value. 

I understand that I need to associate the key (a or " in my case) with the correct value but I'm confused about how to get to that point.

Any help you can provide will, as always, be very much appreciated.

Regards

Jason
By Musashi Jason - 6/7/2018

Musashi Jason - Thursday, June 7, 2018
Dave - Thursday, June 7, 2018
Musashi Jason - Thursday, June 7, 2018

Dave,

For some reason the upload did not work...is there an upload filesize limit? The script package is 2.1 MB...?

Jason

No, 2.1 MB should not be a problem (the archive you uploaded previously to this thread is larger). The problem description, specifically

> The first run through my trial produces the a. photo, b. two text items on screen, and c. audio file. There is a pause after the audio file is played
> but the spoken response is not recorded.

makes me think that some internal noise when initializing the microphone for the 1st time is mistaken as response, but I can't be sure. Perhaps try putting a simple check trial at the very beginning, i.e. before any of the critical trials, with /inputdevice = voicerecord or voicekey that takes any response. If the problem is related to the microphone's 1st time initialization, that should get rid of the problem for the "actual" trials.

As for presenting "mismatched" trials, I don't think there is any fundamental difference in setting those up compared to the "matched" trials, so I'm not sure what the specific question may be. Set up the <trial> and stimulus elements as needed for those trials, and you can use the /not attribute to prevent selection of identical item numbers in the respective stimulus elements if need be.

Generally, as for the audio files (WAVs), make sure they're saved as 16-bit PCM (not 32-bit) for them to work across platforms. If for some reason the file still fails to attach here, you can email it to support<at>millisecond.com instead.

Dave,

Thanks, I managed to make a 'fake' trial that I put in my block prior to the 'read' voicerecord trial that serves to initialize the microphone. It seems to work well. I think I have it setup so it will not introduce errors elsewhere. My code is:

<trial micset>
/ validresponse = (anyresponse)
/ inputdevice = voicerecord
/ errormessage = false
/ recorddata = false

with it in the block as follows:

<block myblock>
/ trials = [1 = firstinstructions; 2 = micset; 3-12 = firsttrial; 13 = secondinstructions; 14-23 = secondtrial;]

The result is unnoticable from the experiment side but it does seem to get the mic up and running so I don't observe the odd behavior on that first run through the trial. :-)

Before I attempt to get my negative prime part set up, I see that I have the correct answer setting (for the second trial) wrong but I'm not sure how to fix it. I have the following code for the second trial (which involves selecting the word heard using the keyboard).

<trial secondtrial>
/ ontrialbegin = [
values.target = text.correctoption.currentitem;
]
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = keyboard
/ validresponse = (parameters.responsekeyleft, parameters.responsekeyright)
/ correctresponse = (values.target)
/ recorddata = true

It works in the sense that the script runs without errors from the subjects' perspective but the value stored in correctresponse is not the value I want so I'm getting a

--> "Response property 'values.target' returned an invalid value 'Tree' etc. for each absolute value. 

I understand that I need to associate the key (a or " in my case) with the correct value but I'm confused about how to get to that point.

Any help you can provide will, as always, be very much appreciated.

Regards

Jason

Dave,

I'm thinking you may not be able to easily see the overall flow of my experiment from the above snippets so I'm pasting the entire thing here. Hopefully, this will make it clearer. Also, in addition to getting the correct response recognized in trial2, I want to next add two trials with negative primes (incongruent photo and audio file match) but don't quite understand how to accomplish that with /not attribute...

I continue to be extremely appreciative of your assistance.

Jason

**************************************************************************************************************
**************************************************************************************************************
DEFAULTS
**************************************************************************************************************
**************************************************************************************************************
script requires Inquisit 5.0.0.0 or higher

<parameters>
/fontheight = 10%

/responsekeyleft = 30
/responsekeyleft_label = "A"
/responsekeyright = 40
/responsekeyright_label = "'"
</parameters>

<defaults>
/ screencolor = white
/ voicekeythreshold = 15
/ minimumversion = "5.0.0.0"
/ fontstyle = ("Arial", 3.5%, false, false, false, false, 5, 1)
</defaults>

<item instructions>

/1 = "This is a timed selection task. GO AS FAST AS YOU CAN but try not to make mistakes.

A series of asterisks, like the following, ******** will be displayed on the screen followed by a quick flash.

You will then see two words.

After the two words appear, you will hear a word.

Repeat the word you hear outloud immediately after you hear the word."

/2 = "For the second part of this test, use the A and ' keys to select the correct option.

A series of asterisks, like the following, ******** will be displayed on the screen followed by a quick flash.

You will then see two words.

After the two words appear, you will hear a word.

Use the A (on the left side of the keyboard) and ' (on the right side of the keyboard) to select the correct option that appears on the left or right of the screen."

</item>

***************************VALUES**********************
<values>
/selectContinue = 1
/target = ""
</values>
***************************VALUES*********************

<item continue>
/1 = "Press the SPACE BAR to begin"
</item>

<picture mypicture>
/ items = pictureitems
</picture>

<item pictureitems>
/ 1 = "dog.jpg"
/ 2 = "cat.jpg"
/ 3 = "apple.jpg"
/ 4 = "house.jpg"
/ 5 = "ball.jpg"
/ 6 = "banana.jpg"
/ 7 = "boat.jpg"
/ 8 = "snail.jpg"
/ 9 = "tree.jpg"
/10 = "boat.jpg"
</item>

<sound mysound>
/ items = sounditems
/ select = picture.mypicture.currentindex
/ erase = false
</sound>

<item sounditems>
/ 1 = "dog.wav"
/ 2 = "cat.wav"
/ 3 = "apple.wav"
/ 4 = "house.wav"
/ 5 = "ball.wav"
/ 6 = "banana.wav"
/ 7 = "boat.wav"
/ 8 = "snail.wav"
/ 9 = "tree.wav"
/ 10 = "car.wav"
</item>

<text correctoption>
/ items = correctitems
/ select = picture.mypicture.currentindex
/ vposition = 50%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = list.hpos.nextvalue
</text>

<item correctitems>
/ 1 = "Dog"
/ 2 = "Cat"
/ 3 = "Apple"
/ 4 = "House"
/ 5 = "Ball"
/ 6 = "Banana"
/ 7 = "Boat"
/ 8 = "Snail"
/ 9 = "Tree"
/ 10 = "Car"
</item>

<text distractoroption>
/ items = distractoritems
/ select = picture.mypicture.currentindex
/ vposition = 50%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = list.hpos.nextvalue
</text>

<item distractoritems>
/ 1 = "Cat"
/ 2 = "Dog"
/ 3 = "House"
/ 4 = "Apple"
/ 5 = "Banana"
/ 6 = "Ball"
/ 7 = "Snail"
/ 8 = "Boat"
/ 9 = "Car"
/ 10 = "Tree"
</item>

<item mask>
/1="*******
*******"
</item>

<text mask>
/items = mask
/select = 1
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ txcolor = black
/txbgcolor = white
/position = (50%, 50%)
</text>

<text maskeraser>
/items = mask
/select = 1
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ txcolor = white
/txbgcolor = white
/position = (50%, 50%)
</text>

// randomize the left-right position of the two response options
<list hpos>
/ items = (30%, 70%)
/ selectionrate = always
</list>

<text instructions>
/ items = item.instructions
/ hjustify = center
/ size = (90%, 60%)
/ position = (50%, 85%)
/ valign = bottom
/ txcolor = black
/ select = sequence
/ resetinterval = 20
</text>

<text spacebar>
/ items = continue
/ select = values.selectContinue
/ position = (50%, 95%)
/ valign = bottom
</text>

<trial firstinstructions>
/ stimulustimes = [1=instructions, spacebar]
/ correctresponse = (" ")
/ errormessage = false
/ recorddata = false
</trial>

<trial secondinstructions>
/ stimulustimes = [2=instructions, spacebar]
/ correctresponse = (" ")
/ errormessage = false
/ recorddata = false
</trial>

<trial micset>
/ validresponse = (anyresponse)
/ inputdevice = voicerecord
/ errormessage = false
/ recorddata = false
</trial>

<trial firsttrial>
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ validresponse = (anyresponse)
/ beginresponsetime = 2000
/ inputdevice = voicerecord
/ responseinterrupt = frames
/ trialduration = 6000
/ recorddata = true
</trial>

<trial secondtrial>
/ ontrialbegin = [
values.target = text.correctoption.currentitem;
]
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = keyboard
/ validresponse = (parameters.responsekeyleft, parameters.responsekeyright)
/ correctresponse = (values.target)
/ recorddata = true
</trial>

<block myblock>
/ trials = [1 = firstinstructions; 2 = micset; 3-12 = firsttrial; 13 = secondinstructions; 14-23 = secondtrial;]
</block>

By Dave - 6/8/2018

Musashi Jason - Thursday, June 7, 2018

Dave,

I'm thinking you may not be able to easily see the overall flow of my experiment from the above snippets so I'm pasting the entire thing here. Hopefully, this will make it clearer. Also, in addition to getting the correct response recognized in trial2, I want to next add two trials with negative primes (incongruent photo and audio file match) but don't quite understand how to accomplish that with /not attribute...

I continue to be extremely appreciative of your assistance.

Jason

**************************************************************************************************************
**************************************************************************************************************
DEFAULTS
**************************************************************************************************************
**************************************************************************************************************
script requires Inquisit 5.0.0.0 or higher

<parameters>
/fontheight = 10%

/responsekeyleft = 30
/responsekeyleft_label = "A"
/responsekeyright = 40
/responsekeyright_label = "'"
</parameters>

<defaults>
/ screencolor = white
/ voicekeythreshold = 15
/ minimumversion = "5.0.0.0"
/ fontstyle = ("Arial", 3.5%, false, false, false, false, 5, 1)
</defaults>

<item instructions>

/1 = "This is a timed selection task. GO AS FAST AS YOU CAN but try not to make mistakes.

A series of asterisks, like the following, ******** will be displayed on the screen followed by a quick flash.

You will then see two words.

After the two words appear, you will hear a word.

Repeat the word you hear outloud immediately after you hear the word."

/2 = "For the second part of this test, use the A and ' keys to select the correct option.

A series of asterisks, like the following, ******** will be displayed on the screen followed by a quick flash.

You will then see two words.

After the two words appear, you will hear a word.

Use the A (on the left side of the keyboard) and ' (on the right side of the keyboard) to select the correct option that appears on the left or right of the screen."

</item>

***************************VALUES**********************
<values>
/selectContinue = 1
/target = ""
</values>
***************************VALUES*********************

<item continue>
/1 = "Press the SPACE BAR to begin"
</item>

<picture mypicture>
/ items = pictureitems
</picture>

<item pictureitems>
/ 1 = "dog.jpg"
/ 2 = "cat.jpg"
/ 3 = "apple.jpg"
/ 4 = "house.jpg"
/ 5 = "ball.jpg"
/ 6 = "banana.jpg"
/ 7 = "boat.jpg"
/ 8 = "snail.jpg"
/ 9 = "tree.jpg"
/10 = "boat.jpg"
</item>

<sound mysound>
/ items = sounditems
/ select = picture.mypicture.currentindex
/ erase = false
</sound>

<item sounditems>
/ 1 = "dog.wav"
/ 2 = "cat.wav"
/ 3 = "apple.wav"
/ 4 = "house.wav"
/ 5 = "ball.wav"
/ 6 = "banana.wav"
/ 7 = "boat.wav"
/ 8 = "snail.wav"
/ 9 = "tree.wav"
/ 10 = "car.wav"
</item>

<text correctoption>
/ items = correctitems
/ select = picture.mypicture.currentindex
/ vposition = 50%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = list.hpos.nextvalue
</text>

<item correctitems>
/ 1 = "Dog"
/ 2 = "Cat"
/ 3 = "Apple"
/ 4 = "House"
/ 5 = "Ball"
/ 6 = "Banana"
/ 7 = "Boat"
/ 8 = "Snail"
/ 9 = "Tree"
/ 10 = "Car"
</item>

<text distractoroption>
/ items = distractoritems
/ select = picture.mypicture.currentindex
/ vposition = 50%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = list.hpos.nextvalue
</text>

<item distractoritems>
/ 1 = "Cat"
/ 2 = "Dog"
/ 3 = "House"
/ 4 = "Apple"
/ 5 = "Banana"
/ 6 = "Ball"
/ 7 = "Snail"
/ 8 = "Boat"
/ 9 = "Car"
/ 10 = "Tree"
</item>

<item mask>
/1="*******
*******"
</item>

<text mask>
/items = mask
/select = 1
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ txcolor = black
/txbgcolor = white
/position = (50%, 50%)
</text>

<text maskeraser>
/items = mask
/select = 1
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ txcolor = white
/txbgcolor = white
/position = (50%, 50%)
</text>

// randomize the left-right position of the two response options
<list hpos>
/ items = (30%, 70%)
/ selectionrate = always
</list>

<text instructions>
/ items = item.instructions
/ hjustify = center
/ size = (90%, 60%)
/ position = (50%, 85%)
/ valign = bottom
/ txcolor = black
/ select = sequence
/ resetinterval = 20
</text>

<text spacebar>
/ items = continue
/ select = values.selectContinue
/ position = (50%, 95%)
/ valign = bottom
</text>

<trial firstinstructions>
/ stimulustimes = [1=instructions, spacebar]
/ correctresponse = (" ")
/ errormessage = false
/ recorddata = false
</trial>

<trial secondinstructions>
/ stimulustimes = [2=instructions, spacebar]
/ correctresponse = (" ")
/ errormessage = false
/ recorddata = false
</trial>

<trial micset>
/ validresponse = (anyresponse)
/ inputdevice = voicerecord
/ errormessage = false
/ recorddata = false
</trial>

<trial firsttrial>
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ validresponse = (anyresponse)
/ beginresponsetime = 2000
/ inputdevice = voicerecord
/ responseinterrupt = frames
/ trialduration = 6000
/ recorddata = true
</trial>

<trial secondtrial>
/ ontrialbegin = [
values.target = text.correctoption.currentitem;
]
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = keyboard
/ validresponse = (parameters.responsekeyleft, parameters.responsekeyright)
/ correctresponse = (values.target)
/ recorddata = true
</trial>

<block myblock>
/ trials = [1 = firstinstructions; 2 = micset; 3-12 = firsttrial; 13 = secondinstructions; 14-23 = secondtrial;]
</block>



What you need to do is set values.target to the keyboard scancode corresponding to the either the left or right key, and that will depend on _where_ text.correctoption is _positioned_, not on text.correctoption's current item. In other words, if text.correctoption is on the left in the given trial, values.target needs to be set to 30. If text.correctoption is on the right in the current trial, then values.target out to be set to 40.

I.e.

<trial secondtrial>
/ ontrialbegin = [
    values.correcth = list.hpos.nextvalue;
    values.distractorh = list.hpos.nextvalue;
]
/ ontrialbegin = [
    if (values.correcth == 30%) values.target = 30 else values.target = 40;
]

/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = keyboard
/ validresponse = (parameters.responsekeyleft, parameters.responsekeyright)
/ correctresponse = (values.target)
/ recorddata = true
</trial>

with

<text correctoption>
/ items = correctitems
/ select = text.mypicture.currentindex
/ vposition = 50%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = values.correcth
</text>

...

<text distractoroption>
/ items = distractoritems
/ select = text.mypicture.currentindex
/ vposition = 50%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = values.distractorh
</text>

As for the 2nd -- mismatched -- trial type, you need to set up separate stimulus elements. You cannot use the same ones that are already used by the 1st -- matched -- trial type.
By Musashi Jason - 6/12/2018

Dave - Friday, June 8, 2018
Musashi Jason - Thursday, June 7, 2018

Dave,

I'm thinking you may not be able to easily see the overall flow of my experiment from the above snippets so I'm pasting the entire thing here. Hopefully, this will make it clearer. Also, in addition to getting the correct response recognized in trial2, I want to next add two trials with negative primes (incongruent photo and audio file match) but don't quite understand how to accomplish that with /not attribute...

I continue to be extremely appreciative of your assistance.

Jason

**************************************************************************************************************
**************************************************************************************************************
DEFAULTS
**************************************************************************************************************
**************************************************************************************************************
script requires Inquisit 5.0.0.0 or higher

<parameters>
/fontheight = 10%

/responsekeyleft = 30
/responsekeyleft_label = "A"
/responsekeyright = 40
/responsekeyright_label = "'"
</parameters>

<defaults>
/ screencolor = white
/ voicekeythreshold = 15
/ minimumversion = "5.0.0.0"
/ fontstyle = ("Arial", 3.5%, false, false, false, false, 5, 1)
</defaults>

<item instructions>

/1 = "This is a timed selection task. GO AS FAST AS YOU CAN but try not to make mistakes.

A series of asterisks, like the following, ******** will be displayed on the screen followed by a quick flash.

You will then see two words.

After the two words appear, you will hear a word.

Repeat the word you hear outloud immediately after you hear the word."

/2 = "For the second part of this test, use the A and ' keys to select the correct option.

A series of asterisks, like the following, ******** will be displayed on the screen followed by a quick flash.

You will then see two words.

After the two words appear, you will hear a word.

Use the A (on the left side of the keyboard) and ' (on the right side of the keyboard) to select the correct option that appears on the left or right of the screen."

</item>

***************************VALUES**********************
<values>
/selectContinue = 1
/target = ""
</values>
***************************VALUES*********************

<item continue>
/1 = "Press the SPACE BAR to begin"
</item>

<picture mypicture>
/ items = pictureitems
</picture>

<item pictureitems>
/ 1 = "dog.jpg"
/ 2 = "cat.jpg"
/ 3 = "apple.jpg"
/ 4 = "house.jpg"
/ 5 = "ball.jpg"
/ 6 = "banana.jpg"
/ 7 = "boat.jpg"
/ 8 = "snail.jpg"
/ 9 = "tree.jpg"
/10 = "boat.jpg"
</item>

<sound mysound>
/ items = sounditems
/ select = picture.mypicture.currentindex
/ erase = false
</sound>

<item sounditems>
/ 1 = "dog.wav"
/ 2 = "cat.wav"
/ 3 = "apple.wav"
/ 4 = "house.wav"
/ 5 = "ball.wav"
/ 6 = "banana.wav"
/ 7 = "boat.wav"
/ 8 = "snail.wav"
/ 9 = "tree.wav"
/ 10 = "car.wav"
</item>

<text correctoption>
/ items = correctitems
/ select = picture.mypicture.currentindex
/ vposition = 50%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = list.hpos.nextvalue
</text>

<item correctitems>
/ 1 = "Dog"
/ 2 = "Cat"
/ 3 = "Apple"
/ 4 = "House"
/ 5 = "Ball"
/ 6 = "Banana"
/ 7 = "Boat"
/ 8 = "Snail"
/ 9 = "Tree"
/ 10 = "Car"
</item>

<text distractoroption>
/ items = distractoritems
/ select = picture.mypicture.currentindex
/ vposition = 50%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = list.hpos.nextvalue
</text>

<item distractoritems>
/ 1 = "Cat"
/ 2 = "Dog"
/ 3 = "House"
/ 4 = "Apple"
/ 5 = "Banana"
/ 6 = "Ball"
/ 7 = "Snail"
/ 8 = "Boat"
/ 9 = "Car"
/ 10 = "Tree"
</item>

<item mask>
/1="*******
*******"
</item>

<text mask>
/items = mask
/select = 1
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ txcolor = black
/txbgcolor = white
/position = (50%, 50%)
</text>

<text maskeraser>
/items = mask
/select = 1
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ txcolor = white
/txbgcolor = white
/position = (50%, 50%)
</text>

// randomize the left-right position of the two response options
<list hpos>
/ items = (30%, 70%)
/ selectionrate = always
</list>

<text instructions>
/ items = item.instructions
/ hjustify = center
/ size = (90%, 60%)
/ position = (50%, 85%)
/ valign = bottom
/ txcolor = black
/ select = sequence
/ resetinterval = 20
</text>

<text spacebar>
/ items = continue
/ select = values.selectContinue
/ position = (50%, 95%)
/ valign = bottom
</text>

<trial firstinstructions>
/ stimulustimes = [1=instructions, spacebar]
/ correctresponse = (" ")
/ errormessage = false
/ recorddata = false
</trial>

<trial secondinstructions>
/ stimulustimes = [2=instructions, spacebar]
/ correctresponse = (" ")
/ errormessage = false
/ recorddata = false
</trial>

<trial micset>
/ validresponse = (anyresponse)
/ inputdevice = voicerecord
/ errormessage = false
/ recorddata = false
</trial>

<trial firsttrial>
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ validresponse = (anyresponse)
/ beginresponsetime = 2000
/ inputdevice = voicerecord
/ responseinterrupt = frames
/ trialduration = 6000
/ recorddata = true
</trial>

<trial secondtrial>
/ ontrialbegin = [
values.target = text.correctoption.currentitem;
]
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = keyboard
/ validresponse = (parameters.responsekeyleft, parameters.responsekeyright)
/ correctresponse = (values.target)
/ recorddata = true
</trial>

<block myblock>
/ trials = [1 = firstinstructions; 2 = micset; 3-12 = firsttrial; 13 = secondinstructions; 14-23 = secondtrial;]
</block>



What you need to do is set values.target to the keyboard scancode corresponding to the either the left or right key, and that will depend on _where_ text.correctoption is _positioned_, not on text.correctoption's current item. In other words, if text.correctoption is on the left in the given trial, values.target needs to be set to 30. If text.correctoption is on the right in the current trial, then values.target out to be set to 40.

I.e.

<trial secondtrial>
/ ontrialbegin = [
    values.correcth = list.hpos.nextvalue;
    values.distractorh = list.hpos.nextvalue;
]
/ ontrialbegin = [
    if (values.correcth == 30%) values.target = 30 else values.target = 40;
]

/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = keyboard
/ validresponse = (parameters.responsekeyleft, parameters.responsekeyright)
/ correctresponse = (values.target)
/ recorddata = true
</trial>

with

<text correctoption>
/ items = correctitems
/ select = text.mypicture.currentindex
/ vposition = 50%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = values.correcth
</text>

...

<text distractoroption>
/ items = distractoritems
/ select = text.mypicture.currentindex
/ vposition = 50%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = values.distractorh
</text>

As for the 2nd -- mismatched -- trial type, you need to set up separate stimulus elements. You cannot use the same ones that are already used by the 1st -- matched -- trial type.

Dave,

Thank you very much for the explanation. Just to clarify, the 30% corresponds to the left position, correct? And, so I can make sure I understand the syntax, double equal signs == is for comparison, correct? So I'm checking to see if correcth is 30 and if so I assign that to values.target and if not I assign 40 to values.target. :-)

Thanks again for your help. Hopefully I'll, sometime soon, be able to stand on my own. :-)

Regards

Jason 
By Musashi Jason - 6/12/2018

Musashi Jason - Tuesday, June 12, 2018
Dave - Friday, June 8, 2018
Musashi Jason - Thursday, June 7, 2018

Dave,

I'm thinking you may not be able to easily see the overall flow of my experiment from the above snippets so I'm pasting the entire thing here. Hopefully, this will make it clearer. Also, in addition to getting the correct response recognized in trial2, I want to next add two trials with negative primes (incongruent photo and audio file match) but don't quite understand how to accomplish that with /not attribute...

I continue to be extremely appreciative of your assistance.

Jason

**************************************************************************************************************
**************************************************************************************************************
DEFAULTS
**************************************************************************************************************
**************************************************************************************************************
script requires Inquisit 5.0.0.0 or higher

<parameters>
/fontheight = 10%

/responsekeyleft = 30
/responsekeyleft_label = "A"
/responsekeyright = 40
/responsekeyright_label = "'"
</parameters>

<defaults>
/ screencolor = white
/ voicekeythreshold = 15
/ minimumversion = "5.0.0.0"
/ fontstyle = ("Arial", 3.5%, false, false, false, false, 5, 1)
</defaults>

<item instructions>

/1 = "This is a timed selection task. GO AS FAST AS YOU CAN but try not to make mistakes.

A series of asterisks, like the following, ******** will be displayed on the screen followed by a quick flash.

You will then see two words.

After the two words appear, you will hear a word.

Repeat the word you hear outloud immediately after you hear the word."

/2 = "For the second part of this test, use the A and ' keys to select the correct option.

A series of asterisks, like the following, ******** will be displayed on the screen followed by a quick flash.

You will then see two words.

After the two words appear, you will hear a word.

Use the A (on the left side of the keyboard) and ' (on the right side of the keyboard) to select the correct option that appears on the left or right of the screen."

</item>

***************************VALUES**********************
<values>
/selectContinue = 1
/target = ""
</values>
***************************VALUES*********************

<item continue>
/1 = "Press the SPACE BAR to begin"
</item>

<picture mypicture>
/ items = pictureitems
</picture>

<item pictureitems>
/ 1 = "dog.jpg"
/ 2 = "cat.jpg"
/ 3 = "apple.jpg"
/ 4 = "house.jpg"
/ 5 = "ball.jpg"
/ 6 = "banana.jpg"
/ 7 = "boat.jpg"
/ 8 = "snail.jpg"
/ 9 = "tree.jpg"
/10 = "boat.jpg"
</item>

<sound mysound>
/ items = sounditems
/ select = picture.mypicture.currentindex
/ erase = false
</sound>

<item sounditems>
/ 1 = "dog.wav"
/ 2 = "cat.wav"
/ 3 = "apple.wav"
/ 4 = "house.wav"
/ 5 = "ball.wav"
/ 6 = "banana.wav"
/ 7 = "boat.wav"
/ 8 = "snail.wav"
/ 9 = "tree.wav"
/ 10 = "car.wav"
</item>

<text correctoption>
/ items = correctitems
/ select = picture.mypicture.currentindex
/ vposition = 50%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = list.hpos.nextvalue
</text>

<item correctitems>
/ 1 = "Dog"
/ 2 = "Cat"
/ 3 = "Apple"
/ 4 = "House"
/ 5 = "Ball"
/ 6 = "Banana"
/ 7 = "Boat"
/ 8 = "Snail"
/ 9 = "Tree"
/ 10 = "Car"
</item>

<text distractoroption>
/ items = distractoritems
/ select = picture.mypicture.currentindex
/ vposition = 50%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = list.hpos.nextvalue
</text>

<item distractoritems>
/ 1 = "Cat"
/ 2 = "Dog"
/ 3 = "House"
/ 4 = "Apple"
/ 5 = "Banana"
/ 6 = "Ball"
/ 7 = "Snail"
/ 8 = "Boat"
/ 9 = "Car"
/ 10 = "Tree"
</item>

<item mask>
/1="*******
*******"
</item>

<text mask>
/items = mask
/select = 1
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ txcolor = black
/txbgcolor = white
/position = (50%, 50%)
</text>

<text maskeraser>
/items = mask
/select = 1
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ txcolor = white
/txbgcolor = white
/position = (50%, 50%)
</text>

// randomize the left-right position of the two response options
<list hpos>
/ items = (30%, 70%)
/ selectionrate = always
</list>

<text instructions>
/ items = item.instructions
/ hjustify = center
/ size = (90%, 60%)
/ position = (50%, 85%)
/ valign = bottom
/ txcolor = black
/ select = sequence
/ resetinterval = 20
</text>

<text spacebar>
/ items = continue
/ select = values.selectContinue
/ position = (50%, 95%)
/ valign = bottom
</text>

<trial firstinstructions>
/ stimulustimes = [1=instructions, spacebar]
/ correctresponse = (" ")
/ errormessage = false
/ recorddata = false
</trial>

<trial secondinstructions>
/ stimulustimes = [2=instructions, spacebar]
/ correctresponse = (" ")
/ errormessage = false
/ recorddata = false
</trial>

<trial micset>
/ validresponse = (anyresponse)
/ inputdevice = voicerecord
/ errormessage = false
/ recorddata = false
</trial>

<trial firsttrial>
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ validresponse = (anyresponse)
/ beginresponsetime = 2000
/ inputdevice = voicerecord
/ responseinterrupt = frames
/ trialduration = 6000
/ recorddata = true
</trial>

<trial secondtrial>
/ ontrialbegin = [
values.target = text.correctoption.currentitem;
]
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = keyboard
/ validresponse = (parameters.responsekeyleft, parameters.responsekeyright)
/ correctresponse = (values.target)
/ recorddata = true
</trial>

<block myblock>
/ trials = [1 = firstinstructions; 2 = micset; 3-12 = firsttrial; 13 = secondinstructions; 14-23 = secondtrial;]
</block>



What you need to do is set values.target to the keyboard scancode corresponding to the either the left or right key, and that will depend on _where_ text.correctoption is _positioned_, not on text.correctoption's current item. In other words, if text.correctoption is on the left in the given trial, values.target needs to be set to 30. If text.correctoption is on the right in the current trial, then values.target out to be set to 40.

I.e.

<trial secondtrial>
/ ontrialbegin = [
    values.correcth = list.hpos.nextvalue;
    values.distractorh = list.hpos.nextvalue;
]
/ ontrialbegin = [
    if (values.correcth == 30%) values.target = 30 else values.target = 40;
]

/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = keyboard
/ validresponse = (parameters.responsekeyleft, parameters.responsekeyright)
/ correctresponse = (values.target)
/ recorddata = true
</trial>

with

<text correctoption>
/ items = correctitems
/ select = text.mypicture.currentindex
/ vposition = 50%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = values.correcth
</text>

...

<text distractoroption>
/ items = distractoritems
/ select = text.mypicture.currentindex
/ vposition = 50%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = values.distractorh
</text>

As for the 2nd -- mismatched -- trial type, you need to set up separate stimulus elements. You cannot use the same ones that are already used by the 1st -- matched -- trial type.

Dave,

Thank you very much for the explanation. Just to clarify, the 30% corresponds to the left position, correct? And, so I can make sure I understand the syntax, double equal signs == is for comparison, correct? So I'm checking to see if correcth is 30 and if so I assign that to values.target and if not I assign 40 to values.target. :-)

Thanks again for your help. Hopefully I'll, sometime soon, be able to stand on my own. :-)

Regards

Jason 

Dave,

I guess I should have tested it thoroughly before posting my previous message. :-/ I had to 'initialize' the two new parameters as follows

<values>
/correcth = ""
/distractorh = ''
</values>

I guess it is appropriate to set them to null initially? That got rid of the "Expression contains and unknown element or property name." error message and the experiment now runs but...for some reason my text prompts (words such as "dog", "cat" etc.) now appear primarily off screen. I mean, I can see two letters of one word all the way over on the left side of the screen but that is it... The changes I've made have apparently corrupted the horizontal presentation position of the prompt...but I'm not sure how.

If you have any pointers I will be most appreciative. :-)

Regards

Jason
By Dave - 6/12/2018

Musashi Jason - Tuesday, June 12, 2018
Dave - Friday, June 8, 2018
Musashi Jason - Thursday, June 7, 2018

Dave,

I'm thinking you may not be able to easily see the overall flow of my experiment from the above snippets so I'm pasting the entire thing here. Hopefully, this will make it clearer. Also, in addition to getting the correct response recognized in trial2, I want to next add two trials with negative primes (incongruent photo and audio file match) but don't quite understand how to accomplish that with /not attribute...

I continue to be extremely appreciative of your assistance.

Jason

**************************************************************************************************************
**************************************************************************************************************
DEFAULTS
**************************************************************************************************************
**************************************************************************************************************
script requires Inquisit 5.0.0.0 or higher

<parameters>
/fontheight = 10%

/responsekeyleft = 30
/responsekeyleft_label = "A"
/responsekeyright = 40
/responsekeyright_label = "'"
</parameters>

<defaults>
/ screencolor = white
/ voicekeythreshold = 15
/ minimumversion = "5.0.0.0"
/ fontstyle = ("Arial", 3.5%, false, false, false, false, 5, 1)
</defaults>

<item instructions>

/1 = "This is a timed selection task. GO AS FAST AS YOU CAN but try not to make mistakes.

A series of asterisks, like the following, ******** will be displayed on the screen followed by a quick flash.

You will then see two words.

After the two words appear, you will hear a word.

Repeat the word you hear outloud immediately after you hear the word."

/2 = "For the second part of this test, use the A and ' keys to select the correct option.

A series of asterisks, like the following, ******** will be displayed on the screen followed by a quick flash.

You will then see two words.

After the two words appear, you will hear a word.

Use the A (on the left side of the keyboard) and ' (on the right side of the keyboard) to select the correct option that appears on the left or right of the screen."

</item>

***************************VALUES**********************
<values>
/selectContinue = 1
/target = ""
</values>
***************************VALUES*********************

<item continue>
/1 = "Press the SPACE BAR to begin"
</item>

<picture mypicture>
/ items = pictureitems
</picture>

<item pictureitems>
/ 1 = "dog.jpg"
/ 2 = "cat.jpg"
/ 3 = "apple.jpg"
/ 4 = "house.jpg"
/ 5 = "ball.jpg"
/ 6 = "banana.jpg"
/ 7 = "boat.jpg"
/ 8 = "snail.jpg"
/ 9 = "tree.jpg"
/10 = "boat.jpg"
</item>

<sound mysound>
/ items = sounditems
/ select = picture.mypicture.currentindex
/ erase = false
</sound>

<item sounditems>
/ 1 = "dog.wav"
/ 2 = "cat.wav"
/ 3 = "apple.wav"
/ 4 = "house.wav"
/ 5 = "ball.wav"
/ 6 = "banana.wav"
/ 7 = "boat.wav"
/ 8 = "snail.wav"
/ 9 = "tree.wav"
/ 10 = "car.wav"
</item>

<text correctoption>
/ items = correctitems
/ select = picture.mypicture.currentindex
/ vposition = 50%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = list.hpos.nextvalue
</text>

<item correctitems>
/ 1 = "Dog"
/ 2 = "Cat"
/ 3 = "Apple"
/ 4 = "House"
/ 5 = "Ball"
/ 6 = "Banana"
/ 7 = "Boat"
/ 8 = "Snail"
/ 9 = "Tree"
/ 10 = "Car"
</item>

<text distractoroption>
/ items = distractoritems
/ select = picture.mypicture.currentindex
/ vposition = 50%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = list.hpos.nextvalue
</text>

<item distractoritems>
/ 1 = "Cat"
/ 2 = "Dog"
/ 3 = "House"
/ 4 = "Apple"
/ 5 = "Banana"
/ 6 = "Ball"
/ 7 = "Snail"
/ 8 = "Boat"
/ 9 = "Car"
/ 10 = "Tree"
</item>

<item mask>
/1="*******
*******"
</item>

<text mask>
/items = mask
/select = 1
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ txcolor = black
/txbgcolor = white
/position = (50%, 50%)
</text>

<text maskeraser>
/items = mask
/select = 1
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ txcolor = white
/txbgcolor = white
/position = (50%, 50%)
</text>

// randomize the left-right position of the two response options
<list hpos>
/ items = (30%, 70%)
/ selectionrate = always
</list>

<text instructions>
/ items = item.instructions
/ hjustify = center
/ size = (90%, 60%)
/ position = (50%, 85%)
/ valign = bottom
/ txcolor = black
/ select = sequence
/ resetinterval = 20
</text>

<text spacebar>
/ items = continue
/ select = values.selectContinue
/ position = (50%, 95%)
/ valign = bottom
</text>

<trial firstinstructions>
/ stimulustimes = [1=instructions, spacebar]
/ correctresponse = (" ")
/ errormessage = false
/ recorddata = false
</trial>

<trial secondinstructions>
/ stimulustimes = [2=instructions, spacebar]
/ correctresponse = (" ")
/ errormessage = false
/ recorddata = false
</trial>

<trial micset>
/ validresponse = (anyresponse)
/ inputdevice = voicerecord
/ errormessage = false
/ recorddata = false
</trial>

<trial firsttrial>
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ validresponse = (anyresponse)
/ beginresponsetime = 2000
/ inputdevice = voicerecord
/ responseinterrupt = frames
/ trialduration = 6000
/ recorddata = true
</trial>

<trial secondtrial>
/ ontrialbegin = [
values.target = text.correctoption.currentitem;
]
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = keyboard
/ validresponse = (parameters.responsekeyleft, parameters.responsekeyright)
/ correctresponse = (values.target)
/ recorddata = true
</trial>

<block myblock>
/ trials = [1 = firstinstructions; 2 = micset; 3-12 = firsttrial; 13 = secondinstructions; 14-23 = secondtrial;]
</block>



What you need to do is set values.target to the keyboard scancode corresponding to the either the left or right key, and that will depend on _where_ text.correctoption is _positioned_, not on text.correctoption's current item. In other words, if text.correctoption is on the left in the given trial, values.target needs to be set to 30. If text.correctoption is on the right in the current trial, then values.target out to be set to 40.

I.e.

<trial secondtrial>
/ ontrialbegin = [
    values.correcth = list.hpos.nextvalue;
    values.distractorh = list.hpos.nextvalue;
]
/ ontrialbegin = [
    if (values.correcth == 30%) values.target = 30 else values.target = 40;
]

/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = keyboard
/ validresponse = (parameters.responsekeyleft, parameters.responsekeyright)
/ correctresponse = (values.target)
/ recorddata = true
</trial>

with

<text correctoption>
/ items = correctitems
/ select = text.mypicture.currentindex
/ vposition = 50%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = values.correcth
</text>

...

<text distractoroption>
/ items = distractoritems
/ select = text.mypicture.currentindex
/ vposition = 50%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = values.distractorh
</text>

As for the 2nd -- mismatched -- trial type, you need to set up separate stimulus elements. You cannot use the same ones that are already used by the 1st -- matched -- trial type.

Dave,

Thank you very much for the explanation. Just to clarify, the 30% corresponds to the left position, correct? And, so I can make sure I understand the syntax, double equal signs == is for comparison, correct? So I'm checking to see if correcth is 30 and if so I assign that to values.target and if not I assign 40 to values.target. :-)

Thanks again for your help. Hopefully I'll, sometime soon, be able to stand on my own. :-)

Regards

Jason 

Yes, 30 is the keyboard scan code for the "A" key (on a standard English QWERTY keyboard). See Tools -> Keyboard Scancodes in the Inquisit Lab menu and/or the "Keyboard Scancodes" topic in the documentation: https://www.millisecond.com/support/docs/v5/html/language/scancodes.htm

In your script, you have that information in the <parameters> element, too,

<parameters>
/fontheight = 10%

/responsekeyleft = 30
/responsekeyleft_label = "A"

/responsekeyright = 40
/responsekeyright_label = "'"
</parameters>

so the actually more elegant -- arguably better -- way to program the <trial>s would be

<trial secondtrial>
/ ontrialbegin = [
    values.correcth = list.hpos.nextvalue;
    values.distractorh = list.hpos.nextvalue;
]
/ ontrialbegin = [
    if (values.correcth == 30%) values.target = parameters.responsekeyleft else values.target = parameters.responsekeyright;
]

/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = keyboard
/ validresponse = (parameters.responsekeyleft, parameters.responsekeyright)
/ correctresponse = (values.target)
/ recorddata = true
</trial>

That way, if you decide to change the keys you want to use in the <parameters> element, no changes to the <trial> are necessary.

As for operators, you are correct:

"==" is a logical comparison operator (equality), i.e. what you use in situations where you want to know if a statement is true or false.

4 == 4 -> true
3 == 5 -> false

"=" on the other hand is the assignment operator, i.e. what you use to assign a value to a variable.

The various operators are covered in the "Operators" topic: https://www.millisecond.com/support/docs/v5/html/language/expressions/operators.htm

Hope this helps!
By Dave - 6/12/2018

Dave - Tuesday, June 12, 2018
Musashi Jason - Tuesday, June 12, 2018
Dave - Friday, June 8, 2018
Musashi Jason - Thursday, June 7, 2018

Dave,

I'm thinking you may not be able to easily see the overall flow of my experiment from the above snippets so I'm pasting the entire thing here. Hopefully, this will make it clearer. Also, in addition to getting the correct response recognized in trial2, I want to next add two trials with negative primes (incongruent photo and audio file match) but don't quite understand how to accomplish that with /not attribute...

I continue to be extremely appreciative of your assistance.

Jason

**************************************************************************************************************
**************************************************************************************************************
DEFAULTS
**************************************************************************************************************
**************************************************************************************************************
script requires Inquisit 5.0.0.0 or higher

<parameters>
/fontheight = 10%

/responsekeyleft = 30
/responsekeyleft_label = "A"
/responsekeyright = 40
/responsekeyright_label = "'"
</parameters>

<defaults>
/ screencolor = white
/ voicekeythreshold = 15
/ minimumversion = "5.0.0.0"
/ fontstyle = ("Arial", 3.5%, false, false, false, false, 5, 1)
</defaults>

<item instructions>

/1 = "This is a timed selection task. GO AS FAST AS YOU CAN but try not to make mistakes.

A series of asterisks, like the following, ******** will be displayed on the screen followed by a quick flash.

You will then see two words.

After the two words appear, you will hear a word.

Repeat the word you hear outloud immediately after you hear the word."

/2 = "For the second part of this test, use the A and ' keys to select the correct option.

A series of asterisks, like the following, ******** will be displayed on the screen followed by a quick flash.

You will then see two words.

After the two words appear, you will hear a word.

Use the A (on the left side of the keyboard) and ' (on the right side of the keyboard) to select the correct option that appears on the left or right of the screen."

</item>

***************************VALUES**********************
<values>
/selectContinue = 1
/target = ""
</values>
***************************VALUES*********************

<item continue>
/1 = "Press the SPACE BAR to begin"
</item>

<picture mypicture>
/ items = pictureitems
</picture>

<item pictureitems>
/ 1 = "dog.jpg"
/ 2 = "cat.jpg"
/ 3 = "apple.jpg"
/ 4 = "house.jpg"
/ 5 = "ball.jpg"
/ 6 = "banana.jpg"
/ 7 = "boat.jpg"
/ 8 = "snail.jpg"
/ 9 = "tree.jpg"
/10 = "boat.jpg"
</item>

<sound mysound>
/ items = sounditems
/ select = picture.mypicture.currentindex
/ erase = false
</sound>

<item sounditems>
/ 1 = "dog.wav"
/ 2 = "cat.wav"
/ 3 = "apple.wav"
/ 4 = "house.wav"
/ 5 = "ball.wav"
/ 6 = "banana.wav"
/ 7 = "boat.wav"
/ 8 = "snail.wav"
/ 9 = "tree.wav"
/ 10 = "car.wav"
</item>

<text correctoption>
/ items = correctitems
/ select = picture.mypicture.currentindex
/ vposition = 50%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = list.hpos.nextvalue
</text>

<item correctitems>
/ 1 = "Dog"
/ 2 = "Cat"
/ 3 = "Apple"
/ 4 = "House"
/ 5 = "Ball"
/ 6 = "Banana"
/ 7 = "Boat"
/ 8 = "Snail"
/ 9 = "Tree"
/ 10 = "Car"
</item>

<text distractoroption>
/ items = distractoritems
/ select = picture.mypicture.currentindex
/ vposition = 50%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = list.hpos.nextvalue
</text>

<item distractoritems>
/ 1 = "Cat"
/ 2 = "Dog"
/ 3 = "House"
/ 4 = "Apple"
/ 5 = "Banana"
/ 6 = "Ball"
/ 7 = "Snail"
/ 8 = "Boat"
/ 9 = "Car"
/ 10 = "Tree"
</item>

<item mask>
/1="*******
*******"
</item>

<text mask>
/items = mask
/select = 1
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ txcolor = black
/txbgcolor = white
/position = (50%, 50%)
</text>

<text maskeraser>
/items = mask
/select = 1
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ txcolor = white
/txbgcolor = white
/position = (50%, 50%)
</text>

// randomize the left-right position of the two response options
<list hpos>
/ items = (30%, 70%)
/ selectionrate = always
</list>

<text instructions>
/ items = item.instructions
/ hjustify = center
/ size = (90%, 60%)
/ position = (50%, 85%)
/ valign = bottom
/ txcolor = black
/ select = sequence
/ resetinterval = 20
</text>

<text spacebar>
/ items = continue
/ select = values.selectContinue
/ position = (50%, 95%)
/ valign = bottom
</text>

<trial firstinstructions>
/ stimulustimes = [1=instructions, spacebar]
/ correctresponse = (" ")
/ errormessage = false
/ recorddata = false
</trial>

<trial secondinstructions>
/ stimulustimes = [2=instructions, spacebar]
/ correctresponse = (" ")
/ errormessage = false
/ recorddata = false
</trial>

<trial micset>
/ validresponse = (anyresponse)
/ inputdevice = voicerecord
/ errormessage = false
/ recorddata = false
</trial>

<trial firsttrial>
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ validresponse = (anyresponse)
/ beginresponsetime = 2000
/ inputdevice = voicerecord
/ responseinterrupt = frames
/ trialduration = 6000
/ recorddata = true
</trial>

<trial secondtrial>
/ ontrialbegin = [
values.target = text.correctoption.currentitem;
]
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = keyboard
/ validresponse = (parameters.responsekeyleft, parameters.responsekeyright)
/ correctresponse = (values.target)
/ recorddata = true
</trial>

<block myblock>
/ trials = [1 = firstinstructions; 2 = micset; 3-12 = firsttrial; 13 = secondinstructions; 14-23 = secondtrial;]
</block>



What you need to do is set values.target to the keyboard scancode corresponding to the either the left or right key, and that will depend on _where_ text.correctoption is _positioned_, not on text.correctoption's current item. In other words, if text.correctoption is on the left in the given trial, values.target needs to be set to 30. If text.correctoption is on the right in the current trial, then values.target out to be set to 40.

I.e.

<trial secondtrial>
/ ontrialbegin = [
    values.correcth = list.hpos.nextvalue;
    values.distractorh = list.hpos.nextvalue;
]
/ ontrialbegin = [
    if (values.correcth == 30%) values.target = 30 else values.target = 40;
]

/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = keyboard
/ validresponse = (parameters.responsekeyleft, parameters.responsekeyright)
/ correctresponse = (values.target)
/ recorddata = true
</trial>

with

<text correctoption>
/ items = correctitems
/ select = text.mypicture.currentindex
/ vposition = 50%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = values.correcth
</text>

...

<text distractoroption>
/ items = distractoritems
/ select = text.mypicture.currentindex
/ vposition = 50%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = values.distractorh
</text>

As for the 2nd -- mismatched -- trial type, you need to set up separate stimulus elements. You cannot use the same ones that are already used by the 1st -- matched -- trial type.

Dave,

Thank you very much for the explanation. Just to clarify, the 30% corresponds to the left position, correct? And, so I can make sure I understand the syntax, double equal signs == is for comparison, correct? So I'm checking to see if correcth is 30 and if so I assign that to values.target and if not I assign 40 to values.target. :-)

Thanks again for your help. Hopefully I'll, sometime soon, be able to stand on my own. :-)

Regards

Jason 

Yes, 30 is the keyboard scan code for the "A" key (on a standard English QWERTY keyboard). See Tools -> Keyboard Scancodes in the Inquisit Lab menu and/or the "Keyboard Scancodes" topic in the documentation: https://www.millisecond.com/support/docs/v5/html/language/scancodes.htm

In your script, you have that information in the <parameters> element, too,

<parameters>
/fontheight = 10%

/responsekeyleft = 30
/responsekeyleft_label = "A"

/responsekeyright = 40
/responsekeyright_label = "'"
</parameters>

so the actually more elegant -- arguably better -- way to program the <trial>s would be

<trial secondtrial>
/ ontrialbegin = [
    values.correcth = list.hpos.nextvalue;
    values.distractorh = list.hpos.nextvalue;
]
/ ontrialbegin = [
    if (values.correcth == 30%) values.target = parameters.responsekeyleft else values.target = parameters.responsekeyright;
]

/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = keyboard
/ validresponse = (parameters.responsekeyleft, parameters.responsekeyright)
/ correctresponse = (values.target)
/ recorddata = true
</trial>

That way, if you decide to change the keys you want to use in the <parameters> element, no changes to the <trial> are necessary.

As for operators, you are correct:

"==" is a logical comparison operator (equality), i.e. what you use in situations where you want to know if a statement is true or false.

4 == 4 -> true
3 == 5 -> false

"=" on the other hand is the assignment operator, i.e. what you use to assign a value to a variable.

The various operators are covered in the "Operators" topic: https://www.millisecond.com/support/docs/v5/html/language/expressions/operators.htm

Hope this helps!

<values>
/correcth = ""
/distractorh = ''
</values>

You can initialize them like so, or you can do

<values>
/correcth = 0%
/distractorh = 0%
</values>

It is important, however, that you you have the code in the <trial> correct, too:

<trial secondtrial>
/ ontrialbegin = [
    values.correcth = list.hpos.nextvalue;
    values.distractorh = list.hpos.nextvalue;
]
/ ontrialbegin = [
    if (values.correcth == 30%) values.target = parameters.responsekeyleft else values.target = parameters.responsekeyright;
]
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = keyboard
/ validresponse = (parameters.responsekeyleft, parameters.responsekeyright)
/ correctresponse = (values.target)
/ recorddata = true
</trial>

The highlighted bit you wiil also need in <tral firsttrial> for the _entire_ script to work properly, not just <trial secondtrial>:

<trial firsttrial>
/ ontrialbegin = [
    values.correcth = list.hpos.nextvalue;
    values.distractorh = list.hpos.nextvalue;
]

/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ validresponse = (anyresponse)
/ beginresponsetime = 2000
/ inputdevice = voicerecord
/ responseinterrupt = frames
/ trialduration = 6000
/ recorddata = true
</trial>
By Musashi Jason - 6/12/2018

Dave - Tuesday, June 12, 2018
Dave - Tuesday, June 12, 2018
Musashi Jason - Tuesday, June 12, 2018
Dave - Friday, June 8, 2018
Musashi Jason - Thursday, June 7, 2018

Dave,

I'm thinking you may not be able to easily see the overall flow of my experiment from the above snippets so I'm pasting the entire thing here. Hopefully, this will make it clearer. Also, in addition to getting the correct response recognized in trial2, I want to next add two trials with negative primes (incongruent photo and audio file match) but don't quite understand how to accomplish that with /not attribute...

I continue to be extremely appreciative of your assistance.

Jason

**************************************************************************************************************
**************************************************************************************************************
DEFAULTS
**************************************************************************************************************
**************************************************************************************************************
script requires Inquisit 5.0.0.0 or higher

<parameters>
/fontheight = 10%

/responsekeyleft = 30
/responsekeyleft_label = "A"
/responsekeyright = 40
/responsekeyright_label = "'"
</parameters>

<defaults>
/ screencolor = white
/ voicekeythreshold = 15
/ minimumversion = "5.0.0.0"
/ fontstyle = ("Arial", 3.5%, false, false, false, false, 5, 1)
</defaults>

<item instructions>

/1 = "This is a timed selection task. GO AS FAST AS YOU CAN but try not to make mistakes.

A series of asterisks, like the following, ******** will be displayed on the screen followed by a quick flash.

You will then see two words.

After the two words appear, you will hear a word.

Repeat the word you hear outloud immediately after you hear the word."

/2 = "For the second part of this test, use the A and ' keys to select the correct option.

A series of asterisks, like the following, ******** will be displayed on the screen followed by a quick flash.

You will then see two words.

After the two words appear, you will hear a word.

Use the A (on the left side of the keyboard) and ' (on the right side of the keyboard) to select the correct option that appears on the left or right of the screen."

</item>

***************************VALUES**********************
<values>
/selectContinue = 1
/target = ""
</values>
***************************VALUES*********************

<item continue>
/1 = "Press the SPACE BAR to begin"
</item>

<picture mypicture>
/ items = pictureitems
</picture>

<item pictureitems>
/ 1 = "dog.jpg"
/ 2 = "cat.jpg"
/ 3 = "apple.jpg"
/ 4 = "house.jpg"
/ 5 = "ball.jpg"
/ 6 = "banana.jpg"
/ 7 = "boat.jpg"
/ 8 = "snail.jpg"
/ 9 = "tree.jpg"
/10 = "boat.jpg"
</item>

<sound mysound>
/ items = sounditems
/ select = picture.mypicture.currentindex
/ erase = false
</sound>

<item sounditems>
/ 1 = "dog.wav"
/ 2 = "cat.wav"
/ 3 = "apple.wav"
/ 4 = "house.wav"
/ 5 = "ball.wav"
/ 6 = "banana.wav"
/ 7 = "boat.wav"
/ 8 = "snail.wav"
/ 9 = "tree.wav"
/ 10 = "car.wav"
</item>

<text correctoption>
/ items = correctitems
/ select = picture.mypicture.currentindex
/ vposition = 50%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = list.hpos.nextvalue
</text>

<item correctitems>
/ 1 = "Dog"
/ 2 = "Cat"
/ 3 = "Apple"
/ 4 = "House"
/ 5 = "Ball"
/ 6 = "Banana"
/ 7 = "Boat"
/ 8 = "Snail"
/ 9 = "Tree"
/ 10 = "Car"
</item>

<text distractoroption>
/ items = distractoritems
/ select = picture.mypicture.currentindex
/ vposition = 50%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = list.hpos.nextvalue
</text>

<item distractoritems>
/ 1 = "Cat"
/ 2 = "Dog"
/ 3 = "House"
/ 4 = "Apple"
/ 5 = "Banana"
/ 6 = "Ball"
/ 7 = "Snail"
/ 8 = "Boat"
/ 9 = "Car"
/ 10 = "Tree"
</item>

<item mask>
/1="*******
*******"
</item>

<text mask>
/items = mask
/select = 1
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ txcolor = black
/txbgcolor = white
/position = (50%, 50%)
</text>

<text maskeraser>
/items = mask
/select = 1
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ txcolor = white
/txbgcolor = white
/position = (50%, 50%)
</text>

// randomize the left-right position of the two response options
<list hpos>
/ items = (30%, 70%)
/ selectionrate = always
</list>

<text instructions>
/ items = item.instructions
/ hjustify = center
/ size = (90%, 60%)
/ position = (50%, 85%)
/ valign = bottom
/ txcolor = black
/ select = sequence
/ resetinterval = 20
</text>

<text spacebar>
/ items = continue
/ select = values.selectContinue
/ position = (50%, 95%)
/ valign = bottom
</text>

<trial firstinstructions>
/ stimulustimes = [1=instructions, spacebar]
/ correctresponse = (" ")
/ errormessage = false
/ recorddata = false
</trial>

<trial secondinstructions>
/ stimulustimes = [2=instructions, spacebar]
/ correctresponse = (" ")
/ errormessage = false
/ recorddata = false
</trial>

<trial micset>
/ validresponse = (anyresponse)
/ inputdevice = voicerecord
/ errormessage = false
/ recorddata = false
</trial>

<trial firsttrial>
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ validresponse = (anyresponse)
/ beginresponsetime = 2000
/ inputdevice = voicerecord
/ responseinterrupt = frames
/ trialduration = 6000
/ recorddata = true
</trial>

<trial secondtrial>
/ ontrialbegin = [
values.target = text.correctoption.currentitem;
]
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = keyboard
/ validresponse = (parameters.responsekeyleft, parameters.responsekeyright)
/ correctresponse = (values.target)
/ recorddata = true
</trial>

<block myblock>
/ trials = [1 = firstinstructions; 2 = micset; 3-12 = firsttrial; 13 = secondinstructions; 14-23 = secondtrial;]
</block>



What you need to do is set values.target to the keyboard scancode corresponding to the either the left or right key, and that will depend on _where_ text.correctoption is _positioned_, not on text.correctoption's current item. In other words, if text.correctoption is on the left in the given trial, values.target needs to be set to 30. If text.correctoption is on the right in the current trial, then values.target out to be set to 40.

I.e.

<trial secondtrial>
/ ontrialbegin = [
    values.correcth = list.hpos.nextvalue;
    values.distractorh = list.hpos.nextvalue;
]
/ ontrialbegin = [
    if (values.correcth == 30%) values.target = 30 else values.target = 40;
]

/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = keyboard
/ validresponse = (parameters.responsekeyleft, parameters.responsekeyright)
/ correctresponse = (values.target)
/ recorddata = true
</trial>

with

<text correctoption>
/ items = correctitems
/ select = text.mypicture.currentindex
/ vposition = 50%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = values.correcth
</text>

...

<text distractoroption>
/ items = distractoritems
/ select = text.mypicture.currentindex
/ vposition = 50%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = values.distractorh
</text>

As for the 2nd -- mismatched -- trial type, you need to set up separate stimulus elements. You cannot use the same ones that are already used by the 1st -- matched -- trial type.

Dave,

Thank you very much for the explanation. Just to clarify, the 30% corresponds to the left position, correct? And, so I can make sure I understand the syntax, double equal signs == is for comparison, correct? So I'm checking to see if correcth is 30 and if so I assign that to values.target and if not I assign 40 to values.target. :-)

Thanks again for your help. Hopefully I'll, sometime soon, be able to stand on my own. :-)

Regards

Jason 

Yes, 30 is the keyboard scan code for the "A" key (on a standard English QWERTY keyboard). See Tools -> Keyboard Scancodes in the Inquisit Lab menu and/or the "Keyboard Scancodes" topic in the documentation: https://www.millisecond.com/support/docs/v5/html/language/scancodes.htm

In your script, you have that information in the <parameters> element, too,

<parameters>
/fontheight = 10%

/responsekeyleft = 30
/responsekeyleft_label = "A"

/responsekeyright = 40
/responsekeyright_label = "'"
</parameters>

so the actually more elegant -- arguably better -- way to program the <trial>s would be

<trial secondtrial>
/ ontrialbegin = [
    values.correcth = list.hpos.nextvalue;
    values.distractorh = list.hpos.nextvalue;
]
/ ontrialbegin = [
    if (values.correcth == 30%) values.target = parameters.responsekeyleft else values.target = parameters.responsekeyright;
]

/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = keyboard
/ validresponse = (parameters.responsekeyleft, parameters.responsekeyright)
/ correctresponse = (values.target)
/ recorddata = true
</trial>

That way, if you decide to change the keys you want to use in the <parameters> element, no changes to the <trial> are necessary.

As for operators, you are correct:

"==" is a logical comparison operator (equality), i.e. what you use in situations where you want to know if a statement is true or false.

4 == 4 -> true
3 == 5 -> false

"=" on the other hand is the assignment operator, i.e. what you use to assign a value to a variable.

The various operators are covered in the "Operators" topic: https://www.millisecond.com/support/docs/v5/html/language/expressions/operators.htm

Hope this helps!

<values>
/correcth = ""
/distractorh = ''
</values>

You can initialize them like so, or you can do

<values>
/correcth = 0%
/distractorh = 0%
</values>

It is important, however, that you you have the code in the <trial> correct, too:

<trial secondtrial>
/ ontrialbegin = [
    values.correcth = list.hpos.nextvalue;
    values.distractorh = list.hpos.nextvalue;
]
/ ontrialbegin = [
    if (values.correcth == 30%) values.target = parameters.responsekeyleft else values.target = parameters.responsekeyright;
]
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = keyboard
/ validresponse = (parameters.responsekeyleft, parameters.responsekeyright)
/ correctresponse = (values.target)
/ recorddata = true
</trial>

The highlighted bit you wiil also need in <tral firsttrial> for the _entire_ script to work properly, not just <trial secondtrial>:

<trial firsttrial>
/ ontrialbegin = [
    values.correcth = list.hpos.nextvalue;
    values.distractorh = list.hpos.nextvalue;
]

/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ validresponse = (anyresponse)
/ beginresponsetime = 2000
/ inputdevice = voicerecord
/ responseinterrupt = frames
/ trialduration = 6000
/ recorddata = true
</trial>

Dave,

Thanks again. I've made those changes but now am having a different positioning problem. I get one of my prompts (apple, for example) on the screen but cannot see the other one at all. I ran through the entire experiement and can note that the correct option is usally not appearing....but on some runs through the trial two options appear on top of each other. It seems the changes I've made have somehow made the followoing part of the script function differently:

// randomize the left-right position of the two response options
<list hpos>
/ items = (30%, 70%)
/ selectionrate = always

This is what I had adjusted, quite some time back, to get the prompts positioned as desired. 

By Dave - 6/12/2018

Musashi Jason - Tuesday, June 12, 2018
Dave - Tuesday, June 12, 2018
Dave - Tuesday, June 12, 2018
Musashi Jason - Tuesday, June 12, 2018
Dave - Friday, June 8, 2018
Musashi Jason - Thursday, June 7, 2018

Dave,

I'm thinking you may not be able to easily see the overall flow of my experiment from the above snippets so I'm pasting the entire thing here. Hopefully, this will make it clearer. Also, in addition to getting the correct response recognized in trial2, I want to next add two trials with negative primes (incongruent photo and audio file match) but don't quite understand how to accomplish that with /not attribute...

I continue to be extremely appreciative of your assistance.

Jason

**************************************************************************************************************
**************************************************************************************************************
DEFAULTS
**************************************************************************************************************
**************************************************************************************************************
script requires Inquisit 5.0.0.0 or higher

<parameters>
/fontheight = 10%

/responsekeyleft = 30
/responsekeyleft_label = "A"
/responsekeyright = 40
/responsekeyright_label = "'"
</parameters>

<defaults>
/ screencolor = white
/ voicekeythreshold = 15
/ minimumversion = "5.0.0.0"
/ fontstyle = ("Arial", 3.5%, false, false, false, false, 5, 1)
</defaults>

<item instructions>

/1 = "This is a timed selection task. GO AS FAST AS YOU CAN but try not to make mistakes.

A series of asterisks, like the following, ******** will be displayed on the screen followed by a quick flash.

You will then see two words.

After the two words appear, you will hear a word.

Repeat the word you hear outloud immediately after you hear the word."

/2 = "For the second part of this test, use the A and ' keys to select the correct option.

A series of asterisks, like the following, ******** will be displayed on the screen followed by a quick flash.

You will then see two words.

After the two words appear, you will hear a word.

Use the A (on the left side of the keyboard) and ' (on the right side of the keyboard) to select the correct option that appears on the left or right of the screen."

</item>

***************************VALUES**********************
<values>
/selectContinue = 1
/target = ""
</values>
***************************VALUES*********************

<item continue>
/1 = "Press the SPACE BAR to begin"
</item>

<picture mypicture>
/ items = pictureitems
</picture>

<item pictureitems>
/ 1 = "dog.jpg"
/ 2 = "cat.jpg"
/ 3 = "apple.jpg"
/ 4 = "house.jpg"
/ 5 = "ball.jpg"
/ 6 = "banana.jpg"
/ 7 = "boat.jpg"
/ 8 = "snail.jpg"
/ 9 = "tree.jpg"
/10 = "boat.jpg"
</item>

<sound mysound>
/ items = sounditems
/ select = picture.mypicture.currentindex
/ erase = false
</sound>

<item sounditems>
/ 1 = "dog.wav"
/ 2 = "cat.wav"
/ 3 = "apple.wav"
/ 4 = "house.wav"
/ 5 = "ball.wav"
/ 6 = "banana.wav"
/ 7 = "boat.wav"
/ 8 = "snail.wav"
/ 9 = "tree.wav"
/ 10 = "car.wav"
</item>

<text correctoption>
/ items = correctitems
/ select = picture.mypicture.currentindex
/ vposition = 50%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = list.hpos.nextvalue
</text>

<item correctitems>
/ 1 = "Dog"
/ 2 = "Cat"
/ 3 = "Apple"
/ 4 = "House"
/ 5 = "Ball"
/ 6 = "Banana"
/ 7 = "Boat"
/ 8 = "Snail"
/ 9 = "Tree"
/ 10 = "Car"
</item>

<text distractoroption>
/ items = distractoritems
/ select = picture.mypicture.currentindex
/ vposition = 50%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = list.hpos.nextvalue
</text>

<item distractoritems>
/ 1 = "Cat"
/ 2 = "Dog"
/ 3 = "House"
/ 4 = "Apple"
/ 5 = "Banana"
/ 6 = "Ball"
/ 7 = "Snail"
/ 8 = "Boat"
/ 9 = "Car"
/ 10 = "Tree"
</item>

<item mask>
/1="*******
*******"
</item>

<text mask>
/items = mask
/select = 1
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ txcolor = black
/txbgcolor = white
/position = (50%, 50%)
</text>

<text maskeraser>
/items = mask
/select = 1
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ txcolor = white
/txbgcolor = white
/position = (50%, 50%)
</text>

// randomize the left-right position of the two response options
<list hpos>
/ items = (30%, 70%)
/ selectionrate = always
</list>

<text instructions>
/ items = item.instructions
/ hjustify = center
/ size = (90%, 60%)
/ position = (50%, 85%)
/ valign = bottom
/ txcolor = black
/ select = sequence
/ resetinterval = 20
</text>

<text spacebar>
/ items = continue
/ select = values.selectContinue
/ position = (50%, 95%)
/ valign = bottom
</text>

<trial firstinstructions>
/ stimulustimes = [1=instructions, spacebar]
/ correctresponse = (" ")
/ errormessage = false
/ recorddata = false
</trial>

<trial secondinstructions>
/ stimulustimes = [2=instructions, spacebar]
/ correctresponse = (" ")
/ errormessage = false
/ recorddata = false
</trial>

<trial micset>
/ validresponse = (anyresponse)
/ inputdevice = voicerecord
/ errormessage = false
/ recorddata = false
</trial>

<trial firsttrial>
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ validresponse = (anyresponse)
/ beginresponsetime = 2000
/ inputdevice = voicerecord
/ responseinterrupt = frames
/ trialduration = 6000
/ recorddata = true
</trial>

<trial secondtrial>
/ ontrialbegin = [
values.target = text.correctoption.currentitem;
]
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = keyboard
/ validresponse = (parameters.responsekeyleft, parameters.responsekeyright)
/ correctresponse = (values.target)
/ recorddata = true
</trial>

<block myblock>
/ trials = [1 = firstinstructions; 2 = micset; 3-12 = firsttrial; 13 = secondinstructions; 14-23 = secondtrial;]
</block>



What you need to do is set values.target to the keyboard scancode corresponding to the either the left or right key, and that will depend on _where_ text.correctoption is _positioned_, not on text.correctoption's current item. In other words, if text.correctoption is on the left in the given trial, values.target needs to be set to 30. If text.correctoption is on the right in the current trial, then values.target out to be set to 40.

I.e.

<trial secondtrial>
/ ontrialbegin = [
    values.correcth = list.hpos.nextvalue;
    values.distractorh = list.hpos.nextvalue;
]
/ ontrialbegin = [
    if (values.correcth == 30%) values.target = 30 else values.target = 40;
]

/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = keyboard
/ validresponse = (parameters.responsekeyleft, parameters.responsekeyright)
/ correctresponse = (values.target)
/ recorddata = true
</trial>

with

<text correctoption>
/ items = correctitems
/ select = text.mypicture.currentindex
/ vposition = 50%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = values.correcth
</text>

...

<text distractoroption>
/ items = distractoritems
/ select = text.mypicture.currentindex
/ vposition = 50%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = values.distractorh
</text>

As for the 2nd -- mismatched -- trial type, you need to set up separate stimulus elements. You cannot use the same ones that are already used by the 1st -- matched -- trial type.

Dave,

Thank you very much for the explanation. Just to clarify, the 30% corresponds to the left position, correct? And, so I can make sure I understand the syntax, double equal signs == is for comparison, correct? So I'm checking to see if correcth is 30 and if so I assign that to values.target and if not I assign 40 to values.target. :-)

Thanks again for your help. Hopefully I'll, sometime soon, be able to stand on my own. :-)

Regards

Jason 

Yes, 30 is the keyboard scan code for the "A" key (on a standard English QWERTY keyboard). See Tools -> Keyboard Scancodes in the Inquisit Lab menu and/or the "Keyboard Scancodes" topic in the documentation: https://www.millisecond.com/support/docs/v5/html/language/scancodes.htm

In your script, you have that information in the <parameters> element, too,

<parameters>
/fontheight = 10%

/responsekeyleft = 30
/responsekeyleft_label = "A"

/responsekeyright = 40
/responsekeyright_label = "'"
</parameters>

so the actually more elegant -- arguably better -- way to program the <trial>s would be

<trial secondtrial>
/ ontrialbegin = [
    values.correcth = list.hpos.nextvalue;
    values.distractorh = list.hpos.nextvalue;
]
/ ontrialbegin = [
    if (values.correcth == 30%) values.target = parameters.responsekeyleft else values.target = parameters.responsekeyright;
]

/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = keyboard
/ validresponse = (parameters.responsekeyleft, parameters.responsekeyright)
/ correctresponse = (values.target)
/ recorddata = true
</trial>

That way, if you decide to change the keys you want to use in the <parameters> element, no changes to the <trial> are necessary.

As for operators, you are correct:

"==" is a logical comparison operator (equality), i.e. what you use in situations where you want to know if a statement is true or false.

4 == 4 -> true
3 == 5 -> false

"=" on the other hand is the assignment operator, i.e. what you use to assign a value to a variable.

The various operators are covered in the "Operators" topic: https://www.millisecond.com/support/docs/v5/html/language/expressions/operators.htm

Hope this helps!

<values>
/correcth = ""
/distractorh = ''
</values>

You can initialize them like so, or you can do

<values>
/correcth = 0%
/distractorh = 0%
</values>

It is important, however, that you you have the code in the <trial> correct, too:

<trial secondtrial>
/ ontrialbegin = [
    values.correcth = list.hpos.nextvalue;
    values.distractorh = list.hpos.nextvalue;
]
/ ontrialbegin = [
    if (values.correcth == 30%) values.target = parameters.responsekeyleft else values.target = parameters.responsekeyright;
]
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = keyboard
/ validresponse = (parameters.responsekeyleft, parameters.responsekeyright)
/ correctresponse = (values.target)
/ recorddata = true
</trial>

The highlighted bit you wiil also need in <tral firsttrial> for the _entire_ script to work properly, not just <trial secondtrial>:

<trial firsttrial>
/ ontrialbegin = [
    values.correcth = list.hpos.nextvalue;
    values.distractorh = list.hpos.nextvalue;
]

/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ validresponse = (anyresponse)
/ beginresponsetime = 2000
/ inputdevice = voicerecord
/ responseinterrupt = frames
/ trialduration = 6000
/ recorddata = true
</trial>

Dave,

Thanks again. I've made those changes but now am having a different positioning problem. I get one of my prompts (apple, for example) on the screen but cannot see the other one at all. I ran through the entire experiement and can note that the correct option is usally not appearing....but on some runs through the trial two options appear on top of each other. It seems the changes I've made have somehow made the followoing part of the script function differently:

// randomize the left-right position of the two response options
<list hpos>
/ items = (30%, 70%)
/ selectionrate = always

This is what I had adjusted, quite some time back, to get the prompts positioned as desired. 


Check the /hposition attributes in

<text correctoption>
/ items = correctitems
/ select = text.mypicture.currentindex
/ vposition = 50%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = values.correcth
</text>

and

<text distractoroption>
/ items = distractoritems
/ select = text.mypicture.currentindex
/ vposition = 50%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = values.distractorh
</text>

Make sure they're referencing the correct values. Also make sure the <list> is still set to selectionrate = always, and that you have the /ontrialbegin logic I explained in my previous reply correct and present in the <trial> elements.

<trial firsttrial>
/ ontrialbegin = [
    values.correcth = list.hpos.nextvalue;
    values.distractorh = list.hpos.nextvalue;
]
...
</trial>
By Musashi Jason - 6/12/2018

Dave - Tuesday, June 12, 2018
Musashi Jason - Tuesday, June 12, 2018
Dave - Tuesday, June 12, 2018
Dave - Tuesday, June 12, 2018
Musashi Jason - Tuesday, June 12, 2018
Dave - Friday, June 8, 2018
Musashi Jason - Thursday, June 7, 2018

Dave,

I'm thinking you may not be able to easily see the overall flow of my experiment from the above snippets so I'm pasting the entire thing here. Hopefully, this will make it clearer. Also, in addition to getting the correct response recognized in trial2, I want to next add two trials with negative primes (incongruent photo and audio file match) but don't quite understand how to accomplish that with /not attribute...

I continue to be extremely appreciative of your assistance.

Jason

**************************************************************************************************************
**************************************************************************************************************
DEFAULTS
**************************************************************************************************************
**************************************************************************************************************
script requires Inquisit 5.0.0.0 or higher

<parameters>
/fontheight = 10%

/responsekeyleft = 30
/responsekeyleft_label = "A"
/responsekeyright = 40
/responsekeyright_label = "'"
</parameters>

<defaults>
/ screencolor = white
/ voicekeythreshold = 15
/ minimumversion = "5.0.0.0"
/ fontstyle = ("Arial", 3.5%, false, false, false, false, 5, 1)
</defaults>

<item instructions>

/1 = "This is a timed selection task. GO AS FAST AS YOU CAN but try not to make mistakes.

A series of asterisks, like the following, ******** will be displayed on the screen followed by a quick flash.

You will then see two words.

After the two words appear, you will hear a word.

Repeat the word you hear outloud immediately after you hear the word."

/2 = "For the second part of this test, use the A and ' keys to select the correct option.

A series of asterisks, like the following, ******** will be displayed on the screen followed by a quick flash.

You will then see two words.

After the two words appear, you will hear a word.

Use the A (on the left side of the keyboard) and ' (on the right side of the keyboard) to select the correct option that appears on the left or right of the screen."

</item>

***************************VALUES**********************
<values>
/selectContinue = 1
/target = ""
</values>
***************************VALUES*********************

<item continue>
/1 = "Press the SPACE BAR to begin"
</item>

<picture mypicture>
/ items = pictureitems
</picture>

<item pictureitems>
/ 1 = "dog.jpg"
/ 2 = "cat.jpg"
/ 3 = "apple.jpg"
/ 4 = "house.jpg"
/ 5 = "ball.jpg"
/ 6 = "banana.jpg"
/ 7 = "boat.jpg"
/ 8 = "snail.jpg"
/ 9 = "tree.jpg"
/10 = "boat.jpg"
</item>

<sound mysound>
/ items = sounditems
/ select = picture.mypicture.currentindex
/ erase = false
</sound>

<item sounditems>
/ 1 = "dog.wav"
/ 2 = "cat.wav"
/ 3 = "apple.wav"
/ 4 = "house.wav"
/ 5 = "ball.wav"
/ 6 = "banana.wav"
/ 7 = "boat.wav"
/ 8 = "snail.wav"
/ 9 = "tree.wav"
/ 10 = "car.wav"
</item>

<text correctoption>
/ items = correctitems
/ select = picture.mypicture.currentindex
/ vposition = 50%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = list.hpos.nextvalue
</text>

<item correctitems>
/ 1 = "Dog"
/ 2 = "Cat"
/ 3 = "Apple"
/ 4 = "House"
/ 5 = "Ball"
/ 6 = "Banana"
/ 7 = "Boat"
/ 8 = "Snail"
/ 9 = "Tree"
/ 10 = "Car"
</item>

<text distractoroption>
/ items = distractoritems
/ select = picture.mypicture.currentindex
/ vposition = 50%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = list.hpos.nextvalue
</text>

<item distractoritems>
/ 1 = "Cat"
/ 2 = "Dog"
/ 3 = "House"
/ 4 = "Apple"
/ 5 = "Banana"
/ 6 = "Ball"
/ 7 = "Snail"
/ 8 = "Boat"
/ 9 = "Car"
/ 10 = "Tree"
</item>

<item mask>
/1="*******
*******"
</item>

<text mask>
/items = mask
/select = 1
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ txcolor = black
/txbgcolor = white
/position = (50%, 50%)
</text>

<text maskeraser>
/items = mask
/select = 1
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ txcolor = white
/txbgcolor = white
/position = (50%, 50%)
</text>

// randomize the left-right position of the two response options
<list hpos>
/ items = (30%, 70%)
/ selectionrate = always
</list>

<text instructions>
/ items = item.instructions
/ hjustify = center
/ size = (90%, 60%)
/ position = (50%, 85%)
/ valign = bottom
/ txcolor = black
/ select = sequence
/ resetinterval = 20
</text>

<text spacebar>
/ items = continue
/ select = values.selectContinue
/ position = (50%, 95%)
/ valign = bottom
</text>

<trial firstinstructions>
/ stimulustimes = [1=instructions, spacebar]
/ correctresponse = (" ")
/ errormessage = false
/ recorddata = false
</trial>

<trial secondinstructions>
/ stimulustimes = [2=instructions, spacebar]
/ correctresponse = (" ")
/ errormessage = false
/ recorddata = false
</trial>

<trial micset>
/ validresponse = (anyresponse)
/ inputdevice = voicerecord
/ errormessage = false
/ recorddata = false
</trial>

<trial firsttrial>
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ validresponse = (anyresponse)
/ beginresponsetime = 2000
/ inputdevice = voicerecord
/ responseinterrupt = frames
/ trialduration = 6000
/ recorddata = true
</trial>

<trial secondtrial>
/ ontrialbegin = [
values.target = text.correctoption.currentitem;
]
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = keyboard
/ validresponse = (parameters.responsekeyleft, parameters.responsekeyright)
/ correctresponse = (values.target)
/ recorddata = true
</trial>

<block myblock>
/ trials = [1 = firstinstructions; 2 = micset; 3-12 = firsttrial; 13 = secondinstructions; 14-23 = secondtrial;]
</block>



What you need to do is set values.target to the keyboard scancode corresponding to the either the left or right key, and that will depend on _where_ text.correctoption is _positioned_, not on text.correctoption's current item. In other words, if text.correctoption is on the left in the given trial, values.target needs to be set to 30. If text.correctoption is on the right in the current trial, then values.target out to be set to 40.

I.e.

<trial secondtrial>
/ ontrialbegin = [
    values.correcth = list.hpos.nextvalue;
    values.distractorh = list.hpos.nextvalue;
]
/ ontrialbegin = [
    if (values.correcth == 30%) values.target = 30 else values.target = 40;
]

/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = keyboard
/ validresponse = (parameters.responsekeyleft, parameters.responsekeyright)
/ correctresponse = (values.target)
/ recorddata = true
</trial>

with

<text correctoption>
/ items = correctitems
/ select = text.mypicture.currentindex
/ vposition = 50%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = values.correcth
</text>

...

<text distractoroption>
/ items = distractoritems
/ select = text.mypicture.currentindex
/ vposition = 50%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = values.distractorh
</text>

As for the 2nd -- mismatched -- trial type, you need to set up separate stimulus elements. You cannot use the same ones that are already used by the 1st -- matched -- trial type.

Dave,

Thank you very much for the explanation. Just to clarify, the 30% corresponds to the left position, correct? And, so I can make sure I understand the syntax, double equal signs == is for comparison, correct? So I'm checking to see if correcth is 30 and if so I assign that to values.target and if not I assign 40 to values.target. :-)

Thanks again for your help. Hopefully I'll, sometime soon, be able to stand on my own. :-)

Regards

Jason 

Yes, 30 is the keyboard scan code for the "A" key (on a standard English QWERTY keyboard). See Tools -> Keyboard Scancodes in the Inquisit Lab menu and/or the "Keyboard Scancodes" topic in the documentation: https://www.millisecond.com/support/docs/v5/html/language/scancodes.htm

In your script, you have that information in the <parameters> element, too,

<parameters>
/fontheight = 10%

/responsekeyleft = 30
/responsekeyleft_label = "A"

/responsekeyright = 40
/responsekeyright_label = "'"
</parameters>

so the actually more elegant -- arguably better -- way to program the <trial>s would be

<trial secondtrial>
/ ontrialbegin = [
    values.correcth = list.hpos.nextvalue;
    values.distractorh = list.hpos.nextvalue;
]
/ ontrialbegin = [
    if (values.correcth == 30%) values.target = parameters.responsekeyleft else values.target = parameters.responsekeyright;
]

/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = keyboard
/ validresponse = (parameters.responsekeyleft, parameters.responsekeyright)
/ correctresponse = (values.target)
/ recorddata = true
</trial>

That way, if you decide to change the keys you want to use in the <parameters> element, no changes to the <trial> are necessary.

As for operators, you are correct:

"==" is a logical comparison operator (equality), i.e. what you use in situations where you want to know if a statement is true or false.

4 == 4 -> true
3 == 5 -> false

"=" on the other hand is the assignment operator, i.e. what you use to assign a value to a variable.

The various operators are covered in the "Operators" topic: https://www.millisecond.com/support/docs/v5/html/language/expressions/operators.htm

Hope this helps!

<values>
/correcth = ""
/distractorh = ''
</values>

You can initialize them like so, or you can do

<values>
/correcth = 0%
/distractorh = 0%
</values>

It is important, however, that you you have the code in the <trial> correct, too:

<trial secondtrial>
/ ontrialbegin = [
    values.correcth = list.hpos.nextvalue;
    values.distractorh = list.hpos.nextvalue;
]
/ ontrialbegin = [
    if (values.correcth == 30%) values.target = parameters.responsekeyleft else values.target = parameters.responsekeyright;
]
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = keyboard
/ validresponse = (parameters.responsekeyleft, parameters.responsekeyright)
/ correctresponse = (values.target)
/ recorddata = true
</trial>

The highlighted bit you wiil also need in <tral firsttrial> for the _entire_ script to work properly, not just <trial secondtrial>:

<trial firsttrial>
/ ontrialbegin = [
    values.correcth = list.hpos.nextvalue;
    values.distractorh = list.hpos.nextvalue;
]

/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ validresponse = (anyresponse)
/ beginresponsetime = 2000
/ inputdevice = voicerecord
/ responseinterrupt = frames
/ trialduration = 6000
/ recorddata = true
</trial>

Dave,

Thanks again. I've made those changes but now am having a different positioning problem. I get one of my prompts (apple, for example) on the screen but cannot see the other one at all. I ran through the entire experiement and can note that the correct option is usally not appearing....but on some runs through the trial two options appear on top of each other. It seems the changes I've made have somehow made the followoing part of the script function differently:

// randomize the left-right position of the two response options
<list hpos>
/ items = (30%, 70%)
/ selectionrate = always

This is what I had adjusted, quite some time back, to get the prompts positioned as desired. 


Check the /hposition attributes in

<text correctoption>
/ items = correctitems
/ select = text.mypicture.currentindex
/ vposition = 50%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = values.correcth
</text>

and

<text distractoroption>
/ items = distractoritems
/ select = text.mypicture.currentindex
/ vposition = 50%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = values.distractorh
</text>

Make sure they're referencing the correct values. Also make sure the <list> is still set to selectionrate = always, and that you have the /ontrialbegin logic I explained in my previous reply correct and present in the <trial> elements.

<trial firsttrial>
/ ontrialbegin = [
    values.correcth = list.hpos.nextvalue;
    values.distractorh = list.hpos.nextvalue;
]
...
</trial>

Dave,

Thanks...I had one set incorrectly (probably because of copy/paste - shame on me). Both attributes were set to values.correth which was, of course, the root of my problem. 

Sorry for taking your time but thanks for your patience and assistance. 

Jason
By Musashi Jason - 6/12/2018

Musashi Jason - Tuesday, June 12, 2018
Dave - Tuesday, June 12, 2018
Musashi Jason - Tuesday, June 12, 2018
Dave - Tuesday, June 12, 2018
Dave - Tuesday, June 12, 2018
Musashi Jason - Tuesday, June 12, 2018
Dave - Friday, June 8, 2018
Musashi Jason - Thursday, June 7, 2018

Dave,

I'm thinking you may not be able to easily see the overall flow of my experiment from the above snippets so I'm pasting the entire thing here. Hopefully, this will make it clearer. Also, in addition to getting the correct response recognized in trial2, I want to next add two trials with negative primes (incongruent photo and audio file match) but don't quite understand how to accomplish that with /not attribute...

I continue to be extremely appreciative of your assistance.

Jason

**************************************************************************************************************
**************************************************************************************************************
DEFAULTS
**************************************************************************************************************
**************************************************************************************************************
script requires Inquisit 5.0.0.0 or higher

<parameters>
/fontheight = 10%

/responsekeyleft = 30
/responsekeyleft_label = "A"
/responsekeyright = 40
/responsekeyright_label = "'"
</parameters>

<defaults>
/ screencolor = white
/ voicekeythreshold = 15
/ minimumversion = "5.0.0.0"
/ fontstyle = ("Arial", 3.5%, false, false, false, false, 5, 1)
</defaults>

<item instructions>

/1 = "This is a timed selection task. GO AS FAST AS YOU CAN but try not to make mistakes.

A series of asterisks, like the following, ******** will be displayed on the screen followed by a quick flash.

You will then see two words.

After the two words appear, you will hear a word.

Repeat the word you hear outloud immediately after you hear the word."

/2 = "For the second part of this test, use the A and ' keys to select the correct option.

A series of asterisks, like the following, ******** will be displayed on the screen followed by a quick flash.

You will then see two words.

After the two words appear, you will hear a word.

Use the A (on the left side of the keyboard) and ' (on the right side of the keyboard) to select the correct option that appears on the left or right of the screen."

</item>

***************************VALUES**********************
<values>
/selectContinue = 1
/target = ""
</values>
***************************VALUES*********************

<item continue>
/1 = "Press the SPACE BAR to begin"
</item>

<picture mypicture>
/ items = pictureitems
</picture>

<item pictureitems>
/ 1 = "dog.jpg"
/ 2 = "cat.jpg"
/ 3 = "apple.jpg"
/ 4 = "house.jpg"
/ 5 = "ball.jpg"
/ 6 = "banana.jpg"
/ 7 = "boat.jpg"
/ 8 = "snail.jpg"
/ 9 = "tree.jpg"
/10 = "boat.jpg"
</item>

<sound mysound>
/ items = sounditems
/ select = picture.mypicture.currentindex
/ erase = false
</sound>

<item sounditems>
/ 1 = "dog.wav"
/ 2 = "cat.wav"
/ 3 = "apple.wav"
/ 4 = "house.wav"
/ 5 = "ball.wav"
/ 6 = "banana.wav"
/ 7 = "boat.wav"
/ 8 = "snail.wav"
/ 9 = "tree.wav"
/ 10 = "car.wav"
</item>

<text correctoption>
/ items = correctitems
/ select = picture.mypicture.currentindex
/ vposition = 50%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = list.hpos.nextvalue
</text>

<item correctitems>
/ 1 = "Dog"
/ 2 = "Cat"
/ 3 = "Apple"
/ 4 = "House"
/ 5 = "Ball"
/ 6 = "Banana"
/ 7 = "Boat"
/ 8 = "Snail"
/ 9 = "Tree"
/ 10 = "Car"
</item>

<text distractoroption>
/ items = distractoritems
/ select = picture.mypicture.currentindex
/ vposition = 50%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = list.hpos.nextvalue
</text>

<item distractoritems>
/ 1 = "Cat"
/ 2 = "Dog"
/ 3 = "House"
/ 4 = "Apple"
/ 5 = "Banana"
/ 6 = "Ball"
/ 7 = "Snail"
/ 8 = "Boat"
/ 9 = "Car"
/ 10 = "Tree"
</item>

<item mask>
/1="*******
*******"
</item>

<text mask>
/items = mask
/select = 1
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ txcolor = black
/txbgcolor = white
/position = (50%, 50%)
</text>

<text maskeraser>
/items = mask
/select = 1
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ txcolor = white
/txbgcolor = white
/position = (50%, 50%)
</text>

// randomize the left-right position of the two response options
<list hpos>
/ items = (30%, 70%)
/ selectionrate = always
</list>

<text instructions>
/ items = item.instructions
/ hjustify = center
/ size = (90%, 60%)
/ position = (50%, 85%)
/ valign = bottom
/ txcolor = black
/ select = sequence
/ resetinterval = 20
</text>

<text spacebar>
/ items = continue
/ select = values.selectContinue
/ position = (50%, 95%)
/ valign = bottom
</text>

<trial firstinstructions>
/ stimulustimes = [1=instructions, spacebar]
/ correctresponse = (" ")
/ errormessage = false
/ recorddata = false
</trial>

<trial secondinstructions>
/ stimulustimes = [2=instructions, spacebar]
/ correctresponse = (" ")
/ errormessage = false
/ recorddata = false
</trial>

<trial micset>
/ validresponse = (anyresponse)
/ inputdevice = voicerecord
/ errormessage = false
/ recorddata = false
</trial>

<trial firsttrial>
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ validresponse = (anyresponse)
/ beginresponsetime = 2000
/ inputdevice = voicerecord
/ responseinterrupt = frames
/ trialduration = 6000
/ recorddata = true
</trial>

<trial secondtrial>
/ ontrialbegin = [
values.target = text.correctoption.currentitem;
]
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = keyboard
/ validresponse = (parameters.responsekeyleft, parameters.responsekeyright)
/ correctresponse = (values.target)
/ recorddata = true
</trial>

<block myblock>
/ trials = [1 = firstinstructions; 2 = micset; 3-12 = firsttrial; 13 = secondinstructions; 14-23 = secondtrial;]
</block>



What you need to do is set values.target to the keyboard scancode corresponding to the either the left or right key, and that will depend on _where_ text.correctoption is _positioned_, not on text.correctoption's current item. In other words, if text.correctoption is on the left in the given trial, values.target needs to be set to 30. If text.correctoption is on the right in the current trial, then values.target out to be set to 40.

I.e.

<trial secondtrial>
/ ontrialbegin = [
    values.correcth = list.hpos.nextvalue;
    values.distractorh = list.hpos.nextvalue;
]
/ ontrialbegin = [
    if (values.correcth == 30%) values.target = 30 else values.target = 40;
]

/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = keyboard
/ validresponse = (parameters.responsekeyleft, parameters.responsekeyright)
/ correctresponse = (values.target)
/ recorddata = true
</trial>

with

<text correctoption>
/ items = correctitems
/ select = text.mypicture.currentindex
/ vposition = 50%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = values.correcth
</text>

...

<text distractoroption>
/ items = distractoritems
/ select = text.mypicture.currentindex
/ vposition = 50%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = values.distractorh
</text>

As for the 2nd -- mismatched -- trial type, you need to set up separate stimulus elements. You cannot use the same ones that are already used by the 1st -- matched -- trial type.

Dave,

Thank you very much for the explanation. Just to clarify, the 30% corresponds to the left position, correct? And, so I can make sure I understand the syntax, double equal signs == is for comparison, correct? So I'm checking to see if correcth is 30 and if so I assign that to values.target and if not I assign 40 to values.target. :-)

Thanks again for your help. Hopefully I'll, sometime soon, be able to stand on my own. :-)

Regards

Jason 

Yes, 30 is the keyboard scan code for the "A" key (on a standard English QWERTY keyboard). See Tools -> Keyboard Scancodes in the Inquisit Lab menu and/or the "Keyboard Scancodes" topic in the documentation: https://www.millisecond.com/support/docs/v5/html/language/scancodes.htm

In your script, you have that information in the <parameters> element, too,

<parameters>
/fontheight = 10%

/responsekeyleft = 30
/responsekeyleft_label = "A"

/responsekeyright = 40
/responsekeyright_label = "'"
</parameters>

so the actually more elegant -- arguably better -- way to program the <trial>s would be

<trial secondtrial>
/ ontrialbegin = [
    values.correcth = list.hpos.nextvalue;
    values.distractorh = list.hpos.nextvalue;
]
/ ontrialbegin = [
    if (values.correcth == 30%) values.target = parameters.responsekeyleft else values.target = parameters.responsekeyright;
]

/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = keyboard
/ validresponse = (parameters.responsekeyleft, parameters.responsekeyright)
/ correctresponse = (values.target)
/ recorddata = true
</trial>

That way, if you decide to change the keys you want to use in the <parameters> element, no changes to the <trial> are necessary.

As for operators, you are correct:

"==" is a logical comparison operator (equality), i.e. what you use in situations where you want to know if a statement is true or false.

4 == 4 -> true
3 == 5 -> false

"=" on the other hand is the assignment operator, i.e. what you use to assign a value to a variable.

The various operators are covered in the "Operators" topic: https://www.millisecond.com/support/docs/v5/html/language/expressions/operators.htm

Hope this helps!

<values>
/correcth = ""
/distractorh = ''
</values>

You can initialize them like so, or you can do

<values>
/correcth = 0%
/distractorh = 0%
</values>

It is important, however, that you you have the code in the <trial> correct, too:

<trial secondtrial>
/ ontrialbegin = [
    values.correcth = list.hpos.nextvalue;
    values.distractorh = list.hpos.nextvalue;
]
/ ontrialbegin = [
    if (values.correcth == 30%) values.target = parameters.responsekeyleft else values.target = parameters.responsekeyright;
]
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ inputdevice = keyboard
/ validresponse = (parameters.responsekeyleft, parameters.responsekeyright)
/ correctresponse = (values.target)
/ recorddata = true
</trial>

The highlighted bit you wiil also need in <tral firsttrial> for the _entire_ script to work properly, not just <trial secondtrial>:

<trial firsttrial>
/ ontrialbegin = [
    values.correcth = list.hpos.nextvalue;
    values.distractorh = list.hpos.nextvalue;
]

/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ validresponse = (anyresponse)
/ beginresponsetime = 2000
/ inputdevice = voicerecord
/ responseinterrupt = frames
/ trialduration = 6000
/ recorddata = true
</trial>

Dave,

Thanks again. I've made those changes but now am having a different positioning problem. I get one of my prompts (apple, for example) on the screen but cannot see the other one at all. I ran through the entire experiement and can note that the correct option is usally not appearing....but on some runs through the trial two options appear on top of each other. It seems the changes I've made have somehow made the followoing part of the script function differently:

// randomize the left-right position of the two response options
<list hpos>
/ items = (30%, 70%)
/ selectionrate = always

This is what I had adjusted, quite some time back, to get the prompts positioned as desired. 


Check the /hposition attributes in

<text correctoption>
/ items = correctitems
/ select = text.mypicture.currentindex
/ vposition = 50%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = values.correcth
</text>

and

<text distractoroption>
/ items = distractoritems
/ select = text.mypicture.currentindex
/ vposition = 50%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = values.distractorh
</text>

Make sure they're referencing the correct values. Also make sure the <list> is still set to selectionrate = always, and that you have the /ontrialbegin logic I explained in my previous reply correct and present in the <trial> elements.

<trial firsttrial>
/ ontrialbegin = [
    values.correcth = list.hpos.nextvalue;
    values.distractorh = list.hpos.nextvalue;
]
...
</trial>

Dave,

Thanks...I had one set incorrectly (probably because of copy/paste - shame on me). Both attributes were set to values.correth which was, of course, the root of my problem. 

Sorry for taking your time but thanks for your patience and assistance. 

Jason

Dave,

Continuing to bug you here...regarding the mismatch setup, am I correct in understanding that I can simply make a new trial using the text, image, audio, and items already specified in my script?  So, for example, I could make a new trial, like:

<trial firsttrialnomatch>
/ ontrialbegin = [
values.correcth = list.hpos.nextvalue;
values.distractorh = list.hpos.nextvalue;
]
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ validresponse = (anyresponse)
/ beginresponsetime = 2000
/ inputdevice = voicerecord
/ responseinterrupt = frames
/ trialduration = 6000
/ recorddata = true

and then modify it (somehow) to present incongruous mypicture and mysound?  Or do I need to make adjustments elsewhere to make the items present in a different order? I feel like the latter is the case but am not sure where to start.

Regards

Jason

By Dave - 6/12/2018

Musashi Jason - Tuesday, June 12, 2018

Dave,

Continuing to bug you here...regarding the mismatch setup, am I correct in understanding that I can simply make a new trial using the text, image, audio, and items already specified in my script?  So, for example, I could make a new trial, like:

<trial firsttrialnomatch>
/ ontrialbegin = [
values.correcth = list.hpos.nextvalue;
values.distractorh = list.hpos.nextvalue;
]
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ validresponse = (anyresponse)
/ beginresponsetime = 2000
/ inputdevice = voicerecord
/ responseinterrupt = frames
/ trialduration = 6000
/ recorddata = true

and then modify it (somehow) to present incongruous mypicture and mysound?  Or do I need to make adjustments elsewhere to make the items present in a different order? I feel like the latter is the case but am not sure where to start.

Regards

Jason


No, you need to set up new/additional <picture>, <sound> and <text> elements for the mismatch <trial>.

The already existing ones are _paired for matches_

<picture mypicture>
/ items = pictureitems
</picture>

<item pictureitems>
/ 1 = "dog.jpg"
/ 2 = "cat.jpg"
/ 3 = "apple.jpg"
/ 4 = "house.jpg"
/ 5 = "ball.jpg"
/ 6 = "banana.jpg"
/ 7 = "boat.jpg"
/ 8 = "snail.jpg"
/ 9 = "tree.jpg"
/10 = "boat.jpg"
</item>

<sound mysound>
/ items = sounditems
/ select = picture.mypicture.currentindex
/ erase = false
</sound>

<item sounditems>
/ 1 = "dog.wav"
/ 2 = "cat.wav"
/ 3 = "apple.wav"
/ 4 = "house.wav"
/ 5 = "ball.wav"
/ 6 = "banana.wav"
/ 7 = "boat.wav"
/ 8 = "snail.wav"
/ 9 = "tree.wav"
/ 10 = "car.wav"
</item>

etc.

You need additional ones that are _paired for mismatches_
By Musashi Jason - 6/13/2018

Dave - Tuesday, June 12, 2018
Musashi Jason - Tuesday, June 12, 2018

Dave,

Continuing to bug you here...regarding the mismatch setup, am I correct in understanding that I can simply make a new trial using the text, image, audio, and items already specified in my script?  So, for example, I could make a new trial, like:

<trial firsttrialnomatch>
/ ontrialbegin = [
values.correcth = list.hpos.nextvalue;
values.distractorh = list.hpos.nextvalue;
]
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ validresponse = (anyresponse)
/ beginresponsetime = 2000
/ inputdevice = voicerecord
/ responseinterrupt = frames
/ trialduration = 6000
/ recorddata = true

and then modify it (somehow) to present incongruous mypicture and mysound?  Or do I need to make adjustments elsewhere to make the items present in a different order? I feel like the latter is the case but am not sure where to start.

Regards

Jason


No, you need to set up new/additional <picture>, <sound> and <text> elements for the mismatch <trial>.

The already existing ones are _paired for matches_

<picture mypicture>
/ items = pictureitems
</picture>

<item pictureitems>
/ 1 = "dog.jpg"
/ 2 = "cat.jpg"
/ 3 = "apple.jpg"
/ 4 = "house.jpg"
/ 5 = "ball.jpg"
/ 6 = "banana.jpg"
/ 7 = "boat.jpg"
/ 8 = "snail.jpg"
/ 9 = "tree.jpg"
/10 = "boat.jpg"
</item>

<sound mysound>
/ items = sounditems
/ select = picture.mypicture.currentindex
/ erase = false
</sound>

<item sounditems>
/ 1 = "dog.wav"
/ 2 = "cat.wav"
/ 3 = "apple.wav"
/ 4 = "house.wav"
/ 5 = "ball.wav"
/ 6 = "banana.wav"
/ 7 = "boat.wav"
/ 8 = "snail.wav"
/ 9 = "tree.wav"
/ 10 = "car.wav"
</item>

etc.

You need additional ones that are _paired for mismatches_

Dave,

Thanks for your help. Ok, I understand that I need a new set to run through with a mismatched pairing...but how do I accomplish the mismatch? I'm guessing it is in the line you've bolded:

/select = picture.mypicture.currentindex

and that I need to use something other than currentindex so as to get a different image but, as I continue to be painfully ignorant of the syntax, I'm not sure what to use. I toggled through the options that are presented when I type the period after mypicture but none appears to provide a 'random' select type function. 

To review my understanding of the logic:

selectionrate, in the <list hpos> section ensures that options are randomly placed on either the left or right of the screen, right? (I think my understanding is correct here, hopefully)

In addition, I was hoping that distractor items selected each time would be random...but upon further inspection I now see that that is not the case. The correctitems and distractor items (1, 2, 3, etc.) are paired when presented... I've made an embarrassing realization about how the script is functioning vs how I thought it was functioning. But that's a step forward in terms of my knowledge base. ;-)

So if I simply renumber my items (to have mismatches between picture and sound files) I should be able to accomplish what I want, correct?

So I basically make a new 'routine' (maybe not the most accurate terminology), using different variable names (e.g. mypictureincong, pictureitemsincong, mysoundincong, correctoptionincong, distractoritemincong, etc.) and then call those from a trial as is done in what I have now? But I can still use the same root files (pictures, audio)...I just need to label them differently as items, text, sound, etc. Hopefully, my logic is all in order here...?

Or, (sorry I'm typing as I think here) maybe I can just make new <text> labeling items (correctoptionincong for example) differently and then call them in a random method...or not. 

Maybe I should just be asking if there is a way to select randomly instead of the current index?

Hopefully, I can get my head around the logic here before too long and, in the not too distant future, be able to stop bugging you. :-)

Regards

Jason
By Musashi Jason - 6/13/2018

Musashi Jason - Wednesday, June 13, 2018
Dave - Tuesday, June 12, 2018
Musashi Jason - Tuesday, June 12, 2018

Dave,

Continuing to bug you here...regarding the mismatch setup, am I correct in understanding that I can simply make a new trial using the text, image, audio, and items already specified in my script?  So, for example, I could make a new trial, like:

<trial firsttrialnomatch>
/ ontrialbegin = [
values.correcth = list.hpos.nextvalue;
values.distractorh = list.hpos.nextvalue;
]
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ validresponse = (anyresponse)
/ beginresponsetime = 2000
/ inputdevice = voicerecord
/ responseinterrupt = frames
/ trialduration = 6000
/ recorddata = true

and then modify it (somehow) to present incongruous mypicture and mysound?  Or do I need to make adjustments elsewhere to make the items present in a different order? I feel like the latter is the case but am not sure where to start.

Regards

Jason


No, you need to set up new/additional <picture>, <sound> and <text> elements for the mismatch <trial>.

The already existing ones are _paired for matches_

<picture mypicture>
/ items = pictureitems
</picture>

<item pictureitems>
/ 1 = "dog.jpg"
/ 2 = "cat.jpg"
/ 3 = "apple.jpg"
/ 4 = "house.jpg"
/ 5 = "ball.jpg"
/ 6 = "banana.jpg"
/ 7 = "boat.jpg"
/ 8 = "snail.jpg"
/ 9 = "tree.jpg"
/10 = "boat.jpg"
</item>

<sound mysound>
/ items = sounditems
/ select = picture.mypicture.currentindex
/ erase = false
</sound>

<item sounditems>
/ 1 = "dog.wav"
/ 2 = "cat.wav"
/ 3 = "apple.wav"
/ 4 = "house.wav"
/ 5 = "ball.wav"
/ 6 = "banana.wav"
/ 7 = "boat.wav"
/ 8 = "snail.wav"
/ 9 = "tree.wav"
/ 10 = "car.wav"
</item>

etc.

You need additional ones that are _paired for mismatches_

Dave,

Thanks for your help. Ok, I understand that I need a new set to run through with a mismatched pairing...but how do I accomplish the mismatch? I'm guessing it is in the line you've bolded:

/select = picture.mypicture.currentindex

and that I need to use something other than currentindex so as to get a different image but, as I continue to be painfully ignorant of the syntax, I'm not sure what to use. I toggled through the options that are presented when I type the period after mypicture but none appears to provide a 'random' select type function. 

To review my understanding of the logic:

selectionrate, in the <list hpos> section ensures that options are randomly placed on either the left or right of the screen, right? (I think my understanding is correct here, hopefully)

In addition, I was hoping that distractor items selected each time would be random...but upon further inspection I now see that that is not the case. The correctitems and distractor items (1, 2, 3, etc.) are paired when presented... I've made an embarrassing realization about how the script is functioning vs how I thought it was functioning. But that's a step forward in terms of my knowledge base. ;-)

So if I simply renumber my items (to have mismatches between picture and sound files) I should be able to accomplish what I want, correct?

So I basically make a new 'routine' (maybe not the most accurate terminology), using different variable names (e.g. mypictureincong, pictureitemsincong, mysoundincong, correctoptionincong, distractoritemincong, etc.) and then call those from a trial as is done in what I have now? But I can still use the same root files (pictures, audio)...I just need to label them differently as items, text, sound, etc. Hopefully, my logic is all in order here...?

Or, (sorry I'm typing as I think here) maybe I can just make new <text> labeling items (correctoptionincong for example) differently and then call them in a random method...or not. 

Maybe I should just be asking if there is a way to select randomly instead of the current index?

Hopefully, I can get my head around the logic here before too long and, in the not too distant future, be able to stop bugging you. :-)

Regards

Jason

Dave,

Sorry, I'm trying hard to wrap my head around all this. It appears that seledtionmode is no longer a valid attribute. Is that correct? Much of the online documentation refers to it but in experimenting with it I'm getting a "not a valid attribute" error.

Jason
By Dave - 6/13/2018

Musashi Jason - Wednesday, June 13, 2018
Musashi Jason - Wednesday, June 13, 2018
Dave - Tuesday, June 12, 2018
Musashi Jason - Tuesday, June 12, 2018

Dave,

Continuing to bug you here...regarding the mismatch setup, am I correct in understanding that I can simply make a new trial using the text, image, audio, and items already specified in my script?  So, for example, I could make a new trial, like:

<trial firsttrialnomatch>
/ ontrialbegin = [
values.correcth = list.hpos.nextvalue;
values.distractorh = list.hpos.nextvalue;
]
/ stimulustimes = [0= mask; 500=mypicture; 515=clearscreen; 516=mask; 1015=clearscreen; 1700=correctoption, distractoroption; 2200=mysound]
/ validresponse = (anyresponse)
/ beginresponsetime = 2000
/ inputdevice = voicerecord
/ responseinterrupt = frames
/ trialduration = 6000
/ recorddata = true

and then modify it (somehow) to present incongruous mypicture and mysound?  Or do I need to make adjustments elsewhere to make the items present in a different order? I feel like the latter is the case but am not sure where to start.

Regards

Jason


No, you need to set up new/additional <picture>, <sound> and <text> elements for the mismatch <trial>.

The already existing ones are _paired for matches_

<picture mypicture>
/ items = pictureitems
</picture>

<item pictureitems>
/ 1 = "dog.jpg"
/ 2 = "cat.jpg"
/ 3 = "apple.jpg"
/ 4 = "house.jpg"
/ 5 = "ball.jpg"
/ 6 = "banana.jpg"
/ 7 = "boat.jpg"
/ 8 = "snail.jpg"
/ 9 = "tree.jpg"
/10 = "boat.jpg"
</item>

<sound mysound>
/ items = sounditems
/ select = picture.mypicture.currentindex
/ erase = false
</sound>

<item sounditems>
/ 1 = "dog.wav"
/ 2 = "cat.wav"
/ 3 = "apple.wav"
/ 4 = "house.wav"
/ 5 = "ball.wav"
/ 6 = "banana.wav"
/ 7 = "boat.wav"
/ 8 = "snail.wav"
/ 9 = "tree.wav"
/ 10 = "car.wav"
</item>

etc.

You need additional ones that are _paired for mismatches_

Dave,

Thanks for your help. Ok, I understand that I need a new set to run through with a mismatched pairing...but how do I accomplish the mismatch? I'm guessing it is in the line you've bolded:

/select = picture.mypicture.currentindex

and that I need to use something other than currentindex so as to get a different image but, as I continue to be painfully ignorant of the syntax, I'm not sure what to use. I toggled through the options that are presented when I type the period after mypicture but none appears to provide a 'random' select type function. 

To review my understanding of the logic:

selectionrate, in the <list hpos> section ensures that options are randomly placed on either the left or right of the screen, right? (I think my understanding is correct here, hopefully)

In addition, I was hoping that distractor items selected each time would be random...but upon further inspection I now see that that is not the case. The correctitems and distractor items (1, 2, 3, etc.) are paired when presented... I've made an embarrassing realization about how the script is functioning vs how I thought it was functioning. But that's a step forward in terms of my knowledge base. ;-)

So if I simply renumber my items (to have mismatches between picture and sound files) I should be able to accomplish what I want, correct?

So I basically make a new 'routine' (maybe not the most accurate terminology), using different variable names (e.g. mypictureincong, pictureitemsincong, mysoundincong, correctoptionincong, distractoritemincong, etc.) and then call those from a trial as is done in what I have now? But I can still use the same root files (pictures, audio)...I just need to label them differently as items, text, sound, etc. Hopefully, my logic is all in order here...?

Or, (sorry I'm typing as I think here) maybe I can just make new <text> labeling items (correctoptionincong for example) differently and then call them in a random method...or not. 

Maybe I should just be asking if there is a way to select randomly instead of the current index?

Hopefully, I can get my head around the logic here before too long and, in the not too distant future, be able to stop bugging you. :-)

Regards

Jason

Dave,

Sorry, I'm trying hard to wrap my head around all this. It appears that seledtionmode is no longer a valid attribute. Is that correct? Much of the online documentation refers to it but in experimenting with it I'm getting a "not a valid attribute" error.

Jason

Jason,

The script works like this:

<picture mypicture>
/ items = pictureitems
</picture>

selects from its items randomly without replacement. That's the default behavior. The items are ordered like this:

<item pictureitems>
/ 1 = "dog.jpg"
/ 2 = "cat.jpg"
/ 3 = "apple.jpg"
/ 4 = "house.jpg"
/ 5 = "ball.jpg"
/ 6 = "banana.jpg"
/ 7 = "boat.jpg"
/ 8 = "snail.jpg"
/ 9 = "tree.jpg"
/10 = "boat.jpg"
</item>

The remaining "matched" stimulus elements, like

<sound mysound>
/ items = sounditems
/ select = picture.mypicture.currentindex
/ erase = false
</sound>

are then simply instructed to select the _same_ item index number as <picture mypicture> has selected randomly. That's how you get the matching pairs, because the existing <sound> and various <text> elements' items are ordered in the same way:

<item pictureitems>
/ 1 = "dog.jpg"
/ 2 = "cat.jpg"
/ 3 = "apple.jpg"
/ 4 = "house.jpg"
/ 5 = "ball.jpg"
/ 6 = "banana.jpg"
/ 7 = "boat.jpg"
/ 8 = "snail.jpg"
/ 9 = "tree.jpg"
/10 = "boat.jpg"
</item>

dog is the 1st item in the <picture mypicture> element, and it's also the 1st item in the corresponding <sound> element:

<item sounditems>
/ 1 = "dog.wav"
/ 2 = "cat.wav"
/ 3 = "apple.wav"
/ 4 = "house.wav"
/ 5 = "ball.wav"
/ 6 = "banana.wav"
/ 7 = "boat.wav"
/ 8 = "snail.wav"
/ 9 = "tree.wav"
/ 10 = "car.wav"
</item>

and so forth. If the 5th item is randomly selected in <picture mypicture>, the 5th item will also be selected in <sound mysound> in the given trial.

The <list hpos> has nothing to do with this. It's merely responsible for randomizing the on-screen position of the response options in the trials.

Now, to produce mismatches, you go about it in the same way IF you want SPECIFIC mismatches, you simply order the items differently. Suppose you want the picture of a dog paired with the sound of a cat, then you do

<picture mypicture2>
/ items = pictureitems2
</picture>

<item pictureitems2>
/ 1 = "dog.jpg"
...
</item>

with

<sound mysound2>
/ items = sounditems2
/ select = picture.mypicture2.currentindex
/ erase = false
</sound>

<item sounditems2>
/ 1 = "cat.wav"
...
</item>

If you want some sort of _random_ matches, you would work with <list> elements holding item numbers and /not attributes in those <list>s instead.

By Dave - 6/13/2018

Musashi Jason - Wednesday, June 13, 2018

Dave,

Sorry, I'm trying hard to wrap my head around all this. It appears that seledtionmode is no longer a valid attribute. Is that correct? Much of the online documentation refers to it but in experimenting with it I'm getting a "not a valid attribute" error.

Jason

As for /selectionmode, that attribute has only ever been valid for <list> elements. It does not apply to stimulus elements like <picture>, <text>, or <sound>. The attribute determining selection in stimulus elements is /select.
By Musashi Jason - 6/13/2018

Dave - Wednesday, June 13, 2018
Musashi Jason - Wednesday, June 13, 2018

Dave,

Sorry, I'm trying hard to wrap my head around all this. It appears that seledtionmode is no longer a valid attribute. Is that correct? Much of the online documentation refers to it but in experimenting with it I'm getting a "not a valid attribute" error.

Jason

As for /selectionmode, that attribute has only ever been valid for <list> elements. It does not apply to stimulus elements like <picture>, <text>, or <sound>. The attribute determining selection in stimulus elements is /select.

Dave,

Thanks again for your help. I need to back up a bit and read through the online documentation some more. Your flow explanation here help emensly though. I'll try and study some more for a while before burdening you with more inquiries. ;-)

Regards

Jason