Howdy, Stranger!

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

Supported by

Dual Task Response Collection

Hi There,

I’m currently designing a dual task experiment with OS and am finding some it a bit challenging on collecting responses for both Task 1 and Task 2.

In the experiment, I would like to present Task 1 (an audio-visual stimulus is presented) followed by Task 2 (a lexical decision task). Presentation of both stimuli was quite simple (thanks to OS :) ). The problem I have is with the response collections.

I would like to collect response for Task 1, starting from the presentation of Task 1 and end until ‘keypress’. In other words, response collection should continue even when Task 2 is being presented, until an allowed response is given by the participants.
As for task2, response should be only collected after response of task 1. (See fig).

I’m wondering how I could implement this idea in OpenSesame.

Essentially, I probably need to run the following in parallel:
1. Presentation of Task 1
2. Response of Task 1
3. Presentation of Task 2

I have tried the inline script and coroutines as suggested in this post
(http://forum.cogsci.nl/index.php?p=/discussion/7/solved-recording-multiple-responses-in-one-trial, ), but I’m running two problems.
1. It seems OS is not picking up the keyboard responses when during Task 1’s presentation. It only picks up responses after both task1 and task2 are presented
2. If the Task 1 response was given after the coroutines end(in this case, after 5000ms), OS logs it as zero in the log file.

Not sure if I’m missing something here or if there’s anything I could have done differently here.

Thank you for your help in advance :)
YTLF

Comments

  • Hi YTLF,

    Sorry for the late reply. Have you sorted it out by now? Unfortunately, I'm not very experienced with coroutines, but this little script below is able to handle stimulus presentation and collection in a dual-task.

    Hope this helps.


    #init objects stim1_cv = canvas() stim2_cv = canvas() blank_cv= canvas() kb1 = keyboard(timeout = 2) kb2 = keyboard(timeout = 2) # draw stimuli stim1_cv.circle(-100,-100,50,fill=True,color='red') stim2_cv.circle(100,100,50,fill=True,color='green') # specify timing (onsets stim2 = 2000 # 1 second presentation stimulus 2 blank1 = 1000 # blank presentation for 1 secodns blank2 = 3000 # blank presentation for 1 secodns trial = 5000 # total time of a trial # run tasks var.resp1 = None var.resp2 = None var.t0= stim1.show() # start timer and show stimulus 1 while True: trialTime = clock.time()-var.t0 # take another time sample if trialTime > trial: break elif trialTime > blank2: blank_cv.show() elif trialTime > stim2: stim2_cv.show() elif trialTime > blank1: blank_cv.show() if var.resp1 != None and var.resp2 == None : var.resp2,var.respTime2 = kb2.get_key() elif var.resp1 != None and var.resp2 != None : # if both responses are given, either wait until the timeout, or break the loop pass # waits # break # breaks else: var.resp1,var.respTime1 = kb1.get_key() var.t1 = clock.time() # trial end time

    i haven't tested it, but something along these lines does the trick.

    Good luck.

    Eduard

    Buy Me A Coffee

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu http://45.77.173.118/ Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games