How to stop sounds


Author
Message
Herby1209
Herby1209
Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)
Group: Forum Members
Posts: 11, Visits: 39
Hi,

i am programming a game for my master thesis and could need some help.
Participants should play 3 rows of a public goods game while listening to one certain sound (length of about 10 minutes) and after playing those 3 rounds the sound should be stopped or replaced by a second soundfile. Listening to that new soundfile they should play another 3 rows.
My problem is that i cant stop the sound (tried to change the "erase" status, lowering the volume and many other things but it seems you can just set these attributes once and not change them in any trial).
My sound looks like that:  (there are 3 sounds because i got 2 groups and they will hear different sounds)

<sound test>
/ erase = false
/ items = (test1.wav", "test2.wav", "test3.wav")
/ select = replace
/ playthrough = false
</sound>

i hoped by "select = replace" the playing sound would just stop when the next starts but it doenst work, the second starts but the first one doenst stop.

Is there any way to fix my problem? I could reduce the length of the tracks but i dont know exactly how long it will take the participants to play the 3 rounds of the game.

Thanks for your help
Herby

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: 82K
Set up a <block> that runs your 3 "game rounds" (i.e., the <trial>s). During the <block>, have the sound play in the background via the <block>'s /bgstim. Run the block 3 times.

<expt>
/ blocks = [1-3 = gameblock]
...
</block>

<block gameblock>
/ bgstim = (test)
/ trials = [...]
</block>

<sound test>
/ items = (test1.wav", "test2.wav", "test3.wav")
/ select = noreplace
/ playthrough = false
/ selectionrate = block
/ resetininterval = 0
</sound>


Herby1209
Herby1209
Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)
Group: Forum Members
Posts: 11, Visits: 39
Thanks for your answer, i will modify my program and see if this works!

Herby1209
Herby1209
Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)
Group: Forum Members
Posts: 11, Visits: 39
This doenst seem to work at all...
I also tried to seperate the three songs but the effect is the same. After the block ended the music keeps playing and doenst stop as it should.
Is there any mistake i am too blind to see?

<block Spielrunde_neutral>
/ bgstim = (Musik)
/ trials = [1 = sequence(instructions_contributions, verhaltenA_no_fear, verhaltenB_no_fear, verhaltenC_no_fear)]
/ onblockend = [values.totalwin_p=(values.firstround_win+values.secondround_win+values.thirdround_win);
    values.totalwin=((values.firstround_win+values.secondround_win+values.thirdround_win)*40);
    values.totalwin_plus=(((values.firstround_win+values.secondround_win+values.thirdround_win)*40)+2400);
]
</block>

<sound Musik>
/ items = ("test1.wav", "test2.wav", "test3.wav")
/ select = noreplace
/ playthrough = false
/ selectionrate = block
/ resetininterval = 0
</sound>

Herby1209
Herby1209
Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)
Group: Forum Members
Posts: 11, Visits: 39
Btw i corrected my mistake in resetintervall but it didnt change anything.
When a new block starts with bgstim both songs are played at the same time... no idea why this happens

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: 82K
That code looks okay. FWIW, sounds stop / change with a new block for me as they should.

#1: What's your OS (type and version)?
#2: Is your Inquisit installation up to date? If not, please install the latest release?
#3: What happens when you use a <video> element instead of <sound>?

Thanks.

Herby1209
Herby1209
Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)
Group: Forum Members
Posts: 11, Visits: 39
Hi,

1: i am using Windows 10 Home 64 bit
2: i just downloaded the latest Version (Inquisit for Lab 4.0.9.0)
3: i couldnt believe my eyes, videos actually stop. When i use video and sound as bgstim only the video stops but the sound keeps playing.

also tried different sound files, maybe it is a codec problem. i used Audacity to create "WAV (Microsoft) signed 16-bit pcm"



Herby1209
Herby1209
Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)
Group: Forum Members
Posts: 11, Visits: 39
i cant find a way to edit my posts thus i made a this one:

i am thinking about converting my Wav files to a video and play it with 1x1 pixels in one corner... maybe that would work.

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: 82K
You don't need to convert to a video format to use the <video> element. The <video> element handles all kinds of compressed / "streaming" formats, including audio-only formats (e.g. MP3).

Herby1209
Herby1209
Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)
Group: Forum Members
Posts: 11, Visits: 39
Thanks! You are my hero!

I used an mp3 file as video and the program does exactly what it should do!

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search