sounds with text box and likert scale on same page


Author
Message
abhi
abhi
Guru (7.5K reputation)Guru (7.5K reputation)Guru (7.5K reputation)Guru (7.5K reputation)Guru (7.5K reputation)Guru (7.5K reputation)Guru (7.5K reputation)Guru (7.5K reputation)Guru (7.5K reputation)
Group: Forum Members
Posts: 114, Visits: 558

Hi everyone,

I am creating a study where I need two pictures on the screenand below each picture is a text box. Participant clicks on each picture tohear a sound.

He/she then writes the sound in the text box below it.

Once he write both the sounds down in the text box. He thenrates which sound  he like the best (on alikert scale on the same screen)

I know how to create  pictureand sound to appear when participant clicks on that.

I am not able to put 2 text boxes below 2 pictures on thesame screen. Tried openend element, but can’t use it . And then how can I put Likertscale to rate sounds on the same page ?

Can it be done? Can someone guide to me simliar questions or tosome scripts? Any alternate way to do it ?

Thanks


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: 105K
It's not possible to do it all "on the same screen"; the closest you can get is with something like this (I'm leaving out the "playing back the sounds"-part):

<values>
/ a_resp = ""
/ b_resp = ""
/ pairnumber = 1
</values>

<block myblock>
/ trials = [1-2=start]
</block>

<trial start>
/ ontrialbegin = [values.a_resp=""; values.b_resp=""; values.pairnumber=list.stimpairs.nextindex; ]
/ stimulusframes = [1=blank]
/ trialduration = 0
/ branch = [trial.click]
/ recorddata = false
</trial>

<trial click>
/ inputdevice = mouse
/ stimulusframes = [1=a, b]
/ validresponse = (a, b)
/ branch = [if (trial.click.response == "a" && values.a_resp == "") openended.a_write]
/ branch = [if (trial.click.response == "b" && values.b_resp == "") openended.b_write]
/ branch = [trial.click]
</trial>

<openended a_write>
/ ontrialend = [values.a_resp=openended.a_write.response]
/ isvalidresponse = [openended.a_write.response != ""]
/ position = (40%, 60%)
/ branch = [if(values.b_resp == "") trial.click else likert.rate]
</openended>

<openended b_write>
/ ontrialend = [values.b_resp=openended.b_write.response]
/ isvalidresponse = [openended.b_write.response != ""]
/ position = (60%, 60%)
/ branch = [if(values.a_resp == "") trial.click else likert.rate]
</openended>

<likert rate>
/ anchors = [1="A"; 4="Neither"; 7="B"]
/ numpoints = 7
/ position = (50%, 80%)
</likert>

<text a>
/ items = a_items
/ erase = false
/ position = (40%, 40%)
/ select = values.pairnumber
</text>

<text b>
/ items = b_items
/ erase = false
/ position = (60%, 40%)
/ select = values.pairnumber
</text>

<item a_items>
/ 1 = "The Beatles"
/ 2 = "Mozart"
</item>

<item b_items>
/ 1 = "Rolling Stones"
/ 2 = "Beethoven"
</item>

<shape blank>
/ shape = rectangle
/ color = white
/ size = (100%, 100%)
/ erase = false
</shape>

<list stimpairs>
/ poolsize = 2
</list>


abhi
abhi
Guru (7.5K reputation)Guru (7.5K reputation)Guru (7.5K reputation)Guru (7.5K reputation)Guru (7.5K reputation)Guru (7.5K reputation)Guru (7.5K reputation)Guru (7.5K reputation)Guru (7.5K reputation)
Group: Forum Members
Posts: 114, Visits: 558
Thanks Dave.

Its complicated for me. Let me figure your code out and adapt it first. Will get back if there are issues.

abhi
abhi
Guru (7.5K reputation)Guru (7.5K reputation)Guru (7.5K reputation)Guru (7.5K reputation)Guru (7.5K reputation)Guru (7.5K reputation)Guru (7.5K reputation)Guru (7.5K reputation)Guru (7.5K reputation)
Group: Forum Members
Posts: 114, Visits: 558
Hi Dave,
Thanks for this. Its working as desired.
But I am stuck again.

I want to play sound in loop till the time participant is ready to write in open ended text box. So he clicks on 'a' / 'b' item and sound is continuously played till the time  he finishes  writing  text in the text box and stops when he clicks on 'continue' to move on to 'b'. Then it repeats and he rates the sounds.

Thanks.

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: 105K
Play back the sounds via the <openended> /stimulusframes. Convert your sounds to MP3 and use the <video> element (not the <sound> element). Set its /loop attribute to true. Set the <openended>'s /beginsresponsetime to 0.

<openended a_write>
/ stimulusframes = [1=a_sound]
/ beginresponsetime = 0
/ ontrialend = [values.a_resp=openended.a_write.response]
/ isvalidresponse = [openended.a_write.response != ""]
/ position = (40%, 60%)
/ branch = [if(values.b_resp == "") trial.click else likert.rate]
</openended>

<video a_sound>
...
/ loop = true
</video>

abhi
abhi
Guru (7.5K reputation)Guru (7.5K reputation)Guru (7.5K reputation)Guru (7.5K reputation)Guru (7.5K reputation)Guru (7.5K reputation)Guru (7.5K reputation)Guru (7.5K reputation)Guru (7.5K reputation)
Group: Forum Members
Posts: 114, Visits: 558
Thanks Dave. Working perfectly.

Another unrelated question which I had seen other times also. When I play audio through video loop, it  breaks . So when I am playing 'coke' (its a recorded voice saying coke; very short sound). so the sound that video element plays is 'k..coke' ; 'k..coke' and so on. whereas when I play the same sound through trial or sound element, I dont hear any break (its coke and not k..coke ) .

does it have to do with mp3 kind of files ? should I change the format ? Or is it the length of file ?

<video sound>
/ items = ("coke.mp3")
/ loop = true
/ playthrough = false
</video>

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: 105K
I don't know. It may be due to the sound being extremely short -- perhaps try inserting a little bit of silence before or after the actual spoken word in the audio file.

abhi
abhi
Guru (7.5K reputation)Guru (7.5K reputation)Guru (7.5K reputation)Guru (7.5K reputation)Guru (7.5K reputation)Guru (7.5K reputation)Guru (7.5K reputation)Guru (7.5K reputation)Guru (7.5K reputation)
Group: Forum Members
Posts: 114, Visits: 558
Thanks for it again.

I think it has to do some thing with the loop. I tried with the following sentence ' I want to hear you say it' and played it in loop. It starts repeating it after the word 'say' and goes in loop. If I play it just once then it goes perfectly fine.

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: 105K
Hmm, I seem to be unable to reproduce this. I've attached a short MP3 for testing purposes -- the file starts and ends with a short bit of silence, with the spoken word "coke" in between. What happens when you loop this file? Is it still cut off or causing some weird overlap?

Thanks!

Attachments
coke.zip (290 views, 9.00 KB)
abhi
abhi
Guru (7.5K reputation)Guru (7.5K reputation)Guru (7.5K reputation)Guru (7.5K reputation)Guru (7.5K reputation)Guru (7.5K reputation)Guru (7.5K reputation)Guru (7.5K reputation)Guru (7.5K reputation)
Group: Forum Members
Posts: 114, Visits: 558
Yes, you are right . Doesn't happen with this .

But I am noticing another thing. When I play such short names on loop, its not played at a uniform speed. What I mean is that the pauses in between the repetitions is not uniform. Sometimes the pause is too long sometimes its too short . (Although its not a problem for me in the current study)

Thanks.


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search