branching doesn't work for 'too slow' and 'wrong' feedback


Author
Message
Amelinq
Amelinq
Associate Member (243 reputation)Associate Member (243 reputation)Associate Member (243 reputation)Associate Member (243 reputation)Associate Member (243 reputation)Associate Member (243 reputation)Associate Member (243 reputation)Associate Member (243 reputation)Associate Member (243 reputation)
Group: Forum Members
Posts: 19, Visits: 48
Hi all,
I'm back with another question :)
I tried the /branch attribute to implement 'wrong' feedback and 'too slow' feedback (for trials with a sound after 1800 ms and for others after 800 ms),
but my code doesn't seem to work.
Anyone who sees what's going wrong? Thanks again so much!

Best, Amelie

*************************************************
TRIALS
<trial irrelevants>
/ ontrialbegin = [
  trial.irrelevants.resetstimulusframes();
  trial.irrelevants.insertstimulustime(list.irrelevants.nextvalue, 200);
    if (startswith(list.irrelevants.currentvalue, "sound.")) {
  trial.irrelevants.insertstimulustime(picture.soundicon, 200)};]
/branch= [if(trial.irrelevants.response == "s")trial.wrong]
/branch = [if(startswith(list.irrelevants.currentvalue, "sound."))trial.irrelevants.insertstimulustime(text.tooslow, 1800)]
/branch = [if(startswith(list.irrelevants.currentvalue, "picture."))trial.irrelevants.insertstimulustime(text.tooslow, 800)]
/branch = [if(startswith(list.irrelevants.currentvalue, "text."))trial.irrelevants.insertstimulustime(text.tooslow, 800)]
/stimulustimes = [0 = yes, no]
/validresponse = ("s","l")
/correctresponse = ("l") // no = l-key
/timeout = 2000
/beginresponsetime = 0
</trial>

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
Amelinq - 10/2/2023
Hi all,
I'm back with another question :)
I tried the /branch attribute to implement 'wrong' feedback and 'too slow' feedback (for trials with a sound after 1800 ms and for others after 800 ms),
but my code doesn't seem to work.
Anyone who sees what's going wrong? Thanks again so much!

Best, Amelie

*************************************************
TRIALS
<trial irrelevants>
/ ontrialbegin = [
  trial.irrelevants.resetstimulusframes();
  trial.irrelevants.insertstimulustime(list.irrelevants.nextvalue, 200);
    if (startswith(list.irrelevants.currentvalue, "sound.")) {
  trial.irrelevants.insertstimulustime(picture.soundicon, 200)};]
/branch= [if(trial.irrelevants.response == "s")trial.wrong]
/branch = [if(startswith(list.irrelevants.currentvalue, "sound."))trial.irrelevants.insertstimulustime(text.tooslow, 1800)]
/branch = [if(startswith(list.irrelevants.currentvalue, "picture."))trial.irrelevants.insertstimulustime(text.tooslow, 800)]
/branch = [if(startswith(list.irrelevants.currentvalue, "text."))trial.irrelevants.insertstimulustime(text.tooslow, 800)]
/stimulustimes = [0 = yes, no]
/validresponse = ("s","l")
/correctresponse = ("l") // no = l-key
/timeout = 2000
/beginresponsetime = 0
</trial>

The way you try to use /branch makes no sense. /branch is for conditionally invoking another trial (here: one that would display appropriate feedback stimuli), it is not for inserting some stimulus into the current trial.

Also, the response property returns the scancode of the keyboard key that was pressed, not the character. If you want to work with the character, you ought to use the responsetext property.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search