Libert task

57 views
Skip to first unread message

d.ve...@hsantalucia.it

unread,
Apr 10, 2018, 10:15:30 AM4/10/18
to E-Prime


Hello! 



I'm trying to implement on E-Prime 2 a Libet task paradigm for an fMRI experiment design (we have the proper extension pack). Based on the original paradigm, subjects have to look a video in which hands clock run very quickly. They have to press a button as spontaneously as possible (avoiding to programming their responses timing). However, the button press don't have to terminate the hands clock running, in order to avoid the bringing of memories about their position when they pressed. Indeed, that last one (the hands clock position during the button press) is the subjects' response that we will collect in a subsequently by means of a VAS scale slide. 

My request is about the possibility either to stop the hands clock video and either to present an auditive stimulus (a simple beep sound), respectively 300ms and 250ms after the subjects' button press (hence while they are still watching the hands clock slide running). 

I tried to collect the RunClockSlide.RT and to manipulate with some inline scripts both the RunClockSlide duration and the sound procedure onset, but I had few success. 


Had someone faced the same problem? Could you give me any suggestions? I would like any information! 


Thanks in advance

Dani

lawson...@gmail.com

unread,
Aug 4, 2018, 12:05:23 PM8/4/18
to E-Prime
I hope you've found a solution by now but thought I would chime in. I'm using E-prime 2.0. 

I'm working on an EEG study using the Libet tasks, and we have programmed an auditory task in which participants hear a beep after the clock starts running. We have programmed the beep to occur at a random interval between 2.55s and 7.65s after the clock begins. 

Here's what we have in the first inline, which is placed as the first object in the TrialProc (it comes up well before the clock is displayed). That way, E-Prime preloads the sound file well before having to play it.

Dim FeedbackBeep As SoundBuffer
Dim GenericSoundBufferInfo As SoundBufferInfo
GenericSoundBufferInfo.MaxLength = 100 
GenericSoundBufferInfo.VolumeControl = CLogical("Yes")
GenericSoundBufferInfo.PanControl = CLogical("No")
Set FeedbackBeep = Sound.CreateBuffer(GenericSoundBufferInfo)
FeedbackBeep.Filename = "beep.wav"
FeedbackBeep.Load
FeedbackBeep.Volume = -1000 'Buffer Volume goes from -10000 to 0 

Note that you need to include the file extension (.wav) and have the file in the same folder as the experimental file. 

Later, at the appropriate place in a different inline code, we have this to play the file, record when it was played, and have it send a trigger:

FeedbackBeep.Play
BeepTime = Clock.Read
WritePort &H4020, 64

The first tricky part is getting it at the right place in the code. Our code uses looping to show a rotating clockhand, so it took some time figure out where to put the .Play command. The second tricky part is getting it to play at the precise times you want. We called on a part of the code that displayed the clockhand (in reference to tick marks) to determine when to play it (i.e. after the clockhand had passed between 153 and 459 tick marks). I would share that, but it wouldn't make sense without seeing the entirety of our code. 

In your case, you may be able to get the file to play by inserting the .Play command in the correct location. If you are randomly varying the offset time between 300ms and 250ms within one session, you'll need to figure out a way to have it anchor to some other event (probably the button press) in your code and randomly offset either 250ms or 300ms from it. To do this, you may have to define an additional variable at the beginning (i.e. a random time of 250ms or 300ms) and then reference it later on when you are anchoring to another event. For example, we used this code in our first inline to define our random interval between tick marks...

Dim ran3 As Integer
ran3 = Random (153, 459) 

...and then we had to use this when we anchored to the code relating to the clockhand. 

On the other hand, if you have a set duration during one session (either 250ms OR 300ms but not both) I think you can find a way around this. If you can find where to correctly insert the .Play command such that it plays when the clock ends, you can just use a file which has a 250ms or 300ms period of silence at the beginning before it plays the beep. Set up one experimental file with the 250ms period of silence and one with the 300ms period.

You might also check out a topic I posted in this group before I reached my solution. I tried a few different things before someone helped me figure it out:


Hope this helps!

Paul 


Reply all
Reply to author
Forward
0 new messages