Skip to content

Simple code to playback a sound file (via MATLAB/Psychtoolbox) when an MRI trigger is sent

License

Notifications You must be signed in to change notification settings

benoitberanger/StartAudioStimAtMRItrigger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to use it

Start the main.m function, select your audio file, then the script wait for a key to be pressed to start the audio playback.
To stop the playback before the end, use the ForceStopPlayback.m function.

Need to adapt the scripts to your setup ?

The main.m function is quite easy to read and commented, it's easy to modify for your own setup.

Requirement

Psychtoolbox : http://psychtoolbox.org/
(StimTemplate : https://github.com/benoitberanger/StimTemplate.git)

OS

Should be independ, because it's base on psychtoolbox functions

Matlab/Octave

MATLAB : tested on R2011a, superior versions should be fine
Octave : Class definition (the '@' directories) is made for MATLAB but not for Octave

Conveniente setup

For more convenience, add your .wav (or .mp3 if audioread is available for your version of MATLAB) in the directory.

StartAudioStimAtMRItrigger

used for fMRI projects @ CENIR-ICM, Paris
CENIR : http://www.cenir.org/
ICM : http://icm-institute.org/

Team

Development : Benoît Béranger (CENIR-ICM, Paris)

About

Simple code to playback a sound file (via MATLAB/Psychtoolbox) when an MRI trigger is sent

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published