looping sounds

jessica jessica.mariano at gmail.com
Thu May 8 16:17:12 UTC 2008


If it helps, the error that comes up while trying to compile the
script is:

Encountered: EndSub
Expecting: Else, ElseIf, End If


On May 8, 12:11 pm, jessica <jessica.mari... at gmail.com> wrote:
> Ben, you are a superstar... sorry, I wasn't clear before with my
> previous post, so I have to ask one more last question (for now, if
> that's okay!) :)
>
> For this experiment, whenever the participant responds correctly, a
> Movie Display will come on the screen. So, if there is a correct
> response before the counter finishes, I need the program to jump
> immediately to the Movie Display. I placed a Label before the Movie
> Display, and tried to adapt your suggested code:
>
> toneCount = toneCount +1
>
> If toneCount <= 5 Then
>    Goto Label2
>
> If TrainingSound2.RESP = "{SPACE}" Then
>         Goto Label3
>
> Else
>     toneCount = 0
>
> End If
>
> ***
>
> But of course, I did something wrong... please correct me!
>
> :)
>
> On May 8, 11:31 am, "ben robinson" <baltimore.... at gmail.com> wrote:
>
> > how about...
>
> > > toneCount = toneCount +1
> > > If toneCount <= 10 Or NameOfObjectPresentingTone.RESP = "" Then
> > >    Goto Label1
> > > Else
> > >    toneCount = 0
> > > End If
> > On Thu, May 8, 2008 at 10:49 AM, jessica <jessica.mari... at gmail.com> wrote:
>
> > > Ben, you are awesome! Thanks so much!
>
> > > I have one more question for now... (sorry to take up so much of your
> > > time!)
>
> > > So now I know how to make this counter, but what if there is a
> > > response before the counter is finished? For example, how can make
> > > SoundObject 2 repeat for 5 times, OR until there is a response from
> > > the participant, whichever comes first?
>
> > > I hope that makes sense... I cannot tell you how much I appreciate
> > > your help!
>
> > > :)
>
> > > On May 7, 1:17 pm, "ben robinson" <baltimore.... at gmail.com> wrote:
> > > > in the same inline where you tell it to go to Label1, before going to
> > > Label1
> > > > you need to set up a counter.  when that counter = 10, you'll no longer
> > > Goto
> > > > Label1.  to do this, in your user script tab:Dim toneCount as Integer
>
> > > > in the inline after your sound object, before Goto Label1:
> > > > toneCount = toneCount +1
> > > > If toneCount <= 10 Then
> > > >    Goto Label1
> > > > Else
> > > >    toneCount = 0
> > > > End If
>
> > > > On Wed, May 7, 2008 at 1:07 PM, jessica <jessica.mari... at gmail.com>
> > > wrote:
>
> > > > > Thanks so much for your speedy response, Ben!
>
> > > > > So I did what you suggested, and placed a label before SoundObject1,
> > > > > and it's definitely repeating!
>
> > > > > Now, how do I make it stop and move on to the next sound? For example,
> > > > > how do I make it loop for say 10 times before SoundObject2 starts
> > > > > playing?
>
> > > > > Also, is there a way to place a small gap (e.g, 500 ms) between each
> > > > > repetition?
>
> > > > > I'm not really familiar with the whole scripting side of E-prime... so
> > > > > many many thanks for your patience and help!!
>
> > > > > :)
>
> > > > > On May 7, 12:50 pm, "ben robinson" <baltimore.... at gmail.com> wrote:
> > > > > > could you simply place a label object (Label1) before the sound
> > > object,
> > > > > then
> > > > > > following presentation of the sound use an inline to "Goto Label1"?
>
> > > > > > On Wed, May 7, 2008 at 12:13 PM, jessica <jessica.mari... at gmail.com>
> > > > > wrote:
>
> > > > > > > Hi all,
>
> > > > > > > Could someone please help me with a simple code to loop sound
> > > stimuli?
> > > > > > > (e.g., ba, ba, ba, ba...)
>
> > > > > > > I tried the 'Loop' function in the Properties section, but it
> > > doesn't
> > > > > > > seem to be working properly - sometimes it doesn't loop at all (or
> > > > > > > skips the sound altogether), sometimes the gap between repetitions
> > > is
> > > > > > > way too long, or way too short... I don't know if this is because
> > > my
> > > > > > > computer is too slow or something, but it's really frustrating! :(
>
> > > > > > > Any help would be greatly appreciated!
>
> > > > > > > Thanks in advance!
>
> > > > > > > jessica
--~--~---------~--~----~------------~-------~--~----~
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