Howdy, Stranger!

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

Supported by

[open] Ending 2 loops simultaneously

edited March 2014 in OpenSesame

Hello, I must say I love OpenSesame, it's the most intuitive software I've ever used for designing a study.
I'm having a little trouble with a parallel study. What I need is to have an image on screen that changes when a participant presses a certain key (in this case, LEFT CTRL). Simultaneously, an audio RT task, with a tone being played at semi-random intervals, with SPACE as the response key. This needs to be completely independent of the images.
What I have is a parallel with 2 loops, one with my image trial, the other with my RT. They both work and they play simultaneously, but what keeps happening is the RT task goes on longer than the image trial. The duration of the image trial will vary from participant to participant, as they control when one image ends and next begins. It could be as little as 60 seconds up to 7 or 8 minutes. So what's happening now is either I run out of images, and the final image displays until the audio RT (currently set at 10 repeats for brevity) finishes, or the audio RT finishes in the middle of the image trial.
What I want is to have the audio RT task last as long as the image trial. As soon as the participant presses CTRL on the final image, it will end both loops simultaneously. Is there a way to do this?

Comments

  • edited 6:53PM

    I must say I love OpenSesame, it's the most intuitive software I've ever used for designing a study.

    Flattery will get you everywhere. ;)

    I cannot give a very specific answer, because I'm not sure I full understand what your experiment looks like, but in general it sounds like you could make use of the loops break-if statement.

    For example, you could put the sound-playing part of your experiment inside a loop and set the repeat value very high. Then you can add a break-if statement (under 'Show advanced options') that says something like ['stop_playing] = 1. Next, you insert a simple inline_script after the response-collection part of the experiment the sound loop (or at least prevent it from starting another cycle):

    # Tell the sound loop to stop
    exp.set('stop_playing', 1)
    

    Also, make sure to reset the stop_playing variable at the beginning of the trial, also using an inline_script:

    # Reset stop playing variable
    exp.set('stop_playing', 0)
    

    Is than any help at all?

    Cheers,
    Sebastiaan

  • edited 6:53PM

    Here's a screen cap of my overview. So I have a parallel with 2 loops, one presenting the images, the other presenting the audio beeps. Right now, I've got 6 images in the image loop, and I want to have the audio beep loop end when the 6th image is finished. I understand the concept of the "break-if" but I don't know how to use it. I added an inline_script like you said and put in the code you provided, but I'm very ignorant of python and don't know how to have it correspond to the image loop.
    image

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