Howdy, Stranger!

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

Supported by

[solved] ERP-experiment slows down in fullscreen mode

edited September 2015 in OpenSesame

Hi,

My experiment runs slow in fullscreen mode, but timing is ok in quickrun or when running in window.

I read that using the Legacy back-end instead of Xpyriment might solve this problem (http://www.cogsci.nl/forum/index.php?p=/discussion/comment/3261) and it actually does. However, I will also be using ERPs with this experiment and you recommend not using Legacy for time-critical experiments...

Do you have any other suggestions on how to deal with this?

When running on my windows desktop computer, the slowing problem is solved when setting "use openGL" to "no" (don't need to change the back-end). This still does not seem a good solution regarding the ERP study. However, on my MacBook this is not enough and I really need to set the back-end to Legacy. Should I find another computer?

Thanks,
Johanna

Comments

  • edited 12:16PM

    Hi Johanna,

    There's always the possibility that your experiment could be programmed to run faster. Did you create your stimulus displays beforehand? (so that you only have to show them during the trial with canvas.show()). In general experiments should run perfectly fast as long as they're programmed efficiently. If you use inline_scripts, try to do as much as possible in the prepare phase, and keep the run phase minimalistic. More details are required before I'd recommend you to buy a new computer, for sure.

    Cheers,

    Josh

  • edited 12:16PM

    Hi Josh,

    Buying a new computer indeed seems a bit radical! :-)

    I think it would be a problem to create the stimulus displays beforehand in this experiment, because stimulus presentation is (partly) dependent on the participant's response. Therefore stimuli are presented in a feedback item, although I know this is not really optimal.

    In each trial, participants are presented two visual stimuli (circles) simultaneously (created in one .png image); one left, one right. Both circles are divided in eight equal slices. Participants then choose one of these stimuli (by pressing a key), after which a rotating 'pizzaslice' is superimposed on the chosen stimulus. For each trial, a random number generated in that trial indicates the number of circle-slices the pizzaslice will cross (which is the length of the rotation).

    It is this rotation of the pizzaslice that is running too slow. It is run by an eight-step sequence, in which I set the duration of each step on 75 ms, but in fullscreen it seems to be limited on 150 ms; it will not get faster.

    I wouldn't know how to prepare my stimuli in advance, as so much is dependent on what happens within each trial. Maybe there are other options to try out..?

    Johanna

  • edited 12:16PM

    Hi Johanna,

    How do you create (draw) the superimposed pizza slice? Do you have 8 sketchpads in a sequence item, or did you with 'sequence' refer to e.g. a for-loop?

    As far as I can see, you would need to create 16 canvases beforehand (inline_script); 8 containing slices superimposed on the left circle, and 8 containing slices superimposed on the right one. After the keyboard_response item you can just place an inline_script with a for-loop that displays 8 of these canvases depending on what participants responded. It could look something like this:

       import random
    
       if keyboard_response == 'z':
       octant = 1 # will indicate which canvas needs to be displayed
              for i in range (0, randint(0,20)): #here 20 is the max amount of steps
                     if octant == 1: 
                           exp.canvas1.show()
                           self.sleep(75)
                           octant += 1
                     elif octant == 2: 
                           exp.canvas2.show()
                           self.sleep(75)
                           octant += 1
                     elif octant == 3: 
                           exp.canvas3.show()
                           self.sleep(75)
                           octant += 1
                     elif octant == 4: 
                           exp.canvas4.show()
                           self.sleep(75)
                           octant += 1
                     elif octant == 5: 
                           exp.canvas5.show()
                           self.sleep(75)
                           octant += 1
                     elif octant == 6: 
                           exp.canvas6.show()
                           self.sleep(75)
                           octant += 1
                     elif octant == 7: 
                           exp.canvas7.show()
                           self.sleep(75)
                           octant += 1
                     elif octant == 8: 
                           exp.canvas1.show()
                           self.sleep(75)
                           octant = 1         # important, octant becomes 1 again!
    

    And a similar for-loop for 'if keyboard_response == '/'' (or whatever buttons you use).

    Good luck!

    Josh

  • edited 12:16PM

    Hi Josh,

    I was just about to write a reply with extra info and therefore checking the experiment again, and mysteriously it suddenly works well (at least on my desktop computer). If the problem arises again, I will get back with more detailed info!

    Thanks for your help anyway!
    Johanna

  • edited 12:16PM

    Ok! And yes - let me know if any problem occurs again.

    Josh

Sign In or Register to comment.