Setting complex sound file name in SoundOut object
EJ Nikelski
nikelski at bic.mni.mcgill.ca
Tue Aug 1 21:07:58 UTC 2006
Hi Susan,
Yup, that's exactly what I was looking for. One can even use
Edit:Experiment:Startup to set a file extension type (e.g. FileExt =
.wav or .bmp) and then use [PathName][SoundFileName][FileExt] so that
one doesn't need to code the file type in the trial list (important for
me, as I present the same stimuli using different modalities).
Thanks again.
-Jim
Susan G. Campbell wrote:
> Have you considered setting the path as an attribute as well? That way
> you could set the path separately in the list or, say, in the Edit:
> Experiment: Startup Info screen.
>
> I tried setting the SoundOut Filename to [PathName][SoundFileName] and
> E-Prime interpreted it correctly, where PathName was the constant
> C:\\stimuli\whatever\ and SoundFileName was the name of the wav file.
> You could also just put the whole path in SoundFileName, but that could
> be problematic if you ever wanted to move the experiment to another
> directory.
>
> Hope this helps,
> Susan Campbell
> Graduate Research Assistant
> University of Maryland
> Center for Advanced Study of Language
>
> -----Original Message-----
> From: eprime at mail.talkbank.org [mailto:eprime at mail.talkbank.org] On
> Behalf Of EJ Nikelski
> Sent: Monday, July 31, 2006 5:21 PM
> To: Subject: Setting complex sound file name in SoundOut object
>
> Hello List,
>
> I'm a new user, and I've run into a problem that must have a simple
> solution ... although I haven't been able to find it. Specifically, I am
>
> using a SoundOut object to play a wav file for each trial; the wav file
> to be played is defined as a trial attribute in the trial list. If I set
>
> the SoundOut object Filename field to [prime], there is no problem.
>
> However, when I place my wav files in a separate directory, and I
> set the SoundOut Filename to something like
> "C:\stimuli\auditory\[prime]", I get a compile error at the following
> line:
>
> primeSoundBuffer.Filename = C:\\stimuli\\auditory\[prime")
>
>
> Note that the line of code has been corrupted (double backslash on
> the end missing, double quote inserted, square bracket changed to right
> parenthesis). I've tried a few variations on this, but the only thing
> that I have gotten working is (1) a completely fixed path wav filename,
> and (2) using only the attribute -- which forces all of the wav files to
>
> be located in my experimental directory.
>
> I've run out of ideas. Any help would be very appreciated.
>
>
> Thanks,
>
>
> -Jim
>
>
More information about the Eprime
mailing list