tone response


Author
Message
nakayama
nakayama
Guru (5.1K reputation)Guru (5.1K reputation)Guru (5.1K reputation)Guru (5.1K reputation)Guru (5.1K reputation)Guru (5.1K reputation)Guru (5.1K reputation)Guru (5.1K reputation)Guru (5.1K reputation)
Group: Forum Members
Posts: 72, Visits: 408
Hi Dave
I am designing a task as the picture shows.
Two second after the presentation of the first tone (lasts 50ms), the second tone beeps (lasts 50ms).
Participants were asked to click the red stimulus any time after its presence and another tone produced (lasts 50ms) along with the click.
So the click can be executed before, coincide with, or after the second tone.
If the click is executed before the second tone, the trial is ended by the second tone;
 If the click is executed after the second tone, the trial is ended by the click;
If the click is executed synchronized with the second tone, the trial is ended by the click;
therefore, whether the click is validresponse depended on when the click happens.
Is there a way to do above and fix the following script?
Thank you for your attention;)

 
Attachments
procedure.JPG (221 views, 13.00 KB)
test.iqx (232 views, 1.00 KB)
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
nakayama - 10/24/2019
Hi Dave
I am designing a task as the picture shows.
Two second after the presentation of the first tone (lasts 50ms), the second tone beeps (lasts 50ms).
Participants were asked to click the red stimulus any time after its presence and another tone produced (lasts 50ms) along with the click.
So the click can be executed before, coincide with, or after the second tone.
If the click is executed before the second tone, the trial is ended by the second tone;
 If the click is executed after the second tone, the trial is ended by the click;
If the click is executed synchronized with the second tone, the trial is ended by the click;
therefore, whether the click is validresponse depended on when the click happens.
Is there a way to do above and fix the following script?
Thank you for your attention;)

 

I don't understand the script you attached and how it's supposed to relate to the description you posted. Your script runs a trial that does nothing for two seconds and then plays a tone:
<values>
/ interval=2000
</values>


<trial sound>
/ ontrialbegin = [trial.sound.insertstimulustime(sound.tone,values.interval);]
/ ontrialend = [trial.sound.resetstimulusframes()]
/ timeout = values.interval+50
/ responsetrial = (noresponse,tap)
/ validresponse = (mousemove,noresponse)
/ inputdevice = mouse
</trial>

Why is this a separate trial and why does it wait for 2 seconds before doing anything?

Then you invoke <trial tap> which displays a red circle, and then another 2 seconds later a tone:

<trial tap>
/ stimulustimes = [0=screen,circleshape;2000=tone]
/ ontrialend = [trial.tap.resetstimulusframes()]
/ validresponse = (circleshape)
/ inputdevice = mouse
/ branch = [trial.release]
</trial>

So, why is <trial sound> even necesary? Why don't you have a single trial that plays both tones? When, in relation to the tones, is the red circle supposed to appear? Your description

"Two second after the presentation of the first tone (lasts 50ms), the second tone beeps (lasts 50ms).
Participants were asked to click the red stimulus any time after its presence and another tone produced (lasts 50ms) along with the click.
So the click can be executed before, coincide with, or after the second tone.
If the click is executed before the second tone, the trial is ended by the second tone;
 If the click is executed after the second tone, the trial is ended by the click;
If the click is executed synchronized with the second tone, the trial is ended by the click;
therefore, whether the click is validresponse depended on when the click happens."

does not cover that at all, and neither does your graphic:



To sum up, why don't you simply do:

<trial sound>
/ ontrialbegin = [trial.sound.resetstimulusframes()]
/ stimulustimes = [0=screen, tone; 50=circleshape; 2000=tone]
/ inputdevice = mouse
/ validresponse = (circleshape)
/ beginresponsetime = 50
/ responseinterrupt = frames

/ branch = [trial.release]
</trial>



Edited 5 Years Ago by Dave
nakayama
nakayama
Guru (5.1K reputation)Guru (5.1K reputation)Guru (5.1K reputation)Guru (5.1K reputation)Guru (5.1K reputation)Guru (5.1K reputation)Guru (5.1K reputation)Guru (5.1K reputation)Guru (5.1K reputation)
Group: Forum Members
Posts: 72, Visits: 408
Dave - 10/24/2019
nakayama - 10/24/2019
Hi Dave
I am designing a task as the picture shows.
Two second after the presentation of the first tone (lasts 50ms), the second tone beeps (lasts 50ms).
Participants were asked to click the red stimulus any time after its presence and another tone produced (lasts 50ms) along with the click.
So the click can be executed before, coincide with, or after the second tone.
If the click is executed before the second tone, the trial is ended by the second tone;
 If the click is executed after the second tone, the trial is ended by the click;
If the click is executed synchronized with the second tone, the trial is ended by the click;
therefore, whether the click is validresponse depended on when the click happens.
Is there a way to do above and fix the following script?
Thank you for your attention;)

 

I don't understand the script you attached and how it's supposed to relate to the description you posted. Your script runs a trial that does nothing for two seconds and then plays a tone:
<values>
/ interval=2000
</values>


<trial sound>
/ ontrialbegin = [trial.sound.insertstimulustime(sound.tone,values.interval);]
/ ontrialend = [trial.sound.resetstimulusframes()]
/ timeout = values.interval+50
/ responsetrial = (noresponse,tap)
/ validresponse = (mousemove,noresponse)
/ inputdevice = mouse
</trial>

Why is this a separate trial and why does it wait for 2 seconds before doing anything?

Then you invoke <trial tap> which displays a red circle, and then another 2 seconds later a tone:

<trial tap>
/ stimulustimes = [0=screen,circleshape;2000=tone]
/ ontrialend = [trial.tap.resetstimulusframes()]
/ validresponse = (circleshape)
/ inputdevice = mouse
/ branch = [trial.release]
</trial>

So, why is <trial sound> even necesary? Why don't you have a single trial that plays both tones? When, in relation to the tones, is the red circle supposed to appear? Your description

"Two second after the presentation of the first tone (lasts 50ms), the second tone beeps (lasts 50ms).
Participants were asked to click the red stimulus any time after its presence and another tone produced (lasts 50ms) along with the click.
So the click can be executed before, coincide with, or after the second tone.
If the click is executed before the second tone, the trial is ended by the second tone;
 If the click is executed after the second tone, the trial is ended by the click;
If the click is executed synchronized with the second tone, the trial is ended by the click;
therefore, whether the click is validresponse depended on when the click happens."

does not cover that at all, and neither does your graphic:



To sum up, why don't you simply do:

<trial sound>
/ ontrialbegin = [trial.sound.resetstimulusframes()]
/ stimulustimes = [0=screen, tone; 50=circleshape; 2000=tone]
/ inputdevice = mouse
/ validresponse = (circleshape)
/ beginresponsetime = 50
/ responseinterrupt = frames

/ branch = [trial.release]
</trial>


Hi, Dave thank you for your comments.
I have reorganized my language and wish to fix one problem on this script.

Participants clicked the stimulus (circleshape) to response, and as soon as (no delay between) the click response, another tone beeps (say, tone2).

And I also don't want the presentation of tone2 affect the presentation of the second tone (located at 2000=tone). So the the second tone is always presented whether the the click response is released+tone2 before or after the second tone. 

(/ stimulustimes = [0=screen, tone; 50=circleshape; 2000=tone])
I noticed if I used / branch = [trial.release] to insert another trial with the presentation of tone2, when the click response was released before the second tone,
the presentation of tone2 and the second tone sounded simultaneously presented, meaning that the presentation time of the second tone was affected by the insertion.

How could I fix this?
Thank you for your advice;) 




Attachments
test4.iqx (223 views, 1.00 KB)
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
nakayama - 10/31/2019
Dave - 10/24/2019
nakayama - 10/24/2019
Hi Dave
I am designing a task as the picture shows.
Two second after the presentation of the first tone (lasts 50ms), the second tone beeps (lasts 50ms).
Participants were asked to click the red stimulus any time after its presence and another tone produced (lasts 50ms) along with the click.
So the click can be executed before, coincide with, or after the second tone.
If the click is executed before the second tone, the trial is ended by the second tone;
 If the click is executed after the second tone, the trial is ended by the click;
If the click is executed synchronized with the second tone, the trial is ended by the click;
therefore, whether the click is validresponse depended on when the click happens.
Is there a way to do above and fix the following script?
Thank you for your attention;)

 

I don't understand the script you attached and how it's supposed to relate to the description you posted. Your script runs a trial that does nothing for two seconds and then plays a tone:
<values>
/ interval=2000
</values>


<trial sound>
/ ontrialbegin = [trial.sound.insertstimulustime(sound.tone,values.interval);]
/ ontrialend = [trial.sound.resetstimulusframes()]
/ timeout = values.interval+50
/ responsetrial = (noresponse,tap)
/ validresponse = (mousemove,noresponse)
/ inputdevice = mouse
</trial>

Why is this a separate trial and why does it wait for 2 seconds before doing anything?

Then you invoke <trial tap> which displays a red circle, and then another 2 seconds later a tone:

<trial tap>
/ stimulustimes = [0=screen,circleshape;2000=tone]
/ ontrialend = [trial.tap.resetstimulusframes()]
/ validresponse = (circleshape)
/ inputdevice = mouse
/ branch = [trial.release]
</trial>

So, why is <trial sound> even necesary? Why don't you have a single trial that plays both tones? When, in relation to the tones, is the red circle supposed to appear? Your description

"Two second after the presentation of the first tone (lasts 50ms), the second tone beeps (lasts 50ms).
Participants were asked to click the red stimulus any time after its presence and another tone produced (lasts 50ms) along with the click.
So the click can be executed before, coincide with, or after the second tone.
If the click is executed before the second tone, the trial is ended by the second tone;
 If the click is executed after the second tone, the trial is ended by the click;
If the click is executed synchronized with the second tone, the trial is ended by the click;
therefore, whether the click is validresponse depended on when the click happens."

does not cover that at all, and neither does your graphic:



To sum up, why don't you simply do:

<trial sound>
/ ontrialbegin = [trial.sound.resetstimulusframes()]
/ stimulustimes = [0=screen, tone; 50=circleshape; 2000=tone]
/ inputdevice = mouse
/ validresponse = (circleshape)
/ beginresponsetime = 50
/ responseinterrupt = frames

/ branch = [trial.release]
</trial>


Hi, Dave thank you for your comments.
I have reorganized my language and wish to fix one problem on this script.

Participants clicked the stimulus (circleshape) to response, and as soon as (no delay between) the click response, another tone beeps (say, tone2).

And I also don't want the presentation of tone2 affect the presentation of the second tone (located at 2000=tone). So the the second tone is always presented whether the the click response is released+tone2 before or after the second tone. 

(/ stimulustimes = [0=screen, tone; 50=circleshape; 2000=tone])
I noticed if I used / branch = [trial.release] to insert another trial with the presentation of tone2, when the click response was released before the second tone,
the presentation of tone2 and the second tone sounded simultaneously presented, meaning that the presentation time of the second tone was affected by the insertion.

How could I fix this?
Thank you for your advice;) 




I don't understand what you want to do. You said originally:

"Two second after the presentation of the first tone (lasts 50ms), the second tone beeps (lasts 50ms).
Participants were asked to click the red stimulus any time after its presence and another tone produced (lasts 50ms) along with the click."

There are three tones in the above, not two.

You further stated:

"If the click is executed before the second tone, the trial is ended by the second tone;"

The code I gave you does exactly that. The 2nd tone is *always* played by <trial sound>, regardless of when the click occurs.

"I noticed if I used / branch = [trial.release] to insert another trial with the presentation of tone2, when the click response was released before the second tone,
the presentation of tone2 and the second tone sounded simultaneously presented, meaning that the presentation time of the second tone was affected by the insertion."

No, the presentation time of tone 2 is not affected. What you hear is the 3rd tone played by <trial release>, which only happens after <trial sound> has played tone2 two seconds after tone1.

It's not clear to me what you think needs to be fixed.


nakayama
nakayama
Guru (5.1K reputation)Guru (5.1K reputation)Guru (5.1K reputation)Guru (5.1K reputation)Guru (5.1K reputation)Guru (5.1K reputation)Guru (5.1K reputation)Guru (5.1K reputation)Guru (5.1K reputation)
Group: Forum Members
Posts: 72, Visits: 408
Dave - 11/1/2019
nakayama - 10/31/2019
Dave - 10/24/2019
nakayama - 10/24/2019
Hi Dave
I am designing a task as the picture shows.
Two second after the presentation of the first tone (lasts 50ms), the second tone beeps (lasts 50ms).
Participants were asked to click the red stimulus any time after its presence and another tone produced (lasts 50ms) along with the click.
So the click can be executed before, coincide with, or after the second tone.
If the click is executed before the second tone, the trial is ended by the second tone;
 If the click is executed after the second tone, the trial is ended by the click;
If the click is executed synchronized with the second tone, the trial is ended by the click;
therefore, whether the click is validresponse depended on when the click happens.
Is there a way to do above and fix the following script?
Thank you for your attention;)

 

I don't understand the script you attached and how it's supposed to relate to the description you posted. Your script runs a trial that does nothing for two seconds and then plays a tone:
<values>
/ interval=2000
</values>


<trial sound>
/ ontrialbegin = [trial.sound.insertstimulustime(sound.tone,values.interval);]
/ ontrialend = [trial.sound.resetstimulusframes()]
/ timeout = values.interval+50
/ responsetrial = (noresponse,tap)
/ validresponse = (mousemove,noresponse)
/ inputdevice = mouse
</trial>

Why is this a separate trial and why does it wait for 2 seconds before doing anything?

Then you invoke <trial tap> which displays a red circle, and then another 2 seconds later a tone:

<trial tap>
/ stimulustimes = [0=screen,circleshape;2000=tone]
/ ontrialend = [trial.tap.resetstimulusframes()]
/ validresponse = (circleshape)
/ inputdevice = mouse
/ branch = [trial.release]
</trial>

So, why is <trial sound> even necesary? Why don't you have a single trial that plays both tones? When, in relation to the tones, is the red circle supposed to appear? Your description

"Two second after the presentation of the first tone (lasts 50ms), the second tone beeps (lasts 50ms).
Participants were asked to click the red stimulus any time after its presence and another tone produced (lasts 50ms) along with the click.
So the click can be executed before, coincide with, or after the second tone.
If the click is executed before the second tone, the trial is ended by the second tone;
 If the click is executed after the second tone, the trial is ended by the click;
If the click is executed synchronized with the second tone, the trial is ended by the click;
therefore, whether the click is validresponse depended on when the click happens."

does not cover that at all, and neither does your graphic:



To sum up, why don't you simply do:

<trial sound>
/ ontrialbegin = [trial.sound.resetstimulusframes()]
/ stimulustimes = [0=screen, tone; 50=circleshape; 2000=tone]
/ inputdevice = mouse
/ validresponse = (circleshape)
/ beginresponsetime = 50
/ responseinterrupt = frames

/ branch = [trial.release]
</trial>


Hi, Dave thank you for your comments.
I have reorganized my language and wish to fix one problem on this script.

Participants clicked the stimulus (circleshape) to response, and as soon as (no delay between) the click response, another tone beeps (say, tone2).

And I also don't want the presentation of tone2 affect the presentation of the second tone (located at 2000=tone). So the the second tone is always presented whether the the click response is released+tone2 before or after the second tone. 

(/ stimulustimes = [0=screen, tone; 50=circleshape; 2000=tone])
I noticed if I used / branch = [trial.release] to insert another trial with the presentation of tone2, when the click response was released before the second tone,
the presentation of tone2 and the second tone sounded simultaneously presented, meaning that the presentation time of the second tone was affected by the insertion.

How could I fix this?
Thank you for your advice;) 




I don't understand what you want to do. You said originally:

"Two second after the presentation of the first tone (lasts 50ms), the second tone beeps (lasts 50ms).
Participants were asked to click the red stimulus any time after its presence and another tone produced (lasts 50ms) along with the click."

There are three tones in the above, not two.

You further stated:

"If the click is executed before the second tone, the trial is ended by the second tone;"

The code I gave you does exactly that. The 2nd tone is *always* played by <trial sound>, regardless of when the click occurs.

"I noticed if I used / branch = [trial.release] to insert another trial with the presentation of tone2, when the click response was released before the second tone,
the presentation of tone2 and the second tone sounded simultaneously presented, meaning that the presentation time of the second tone was affected by the insertion."

No, the presentation time of tone 2 is not affected. What you hear is the 3rd tone played by <trial release>, which only happens after <trial sound> has played tone2 two seconds after tone1.

It's not clear to me what you think needs to be fixed.

Thank you for your reply. The problem I wish to fix is
"What you hear is the 3rd tone played by <trial release>, which only happens after <trial sound> has played tone2 two seconds after tone1"
I want the 3rd tone produced by click also happens not only after but also before <trial sound> has played tone2.
The current script now works like this: If I click and produced the 3rd tone between tone1 and tone2, the 3rd tone did not occur before tone2, but sounded like right after tone2.  


nakayama
nakayama
Guru (5.1K reputation)Guru (5.1K reputation)Guru (5.1K reputation)Guru (5.1K reputation)Guru (5.1K reputation)Guru (5.1K reputation)Guru (5.1K reputation)Guru (5.1K reputation)Guru (5.1K reputation)
Group: Forum Members
Posts: 72, Visits: 408
Participants can either click and produce 3rd tone between tone 1 and tone 2 or after tone2.
Clicking after tone2 and produced 3rd tone has no problem using branch.
But when between tone1 and tone2, the 3rd tone also occurs after tone2 due to branch. But what I wanted is that the 3rd tone occurs right after clicking.
I wish this could be clear.

Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
nakayama - 11/1/2019
Participants can either click and produce 3rd tone between tone 1 and tone 2 or after tone2. Clicking after tone2 and produced 3rd tone has no problem using branch.But when between tone1 and tone2, the 3rd tone also occurs after tone2 due to branch. But what I wanted is that the 3rd tone occurs right after clicking.I wish this could be clear.

Then you cannot use /branch. You ought to use /responsemessage instead.

<trial sound>
/ ontrialbegin = [trial.sound.resetstimulusframes()]
/ stimulustimes = [0=screen, tone; 50=circleshape; 2000=tone]
/ inputdevice = mouse
/ validresponse = (circleshape)
/ beginresponsetime = 50
/ responseinterrupt = frames
/ responsemessage = ("circleshape", tone, 50)
</trial>

nakayama
nakayama
Guru (5.1K reputation)Guru (5.1K reputation)Guru (5.1K reputation)Guru (5.1K reputation)Guru (5.1K reputation)Guru (5.1K reputation)Guru (5.1K reputation)Guru (5.1K reputation)Guru (5.1K reputation)
Group: Forum Members
Posts: 72, Visits: 408
Dave - 11/1/2019
nakayama - 11/1/2019
Participants can either click and produce 3rd tone between tone 1 and tone 2 or after tone2. Clicking after tone2 and produced 3rd tone has no problem using branch.But when between tone1 and tone2, the 3rd tone also occurs after tone2 due to branch. But what I wanted is that the 3rd tone occurs right after clicking.I wish this could be clear.

Then you cannot use /branch. You ought to use /responsemessage instead.

<trial sound>
/ ontrialbegin = [trial.sound.resetstimulusframes()]
/ stimulustimes = [0=screen, tone; 50=circleshape; 2000=tone]
/ inputdevice = mouse
/ validresponse = (circleshape)
/ beginresponsetime = 50
/ responseinterrupt = frames
/ responsemessage = ("circleshape", tone, 50)
</trial>
Thank you Dave that solved my problem;)
By using / responsemessage 
I also wish to give a visual feedback lasts 50 ms on where the location was clicked but not to track the last mouse cursor. so using trial.sound.responsex may has to be avoided.
How could I fix this? Thank you;)


Attachments
test5.iqx (237 views, 1.00 KB)
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
nakayama - 11/4/2019
Dave - 11/1/2019
nakayama - 11/1/2019
Participants can either click and produce 3rd tone between tone 1 and tone 2 or after tone2. Clicking after tone2 and produced 3rd tone has no problem using branch.But when between tone1 and tone2, the 3rd tone also occurs after tone2 due to branch. But what I wanted is that the 3rd tone occurs right after clicking.I wish this could be clear.

Then you cannot use /branch. You ought to use /responsemessage instead.

<trial sound>
/ ontrialbegin = [trial.sound.resetstimulusframes()]
/ stimulustimes = [0=screen, tone; 50=circleshape; 2000=tone]
/ inputdevice = mouse
/ validresponse = (circleshape)
/ beginresponsetime = 50
/ responseinterrupt = frames
/ responsemessage = ("circleshape", tone, 50)
</trial>
Thank you Dave that solved my problem;)
By using / responsemessage 
I also wish to give a visual feedback lasts 50 ms on where the location was clicked but not to track the last mouse cursor. so using trial.sound.responsex may has to be avoided.
How could I fix this? Thank you;)


That's not possible here.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search