Howdy, Stranger!

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

Supported by

Keyboard response during sampler presentation

Hi there,

I have tried to read up on this topic through some of the other discussions but am finding myself lost in the details / other designs seem more complex. Basically, I need to collect a keyboard response (either S or D, where either S or D may be correct depending on the given trial) but this response needs to be collectable during the presentation phase as well as after. The design is structured as follows:

Here, the HF_D_1 loop runs the HF_sequence_1 sequence which contains the variable titled HF_sound (this involves six sound items which are then called in the sampler). The fixation dot is set at a duration 0 to run for the duration of the sequence, and then the sketchpad Recog_mid_1 displays '***' until the next sequence begins (HF_D_1R) - in this instance the second sequence is different to the first (hence D). This runs in the same manner as the last until a "Same/different?" sketchpad prompt appears (SD) also set at duration 0, to which the participant must press either S or D (set by the keyboard response titled End_HF_D_1).

This works well, but my problem is that I need to be able to record responses from the onset of HF_D_1R right up through the presentation of SD, rather than at the end only once SD appears. My understanding from other discussions is that I may need an inline script to do this but again, given the differences in designs I'm having trouble figuring out how to go about this. Any help is appreciated. Thank you!

Comments

  • Hi,

    Yes, inline_scripts might be to go-to solution. In the documentation you will see taht you can to all the things that you can do with [sketchpads](http://osdoc.cogsci.nl/3.1/manual/python/canvas/) and samplers also with inline_scripts and it is all that difficult. First, create canvasses , keyboard times, and load the sounds. Then, enter a loop in which you start waiting for key presses, depending on the time that has passed inside the loop you present either the one display, or the other, together with the corresponding sound.

    See for example here

    # create objects
    fix_cv = canvas()
    recog_cv = canvas()
    SD_cv = canvas()
    
    kb = keyboard(keylist = ['s','d','escape'])
    src = pool['sound.ogg']
    my_sampler = sampler(src, volume=.5)
    
    # draw the canvas, e.g.
    
    SD_cv.text("same or different")
    
    # define some times
    onset_firstFix = 1000
    onset_recogCv = 2000
    onset_secondFix = 3000
    onset_SDcv = 4000
    
    start_time = clock.time()
    while True: 
        k, t = kb.get_key(timeout=50)
        if k != None:
             break
    
        if clock.time()-start_time > onset_SDcv:
            SD_cv.show()
        elif clock.time()-start_time > onset_secondFix:
            fix_cv.show()
        elif clock.time()-start_time > onset_recogCv:
            recog_cv.show()
        elif clock.time()-start_time > onset_firstFix:
            fix_cv.show()
    

    I haven't tested the script, but something along these lines should do 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