Sound with the error message in Stroop task


Author
Message
dukanske
dukanske
Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)
Group: Forum Members
Posts: 6, Visits: 22
Hi,
I'm adapting the script for the color-word Stroop task for a study. One of the things I need to do is add a sound to the error message after wrong responses.
In the existing script, an "X" flashes after wrong responses. The stimulus is written as a text item. How do I get a sound to play simultaneously with the "X"?

Also, could I include several different error sounds with random selection to get an element of surprise with each error message? How?

I'll be very grateful for any help you can offer to resolve this.

Thanks,
Freddie

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: 13K, Visits: 104K
You need to set up a <sound> element (if you're using WAV files) or a <video> element (if you are using some other audio format like MP3). That element can have multiple items. You then need to display it via the <trial>'s /responsemessage. One problem may be that a <trial> only may have a single /errormessage attribute (not multiple). You may thus have to /branch to a dedicated feedback trial instead of using /errormessage and/or /responsemessage. That feedback trial can display both the X <text> stimulus and the <sound>/<video> as any other trial would display any other stimuli.

dukanske
dukanske
Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)
Group: Forum Members
Posts: 6, Visits: 22

Right, so the standard errormessage can only specify one stimulus. I guess I need to branch to a designated feedback trial as you suggest. However, after a few hours of fiddling around with this I can't seem to get it working. Where in the trial specification do I insert the /branch command, and how do I write the condition? The original trials are written as follows:

<trial redcongruent>
/ontrialbegin = [
    values.congruency = 1;
]
/ pretrialpause = 200
/ stimulustimes = [1=redcongruent, redreminder, greenreminder, bluereminder, blackreminder]
/ correctresponse = ("d")
/ validresponse = ("d", "f", "j", "k")
/ errormessage = true(x, 400)
/ontrialend = [
    list.responses.insertitem(trial.redcongruent.correct, 1);
    list.responses_congruent.insertitem(trial.redcongruent.correct, 1);

    if (trial.redcongruent.correct) {
        list.latencies.insertitem(trial.redcongruent.latency, 1);
        list.latencies_congruent.insertitem(trial.redcongruent.latency, 1);
    }
]
</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: 13K, Visits: 104K
It doesn't matter where you insert the /branch. That would only matter if there were multiple /branch attributes in the <trial>: Then they are checked in the order given from top to bottom, with the first /branch that evaluates to 'true' being executed.

<trial redcongruent>
/ontrialbegin = [
    values.congruency = 1;
]
/ pretrialpause = 200
/ stimulustimes = [1=redcongruent, redreminder, greenreminder, bluereminder, blackreminder]
/ correctresponse = ("d")
/ validresponse = ("d", "f", "j", "k")
/ errormessage = true(x, 400)
/ontrialend = [
    list.responses.insertitem(trial.redcongruent.correct, 1);
    list.responses_congruent.insertitem(trial.redcongruent.correct, 1);

    if (trial.redcongruent.correct) {
        list.latencies.insertitem(trial.redcongruent.latency, 1);
        list.latencies_congruent.insertitem(trial.redcongruent.latency, 1);
    }
]
/ branch = [if (trial.redcongruent.error) trial.errorfeedback]
</trial>                               

with

<trial errorfeedback>
/ stimulusframes = [1=x, errorsound]
/ validresponse = (noresponse)
/ trialduration = 400
/ recorddata = false
</trial>

Edited 8 Years Ago by Dave
dukanske
dukanske
Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)
Group: Forum Members
Posts: 6, Visits: 22
That's awesome, thank you!

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search