EEG Trigger synchro with sound

5 vues (au cours des 30 derniers jours)
Den
Den le 15 Fév 2018
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]));

Réponses (1)

Maryam Butt
Maryam Butt le 4 Jan 2019
Hi Den, have you got its solution yet?

Catégories

En savoir plus sur EEG/MEG/ECoG dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by