Howdy, Stranger!

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

Supported by

[solved] Unique Randomization

edited October 2014 in OpenSesame

Hi,

I need to present a series of facial stimuli where both what face is shown and whether that face is shown once or three times (in a row). So; random face 'x', shown three times. Next, random face 'y', shown once.
It would be easy enough to randomize if face 'x' gets shown three times for each participant, but I'd like not only the face itself, but the number of times it's shown for every participant.

So far I am able to successfully randomize the presentation of the visual stimuli. My problem is (a) getting Open Sesame to decide to either show it once or three times and (b) getting it to show the visual stimulus again after say like a 500ms delay while still operating within the same loop sequence.

Any suggestions on how to accomplish this would be amazing!

Comments

  • edited October 2014

    Hi,

    Here is a working script example. The script (including some example pictures from Wikipedia) can be downloaded here.

    # Generated by OpenSesame 2.8.3 (Gutsy Gibson)
    # Wed Oct 01 21:35:32 2014 (nt)
    # <http://www.cogsci.nl/opensesame>
    
    set mouse_backend "legacy"
    set subject_parity "even"
    set height "768"
    set font_italic "no"
    set canvas_backend "legacy"
    set synth_backend "legacy"
    set start "experiment"
    set title "New experiment"
    set coordinates "relative"
    set width "1024"
    set sampler_backend "legacy"
    set transparent_variables "no"
    set foreground "white"
    set font_bold "no"
    set description "Default description"
    set background "black"
    set font_size "18"
    set keyboard_backend "legacy"
    set font_family "mono"
    set compensation "0"
    set bidi "no"
    set subject_nr "0"
    
    define sketchpad blank
        set duration "1000"
        set description "Displays stimuli"
    
    define sequence experiment
        run reset_counting_variable "always"
        run welcome "always"
        run face_loop "always"
    
    define loop face_loop
        set repeat "1"
        set description "Repeatedly runs another item"
        set item "face_sequence"
        set break_if "never"
        set column_order "imgname"
        set cycles "3"
        set order "random"
        setcycle 0 imgname "bunny.png"
        setcycle 1 imgname "carrot.png"
        setcycle 2 imgname "potato.png"
        run face_sequence
    
    define sequence face_sequence
        set flush_keyboard "yes"
        set description "Runs a number of items in sequence"
        run repeat_loop "always"
    
    define sketchpad image
        set duration "2000"
        set description "Displays stimuli"
        draw image 0 0 "[imgname]" scale=1 center=1 show_if="always"
    
    define loop repeat_loop
        set repeat "0.5"
        set description "Repeatedly runs another item"
        set item "showing_sequence"
        set break_if "never"
        set column_order "showtime"
        set cycles "2"
        set order "random"
        setcycle 0 showtime "1"
        setcycle 1 showtime "3"
        run repeat_sequence
    
    define sequence repeat_sequence
        set flush_keyboard "yes"
        set description "Runs a number of items in sequence"
        run show_loop "always"
        run reset_counting_variable "always"
    
    define inline_script reset_counting_variable
        ___run__
        exp.set("count_image", 0)
        __end__
        set _prepare ""
        set description "Executes Python code"
    
    define loop show_loop
        set repeat "3"
        set description "Repeatedly runs another item"
        set item "show_sequence"
        set break_if "[count_image] = [showtime]"
        set column_order ""
        set cycles "1"
        set order "random"
        run show_sequence
    
    define sequence show_sequence
        set flush_keyboard "yes"
        set description "Runs a number of items in sequence"
        run image "always"
        run blank "always"
    
    define sketchpad welcome
        set duration "keypress"
        set start_response_interval "no"
        set description "Displays stimuli"
        draw textline 0 0 "OpenSesame 2.8.0 <i>Gutsy Gibson</i>" center=1 color=white font_family="serif" font_size=32 font_italic=no font_bold=no show_if="always" html="yes"
    
  • edited 10:21AM

    Thanks, Edwin.

    This helped!

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