Howdy, Stranger!

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

Supported by

[open] Need help collecting the time a key was pressed.

edited January 2013 in OpenSesame

Hello,

I'm currently trying to make an experiment where the participant has to rate a set of eyes on a scale of 1-5. This part of the experiment I've found very easy to set up.

Unfortunately I also want to test the prospective memory of the participants at the same time, so need to record their keyboard press of the letter 'Q' when they have perceived 2 minutes to have passed. I'm new to open sesame and haven't the faintest idea how to have a participant rate eyes whilst also having a response to a totally different task at the same time, which I'd need a time stamp with to know how close the response was to 2 minutes actually passing.

Any help would be much appreciated.

Thank you very much,

Mark.

Comments

  • edited 4:45PM

    Hi Mark,

    Welcome to the forum!

    If I understand correctly your trial sequence is as follows:

    • Firstly, you present a stimulus (a pair of eyes).
    • Secondly, participants rate this pair of eyes on a 1-5 rating scale.
    • This is followed by a blank interval during which participants have to estimate when 2 minutes have passed since stimulus presentation (and not since their response on the rating scale).
    • Finally, participants press "q" if they think the two minutes have passed.

    Like you said, you will need the time stamps of the stimulus and the keyboard response for this. Luckily, these are very easy to obtain: The time stamp of any given item is contained by an existing variable called "time_" followed by the name of the item. So, for example, the variable "time_my_sketchpad" contains the time stamp of the last time the item "my_sketchpad" was called.

    When applying this to your situation, I would suggest the following procedure:

    • Firstly, append the following items to your trial sequence (which I think you already did): a sketcphad item to present the eyes, a rating_scale item to collect the first response (a mouse click?) and a second sketchpad item to present a blank screen during the remainder of the interval. Set the duration of the latter to 0.
    • Secondly, append a keyboard response to collect the q-press.
    • Next, append a third sketchpad item and set its duration to 0. This is just a dummy item and will be used to obtain the time stamp of the q-press (see below).
    • Append an inline_script item. This is because we need a bit of Python inline code to determine the duration of the target interval (between stimulus and q-response).
    • And finally, append a logger item to make sure all variables are logged at the end of every trial.

    The overview of your experiment should now look something like this:
    image

    The following script should give you an idea of how to determine the interval of interest per trial. Simply put this Python inline code to the Run phase tab of your inline_script item. See the comments for a more detailed explanation.

    [pastebin:4TLKWwxY]

    The complete example experiment can be downloaded here. Simply 'save as' with the extension ".opensesame".

    Finally, note that can have a look at the list of existing variables simply by clicking the "show variable inspector" button in the main toolbar, like so:

    image

    I hope this helps! Please let us know if you have any further questions!

    Best wishes,

    Lotje

    Did you like my answer? Feel free to 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