EEG Trigger synchro with sound
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi all, How can I send a single EEG trigger after the sound to our EEG system via Parallel or serial Port? Could somebody please help me/ Thank you very much.
Here is the code I wrote to produce the sound and after which I would like to send the EEG trigger
pahandle = PsychPortAudio('Open', [], 1, 1, freq, nrchannels);
% Set the volume to half for this demo
PsychPortAudio('Volume', pahandle, 0.5);
% Make a beep which we will play back to the user
myBeep = MakeBeep(500, beepLengthSecs, freq);
% Fill the audio playback buffer with the audio data, doubled for stereo
% presentation
PsychPortAudio('FillBuffer', pahandle, [myBeep; myBeep]);
% Start audio playback 1
PsychPortAudio('Start', pahandle, repetitions, startCue,
waitForDeviceStart);
WaitSecs(randi([10, 15]));
0 comentarios
Respuestas (1)
Ver también
Categorías
Más información sobre EEG/MEG/ECoG en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!