Playing background music/noise November 02, 2020 01:47PM |
Admin Registered: 5 years ago Posts: 875 |
function alert_function(hook,MLConfig,TrialRecord) persistent id filename = 'noise.wav'; % change the filename appropriately switch hook case 'init' % when the [RUN] button is clicked id = mgladdsound(filename); mglsetproperty(id, 'looping',true, 'collective',false); mglplaysound(id); case 'fini' % when the task window is closed mgldestroysound(id); end end
The National Institute of Mental Health (NIMH) is part of the National Institutes of Health (NIH), a component of the U.S. Department of Health and Human Services.