playing SoundIn audio within the same trial
David McFarlane
mcfarla9 at msu.edu
Thu Jul 14 16:41:08 UTC 2011
Alon,
Wow, thanks for posting this documentation -- I do not yet use
SoundIn (although I have to write a lesson on it shortly!), but I
might find this useful some time. As to your questions..
First, it seems to me that these belong to PST Web Support
(http://support.pstnet.com/e%2Dprime/support/login.asp ), so I hope
you post them there as well (and post back here with their
response). Anyway, here is my take...
>My questions are:
>1) Why when I change the sound capture filename to "temp.wav" is the
>script successful (even though the SaveToFile method is called at
>the end of the procedure again so is overwriting the temp.wav file),
>whereas without changing the filename, I get an error?
I have no idea, I think we will have to leave this one to PST.
>2) Was there an easier way to do this?
Again, I have no experience yet with SoundIn. But I would guess that
instead of using the @Auto automatic file naming you could generate
file names yourself in your code and that might avoid the "write
fail" problem. Since you already use inline code to handle playing
the captured audio, generating your own file names should add no
extra burden. Sometimes all that extra "automation" just gets in the
way, I like to turn it all off and supply my own code.
>3) Is there documentation on the properties of the SoundIn object
>available in E-basic? I couldn't find any in the E-Basic help,
Indeed, the E-Basic Help lacks a SoundIn topic, and topics for any
new features of EP2. As far as I can tell, the EB Help in EP2
contains exactly the same content as for EP1. No telling when PST
will supply us the missing documentation, but if you contact Web
Support they will often supply documentation privately on a "need to
know" basis. If you get that, then please make that documentation
public here. Thanks.
> so had to figure it out by looking at the compiled script.
Indeed, that is how I have figured out a *lot* of how EP actually
works, even with the EB Help on hand (and that learning process works
a *lot* better with good-old EP1 than with EP2). And as I have said
elsewhere, beware that the EB Help is incomplete, and in some cases
misleading or just plain wrong, so you have to test everything out
for yourself.
>For example, it would be nice to know if there is a way to play the
>SoundCaptureBuffer before it is saved to file
I suspect there is no such method, and no plan to add one. Again, a
question best handled by PST staff.
>(I tried a SoundIn1SoundCaptureBuffer.Play method but it didn't work).
Nice bit of hacking for you to try the method anyway, sometimes you
do uncover undocumented features that way ;).
>4) A separate and minor question, but can you specify the filename
>for the SoundOUT object at runtime (so I don't have to do it by way
>of an attribute)?
SoundOut file names are actually handled by an associated SoundBuffer
object, using the .Filename property and .Load method. See the
SoundBuffer topic in the EB Help, and look at the code that E-Studio
generates for any SoundOut object.
Regards,
-- David McFarlane, Professional Faultfinder
--
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-prime at googlegroups.com.
To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com.
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.
More information about the Eprime
mailing list