How to play a sound file by pressing on a picture


Author
Message
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

I'd be willing to invest a little time and look into this. However, I'd appreciate if you could put the script you pasted above as well as all supporting files (pictures, sounds) into a zip-file and either attach it to this thread (see the 'options' tab when replying) or upload it somewhere else. I'd like to have something to work with that will actually parse instead of throwing missing file errors on end...


~Dave


Klemens
Klemens
Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)
Group: Forum Members
Posts: 6, Visits: 1

Hi Dave,



I really appreciate your help. You can download the zip file from the link below:


http://rapidshare.com/files/283436577/Paired_Comparison.zip.html



Best,


Klemens


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

Hi Klemens,


got the file and will take a look. Probably not gonna get to this today, but will post tomorrow.


~Dave


Klemens
Klemens
Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)
Group: Forum Members
Posts: 6, Visits: 1

Hi Dave,


I'm just thinking about splitting up the comparison trial and the stimulus selection "dummy" trial and place them in seperate blocks. In this way, I could set the selectionrate of the stimulus selection counter to "block". Then I'd be able to branch to a new block containing only the dummy trial after a rating has been given, whereas clicking on the buttons does not change blocks but only plays back the sound and afterwards repeats the comparison trial.


Do you think this could work?


Best, Klemens


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

This might work, but honestly doesn't strike me as a particularly efficient approach. Alas, you might want to check out the script attached to this reply first. I've tweaked your setup quite a bit. Item selection is done via a dummy trial as indicated earlier. And since you want participants to rate two sounds on their similarity, the script now only allows submitting a rating if the participant has actually listened to each sound at least once. Hope you can make something out of it...


~Dave


Attachments
PairComp_Rev2.exp (985 views, 4.00 KB)
Klemens
Klemens
Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)
Group: Forum Members
Posts: 6, Visits: 1

Dave: You made my day!


Now I see what you had in mind when talking about "dummy trials". I also love the way you used the value items to only allow progression to the next stimulus selection trial when both sounds have finished playing!


Thanks a lot, this did really help!


Best,


Klemens 


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

Dave: You made my day!


Thank you -- reading this makes my day!


Now I see what you had in mind when talking about "dummy trials".


I use the term "dummy trials" for <trial> elements that solely perform supplemental tasks (item selection, imposing constraints, etc.). These trials usually don't require any subject interaction / responses and most of the time participants won't even know they exist. FYI, if you're familiar with E-Prime, trials set up like this essentially behave like "inline script".


I also love the way you used the value items to only allow progression to the next stimulus selection trial when both sounds have finished playing!


I just thought this would make sense. I'm glad you agree.


Good luck with your research!


~Dave


Klemens
Klemens
Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)
Group: Forum Members
Posts: 6, Visits: 1

Hello,


after a little break I'm still/again working on the paired comparison script, pondering a new question:


Is it somehow possible to combine one sound stimulus (activated by a button) and several likert ratings in one trial? I'm thinking of something like a surveypage with one sound button and several slider questions, but unfortunately the surveypage element does neither allow a responsemessage attribute (which is neccessary for playing back the sound) nor branching to dummy trials (which is neccessary for randomized stimulus selection).


I guess I'll have to do it by using custom likert scales again? But in this case, I'd have to define countless picture items and randomization of the different questions within one trial would also be quite cumbersome...


I'm grateful for every comment!


Cheers,


Klemens 


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 think I'm asking for something similar as the others in this thread, but can't figure what's happening in the scripts that are posted (what are dummy trials?)



I have several (~6) audio stimuli that I need to play, one stimulus per page.  I want participants to be able to repeat the sound, but so far, I haven't figured out a way to do that.  When I press repeat, it plays a new sound file.  I could do each trial separately, but the problem then is that the stimuli won't be presented in random order.  I've copy pasted the script:



<trial sounddemo>
/ stimulustimes = [0=soundcaption; 0=soundicon]
/ validresponse = (soundicon, clicknext)
/ responsetrial = (soundicon, soundicon)
</trial>

<trial soundicon>
/ stimulustimes = [0=call,soundicon; 10000=clicknext, clickrepeat]
/ validresponse = (soundicon, clicknext)
/ responsetrial = (soundicon, soundicon)
</trial>

<text soundcaption>
/ items = ("Click the icon to listen to the sound.")
/ size = (450,200)
/ txcolor = (0, 0, 0)
/ valign = bottom
</text>

<text clickrepeat>
/ items = ("Click the icon to repeat")
/ valign = bottom
/ txcolor = (0, 0, 0)
/ position = (50, 36)
</text>

<picture soundicon>
/ items = ("soundicon.jpg")
/ position = (50, 50)
</picture>

<text clicknext>
/ items = ("Click here to continue")
/ txcolor = (0, 0, 0)
/ position = (50, 67)
/ fontstyle = ("Verdana", 14pt, true)
</text>

<sound call>
/ items = audiosamples
/ select = noreplace
/ playthrough = true
/ pan = 0
</sound>



<item audiosamples>
/1 = "M1.wav"
/2 = "F1.wav"
/3 = "AM1.wav"
/4 = "AF1.wav"
/5 = "AM2.wav"
/6 = "M2.wav"
</item>


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

(what are dummy trials?)


Dummy trials are <trial> elements that perform only helper functions like stimulus selection, scoring, etc. and are effectively invisible to subjects. Anyway, have you given the script I attached on the previous page a look? It does pretty much exactly what you're asking for.


~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