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


Author
Message
AbigailNovick
AbigailNovick
New Member (30 reputation)New Member (30 reputation)New Member (30 reputation)New Member (30 reputation)New Member (30 reputation)New Member (30 reputation)New Member (30 reputation)New Member (30 reputation)New Member (30 reputation)
Group: Forum Members
Posts: 5, Visits: 25
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 (830K reputation)Supreme Being (830K reputation)Supreme Being (830K reputation)Supreme Being (830K reputation)Supreme Being (830K reputation)Supreme Being (830K reputation)Supreme Being (830K reputation)Supreme Being (830K reputation)Supreme Being (830K reputation)
Group: Administrators
Posts: 10K, Visits: 58K
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
New Member (30 reputation)New Member (30 reputation)New Member (30 reputation)New Member (30 reputation)New Member (30 reputation)New Member (30 reputation)New Member (30 reputation)New Member (30 reputation)New Member (30 reputation)
Group: Forum Members
Posts: 5, Visits: 25
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