Audio issues


Author
Message
sbashyam
sbashyam
Associate Member (281 reputation)Associate Member (281 reputation)Associate Member (281 reputation)Associate Member (281 reputation)Associate Member (281 reputation)Associate Member (281 reputation)Associate Member (281 reputation)Associate Member (281 reputation)Associate Member (281 reputation)
Group: Forum Members
Posts: 18, Visits: 27
Hi Dave,

In my current study, I have set up some images appearing in a random order. The participant is required to count the number of animals on screen and enter a value. I was able to write the code for this and it works. However, I am having trouble adding audio to the trials. At the display of every image, I want two audio files to be played (both included in the folder attached below) - first "what_card.wav" and then "CanUCount.wav". My issue is that when I try to make the </sound> category, I am given an error about double quotes, even though I have double quotes in my syntax.

Could you please help me out?
https://drive.google.com/drive/folders/1zUe3Rj-OsPwauF1esQQbyrpwgad4QeEa?usp=share_link

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: 12K, Visits: 98K
sbashyam - 9/7/2023
Hi Dave,

In my current study, I have set up some images appearing in a random order. The participant is required to count the number of animals on screen and enter a value. I was able to write the code for this and it works. However, I am having trouble adding audio to the trials. At the display of every image, I want two audio files to be played (both included in the folder attached below) - first "what_card.wav" and then "CanUCount.wav". My issue is that when I try to make the </sound> category, I am given an error about double quotes, even though I have double quotes in my syntax.

Could you please help me out?
https://drive.google.com/drive/folders/1zUe3Rj-OsPwauF1esQQbyrpwgad4QeEa?usp=share_link

Do you see how these double-quotes look kind of curly?



These are simply the wrong quote characters (don't copy & paste from word processors or the like). You need to use plain double-quotes, i.e.



<sound whats_card>
/ items = ("what_card.wav")
/ playthrough = true
</sound>

sbashyam
sbashyam
Associate Member (281 reputation)Associate Member (281 reputation)Associate Member (281 reputation)Associate Member (281 reputation)Associate Member (281 reputation)Associate Member (281 reputation)Associate Member (281 reputation)Associate Member (281 reputation)Associate Member (281 reputation)
Group: Forum Members
Posts: 18, Visits: 27
Thank you Dave! Can you also tell me how I can play the audios for each trial?

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: 12K, Visits: 98K
sbashyam - 9/7/2023
Thank you Dave! Can you also tell me how I can play the audios for each trial?

You display <sound> stimuli just like any other type of stimulus, be it <text>, <picture>, <shape> or <video>. Add the sound stimulus to a <trial>'s /stimulustimes or -frames, at the time you want it played.
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: 12K, Visits: 98K
Dave - 9/7/2023
sbashyam - 9/7/2023
Thank you Dave! Can you also tell me how I can play the audios for each trial?

You display <sound> stimuli just like any other type of stimulus, be it <text>, <picture>, <shape> or <video>. Add the sound stimulus to a <trial>'s /stimulustimes or -frames, at the time you want it played.

It's not entirely clear when, exactly, you want those audios played, but I'm guessing you want something like this:

<sound whats_card>
/ items = ("what_card.wav")
/ playthrough = true
</sound>

<sound can_u_count>
/ items = ("CanUCount.wav")
/ playthrough = true
</sound>


being the two audios, and the trial playing those back one after the other before allowing the subject to continue.

<trial showpicture>
/ stimulustimes = [0=stimuli_display, whats_card; 2000=can_u_count; 5000=continue]
/ validresponse = (continue)
</trial>


Change the timings as needed if you want a longer or shorter pause between the two sounds.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search