Howdy, Stranger!

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

Supported by

Insert random intervals between mouse responses and sounds

Hi,
I'm totally noob in coding, so, i'm trying to do a simple action-effect task by using only the OS graphic interface.
I need to generate fixed random intervals (200, 500 and 800 ms) between mouse clicks (actions) and respective sounds (effects), and i'm currently using mouse_response + advance_delay + sampler items to do this.
I try to structure the experiment by ordering the items in one of the two different variations of sequences below, in both, i can't do the randomization work through the random function in the loop item. There are:

1) Block_loop
Trial_seq
mouse_resp
adv_delay_ (200 ms)
sampler
mouse_resp
adv_delay_1 (500 ms)
sampler
mouse_resp
adv_delay_2 (800 ms)
sampler

2) Block_loop
Trial_seq
mouse_resp
adv_delay_ (200 ms)
adv_delay_1 (500 ms)
adv_delay_2 (800 ms)
sampler
[in the case above, there is a sum of the three intervals, i.e: mouse click -> 1500ms (200+500+800 ms) -> sound]

As i say, i try the random in the block_loop, etc,etc, but nothing. When i run the experiment, the trial_sequence run without a random in the intervals, like in "sequential order" mode.
The independent variables in my loop are:
Mouse (level: left_button)/Random_delay (3 levels: 200/500/800 ms)/Sound (level: beep_1)

I really need help!
Thanks in advance,
Hugo.

Comments

  • Hi Hugo,

    I think you want to use the loop like:

    1) Block_loop
    Trial_seq
    mouse_resp
    adv_delay_ ([var.delay])
    sampler

    Run that 3 times (or more) in random order and use values 200, 500 and 800 for var.delay.
    Like 'left' and 'right' are used for gaze_cue in http://osdoc.cogsci.nl/3.1/tutorials/beginner/

    Best,
    Jarik

    PS if I'm misunderstanding your question, could you upload your experiment?

  • Hi Jarik,

    Thank you very much for the help.
    I try to plot the values (200, 500 and 800) in adv_delay_ ([var.delay]), but it don't run as it might be.
    The loop look like this:

    adv_delay (in the first row, as the variable name. Open sesame don't accept ( ) and [ ] in the first row.
    adv_delay_ ([200])
    adv_delay_ ([500])
    adv_delay_ ([800])

    Am i right about the way to plot? Of course i could upload the experiment, but i don't know how, do you can say to me how can i do this?

    Thanks again!
    Hugo.

  • Hi Hugo,

    You can upload using the right-most item of the toolbar above the comment field. Possibly you can even drag and drop your experiment file on the comment field (where you type your posts).

    Best,
    Jarik

  • Hi Jarik,
    Thanks again for your attention!
    The experiment is the following.

    Hugo.

  • Hi Hugo,

    You will have to remove 2 of the 3 advanced_delays as you will vary the duration via the advanced_delay variable from the loop item. Now the difficult part is the Duration field of the advanced_delay item does not expect anything else then numbers. So you can just type your variable in there like: "[advanced_delay]". There is a workaround for this:

    • Click Select view in the top right of the advanced_delay item
    • Click View script
    • Change set duration 200 to set duration [advanced_delay]
    • Click Apply and close in the top right of the advanced_delay item

    Another option might be to just use a sketchpad item instead of an advanced_delay item. This will enable you to just type "[advanced_delay]" in the Duration field. It will also enable you to clear the screen which keeps showing new_form_text_display until you draw something new. You could add a text like "please click mouse" for example.

    Best,
    Jarik

    PS it might be more clear to choose a variable name like advanced_delay_duration instead of advanced_delay to be able to tell things apart.

  • Hi Jarik,
    I try the way you indicated, but it doesn't work. Both, advanced_delay and the sketchpad items don't accepted the [advanced_delay] in something like a random form.
    Do you think about some code that could help to randomize the intervals? I'm completely noob about coding. Anyway, i'm trying the clock.sleep function, and it work like the advanced_delay item. Again, the problem is related with the randomization...
    I'm trying some random. codes, but it doesn't work.

    Thanks for your help,
    Hugo.

  • Hi Hugo,

    Please find your slightly modified experiment attached. I used a sketchpad item that also displays the delay on screen. If you run the experiment you will see the loop loop_1_active_1 gives random delays (200, 500 or 800) between the mouse click and the beep.

    Best,
    Jarik

  • Hi Jarik,
    The randomization occurs normally! I better understand the link between the variables in the loop and in the other items now.
    I'm just doing the trick using advanced_delay item, instead of sketchpad.
    Thank you very much again!
    Hugo.

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