How to record sound and button presses on the same trial?


Author
Message
AbigailNovick
AbigailNovick
Respected Member (364 reputation)Respected Member (364 reputation)Respected Member (364 reputation)Respected Member (364 reputation)Respected Member (364 reputation)Respected Member (364 reputation)Respected Member (364 reputation)Respected Member (364 reputation)Respected Member (364 reputation)
Group: Forum Members
Posts: 25, Visits: 85
Hello,

I am trying to record audio and also record button presses on the same trial. I record sound using soundcapture, and record button presses using keyboard as the inputdevice. 

The problem is if I want to record what buttons subjects press by using validresponse, then the trial ends as soon as they press a keyboard button, thus truncating the recording. 

How do I continue recording even after a keyboard button has been pressed?

Thank you for your time,
Abby

current code below
<trial mytrial>
/ soundcapture = true
/ inputdevice = keyboard
/ stimulustimes = [0=target]
/ trialduration = 2000
/ validresponse =(23, 36, 37, 38)
</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
AbigailNovick - 7/14/2020
Hello,

I am trying to record audio and also record button presses on the same trial. I record sound using soundcapture, and record button presses using keyboard as the inputdevice. 

The problem is if I want to record what buttons subjects press by using validresponse, then the trial ends as soon as they press a keyboard button, thus truncating the recording. 

How do I continue recording even after a keyboard button has been pressed?

Thank you for your time,
Abby

current code below
<trial mytrial>
/ soundcapture = true
/ inputdevice = keyboard
/ stimulustimes = [0=target]
/ trialduration = 2000
/ validresponse =(23, 36, 37, 38)
</trial>

You do something like

<trial mytrial>
/ soundcapture = true
/ inputdevice = keyboard
/ stimulustimes = [0=target; 2000=target]
/ responseinterrupt = frames
/ beginresponsetime = 0
/ trialduration = 2000
/ validresponse =(23, 36, 37, 38)
</trial>

AbigailNovick
AbigailNovick
Respected Member (364 reputation)Respected Member (364 reputation)Respected Member (364 reputation)Respected Member (364 reputation)Respected Member (364 reputation)Respected Member (364 reputation)Respected Member (364 reputation)Respected Member (364 reputation)Respected Member (364 reputation)
Group: Forum Members
Posts: 25, Visits: 85
Dave - 7/14/2020
AbigailNovick - 7/14/2020
Hello,

I am trying to record audio and also record button presses on the same trial. I record sound using soundcapture, and record button presses using keyboard as the inputdevice. 

The problem is if I want to record what buttons subjects press by using validresponse, then the trial ends as soon as they press a keyboard button, thus truncating the recording. 

How do I continue recording even after a keyboard button has been pressed?

Thank you for your time,
Abby

current code below
<trial mytrial>
/ soundcapture = true
/ inputdevice = keyboard
/ stimulustimes = [0=target]
/ trialduration = 2000
/ validresponse =(23, 36, 37, 38)
</trial>

You do something like

<trial mytrial>
/ soundcapture = true
/ inputdevice = keyboard
/ stimulustimes = [0=target; 2000=target]
/ responseinterrupt = frames
/ beginresponsetime = 0
/ trialduration = 2000
/ validresponse =(23, 36, 37, 38)
</trial>

This is perfect!!!! Just tried it out.Thank you so much, 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