Millisecond Forums

simple startle response presentation

https://forums.millisecond.com/Topic22464.aspx

By Brigitte - 9/11/2017

Hej! It's the first time that I am using Inquisit and I am struggling a bit with setting up a simple startle response presentation. Basically, we just want to present a startle noise ten times, while a white noise is running in the background the whole time. No key press responses etc. will be stored. Instead of assigning a stimulus value to the background noise, I thought of using a block element. As the script is full of bugs, does anyone have suggestions what to change? Will be a good learning opportunity for sure! Thanks!

<values>
/ startleisi = 10000
/ startleduration = 4
</values>

<item sound>
/ 1 = "startle.wav"
</item>

<values tone>
/ completed = 0
/ stimtype = 1
</values>

<sound tone>
/ items = sounds
/ select = values.stimtype
/ playthrough = true
/ pan = 0
</sound>

<sound backgroundsound>
/ items = "whitenoise.wav"
/ playthrough = false
</sound>

<trial startle>
/ ontrialbegin = [values.stimtype = 1]
/ stimulusframes = [1 = tone]
/ timeout = values.startleduration
/posttrialpause = values.startleisi
</trial>

<block StartlePres>
/ bgstim = (backgroundsound)
/ trials = [1-10 noreplace(startle startle startle startle startle startle startle startle startle startle)]
</block>

<expt>
/ onexptend = [values.completed = 1]
/ blocks = [1 StartlePres]
</expt>
By Dave - 9/12/2017

Brigitte - Tuesday, September 12, 2017
Hej! It's the first time that I am using Inquisit and I am struggling a bit with setting up a simple startle response presentation. Basically, we just want to present a startle noise ten times, while a white noise is running in the background the whole time. No key press responses etc. will be stored. Instead of assigning a stimulus value to the background noise, I thought of using a block element. As the script is full of bugs, does anyone have suggestions what to change? Will be a good learning opportunity for sure! Thanks!

<values>
/ startleisi = 10000
/ startleduration = 4
</values>

<item sound>
/ 1 = "startle.wav"
</item>

<values tone>
/ completed = 0
/ stimtype = 1
</values>

<sound tone>
/ items = sounds
/ select = values.stimtype
/ playthrough = true
/ pan = 0
</sound>

<sound backgroundsound>
/ items = "whitenoise.wav"
/ playthrough = false
</sound>

<trial startle>
/ ontrialbegin = [values.stimtype = 1]
/ stimulusframes = [1 = tone]
/ timeout = values.startleduration
/posttrialpause = values.startleisi
</trial>

<block StartlePres>
/ bgstim = (backgroundsound)
/ trials = [1-10 noreplace(startle startle startle startle startle startle startle startle startle startle)]
</block>

<expt>
/ onexptend = [values.completed = 1]
/ blocks = [1 StartlePres]
</expt>

Not sure what the question is, to be honest. I think the best approach to do this is to run the white noise via the <block>'s /bgstim and then just have the block run 10 instances of a <trial> (with varying durations / intervals between them if need be) that play back the startle sound. That's broadly what your code does, so it would be great if you could put your questions into more concrete terms. Thanks. Beyond that, there are a few syntax mistakes in the code, corrected below:

<values>
/ startleisi = 10000
/ startleduration = 4
/ completed = 0
</values>

<item sound>
/ 1 = "startle.wav"
</item>

<sound tone>
/ items = sound
/ playthrough = true
/ pan = 0
</sound>

<sound backgroundsound>
/ items = ("whitenoise.wav")
/ playthrough = false
</sound>

<trial startle>
/ stimulusframes = [1 = tone]
/ timeout = values.startleduration
/posttrialpause = values.startleisi
</trial>

<block StartlePres>
/ bgstim = (backgroundsound)
/ trials = [1-10 = startle]
</block>

<expt>
/ onexptend = [values.completed = 1]
/ blocks = [1 = StartlePres]
</expt>