Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

dual-task in opensesame

hi! i'm trying to create a dual-task interference exp on opensesame, that requires two responses on one screen for two different tasks. is there any way to do this?

Comments

  • Hi,

    Essentially yes. You would "trick" participants by presenting the screen twice without any visual change in between. That way it will appear as if it was shown only once, however, it gives you the possibility to use two keyboard items, so that you can collect two responses. Details depend on your specific design/implementation. How about you get started and in case you get stuck, report back here?

    Good luck,

    Eduard

    Buy Me A Coffee

  • FabFab
    edited October 2021

    Hi @hello123123,

    As Eduard pointed out, the way to do this is to take a first response and immediately display the same stimulus screen again before you take a second response. So, you'd have two stimulus screens and two keyboard object within the same trial.

    It is simple to do in its basic form. Here's an example I put together quickly to illustrate the method.

    Let's imagine a task where a letter and a digit are presented simultaneously and participants must first press the C or V buttons to indicate is the letter is a consonant or a vowel, and then press E or O to indicate is the digit is Even or Odd. The simplest method is this:


    In this example, the stimulus sketchpad is used twice, with a duration of 0 ms, and a different keyboard object is inserted after each instance (the first to take the response to the letter; the second to take the response to the digit).

    You can download my example here:

    The logger makes sure to record the two responses and their respective RTs. Note however that RTs are measured from the onset of the keyboard object, so in the output, you'll get a first RT for the letter measured from the onset of the take_letter_response keyboard object, while the RT measured for the digit response will be measured from the onset of the take_digit_response keyboard object. To get the RTs measured from the onset of the stimulus, you could add the two RTs to get the RT for the digit measured from stimulus onset (you can do that in your data after the experiment has finished, or you can use some programming to redefine the value of the second RT accordingly).

    The scoring of the responses does not work automatically for some reason (though there might be something I missed - am doing this in a rush before heading home), so I implemented the scoring of both responses using an inline_javascript object and the following code (you could write code in Python using the inline_script object instead, but if you're planning to run this task in a browser, you should use javascript):

    // compute scores for each task
    
    if (vars.response_take_letter_response == vars.c_letter){
    vars.correct_take_letter_response = 1;
    } else {
    vars.correct_take_letter_response = 0;
    }
    
    if (vars.response_take_digit_response == vars.c_digit){
    vars.correct_take_digit_response = 1;
    } else {
    vars.correct_take_digit_response = 0;
    }
    

    The data log will contain the information about both responses. Whether they are correct or not:

    ... as well as responses recorded and their corresponding RTs:

    If you wished to introduce some sort of change on the screen so that participants can see that their response has been registered, then you should replace the second sketchpad by a feedback object and use code to implement the presentation of something on the screen indicating that a response has been taken (sketchpad can't be updated on the fly while the trial is running, but feedback objects can).

    Hope this helps.

    Good luck!

    Fabrice.

    Buy Me A Coffee

Sign In or Register to comment.