How to play a sound file by pressing on a picture


Author
Message
Inquisitive
Inquisitive
Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)
Group: Forum Members
Posts: 13, Visits: 1

Yeah I took a look but really couldn't make anything of it, partly because I wasn't sure if it was actually doing what I need my task to do.  I'll take a closer look and inspect it and let you know which things I get tripped up on.



Thanks.


Inquisitive
Inquisitive
Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)
Group: Forum Members
Posts: 13, Visits: 1

I've implemented the counter in my script and this now fixes the "repeat" problem.  Now when I press repeat it does play the same audio clip.


The problem I have now is that the stimuli are not presented in random order:  I copied all of the same counter features that I thought were relevant in the plush script, and what I now get is:


First trial plays the 2nd audio file, 2nd trial plays the 3rd audio file, 3rd trial plays the 4th and so on.  My guess is that it's because of the lines:



<values>
/ mastercounter = 1
</values>


and


/ ontrialend = [values.mastercounter = values.mastercounter + 1]



It seems to me that this script is not designed to play stimuli randomly.  Maybe I am misunderstanding some part of it?



Also, I didn't understand why this "stop" line is included; seems redundant:


./ trials = [1-90 = myturn1, myturn2, otherturn]
/ stop = [values.mastercounter > 30]


Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K

Well, you're looking at the wrong script. See "PairComp_Rev2.exp" attached to the last post on the previous page and re-read the posts related to that script. And no -- none of the lines are redundant.


~Dave


Inquisitive
Inquisitive
Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)
Group: Forum Members
Posts: 13, Visits: 1

I took a look at the correct script this time, and it's a mess.  Since his task is a paired comparison, there is a lot of extra stuff in there that I can't tell if it's related or not to what I need to do.  I assume the dummy trials are the things at the bottom?  I couldn't really figure out what was going on there either.


Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K

<defaults>
/ inputdevice = mouse
</defaults>

<values>
/ itemnumber = 0
</values>

<counter mysounds>
/ select = noreplace(1-6)
</counter>

<text clicktoplaysound>
/ items = ("Click me, hear sound.")
</text>

<text sound>
/ items = sounditems
/ select = values.itemnumber
</text>

<item sounditems>
/ 1 = "01.wav"
/ 2 = "02.wav"
/ 3 = "03.wav"
/ 4 = "04.wav"
/ 5 = "05.wav"
/ 6 = "06.wav"
</item>

<text nextsound>
/ items = ("Next")
/ position = (25%, 75%)
</text>

<text repeatsound>
/ items = ("Repeat")
/ position = (75%, 75%)
</text>

<trial click>
/ ontrialbegin = [values.itemnumber=counter.mysounds.selectedvalue]
/ stimulusframes = [1=clicktoplaysound]
/ validresponse = (clicktoplaysound)
/ branch = [trial.play]
</trial>

<trial play>
/ stimulusframes = [1=sound, repeatsound, nextsound]
/ validresponse = (repeatsound, nextsound)
/ branch = [if(trial.play.response=="repeatsound")trial.play]
</trial>

<block myblock>
/ trials = [1-6=click]
</block>


Inquisitive
Inquisitive
Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)
Group: Forum Members
Posts: 13, Visits: 1

Yay!!! After much tweaking, checking and double checking and editing, it looks like I've got it working how I want it.  Thanks a bunch!


Inquisitive
Inquisitive
Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)
Group: Forum Members
Posts: 13, Visits: 1

I have a big problem that I didn't account for.  I'm scheduled to start running people in two days and didn't think of the fact that I need to have some way of pairing the number of stimulus (which audio sample they receive) to their responses to that stimulus.  Currently all I can do is enter them by hand via the SPSS output, because the stimulus number and the response are not on the same line.  Is there a way to ask for the current stimulus number as one of the data outputs?  Then I would have that stimulus number in the same row as the response to the stimulus.



Thanks in advance.


Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K

Yes. Please see the documentation for the <data> element and the /columns attribute.


Inquisitive
Inquisitive
Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)
Group: Forum Members
Posts: 13, Visits: 1

Hmmm...Thanks for pointing me to that, but I'm still very puzzled.  I enter stimulusnumber as a column, and that spits out the info that I need, but not in the spot I need it to enter into SPSS.  It would be easy enough to just copy paste that column one cell downward, but the problem I run into is this:



The first trial they listen to the audio sample.  Then they are asked 2 questions about the trial.  So there is only one row that contains the stimulusnumber that I need to match responses to.  Meanwhile, I have 2 rows with responses.  See the attached image, where the two values of "3" are the responses to the stimulus.  What would be the best way for me to get those to line up?


Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K

You must either customize Inquisit's raw data output (which is why I referred you to those documentation topics)

<data>
/ columns = [..., sound.mysound.selectedindex, ...]
[...]
</data>

or restructure your data in SPSS, preferrably using SPSS syntax (which isn't hard either).

Regards,
~Dave


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search