<div dir="ltr">David<br><br>The 'sync to none' solution reduced the lag to 2ms from 16ms so that is a significant improvement. Thanks.<br><br>Editing the pre-release value didn't seem to do anything, the files are very small so there is probably very little delay in loading them<br><br>Thanks<br>Rob <br><br>On Thursday, 7 August 2014 21:27:39 UTC+1, McFarlane, David wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">Rob,
<br>
<br>To answer the question asked: Yes, you are correct that the system
<br>is losing a refresh for every object loading. You may avoid that
<br>simply by going to the Sync tab of your Slide objects and setting
<br>Onset Sync to "(none)".
<br>
<br>That said ...
<br>
<br>To get even better synchronization between onset of your image &
<br>sound, you could add the sound right to the Slide. Your following
<br>inline code (to terminate sound on response) would then have to refer
<br>to the SlideSound sub-object instead, but if you look at some of the
<br>automatically generated code and fuss around a little you should figure it out.
<br>
<br>Instead of
<br>
<br> sleep(1000-c.getattrib("<wbr>TonePlay.rt")
<br>
<br>you could simply use
<br>
<br> sleep(1000-TonePlay.rt)
<br>
<br>which avoids having to deal with an attribute that may or may not be
<br>set at the time. But I would not use this method anyway, as I fear
<br>that it still leaves too much room for slop (RT may not take into
<br>account other delays that have set in, etc.). Instead, I would take
<br>advantage of the neat built-in timing facilities of EP objects
<br>themselves, and just manipulate the NextTargetOnsetTime directly, e.g.,
<br>
<br> SetNextTargetOnsetTime Slide1.OnsetTime + 1000
<br>
<br>to emulate Event timing mode, or
<br>
<br> SetNextTargetOnsetTime Slide1.TargetOnsetTime + 1000
<br>
<br>to emulate Cumulative timing mode. Set the SetNextTargetOnsetTime
<br>topic in the E-Basic Help facility.
<br>
<br>Better yet, just set the Slide Durations to 1000, and PreRelease to
<br>1000, and you will not need any code at all to make each Slide start
<br>1000 ms apart (don't take my word for that, try the exercise
<br>yourself). The inline code will run during the PreRelease period as
<br>directed, and the next Slide will start 1000 ms after the previous
<br>one (assuming that your inline code does not run beyond the
<br>PreRelease). (In fact, EP2.0.10 now sets PreRelease to "(same as
<br>duration)" by default, making much of this automatic.)
<br>
<br>-----
<br>David McFarlane
<br>E-Prime training
<br>online: <a href="http://psychology.msu.edu/Workshops_Courses/eprime.aspx" target="_blank" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fpsychology.msu.edu%2FWorkshops_Courses%2Feprime.aspx\46sa\75D\46sntz\0751\46usg\75AFQjCNHhJVD3mCfXKdywfB5AgKLPu1OSJg';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fpsychology.msu.edu%2FWorkshops_Courses%2Feprime.aspx\46sa\75D\46sntz\0751\46usg\75AFQjCNHhJVD3mCfXKdywfB5AgKLPu1OSJg';return true;">http://psychology.msu.edu/<wbr>Workshops_Courses/eprime.aspx</a>
<br>Twitter: @EPrimeMaster (<a href="https://twitter.com/EPrimeMaster" target="_blank" onmousedown="this.href='https://www.google.com/url?q\75https%3A%2F%2Ftwitter.com%2FEPrimeMaster\46sa\75D\46sntz\0751\46usg\75AFQjCNHlT7nwYBmELwRxV4Xn5GW-sG9EKw';return true;" onclick="this.href='https://www.google.com/url?q\75https%3A%2F%2Ftwitter.com%2FEPrimeMaster\46sa\75D\46sntz\0751\46usg\75AFQjCNHlT7nwYBmELwRxV4Xn5GW-sG9EKw';return true;">https://twitter.com/<wbr>EPrimeMaster</a>)
<br>
<br>/----
<br>Stock reminder: 1) I do not work for PST. 2) You may reach PST's
<br>trained staff (and other support facilities) at
<br><a href="https://support.pstnet.com" target="_blank" onmousedown="this.href='https://www.google.com/url?q\75https%3A%2F%2Fsupport.pstnet.com\46sa\75D\46sntz\0751\46usg\75AFQjCNF5BfukPzW6lq7UCweMsMu7_9wJEQ';return true;" onclick="this.href='https://www.google.com/url?q\75https%3A%2F%2Fsupport.pstnet.com\46sa\75D\46sntz\0751\46usg\75AFQjCNF5BfukPzW6lq7UCweMsMu7_9wJEQ';return true;">https://support.pstnet.com</a> . 3) If you do get an answer from PST
<br>staff, please extend the courtesy of posting their reply back here
<br>for the sake of others.
<br>\----
<br>
<br>
<br>At 8/7/2014 01:33 PM Thursday, Rob Manchester wrote:
<br>>I'm trying to edit someone else's experiment in E-Prime V1.
<br>>
<br>>They have a procedure that contains 8 objects. 4 of these objects
<br>>are slides which contain images. The slides have duration = 0. The
<br>>other 4 objects are bits of inline code that calls another procedure
<br>>which contains 1) a slide with duration 1000 which has a 'soundout'
<br>>object of duration 1000 that terminates on a keyboard response. 2)
<br>>a further bit of code = sleep(1000-c.getattrib("<wbr>TonePlay.rt")). This
<br>>last bit of code I think tries to ensure that the procedure lasts
<br>>1000 regardless of the reaction time to the sound.
<br>>
<br>>The image slides are interespersed with the inline code that call
<br>>the audio procedure i.e.
<br>>
<br>>Image Slide Duration = 0
<br>>Code calling audio proc, duration 1000ms
<br>>Image Slide Duration = 0
<br>>Code calling audio proc, duration 1000ms
<br>>Image Slide Duration = 0
<br>>Code calling audio proc, duration 1000ms
<br>>Image Slide Duration = 0
<br>>Code calling audio proc, duration 1000ms
<br>>
<br>>My screen refresh is 60hz. The idea of the code is that the Images
<br>>and Audio display together for 1000s each, with the audio (but not
<br>>the image) terminating on response. It works apart from the fact
<br>>that the audio loads 16/17ms after the image - i.e. 1 screen
<br>>refresh. The ISI between sucessive audio stimuli is 1034ms rather
<br>>than 1000ms (i.e. two screen refreshes too long). Could anyone tell
<br>>me why these delays are occurring? I presume the system is losing a
<br>>refresh for every object loading (i.e. a delay = to a screen refresh
<br>>is occuring when E-prime moves between the slide object and the
<br>>inline code object. I've tried putting a pre-release value of 20ms
<br>>on the slides but this doesn't seem to have had any effect. Does any
<br>>have any ideas as to how to solve this?
<br>>
<br>>Thanks
<br>>Rob
<br>
<br></blockquote></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups "E-Prime" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:e-prime+unsubscribe@googlegroups.com">e-prime+unsubscribe@googlegroups.com</a>.<br />
To post to this group, send email to <a href="mailto:e-prime@googlegroups.com">e-prime@googlegroups.com</a>.<br />
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/e-prime/ad146219-7e82-4c7f-b1a7-10882023d18b%40googlegroups.com?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/e-prime/ad146219-7e82-4c7f-b1a7-10882023d18b%40googlegroups.com</a>.<br />
For more options, visit <a href="https://groups.google.com/d/optout">https://groups.google.com/d/optout</a>.<br />