Slide with soundin and image: audio size issues
David McFarlane
mcfarla9 at msu.edu
Mon Feb 25 20:27:02 UTC 2013
Sylvain,
Well, you can read about Generate PreRun/PostRun in the New Features
Guide, and at http://www.pstnet.com/support/kb.asp?TopicID=3299
. Many stimuli need some preparation before running (e.g., loading
image, sound, or movie files). That prepartion takes time, and may
delay stimulus onset if the preparation takes place just before
running the stimulus. Generate PreRun places that preparation code
instead at the top of the Procedure. As a result, the first object
of the Procedure may start late, but everything else in the Procedure
should start with less delay. But this works only for stimulus
content known at the start of Procedure, otherwise stimulus
preparation should still take place just before the stimulus. Also,
resetting an object at the top of the Procedure may prematurely
terminate some continuing streaming action, such as a sound, movie,
or sound recording.
So, for any stimulus object, "TopOfProcedure" means to place stimulus
preparation code at, well, the top of the Procedure;
"BeforeObjectRun" means to place stimulus preparation code just
before running the stimulus; "Inherit" means to use the setting from
the Procedure. In turn, each Procedure may have its Generate PreRun
set to either "TopOfProcedure" or "BeforeObjectRun", which it then
passes down to all the stimulus objects that it contains.
At this time, Generate PostRun does nothing useful, so you may safely
ignore it.
That said, clearly there is more at work in your program. Perhaps
SoundIn is a little trickier than I thought. It would be nice to
understand this better, but for now you seem to have a
workaround. Perhaps you can explore this with PST Web Support, and
then post back.
-----
David McFarlane
E-Prime training
online: http://psychology.msu.edu/Workshops_Courses/eprime.aspx
Twitter: @EPrimeMaster (https://twitter.com/EPrimeMaster)
At 2/24/2013 09:27 AM Sunday, Sylvain wrote:
>Hello David,
>
>Thank for your answer. I tried to set TextDisplayITI to Generate
>PreRun to BeforeObjectRun. I let the pre-release of TextDisplayITI
>to "same duration". However I still have wav file (from the previous
>object still recording Slide) of less than 1000 ms. The only thing
>that seem to work is:
>- having a pre-release of 0 ms on the TextDisplayITI;
>- having a duration of more than 1000 ms to TextDisplayITI.
>
>I could run my experiment this way, it works, but I'm confused about
>the script generation feature. All the object of my procedure are
>set to "Inherit' for Generate PreRun and Generate PostRun. Could you
>clarify a little but of this feature?
>
>Thank you again,
>
>Sylvain
>
>
>On Friday, February 22, 2013 7:23:09 PM UTC+1, McFarlane, David wrote:
>Sylvain,
>
>Well done. A lot of detail there, and I think I see the clue in your
>final paragraph -- it looks like you have stumbled into the new
>Generate PreRun = TopOfProcedure "gotcha" that can hit the last
>object in a Procedure, see
><http://www.pstnet.com/support/kb.asp?TopicID=3299>http://www.pstnet.com/support/kb.asp?TopicID=3299
>and
><http://www.pstnet.com/support/kb.asp?TopicID=2627>http://www.pstnet.com/support/kb.asp?TopicID=2627
>.
>
>In short, you might fix this either by using PreRelease = 0, as you
>did, or setting Generate PreRun to BeforeObjectRun.
>
>One of us should add your observation as a comment to those KB
>articles. Thanks for presenting & pursuing this.
>
>-----
>David McFarlane
>E-Prime training
>online:
><http://psychology.msu.edu/Workshops_Courses/eprime.aspx>http://psychology.msu.edu/Workshops_Courses/eprime.aspx
>
>Twitter: @EPrimeMaster
>(<https://twitter.com/EPrimeMaster>https://twitter.com/EPrimeMaster)
>
>
>At 2/22/2013 01:02 PM Friday, Sylvain wrote:
> >Hello David,
> >
> >Thank you for your answer!
> >
> >It worked with the sleep(ITI) once set as more than 1000 ms, however
> >I did several other tests:
> >
> >- I replaced my Sleep(ITI) with a TextDisplayITI of random duration
> >(between 500 and 1200 ms), with no pre-release;
> >- I launched an E-Test Run to hundred of trials.
> >
> >My result are as follow:
> >- if I add the Slide.RT (the slide with the two sub-objects) to
> >TextDisplayITI.duration, then if the total is inferior to almost
> >1000 ms, the generated wav will be less than 1000 ms;
> >- if the sum is superior to 1000 ms, I will get a wav file of 1000 ms.
> >
> >Now something interesting:
> >
> >- if I set the TextDisplayITI pre-release to more than 0 ms (I tried
> >with same duration), my wav files are then less than 1000 ms!
> >So I thought that it might be due to the fact that adding a
> >pre-release changed the TextDisplayITI.offsettime, and that the wav
> >could stop at the point of this offset. The other hypothesis was
> >that maybe, since the TextDisplayITI was the last slide of the
> >trial, looping to the beginning another trial could stop the wav
> >file. So to check that I added a Sleep at the very end of the trial
> >of 1000 ms, while keeping TextDisplayITI with a pre-release of same
> >duration. Doing that it gives me wav of 1000 ms.
> >
> >My guess is then that adding a pre-release to TextDisplayITI is
> >changing the TextDisplayITI.offsettime, and it induces a computation
> >start of the next loop earlier. And this cause a stop in the
> >recording of the wav of the previous trial.
> >
> >Sylvain
> >
> >On Friday, February 22, 2013 5:44:13 PM UTC+1, McFarlane, David wrote:
> >Sylvain,
> >
> >This all looks good to me, so I have no idea why it does not work for
> >you -- in my experience, with SoundIn Buffer Size set to 1000 and
> >other settings such as in your example, I get a full 1000 ms of sound
> >recording. Using a Sleep inline for the ITI should make no
> >difference, but by now you should have done that exercise for
> >yourself (and reported back here with your results). So something
> >else must be going on, or maybe someone else here has a clue. (Note
> >BTW that End Capture Action did not work in EP2.0.8.90, see
> ><<http://www.pstnet.com/forum/Topic5473-12-1.aspx>http://www.pstnet
> .com/forum/Topic5473-12-1.aspx>http://www.pstnet.com/forum/Topic5473-12-1.aspx
> >.)
> >
> >So you should just submit this to PST Web Support, see stock
> reminder below.
> >
> >-----
> >David McFarlane
> >E-Prime training
> >online:
> ><<http://psychology.msu.edu/Workshops_Courses/eprime.aspx>http://ps
> ychology.msu.edu/Workshops_Courses/eprime.aspx>http://psychology.msu.edu/Workshops_Courses/eprime.aspx
>
> >
> >Twitter: @EPrimeMaster
> >(<<https://twitter.com/EPrimeMaster>https://twitter.com/EPrimeMaste
> r>https://twitter.com/EPrimeMaster)
> >
> >/----
> >Stock reminder: 1) I do not work for PST. 2) PST's trained staff
> >take any and all questions at
> ><<http://support.pstnet.com/e%2Dprime/support/login.asp>http://supp
> ort.pstnet.com/e%2Dprime/support/login.asp>http://support.pstnet.com/e%2Dprime/support/login.asp
>
> >, and they
> >strive to respond to all requests in 24-48 hours, so make full use of
> >it. 3) In addition, PST offers several instructional videos on their
> >YouTube channel
> >(<<http://www.youtube.com/user/PSTNET>http://www.youtube.com/user/P
> STNET>http://www.youtube.com/user/PSTNET
> >). 4) If you do
> >get an answer from PST staff, please extend the courtesy of posting
> >their reply back here for the sake of others.
> >\----
> >
> >
> >At 2/21/2013 07:26 PM Thursday, Sylvain wrote:
> > >I have a problem with the latest version of EP2(2.0.10.242).
> > >A typical trial procedure is as follow:
> > >
> > >- first a fixation cross appear for a duration of 200 ms
> > >(pre-realease set at the stim duration);
> > >
> > >- then a blank screen of a jittered duration appears (the jittered
> > >duration has been computed before, not online, the pre-realease is
> > >set also at the stim duration);
> > >
> > >- then a Slide appear with two sub-objet: an image and a
> > >SlideSoundIn. I want my participants to give the name of the image,
> > >taking advantage of the SRS box vocal responses, and have the Slide
> > >disappearing; but I also want to record, with the SlideSoundIn
> > >sub-object, the whole signal audio. I set the duration of the Slide
> > >to 1000 ms maximum, and for the SlideSoundIn I've chosen a buffer of
> > >1000 ms, set "Stop after" to no, and "EndSoundCaptureAction" to
> > >none. However, I notice that when I do that, automatically I see the
> > >"Stop after mode" staying on "NextOnsetTime" (pre-realease for the
> > >slide set at the stim duration);
> > >
> > >- then an ITI of 1 sec appears (pre-realease for the slide set at
> > >the stim duration).
> > >
> > >Doing that, I noticed that my audio signal from the SlideSoundIn
> > >sub-object always ended before reaching 1000 ms.
> > >
> > >My question are:
> > >
> > >1) Do you think that even though I set the "Stop after" of the
> > >SlideSoundIn to "no" (I'm 100% sure I did that, several times) the
> > >recording could stop during the ITI onset or pre-realease of it? If
> > >not, what could have I done wrong?
> > >
> > >2) In order to get rid of this issue, I replaced the ITI screen by a
> > >sleep inline. Does the recording of the SlideSoundIn continue during
> > >a sleep? Maybe it could be a solution to this issue.
> > >
> > >Thank you for any advices and answers.
> > >
> > >Sylvain
--
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To unsubscribe from this group and stop receiving emails from it, send an email to e-prime+unsubscribe at googlegroups.com.
To post to this group, send email to e-prime at googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
More information about the Eprime
mailing list