Randomization of sounds in a memory task

ben robinson baltimore.ben at gmail.com
Tue May 13 14:12:31 UTC 2008


so, leila, do you only need to randomize the order of the sounds one time,
the first time that you present them?if so, just as david pointed out, you
could make an array, randomize it one time, then assign each element of the
array to a row in a list.  then you can call the sounds sequentially from
the list, and repeat the list as many times as you like.
something like this:

in your UserTab:
Dim SoundArray(9) as String 'this is a 10-element array of words (don't let
the 9 in parentheses fool you, since the first element in your array will be
SoundArray(0).) - you'll just need to fill in the elements by hand...
Dim i as Integer

in an Inline1, at the very beginning of your script:
SoundArray(0) = sound1.wav
SoundArray(1) = sound2.wav
SoundArray(2)...
SoundArray(3)...
...
SoundArray(9) = sound10.wav
RandomizeArray SoundArray
For i = 1 to List1.Size
   List1.SetAttrib i, "Sound", SoundArray(i)
Next i
List1.Reset
i = 0
'now below Inline1 you'll need to add Label1
'and below Label1 add List1 with 10 rows, and add a column in List1 called
Sound
'make List1 call your procedure in which you'll be playing all your sounds.
 that is, under the Procedure column in List1 fill in every row with the
name of your trial procedure

'in your trial procedure, set the object which is meant to play the sound to
get the name of the sound file from the column titled "Sound" in List1 (to
do this, instead of typing out the name of a .wav file, just type '[Sound]'
without the single quotes)

'on the same level as your Inline1, but below List1, add an Inline2
'in Inline2 type:
i = i + 1
If i <= 5 Then Goto Label1 'this will repeat your List1 five times before
ending (that means you should hear the same randomized sequence of 10 sounds
presented sequentially five times in a row

ben

On Mon, May 12, 2008 at 11:15 PM, David K McFarlane <mcfarla9 at msu.edu>
wrote:

>
> Leila,
>
>
> > I should presente a sequence of random sounds at participant and 2
> > secondes after, the same sequence should be presented
>
>
> I cannot give specifics,  but in general, E-Prime is not very good about
> remembering or repeating the past.  So I think repeating the same random
> sequence will require some advanced script techniques.
>
>
> You might try List.GetPrevAttrib() -- look at the List topic in the
> E-Basic
> online help.
>
>
> Alternatively, you might try creating an array to store the random
> sequence
> for playback later.  Or maybe there is a clever way to do this with a
> nested list and colon syntax.  Or, you could just build the presentation
> list entirely in script (I did this for one experiment that had special
> randomization requirements).
>
>
> But these are all advanced techniques, so I cannot give details.  Perhaps
> someone else can show us a simpler way to do this.
>
>
>  -- 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
-~----------~----~----~----~------~----~------~--~---

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.linguistlist.org/pipermail/eprime/attachments/20080513/b3cb6270/attachment.htm>


More information about the Eprime mailing list