sound duration syntax

David McFarlane mcfarla9 at msu.edu
Thu May 21 19:16:48 UTC 2009


Steve,

Four thoughts on this for you...


1) I suppose you could use a bit of inline script before the slide to 
do something like

If c.GetAttrib("language") = "spanish" Then
     c.SetAttrib "SoundDur", c.GetAttrib("SPduration")
ElseIf c.GetAttrib("language") = "english" Then
     c.SetAttrib "SoundDur", c.GetAttrib("AEduration")
Else
     MsgBox "Invalid language!"
End If

(or something similar using Iif(), etc., I leave that as an 
exercise), where "SoundDur" is used to set the duration of the Slide object.


2) The Slide State idea will not work because each Slide has one and 
only one Duration that applies to all of its states.


3) You could put the Spanish and English sentences each in their own 
nested list that gets selected by the main list.  That way each 
nested list can have a column called, say, "SoundDur", with the 
correct durations for each sentence in each language, and your 
presentation object need only know the value of SoundDur no matter 
what language.


4) Or, just set the Duration of your SoundOut or Slide object to 
(infinite), and set End Sound Action of your SoundOut object or 
sub-object to Terminate.  That should play each sound to its end, 
then automatically terminate the presentation object and move on, 
without your having to measure or know anything about sound 
durations.  If you then still want to know how long each sound 
played, you can get that from the time auditing log.


Good luck, hope this helps a bit,
-- David McFarlane, Professional Faultfinder


At 5/20/2009 02:42 PM Wednesday, Steve Frost wrote:

>I have an experiment in which I am playing out WAVs of sentences,
>either in Spanish or English based on an input dialog at the beginning
>of the experiment and this part works fine. However, I also want to
>set the sound duration to be the exact duration of the audio file. I
>have calculated the durations for the Spanish and English versions and
>entered them into columns in my list called AEduration and SPduration.
>I was wondering how best to link the duration field of the sound
>object to the appropriate column based on the value of the input
>dialog? That is, is the variable 'language' is set to 'spanish' then I
>want the duration field to be linked to the values in the SPduration
>column and linked to the values in the AEduration if language=english.
>My one thought is to make the event with the audio a slide and create
>different slide states that would be selected based on the value of
>the language variable, but I am wondering if there is an easier way?
>Thanks.
>
>Steve


--~--~---------~--~----~------------~-------~--~----~
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