Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Sending Multiple EEG triggers for 1 sampler item

Hello Open Sesame Community,

For my latest experiment, I've recently switched to using Open Sesame.

I'm planning to conduct an ERP experiment, in which the participants will be presented with spoken sentences through a sampler item.

I would like to send multiple triggers for each sentence, for example at the start of the sentence, the start of the target word and the end of the sentence. My question is how to arrange this. On the Forum I could only find examples of scripts sending out 1 trigger per stimulus.

Would it be possible to write one single in line script that sends out three triggers, or would I need to create three different inline scripts, each for the trigger in question?

I've been trying to write the code needed for this, but I'm unsure if it would work. This is what I wrote so far (the Trigger and Delay variables would be in my loop item):

global io

trigger = var.Trigger #Is it possible to define multiple triggers here? E.g. Trigger1, Trigger2, Trigger3?

port = 0x378

try:

io.DlPortWritePortUchar(port, trigger)

except:

print 'Failed to send trigger!'

var.Trigger1 = clock.time() #trigger start soundfile

var.Trigger2 = clock.time()+ var.Delay1 #second trigger onset target

var.Trigger3 = clock.time()+ var.Delay2 #third trigger offset target


I hope someone could share some insights on how to send multiple triggers.

Thanks in advance!

Comments

  • Hi,

    I would like to send multiple triggers for each sentence, for example at the start of the sentence, the start of the target word and the end of the sentence. My question is how to arrange this. On the Forum I could only find examples of scripts sending out 1 trigger per stimulus.

    That is only possible if you have a different sampler file per stimulus (first word, target word, last word), or if you exactly know how long each word of the sentence last. If your entire sentence is one audio file, Opensesame doesn't how that file is structured (how many words, how long the word, etc.). In either case the temporal precision is not ideal. There is usually some jitter with presenting audio files, so that an EEG trigger might be accordingly a little imprecise. With that in mind it probably is better to have a different audio file for each word.

    Would it be possible to write one single in line script that sends out three triggers, or would I need to create three different inline scripts, each for the trigger in question?

    In theory, there is nothing wrong about that. The important is that you send the triggers as close in time as possible to the event you want to code. If you present all the sounds in a single inline_script you can send all the triggers in that script. If you use different scripts (or sampler items) to present the stimuli, you would probably also need different inline_scripts to send your triggers.

    Hope this helps,

    Eduard

    Buy Me A Coffee

  • Hi Eduard,

    Thanks for your swift reply!

    At this point we have one audio file per sentence. We do know when the separate words (e.g. the target) starts. When you write that the temporal precision is not ideal, what is the error/imprecision you are thinking about? I guess if it is a matter of up to 10 ms we could live with it, but if it is more like several 100ms it will become really problematic.

    Thanks!

  • Hi,

    I don't know exactly how much delay to expect, but this paper here: https://peerj.com/articles/9414/

    might be a good starting point to find out. Potentially, also this website (if you use the psychopy backend): https://www.psychopy.org/general/timing/timing.html

    Hope this helps.

    Eduard

    Buy Me A Coffee

  • Thanks this helps :)

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu http://45.77.173.118/ Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games