From pauls_postbus at hotmail.com Mon Jan 1 22:48:24 2007 From: pauls_postbus at hotmail.com (Paul Gr) Date: Mon, 1 Jan 2007 23:48:24 +0100 Subject: Eprime Newbie-- need help with inspection time In-Reply-To: Message-ID: hello brian, Because the algorithm in the script works with ‘frame counts’ instead of absolute durations in milliseconds, you can use the test with any refresh rate. I only inserted the refresh rate warning at the start of the test to make sure our researchers always used the same display configuration of 100Hz. Just modify the values in the inline script to get rid of the warning. However, be aware that higher refresh rates give a better time resolution. Extremely high refresh rates will be overkill though! Also be aware of the fact that most flat screens have poor visual response (onset&offset) times. (I assume that you use flat screens because the refresh rate seems to be fixed to 60Hz.) This will also influence the times you measure. Most important: do not mix different display configurations in the same study. Your second question is a bit more difficult answer because I programmed the script quite a long time ago. However, I think you misinterpret the meaning of a ‘reversal’. (see below.) The number of reversals is mainly used to decrease the step size from 4 to 1 during the test. This makes it possible to start the test with a relative large step size, and reduce it when then the subject performs well. In most cases the step size should become 1 ‘way before’ the experiment finishes. In other words: the staircase algorithm works like a damped oscillator, where the stimulus duration oscillates around an ‘optimal’ value. This optimal value can be regarded as the shortest stimulus duration at which the subject still gives correct responses. I think the readme file also explains it a bit (sorry for the fuzzy English). Let me include a fragment of the readme file that should be included with the script: Staircase algorithm used: The stimulus duration (i.e. the number of display frames on a CRT monitor) is increased or decreased with a specific number (=stepsize) according to response accuracy. On each wrong response the number of frames is increased with the current stepsize-value. However, the number of frames is only decreased with the ‘stepsize’-value when a fixed number of consecutive correct responses are detected (currently set to 4.) The step size itself is also modified. The experiment starts with a relative large value and is slowly decreased to a minimal step size during the test. This is done by keeping a so called ‘reversal’ count. A reversal occurs when: a) the current frame-count is larger then the previous frame-count when a correct sequence of (4) responses are detected; or b) when the current frame-count is smaller then the previous frame-count when an incorrect response is detected. In other words: a reversal happens when sequence of increasing display durations is about to decrease, or vice versa. The number of reversals is used to determine the stepsize: initially the stepsize will be 4 (=40 milliseconds at 100Hz). After 2 reversals the stepsize is reduced to 2 and after 4 reversals it will reach its smallest possible value of 1. This step-size and frame-count adaptation will take care of a slowly optimizing display duration for a given subject. The test will automatically abort after 15 reversals or 96 trials, whichever comes first. The first 3 trials ware considered practice or warm-up trials and have predefined frame counts. hope this helps, paul groot vrije universiteit amsterdam >From: Bpesta22 at cs.com >To: eprime at mail.talkbank.org >Subject: Eprime Newbie-- need help with inspection time >Date: Wed, 27 Dec 2006 20:31:44 EST > >Help with inspection time. > >Greetings. > >I am interested in using the inspection time task uploaded onto the eprime >website by Paul Groot. I'm having two problems (and I am not at all versed >in >programming) that I was hoping someone here could help me with. > >1) The experiment is written for 100hz monitors. I only have access to >machines with 60hz monitors. As far as I can tell from the code, it seems >like >running in 60hz would be do-able, but I lack the expertise to know if the >experiment would still produce reliable data running at 60hz. > >2) There's a section of the code that I cannot grasp. Briefly, in the >inspection time task, two lines are presented, and the subject decides >which one is >longer. The lines remain on screen only for a short period of time. The >duration for the next trial changes whenever a "reversal" occurs. For >example, if the >subject gets 4 right at the current duration, a reversal occurs, and the >duration time is decreased (making the task more difficult) by a set amount >for >the next trial. Conversely, if the subject gets this trial wrong, a >reversal >also occurs, and now the duration time for the next trial is increased. > >The duration time for any trial is just the refresh interval of the monitor >(10 ms for 100 hz, or 16.67ms for 6 hz, as with my monitor) x the number of >frames. For example, the first trial has 10 frames, so the stimulus >remains >onscreen for 100ms (100hz) or 167ms (60hz). If the subject gets 4 right at >this >duration, the number of frames is "stepped down" by 4. So, the next trial >would >have 6 frames and the stimulus would last for 60ms. The step sizes decrease >in >later trials to hone in on the subjects true "inspection time". > >When I run myself as a subject, though, the data file seems off. Sometimes >when I do 4 right at a given duration, the number of reversals does not go >up by >one (even though the next trial presents the stimulus at a shorter >duration). >Other times, 4 right at a given duration does result in a reversal. > >The same is true with mistakes-- sometimes eprime will record the reversal, >and the duration for the next trial will increase; other times, the >reversal is >not recorded in eprime, even though the next trial does have an increased >duration. Here's the relevant (I think!) part of the code: > > if nOK>=REAVALUATE_CORRECT_COUNT then > ' decrease stim duration > nOK = 0 ' restart counting > if (nPrevFrameCount < nFrameCount) then nReversals = nReversals + >1 > nPrevFrameCount = nFrameCount > nFrameCount = nFrameCount - nStepSize > if nFrameCount<=0 then > nStepSize = nStepSize \ 2 > if nStepSize<1 then nStepSize=1 > nFrameCount = nStepSize > end if > >The fourth line makes no sense to me. I have 4 correct trials in a row, so >I >should get a reversal (the next trial should present the two lines at a >shorter duration). But how is it that the previous frame count could be >less than >the current frame count. Shouldn't it be the opposite (the previous frame >count >was higher-- the lines were displayed longer-- than the frame count for the >current trial). > >Sorry for the length of this post, perhaps I should stop here. If anyone >could help, I would sincerely appreciate it. > >Bryan > _________________________________________________________________ Geef jouw Hotmail kleur met Windows Live Mail! Stap nu over! http://imagine-windowslive.com/mail/launch/default.aspx?Locale=nl-nl From t.o.chr at web.de Mon Jan 8 01:47:01 2007 From: t.o.chr at web.de (Theodor Christow) Date: Mon, 8 Jan 2007 02:47:01 +0100 Subject: Cannot load sound file "a.wav" Message-ID: hello, in an experiment IŽd like to use several sound files. When the experiment starts the following runtime error occures: cannot load sound file "a.wav" Data too large for buffer error number: 18005 This file has 188 KB, is it too big? How many KB are sound files allowed to have for use in eprime? Or may the problem be a different with a possibility to be solved? Many thanks in advance for some help on this problem! Theodor Christow From bianca.de-haan at klinikum.uni-tuebingen.de Wed Jan 10 15:10:38 2007 From: bianca.de-haan at klinikum.uni-tuebingen.de (B de Haan) Date: Wed, 10 Jan 2007 16:10:38 +0100 Subject: triggering TMS machine via serial port (com1) Message-ID: Hi all, I would like to trigger a TMS machine (Magstim SuperRapid) in E-prime via the serial port and somehow nothing I try works. Is there anyone out there who has successfully managed this? I have tried: 1) Similarly to the logic when triggering the LPT1 port, adding a bit of inline script after the stimulus: WritePort &H03F8, 255 WritePort &H03F8, 255 WritePort &H03F8, 255 WritePort &H03F8, 0 Adding the port as device never used to be necessary when I used the parallel port, but I tried it in all possible permutations of with/without adding a port device and with/without adding a serial device 2) I tried the solution mentioned in the post on http://listserv.linguistlist.org/cgi-bin/wa?A2=ind0609E &L=EPRIME&P=R2&I=-3 3) I tried using all the SerialWrite methods (Serial.WriteByte, Serial.WriteInteger, Serial.WriteLong, Serial.WriteString), although I must confess I was not always sure how to use these commands to set the serial port to HIGH. This again I tried with all possible permutations of with/without adding a port device and with/without adding a serial device. So, can anyone help me? I never had any problems with the Magstim Rapids, since they are triggered via the parallel port, but somehow I cannot manage to get a trigger through the serial port. Is there anyone out there using the new Magstim SuperRapids together with E-prime (or anyone else who might have an idea as to what I am doing wrong)? Any help would be greatly appreciated, Bianca de Haan -------------- next part -------------- An HTML attachment was scrubbed... URL: From Fabrizio.Ferri at uv.es Wed Jan 10 15:32:58 2007 From: Fabrizio.Ferri at uv.es (Fabrizio Ferri Benedetti) Date: Wed, 10 Jan 2007 16:32:58 +0100 Subject: triggering TMS machine via serial port (com1) In-Reply-To: <000001c734c9$8234fcd0$d87d0286@dehaan> Message-ID: Hi Bianca, I've never worked with a TMS machine; nevertheless, some ideas come to my mind: 1) Check whether you are using COM1 or not (E-Prime 1 can't use serial ports beyond COM4, and some PCs - especially laptops or brand new - already have all the ports used by other devices; check that under My PC -> Hardware -> Device Manager). 2) Some software only shows the triggers when the recording is up and running, and not while in idle mode. 3) Have you tried the DEBUG method to test the communication between the machines? 4) Just in case, try all the solutions with a simple E-Prime script, easily modifiable and runnable on another PC. My bet is that there's some I/O problem, perhaps related to wrong or busy port number, faulty cables or something similar. Cheers, Fabrizio B de Haan escribió: > > Hi all, > > > > I would like to trigger a TMS machine (Magstim SuperRapid) in E-prime > via the serial port and somehow nothing I try works. Is there anyone > out there who has successfully managed this? > > > > I have tried: > > > > 1) Similarly to the logic when triggering the LPT1 port, adding a bit > of inline script after the stimulus: > > WritePort &H03F8, 255 > > WritePort &H03F8, 255 > > WritePort &H03F8, 255 > > WritePort &H03F8, 0 > > Adding the port as device never used to be necessary when I used the > parallel port, but I tried it in all possible permutations of > with/without adding a port device and with/without adding a serial device > > > > 2) I tried the solution mentioned in the post on > http://listserv.linguistlist.org/cgi-bin/wa?A2=ind0609E&L=EPRIME&P=R2&I=-3 > > > > > 3) I tried using all the SerialWrite methods (Serial.WriteByte, > Serial.WriteInteger, Serial.WriteLong, Serial.WriteString), although I > must confess I was not always sure how to use these commands to set > the serial port to HIGH. This again I tried with all possible > permutations of with/without adding a port device and with/without > adding a serial device. > > > > So, can anyone help me? I never had any problems with the Magstim > Rapids, since they are triggered via the parallel port, but somehow I > cannot manage to get a trigger through the serial port. Is there > anyone out there using the new Magstim SuperRapids together with > E-prime (or anyone else who might have an idea as to what I am doing > wrong)? > > > > Any help would be greatly appreciated, > > > > Bianca de Haan > -- Fabrizio Ferri Benedetti Departamento de Psicología Evolutiva y Educativa Facultad de Psicología Universidad de Valencia http://www.uv.es/fafebe From pauls_postbus at hotmail.com Wed Jan 10 15:59:29 2007 From: pauls_postbus at hotmail.com (Paul Gr) Date: Wed, 10 Jan 2007 16:59:29 +0100 Subject: triggering TMS machine via serial port (com1) In-Reply-To: <000001c734c9$8234fcd0$d87d0286@dehaan> Message-ID: Hi Bianca, Could you specify which pins of the COM port are used for triggering... This is very important because the LPT port functions very different compared to LPT ports. You could use any of the handshake output lines (like DTR and RTS), but then you would have to use a different port address instead (3FC). Address 3F8 is the register which is used for serial communication (Rx/Tx lines). This can be used, but only when you know what you are doing because transmission on the Tx line will be a serial bit pattern. The baudrate will determine the clock speed of this pattern. There is also another thing to realize before tying up COM ports to anything else: output voltages of COM port pins can be anywhere between -18 and +18 Volt. Not all hardware is designed to handle such voltages On the following web page the RTS and DTR output lines are used for a different purpose (power supply), but the information might help a bit: http://www.psy.vu.nl/download/menu/xml/eprime_howto_port_com.xml best, Paul >From: "B de Haan" >To: >Subject: triggering TMS machine via serial port (com1) >Date: Wed, 10 Jan 2007 16:10:38 +0100 > >Hi all, > > > >I would like to trigger a TMS machine (Magstim SuperRapid) in E-prime via >the serial port and somehow nothing I try works. Is there anyone out there >who has successfully managed this? > > > >I have tried: > > > >1) Similarly to the logic when triggering the LPT1 port, adding a bit of >inline script after the stimulus: > >WritePort &H03F8, 255 > >WritePort &H03F8, 255 > >WritePort &H03F8, 255 > >WritePort &H03F8, 0 > >Adding the port as device never used to be necessary when I used the >parallel port, but I tried it in all possible permutations of with/without >adding a port device and with/without adding a serial device > > > >2) I tried the solution mentioned in the post on >http://listserv.linguistlist.org/cgi-bin/wa?A2=ind0609E > >&L=EPRIME&P=R2&I=-3 > > > >3) I tried using all the SerialWrite methods (Serial.WriteByte, >Serial.WriteInteger, Serial.WriteLong, Serial.WriteString), although I must >confess I was not always sure how to use these commands to set the serial >port to HIGH. This again I tried with all possible permutations of >with/without adding a port device and with/without adding a serial device. > > > >So, can anyone help me? I never had any problems with the Magstim Rapids, >since they are triggered via the parallel port, but somehow I cannot manage >to get a trigger through the serial port. Is there anyone out there using >the new Magstim SuperRapids together with E-prime (or anyone else who might >have an idea as to what I am doing wrong)? > > > >Any help would be greatly appreciated, > > > >Bianca de Haan > _________________________________________________________________ Bekijk je berichten in 1 oogopslag met de indeling van Live Mail! http://imagine-windowslive.com/mail/launch/default.aspx?Locale=nl-nl From marilyne at psych.utoronto.ca Wed Jan 10 17:14:04 2007 From: marilyne at psych.utoronto.ca (Marilyne Ziegler) Date: Wed, 10 Jan 2007 12:14:04 -0500 Subject: triggering TMS machine via serial port (com1) Message-ID: WritePort &H378, 0 Sleep 5 WritePort &H378, 255 Sleep 5 WritePort &H378, 0 c.setattrib "startscanner", Clock.ReadMillisec We use this to start a MRI Scanner through the parallel port...seems to work... off on off...I guess. Marilyne ZieglerMarilyne Ziegler Research Officer Human Neuropsychology and Cognitive Sciences Lab Dept of Psychology University of Toronto 100 St. George St. Toronto, Ontario marilyne at psych.utoronto.ca 1-416-978-7029 ----- Original Message ----- From: B de Haan To: eprime at mail.talkbank.org Sent: Wednesday, January 10, 2007 10:10 AM Subject: triggering TMS machine via serial port (com1) Hi all, I would like to trigger a TMS machine (Magstim SuperRapid) in E-prime via the serial port and somehow nothing I try works. Is there anyone out there who has successfully managed this? I have tried: 1) Similarly to the logic when triggering the LPT1 port, adding a bit of inline script after the stimulus: WritePort &H03F8, 255 WritePort &H03F8, 255 WritePort &H03F8, 255 WritePort &H03F8, 0 Adding the port as device never used to be necessary when I used the parallel port, but I tried it in all possible permutations of with/without adding a port device and with/without adding a serial device 2) I tried the solution mentioned in the post on http://listserv.linguistlist.org/cgi-bin/wa?A2=ind0609E&L=EPRIME&P=R2&I=-3 3) I tried using all the SerialWrite methods (Serial.WriteByte, Serial.WriteInteger, Serial.WriteLong, Serial.WriteString), although I must confess I was not always sure how to use these commands to set the serial port to HIGH. This again I tried with all possible permutations of with/without adding a port device and with/without adding a serial device. So, can anyone help me? I never had any problems with the Magstim Rapids, since they are triggered via the parallel port, but somehow I cannot manage to get a trigger through the serial port. Is there anyone out there using the new Magstim SuperRapids together with E-prime (or anyone else who might have an idea as to what I am doing wrong)? Any help would be greatly appreciated, Bianca de Haan -------------- next part -------------- An HTML attachment was scrubbed... URL: From eddie at ling.ed.ac.uk Thu Jan 11 15:29:34 2007 From: eddie at ling.ed.ac.uk (Eddie Dubourg) Date: Thu, 11 Jan 2007 15:29:34 -0000 Subject: Experiment time limit, with warning... Message-ID: I'm writing an experiment that needs a specific duration of 20 minutes. Now, I know it's trivial to put a duration on the list that calls the experimental block (and I wish I could do this), but the researcher I'm working with needs to warn the subjects at 19 mins that the time is nearly up, and at 20 mins, the experiment needs to terminate. I've looked at the RTTime help files, and am working on a variants of :- if RteRunnableInputObject.RTTime >= 1140000 : <= 1200000 then goto LABEL1 else if RteRunnableInputObject.RTTime >= 1200000 then goto LABEL2 end if Am I approaching this from the right angle? Many thanks Eddie Dubourg From brobinso at mprc.umaryland.edu Thu Jan 11 15:50:03 2007 From: brobinso at mprc.umaryland.edu (Ben Robinson) Date: Thu, 11 Jan 2007 10:50:03 -0500 Subject: Experiment time limit, with warning... Message-ID: that looks like the right angle to me. all except for the use of the colon (">= 1140000 : <= 1200000"). i can't swear to it, but i don't think that syntax will work with eprime. i would recommend, instead, something like 'place the Dim statement in your User Script Dim warnThemOnlyOnce as Integer 'place this If Then wherever it belongs If RteRunnableInputObject.RTTime >= 1140000 And warnThemOnlyOnce = 0 Then warnThemOnlyOnce = 1 goto Label1 ElseIf RteRunnableInputObject.RTTime >= 1200000 Then goto Label2 End If >>> "Eddie Dubourg" 1/11/2007 10:29 AM >>> I'm writing an experiment that needs a specific duration of 20 minutes. Now, I know it's trivial to put a duration on the list that calls the experimental block (and I wish I could do this), but the researcher I'm working with needs to warn the subjects at 19 mins that the time is nearly up, and at 20 mins, the experiment needs to terminate. I've looked at the RTTime help files, and am working on a variants of :- if RteRunnableInputObject.RTTime >= 1140000 : <= 1200000 then goto LABEL1 else if RteRunnableInputObject.RTTime >= 1200000 then goto LABEL2 end if Am I approaching this from the right angle? Many thanks Eddie Dubourg From mooreks at umich.edu Wed Jan 17 19:28:13 2007 From: mooreks at umich.edu (Katherine Sledge Moore) Date: Wed, 17 Jan 2007 14:28:13 -0500 Subject: arrays of arrays? Message-ID: Is it possible in E-basic to make an array of arrays? So let's say you had the following: Dim array1(2) as Integer Dim array2(2) as Integer Dim array3(2) as Integer Array1(0) = 0 Array1(1) = 1 Array1(2) = 2 Array2(0) = 3 Array2(1) = 4 Array2(2) = 5 Array3(0) = 6 Array3(1) = 7 Array3(2) = 8 Can you then say: Dim allarray(2) as array Allarray(0) = array1 Allarray(1) = array2 Allarray(2) = array3 If I wanted to get to the 0th item in the 2nd array could I then say: x = allarray(2(0))? Is there some other way of doing it? From martin.buschkuehl at psy.unibe.ch Wed Jan 17 20:21:46 2007 From: martin.buschkuehl at psy.unibe.ch (=?ISO-8859-1?Q?Martin_Buschk=FChl?=) Date: Wed, 17 Jan 2007 21:21:46 +0100 Subject: arrays of arrays? In-Reply-To: <016a01c73a6d$a1b023b0$6601a8c0@psycjjonides14> Message-ID: Hi, maybe you can solve your problem with the use of multi-dimensional arrays. You have to declare such an array as follows: dim array(3,3) In this case, a variable (i.e. a two dimensional array) containing a 4 x 4 matrix (with a base index of 0) is declared. You are then able to access each item in this matrix by defining its coordinates with the two numbers in the brackets. You can find further information about multi-dimensional arrays on this website: http://en.wikipedia.org/wiki/Array#Multi-dimensional_arrays Note, that the function "randomizearray" does not work with multi-dimensional arrays. Best, Martin. Katherine Sledge Moore schrieb: > Is it possible in E-basic to make an array of arrays? > > So let's say you had the following: > Dim array1(2) as Integer > Dim array2(2) as Integer > Dim array3(2) as Integer > > Array1(0) = 0 > Array1(1) = 1 > Array1(2) = 2 > > Array2(0) = 3 > Array2(1) = 4 > Array2(2) = 5 > > Array3(0) = 6 > Array3(1) = 7 > Array3(2) = 8 > > > Can you then say: > > Dim allarray(2) as array > > Allarray(0) = array1 > Allarray(1) = array2 > Allarray(2) = array3 > > If I wanted to get to the 0th item in the 2nd array could I then say: > x = allarray(2(0))? Is there some other way of doing it? > > > > -- lic. phil. Martin Buschkühl University of Bern Department of Psychology Division of Experimental Psychology and Neuropsychology Muesmattstrasse 45 3012 Bern Switzerland phone +41 (0)31 631 47 34 fax +41 (0)31 631 82 12 http://www.apn.psy.unibe.ch From pauls_postbus at hotmail.com Sat Jan 20 10:00:15 2007 From: pauls_postbus at hotmail.com (Paul Gr) Date: Sat, 20 Jan 2007 11:00:15 +0100 Subject: Repetitive Sound Presentation and Trigger Issues Message-ID: Hello Pamela, I currently don’t have enough time for a proper analysis of your code and setup, but there are few things to think about: 1) Try to preload the sound files into different Sound objects at the start of the experiment. This will prevent unpredictable delays caused by loading the audio files during a trial. Preloading should be possible by adding properly configured SoundOut objects to the ‘unreferenced E-Objects’ section. This should be done for each sound. You can simple start such sound objects by calling the Play or Run methods. 2) Note that some soundcards have problems playing very short tracks. This problem seems to be related with the internal buffering mechanism of the sound card (or the DirectX drivers.) In our lab we once had a situation where sometimes the tail of track A was replayed at the start of track B. We solved this issue by adding some silence at the start and end of each WAV-file. Another option is to create a single WAV-file which contains all the audio you would like to play. (We even developed a small library for this which can be used by EPrime to generate WAV-files at runtime by adding existing WAV files into one large audio stream.) 3) Because it is not always easy to check the exact onsets of the sound stimuli, it is sometimes desirable to be able to record the sound output itself along with the EEG. The easiest way would be to record the attenuated audio signal itself on a bipolar input. However, because galvanic connection of external equipment with the EEG amplifier is not allowed, you will require special isolation electronics to be able to do this safely. Another option would be some dedicated electronics that translates the audio signal into a digital trigger pulse, which can be recorded on the trigger input. In some cases this will eliminate the need of creating the digital triggers in EPrime. hope this helps. best, Paul Groot VU University Amsterdam Date: Thu, 18 Jan 2007 09:20:50 -0600From: pamela.n.carton at gmail.comTo: eprime at mail.talkbank.orgSubject: Repetitive Sound Presentation and Trigger IssuesHello-We are currently doing a study in which we will present pictures followed by a fixation point. During the pictures and the fixation points, we want to present clicks spaced at 100 ms repetitively. Also, we want to implement a startle probe that will play once randomly throughout the image presentation. Similarly, we want the clicks to resume after the startle probe presentation. Finally, a fixation point should appear when the image presentation is completed. During the fixation point, the clicks should simultaneously be presented. This will be done for 48 pictures.To clarify, the program should look as follows:-picture presentation with simultaneous 100 ms clicks-random startle probe once during the picture presentation-resume 100 ms clicks for the remainder of the picture presentation-present a fixation point on the screen with simultaneous 100 ms click presentation-repeatSeveral items to note before reading on:-We are using a NeuroScan SynAmps 2-The way we have our study designed on E-Prime, we are using slide objects with different active states. Specifically, we have inline coding initializing the Stimulus slide object. The Stimulus slide object has two active states: an image state that presents the image and a sound out (on the state) for the clicks, and a fixation state that presents the fixation point and another sound out (on the state as well) for the startle probe. We also have some more inline code to switch the Stimulus states following that slide object, and that is then followed by another slide object with two different active states. The first of those states is a fixation point with a sound out on it that plays the clicks. The second state of that object does not display any images, but it is supposed to present the startle probe.Now that the general set up of our program is out of the way, here's the trouble we are having:Firstly, when we try to get the clicks to play while we have WritePorts and triggers in the inline code, we are able to see triggers properly executed, but we cannot get the clicks to play in the correct, repetitive 100 ms manner. Specifically, it will sound as though the clicks are spaced out inconsistently and unevenly. This does not seem to have an effect on the startle probe, however, which is presented as it should be. When we expect to hear the clicks again post-startle probe presentation (but before the fixation point and clicks presentation), we get one or two unevenly spaced out clicks. Then, at the fixation point, the 100 ms clicks resume at a faster pace than how they should be presented. The pictures and the fixation points are displayed correctly during this set up, thank goodness.Here's some of the code we have tried using in our SwitchStimStates: ' Switches ActiveState to Startle, then waits until' startle is scheduled to playWhile StimDur < Cdbl(c.GetAttrib("StimStartleOffset"))*1000StimDur = Clock.ReadMicrosec - ClockReadClickTrig = StimDur\(ClickBin*1000)Writeport Triggerport, c.getattrib("StimTrigger") + ClickTrig + 1Stim.playSleep SleepDurLoopDur = 0ClockRead2 = Clock.ReadMicrosec'Click TriggerWhile LoopDur < ClickDur*500LoopDur = Clock.ReadMicrosec - ClockRead2WendWritePort TriggerPort, HoldValueSleep SleepDurWhile LoopDur < ClickDur*1000LoopDur = Clock.ReadMicrosec - ClockRead2WendWend'Set sound volume for startle probe and play itIf CInt(c.GetAttrib("StimStartleOffset")) <> 0 ThentheSound.Buffers(1).Volume = 0theSound.Buffers(1).filename = "E:\\Experiment Stimuli\\Startles\\startle_44100.wav"theSound.Buffers(1).loadStim.play'Trigger Startle ProbeWriteport Triggerport, c.getattrib("StimStartleTrigger")Sleep SleepDurWritePort TriggerPort, HoldValueSleep c.getattrib("StartleDuration") - SleepDur End If'Set sound volume back to baselinetheSound.Buffers(1).Volume = CInt(c.GetAttrib("SoundVolume"))theSound.Buffers(1).filename = "E:\\Experiment Stimuli\\Startles\\click_44100_100ms.wav"theSound.Buffers(1).load' Waits until stimulus is finishedWhile StimDur < CDbl(c.GetAttrib("StimDuration"))*1000 - ClickDur*1000StimDur = Clock.ReadMicrosec - ClockReadStim.playLoopDur = 0ClockRead2 = Clock.ReadMicrosec'Click TriggerClickTrig = StimDur\(ClickBin*1000)Writeport Triggerport, c.getattrib("StimTrigger") + ClickTrig + 1Sleep SleepDurWritePort TriggerPort, HoldValueSleep SleepDur 'Wait remainder of ClickDurWhile LoopDur < ClickDur*1000 LoopDur = Clock.ReadMicrosec - ClockRead2WendWendWe then tried to comment out the the Click Trigger section of code - thus, we were hoping that the program would present the sound stimuli properly when we eliminated certain triggers. Indeed, the clicks prior to the startle probe were presented as we hoped and the startle probe itself was presented as we would expect. In addition, the clicks during the fixation point were presented properly. The images were also presented correctly, the same as before. However, we face two problems in the set up of the program this way: 1) There were no triggers, obviously, and we need to find a way to get this program running correctly, both in sound presentation and in triggers, 2) We do NOT get the clicks presented at all after the startle probe. That is to say, we do get clicks presented properly during the fixation point and prior to the startle probe, just not immediately after the startle probe.We have tried to remedy these problems in several ways. We ensured that in our code, we use double back slashes in listing the directories for the sound files – we know that E-Prime often has trouble interpreting where to find the sounds from a specific drive without the double back slashes. Also, we had upgraded E-Prime from version 1.1.4.1 to version 1.2. This did not seem to make difference at all in either way we attempted the program. In addition, we have tried using E-Prime Beta versions 2.0.1.52 and 2.0.1.57 to no avail. Finally, we tried recreating this program without images. Instead, we have tried to use the clicks and startle probe with Sound Out objects instead of on slide objects. More specifically, we created a PreStim slide object with a fixation point. This was followed by a Sound Out object that presents the 100 ms clicks. After that code, we added another Sound Out object with the startle probe sound. Finally, we added the PostStim slide object with two different active states. The first of those states is a fixation point with a sound out on it that plays the clicks. The second state of that object does not display any images, but it is supposed to present the startle probe.When we attempted this basic set up, it failed to perform as we hoped. The clicks and startles were presented, but the spacing of the clicks was not 100 ms – they were spaced unevenly and in random chunks.So, again, we cannot get our program to successfully do the following:-play clicks at 100 ms intervals repetitively-simultaneously get the triggers working-get the clicks to play post-startle probe (but before the fixation point with clicks)If you have any suggestions as to how we might resolve these issues, which seem to be of a fundamental nature for E-Prime, please do not hesitate in responding.Thanks for reading this post. If you are confused or would like more clarification as to what we are trying to do in this program, I'll be happy to answer any questions.-Pam Carton ------------------------------------------Pamela N. Carton, Research AnalystVanderbilt University 301 Wilson Hall111 21st Ave SouthNashville, TN 37203office: (615) 343-5452cell: (914) 522-3905 _________________________________________________________________ Probeer Live.com: je eigen persoonlijke opstartpagina met alleen de dingen die jij belangrijk vindt op één plek. http://www.live.com/getstarted -------------- next part -------------- An HTML attachment was scrubbed... URL: From wells at mail.utexas.edu Sat Jan 20 19:00:52 2007 From: wells at mail.utexas.edu (wells at mail.utexas.edu) Date: Sat, 20 Jan 2007 13:00:52 -0600 Subject: .wav filename invalid Message-ID: If someone could help me with this I would certainly appreciate it... It seems that no matter what I do I cannot get eprime to play a certain .wav file. Everytime it gives me an error that "filename is invalid". I've made sure that the file is in the correct folder and the file I've listed in the sound out object exactly matches the one in the folder. I'm probably just overlooking something very simple, but any assistance would be appreciated. Thanks! - Tony -- Tony T. Wells, M.A. Mood Disorders Laboratory Department of Psychology University of Texas at Austin 1 University Station A8000 Austin, Texas 78712-0187 Lab Phone: 512.475.6817 From seif1301 at uni-trier.de Sat Jan 20 19:49:51 2007 From: seif1301 at uni-trier.de (Jan Seifert) Date: Sat, 20 Jan 2007 20:49:51 +0100 Subject: .wav filename invalid In-Reply-To: <1169319652.45b266e415865@webmailapp3.cc.utexas.edu> Message-ID: Hello Tony, E-Prime plays other sound files without complaining, I guess? Maybe it would be helpful to find out what is wrong if you told us the name of the file. Regards, Jan wells at mail.utexas.edu schrieb: > If someone could help me with this I would certainly appreciate it... > > It seems that no matter what I do I cannot get eprime to play a certain .wav > file. Everytime it gives me an error that "filename is invalid". I've made > sure that the file is in the correct folder and the file I've listed in the > sound out object exactly matches the one in the folder. I'm probably just > overlooking something very simple, but any assistance would be appreciated. > Thanks! > > - Tony From dhair at wfubmc.edu Mon Jan 22 21:44:31 2007 From: dhair at wfubmc.edu (David Hairston) Date: Mon, 22 Jan 2007 16:44:31 -0500 Subject: Information/property access to slide sub-objects Message-ID: I have a case where I'd like to have multiple events occurring within a slide object, both visual (.bmp) and auditory (.wav). In the most simple case, a .wav file is started playing while a .bmp is drawn. The two have differing durations, however, so that the experiment moves on to the next object while the sound is still going. Now in the data logging of a slide, it appears to report only the properties of the slide object as a whole, which in reality seem to reflect those of the graphical component. In particular, aside from needing actual timing info for the on/offset of the sound file, I need to be able to utilize the OnsetSignal and OffsetSignal properties for this component as well, separately from the on/offset of the screen drawing. However, the "object" for this sound is a sub-object of the general Slide object. Is there any way to get access to this information, or set the properties of the sub-objects? Thanks Dave W. David Hairston, Ph.D. ANSIR Lab Dept of Radiology Wake Forest University School of Medicine Medical Center Blvd Winston-Salem NC 27157 (336) 716-7160 (Offiice) (336) 716 0798 (Fax) -------------- next part -------------- An HTML attachment was scrubbed... URL: From Beamgau at gmx.de Tue Jan 23 10:07:06 2007 From: Beamgau at gmx.de (Felix Fischer) Date: Tue, 23 Jan 2007 11:07:06 +0100 Subject: canvas as background? Message-ID: hi everybody, i got a canvas, which i want to use as background. there a several coloured circles on it. now i want to have something like a foreground... i want to draw something on it, clear the foreground, draw and clear in a loop. the background should not be affected by this "loop". i tried to simply use one canvas for background, one for foreground, but this didn't work out... can someone tell me how to achieve this? thanks a lot felix fischer tu berlin -- "Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ... Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail From pauls_postbus at hotmail.com Tue Jan 23 15:58:36 2007 From: pauls_postbus at hotmail.com (Paul Gr) Date: Tue, 23 Jan 2007 16:58:36 +0100 Subject: canvas as background? Message-ID: hello felix, there are several way's to do this, but the easiest is probably the following: - use two offscreen canvas objects: 'background' and 'scratch' - prepare the background as you already did then, inside the loop: - copy 'background' to 'scratch' - draw something on top of scratch - wait for vertical retrace (WaitForVerticalBlank) - copy scratch to screenIf the background image can be created efficiently (i.e. just a few lines or circles), then it is probalby more efficient to forget the background object and erase and redraw the complete scratch image straight away inside the loop... best, Paul Paul Groot Vrije Universiteit Amsterdam > Date: Tue, 23 Jan 2007 11:07:06 +0100> From: Beamgau at gmx.de> Subject: canvas as background?> To: EPRIME at MAIL.TALKBANK.ORG> > hi everybody,> > i got a canvas, which i want to use as background. there a several coloured circles on it.> > now i want to have something like a foreground... i want to draw something on it, clear the foreground, draw and clear in a loop.> > the background should not be affected by this "loop". i tried to simply use one canvas for background, one for foreground, but this didn't work out...> > can someone tell me how to achieve this? > > thanks a lot> felix fischer> tu berlin> -- > "Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...> Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail> _________________________________________________________________ Leef je uit: ontwerp je startpagina precies zoals jij het wil hebben op Live.nl. http://www.live.com/getstarted -------------- next part -------------- An HTML attachment was scrubbed... URL: From Stephane.DeBrito at iop.kcl.ac.uk Tue Jan 23 19:58:34 2007 From: Stephane.DeBrito at iop.kcl.ac.uk (De Brito, Stephane) Date: Tue, 23 Jan 2007 19:58:34 -0000 Subject: Object alternation task Message-ID: Dear E-prime experts, I would like to program an object alternation task, which is a bit similar to the spatial alternation task I mentioned a few weeks ago on the e-prime list. Task description: The participant sees 2 objects (always a red tomato and a blue chair) and has to figure out which one is baited with a £20 note. The participant task is to learn that the object behind which the £20 note is located is being alternated after each correct response. After each correct response, a £20 note appears on the screen. Basically, I would like to design the task so that the subject can click on the object behind which he thinks the £20 note is hidden. My questions are: 1) Is there a way to display the same two objects but in different locations on the screen across trials? The objects should change locations on the screen in a random way. 2) I believe it is possible to use the mousse as an input device using the SlideState.HitTest method, but don't really know how to use it. Any suggestions would be much appreciated. Many thanks! Stephane ------------------------------------------ Stephane De Brito, PhD student Institute of Psychiatry King's College London Forensic Mental Health Science Department Box P023 De Crespigny Park Denmark Hill London SE5 8AF United Kingdom Tel: + 44 (0) 20 7848 0711 Fax: + 44 (0) 20 7848 0754 website: www.iop.kcl.ac.uk -------------- next part -------------- An HTML attachment was scrubbed... URL: From tlorat at psychology.ou.edu Wed Jan 24 17:04:57 2007 From: tlorat at psychology.ou.edu (Tim Lorat) Date: Wed, 24 Jan 2007 11:04:57 -0600 Subject: Alternating two pictures Message-ID: Hello, I am trying to program a change blindness experiment, with two pictures alternating, each displayed for a certain amount of time (e.g. 500ms), and a blank period in between those two pictures (of e.g. 200ms). The stimuli should alternate until the participant responds. As I am fairly new to E-Prime I am not sure how to do this and would be thankful for any help. Thanks, Tim -------------- next part -------------- An HTML attachment was scrubbed... URL: From helen.tibboel at ugent.be Thu Jan 25 07:19:59 2007 From: helen.tibboel at ugent.be (Helen Tibboel) Date: Thu, 25 Jan 2007 08:19:59 +0100 Subject: E-prime: using AZERTY-keyboards? Message-ID: L. S., I am currently trying to program an experiment using an AZERTY-keyboard. The hardware-settings for the keyboard are correct (typing script works fine). However, when I try to run the experiment, responses are logged as if I'm using a QWERTY-keyboard (so when I respond with "q", the data-file will show an "a" etc.). Is there any way to solve this problem? Thank you and kind regards, Helen Tibboel -- ********************************************************** Helen Tibboel Ghent University Department of Experimental-Clinical and Health Psychology Henri Dunantlaan 2, B-9000 Ghent, Belgium Tel: + 32 (0)9 264 63 97 Email: helen.tibboel at ugent.be Department site: http://allserv.ugent.be/~ydesmet/ ********************************************************** From sonia_pritchard at rogers.com Thu Jan 25 16:37:48 2007 From: sonia_pritchard at rogers.com (Sonia Pritchard) Date: Thu, 25 Jan 2007 11:37:48 -0500 Subject: Random ordering of trials within a block Message-ID: Dear E-Prime Users, In the Users Guide, Appendix B, page A-29, it is noted that the Gamblers Fallacy due to randomization can be avoided by setting the maximum of the number of repetitions of a single trial. However, there is no mention of how to achieve this. Perhaps there is some reference to this solution elsewhere in the manual, but I could not find it. I would be grateful to receive some advice on this issue. Regards, Sonia ------------------------------------------------------- Sonia Pritchard Psycholinguistics Lab University of Ottawa 70, Laurier Ave East Ottawa, ON, Canada K1N 6N5 Office: Arts 410 Phone #: (613) 562-5800, ext. 1772 Email: sprit001 at uottawa.ca sonia_pritchard at rogers.com From Fabrizio.Ferri at uv.es Mon Jan 29 17:38:26 2007 From: Fabrizio.Ferri at uv.es (Fabrizio Ferri Benedetti) Date: Mon, 29 Jan 2007 18:38:26 +0100 Subject: Sending a trigger during a stimulus' presentation Message-ID: Hi! I'll try to make it simple: - In my procedure, an InLine BEFORE the stimulus send a start trigger via serial port using OnSet method; an InLine AFTER the stimulus send triggers accounting for accuracy or lack of response (as the subject's answer terminates the slide) -In the same procedure, there is also a fixed-time pause after the stimulus. It happens that the subject may answer during the pause, and not during the stimulus. Now, as the pause (an empty slide) can't be terminated by the subject's answer, every trigger I process with an InLine after the pause itself will always be sent after the pause. Is there any way to send triggers (or perform actions) if the subject answers during the presentation of a stimulus (slide/text/pause/etc)? That is: I don't want the answer to terminate the stimulus or pause; I just want the answer to perform scripted actions (like sending triggers) along the duration of the slide. Hope I made myself clear... Cheers, Fabrizio -- Fabrizio Ferri Benedetti Departamento de Psicología Evolutiva y Educativa Facultad de Psicología Universidad de Valencia http://www.uv.es/fafebe From Fabrizio.Ferri at uv.es Mon Jan 29 22:26:25 2007 From: Fabrizio.Ferri at uv.es (Fabrizio Ferri Benedetti) Date: Mon, 29 Jan 2007 23:26:25 +0100 Subject: Sending a trigger during a stimulus' presentation In-Reply-To: <7.0.1.0.0.20070130073732.01bff008@une.edu.au> Message-ID: Hi Peter, > what are you sending triggers to? EEG unit? Yes. > if accuracy or no response is all the info you > want, why not just blend behavioural file with > EEG for sorting purposes. I'm not sure about what you mean by "blending"; of course, comparing an E-Prime output file with 500 stimuli with an equivalent EEG recording, can be quite a painful task if done manually. That's why I wanted to display the response in the EEG recording even during the inter stimulus interval. >e-prime executes code sequentially, so can't send triggers in the > middle of an object that is executing Bad news then :-( Thanks anyway, Fabrizio > > > > At 04:38 AM 30/01/2007, you wrote: > > >Hi! > > > >I'll try to make it simple: > > > >- In my procedure, an InLine BEFORE the stimulus > >send a start trigger via serial port using OnSet > >method; an InLine AFTER the stimulus send > >triggers accounting for accuracy or lack of > >response (as the subject's answer terminates the slide) > > > >-In the same procedure, there is also a > >fixed-time pause after the stimulus. It happens > >that the subject may answer during the pause, > >and not during the stimulus. Now, as the pause > >(an empty slide) can't be terminated by the > >subject's answer, every trigger I process with > >an InLine after the pause itself will always be sent after the pause. > > > >Is there any way to send triggers (or perform > >actions) if the subject answers during the > >presentation of a stimulus > >(slide/text/pause/etc)? That is: I don't want > >the answer to terminate the stimulus or pause; I > >just want the answer to perform scripted actions > >(like sending triggers) along the duration of the slide. > > > >Hope I made myself clear... > > > >Cheers, > > > >Fabrizio > > > >-- > >Fabrizio Ferri Benedetti > >Departamento de Psicología Evolutiva y Educativa > >Facultad de Psicología > >Universidad de Valencia > >http://www.uv.es/fafebe > > > > > > > > > > > > > >-- > >No virus found in this incoming message. > >Checked by AVG Free Edition. > >Version: 7.1.410 / Virus Database: 268.17.12/655 - Release Date: 28/01/2007 > > > > Peter Quain > School of Psychology > University of New England > Armidale, Australia, 2351 > Phone: 02 6773 5193 > Fax: 02 6773 3820 > > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.1.410 / Virus Database: 268.17.12/655 - Release Date: 28/01/2007 > > > > > -- Fabrizio Ferri Benedetti Departamento de Psicología Evolutiva y Educativa Facultad de Psicología Universidad de Valencia http://www.uv.es/fafebe From dhair at wfubmc.edu Mon Jan 29 22:37:07 2007 From: dhair at wfubmc.edu (David Hairston) Date: Mon, 29 Jan 2007 17:37:07 -0500 Subject: Sending a trigger during a stimulus' presentation Message-ID: It seems to me that if all you want is a trace of the response having happened, and are not concerned with other data on-line, then it might be easier to just bypass E-prime altogether. Look into the hardware for your response pad; most equipment has an additional line out. You could run this to an ADC line (surely you have one on the EEG recording unit). That channel will then tell when the subject responded. Just a thought. Dave -----Original Message----- From: eprime at mail.talkbank.org [mailto:eprime at mail.talkbank.org] On Behalf Of Fabrizio Ferri Benedetti Sent: Monday, January 29, 2007 5:26 PM To: eprime at mail.talkbank.org Cc: Peter Quain Subject: Re: Sending a trigger during a stimulus' presentation Hi Peter, > what are you sending triggers to? EEG unit? Yes. > if accuracy or no response is all the info you > want, why not just blend behavioural file with > EEG for sorting purposes. I'm not sure about what you mean by "blending"; of course, comparing an E-Prime output file with 500 stimuli with an equivalent EEG recording, can be quite a painful task if done manually. That's why I wanted to display the response in the EEG recording even during the inter stimulus interval. >e-prime executes code sequentially, so can't send triggers in the > middle of an object that is executing Bad news then :-( Thanks anyway, Fabrizio > > > > At 04:38 AM 30/01/2007, you wrote: > > >Hi! > > > >I'll try to make it simple: > > > >- In my procedure, an InLine BEFORE the stimulus > >send a start trigger via serial port using OnSet > >method; an InLine AFTER the stimulus send > >triggers accounting for accuracy or lack of > >response (as the subject's answer terminates the slide) > > > >-In the same procedure, there is also a > >fixed-time pause after the stimulus. It happens > >that the subject may answer during the pause, > >and not during the stimulus. Now, as the pause > >(an empty slide) can't be terminated by the > >subject's answer, every trigger I process with > >an InLine after the pause itself will always be sent after the pause. > > > >Is there any way to send triggers (or perform > >actions) if the subject answers during the > >presentation of a stimulus > >(slide/text/pause/etc)? That is: I don't want > >the answer to terminate the stimulus or pause; I > >just want the answer to perform scripted actions > >(like sending triggers) along the duration of the slide. > > > >Hope I made myself clear... > > > >Cheers, > > > >Fabrizio > > > >-- > >Fabrizio Ferri Benedetti > >Departamento de Psicología Evolutiva y Educativa > >Facultad de Psicología > >Universidad de Valencia > >http://www.uv.es/fafebe > > > > > > > > > > > > > >-- > >No virus found in this incoming message. > >Checked by AVG Free Edition. > >Version: 7.1.410 / Virus Database: 268.17.12/655 - Release Date: 28/01/2007 > > > > Peter Quain > School of Psychology > University of New England > Armidale, Australia, 2351 > Phone: 02 6773 5193 > Fax: 02 6773 3820 > > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.1.410 / Virus Database: 268.17.12/655 - Release Date: 28/01/2007 > > > > > -- Fabrizio Ferri Benedetti Departamento de Psicología Evolutiva y Educativa Facultad de Psicología Universidad de Valencia http://www.uv.es/fafebe From brobinso at mprc.umaryland.edu Tue Jan 30 14:30:10 2007 From: brobinso at mprc.umaryland.edu (Ben Robinson) Date: Tue, 30 Jan 2007 09:30:10 -0500 Subject: Sending a trigger during a stimulus' presentation Message-ID: yes. this can be done. we present our Stimulus ("TheStim") with a duration of 0 ms. assign the responses allowable, Time Limit = infinite, End Action = none. also, the background is Transparent, but i'm not certain this matters. immediately after TheStim we have this inline: *********************** WritePort &H378, 0 WritePort &H378, c.GetAttrib("EventCode") flag = 1 Do If TheStim.RT > 0 and flag = 1 then WritePort &H378, 0 WritePort &H378, TheStim.ACC + 8 timestamp = clock.read() flag = 2 c.SetAttrib"ReactTime", timestamp - TheStim.OnsetTime end if Loop until clock.read() > TheStim.OnsetTime + 190 ************************** the initial WritePort sends a zero to clear the line for the event code, which we pull from the list with the next WritePort command. we set up a flag so that the response code can only be sent one time, without any repeats. we use a Do Loop Until for the duration that we want TheStim to remain onscreen (in this case, approx 200 ms). within the Do Loop we continuously check TheStim's RT to find out when and if a response was made (RT > 0). if a response was made we immediately send the response code, set a timestamp for the response, and set the flag so that this sequence won't happen again during this trial. at the end of the Do Loop, whether or not a response has been given, we clear TheStim by presenting our fixation point, "Fixation," with an opaque background and a duration of 0 ms. following Fixation we have this inline: *************************** Dim flag2 as integer Dim Timestamp2 As long Dim duration as integer Timestamp2 = clock.read() duration = Random (900,1300) 'choose a random duration flag2 = 1 Do If TheStim.RT > 0 and flag2 = 1 and flag <> 2 then WritePort &H378, 0 WritePort &H378, TheStim.ACC + 8 timestamp = clock.read() flag2 = 2 c.SetAttrib"ReactTime", timestamp - TheStim.OnsetTime End If Loop until clock.read() > Timestamp2 + duration If c.GetAttrib("Target") = "y" Then TotalTarget = TotalTarget + 1 If TheStim.ACC = 1 Then ACC = ACC + 1 ACCTarget = ACCTarget + 1 End If Else If TheStim.ACC = 1 Then ACC = ACC + 1 End If End If Total = Total + 1 ************************* this inline is similar to the first inline i described. we set up another flag, so that only one response code can be sent. we jitter the duration of the fixation point between 900 and 1300 ms. we use another Do Loop Until to find the first response (we make sure neither flag has yet been tripped, either the current "flag2," or the previous "flag"). if we detect the first response we send a response code, record the time it happened, and keep looping until the Fixation duration elapses. the If, Else, End If part of the code helps keeps track of accuracy. hope that helps. ben robinson >>> Fabrizio Ferri Benedetti 1/29/2007 12:38 PM >>> Hi! I'll try to make it simple: - In my procedure, an InLine BEFORE the stimulus send a start trigger via serial port using OnSet method; an InLine AFTER the stimulus send triggers accounting for accuracy or lack of response (as the subject's answer terminates the slide) -In the same procedure, there is also a fixed-time pause after the stimulus. It happens that the subject may answer during the pause, and not during the stimulus. Now, as the pause (an empty slide) can't be terminated by the subject's answer, every trigger I process with an InLine after the pause itself will always be sent after the pause. Is there any way to send triggers (or perform actions) if the subject answers during the presentation of a stimulus (slide/text/pause/etc)? That is: I don't want the answer to terminate the stimulus or pause; I just want the answer to perform scripted actions (like sending triggers) along the duration of the slide. Hope I made myself clear... Cheers, Fabrizio -- Fabrizio Ferri Benedetti Departamento de Psicología Evolutiva y Educativa Facultad de Psicología Universidad de Valencia http://www.uv.es/fafebe From pauls_postbus at hotmail.com Mon Jan 1 22:48:24 2007 From: pauls_postbus at hotmail.com (Paul Gr) Date: Mon, 1 Jan 2007 23:48:24 +0100 Subject: Eprime Newbie-- need help with inspection time In-Reply-To: Message-ID: hello brian, Because the algorithm in the script works with ?frame counts? instead of absolute durations in milliseconds, you can use the test with any refresh rate. I only inserted the refresh rate warning at the start of the test to make sure our researchers always used the same display configuration of 100Hz. Just modify the values in the inline script to get rid of the warning. However, be aware that higher refresh rates give a better time resolution. Extremely high refresh rates will be overkill though! Also be aware of the fact that most flat screens have poor visual response (onset&offset) times. (I assume that you use flat screens because the refresh rate seems to be fixed to 60Hz.) This will also influence the times you measure. Most important: do not mix different display configurations in the same study. Your second question is a bit more difficult answer because I programmed the script quite a long time ago. However, I think you misinterpret the meaning of a ?reversal?. (see below.) The number of reversals is mainly used to decrease the step size from 4 to 1 during the test. This makes it possible to start the test with a relative large step size, and reduce it when then the subject performs well. In most cases the step size should become 1 ?way before? the experiment finishes. In other words: the staircase algorithm works like a damped oscillator, where the stimulus duration oscillates around an ?optimal? value. This optimal value can be regarded as the shortest stimulus duration at which the subject still gives correct responses. I think the readme file also explains it a bit (sorry for the fuzzy English). Let me include a fragment of the readme file that should be included with the script: Staircase algorithm used: The stimulus duration (i.e. the number of display frames on a CRT monitor) is increased or decreased with a specific number (=stepsize) according to response accuracy. On each wrong response the number of frames is increased with the current stepsize-value. However, the number of frames is only decreased with the ?stepsize?-value when a fixed number of consecutive correct responses are detected (currently set to 4.) The step size itself is also modified. The experiment starts with a relative large value and is slowly decreased to a minimal step size during the test. This is done by keeping a so called ?reversal? count. A reversal occurs when: a) the current frame-count is larger then the previous frame-count when a correct sequence of (4) responses are detected; or b) when the current frame-count is smaller then the previous frame-count when an incorrect response is detected. In other words: a reversal happens when sequence of increasing display durations is about to decrease, or vice versa. The number of reversals is used to determine the stepsize: initially the stepsize will be 4 (=40 milliseconds at 100Hz). After 2 reversals the stepsize is reduced to 2 and after 4 reversals it will reach its smallest possible value of 1. This step-size and frame-count adaptation will take care of a slowly optimizing display duration for a given subject. The test will automatically abort after 15 reversals or 96 trials, whichever comes first. The first 3 trials ware considered practice or warm-up trials and have predefined frame counts. hope this helps, paul groot vrije universiteit amsterdam >From: Bpesta22 at cs.com >To: eprime at mail.talkbank.org >Subject: Eprime Newbie-- need help with inspection time >Date: Wed, 27 Dec 2006 20:31:44 EST > >Help with inspection time. > >Greetings. > >I am interested in using the inspection time task uploaded onto the eprime >website by Paul Groot. I'm having two problems (and I am not at all versed >in >programming) that I was hoping someone here could help me with. > >1) The experiment is written for 100hz monitors. I only have access to >machines with 60hz monitors. As far as I can tell from the code, it seems >like >running in 60hz would be do-able, but I lack the expertise to know if the >experiment would still produce reliable data running at 60hz. > >2) There's a section of the code that I cannot grasp. Briefly, in the >inspection time task, two lines are presented, and the subject decides >which one is >longer. The lines remain on screen only for a short period of time. The >duration for the next trial changes whenever a "reversal" occurs. For >example, if the >subject gets 4 right at the current duration, a reversal occurs, and the >duration time is decreased (making the task more difficult) by a set amount >for >the next trial. Conversely, if the subject gets this trial wrong, a >reversal >also occurs, and now the duration time for the next trial is increased. > >The duration time for any trial is just the refresh interval of the monitor >(10 ms for 100 hz, or 16.67ms for 6 hz, as with my monitor) x the number of >frames. For example, the first trial has 10 frames, so the stimulus >remains >onscreen for 100ms (100hz) or 167ms (60hz). If the subject gets 4 right at >this >duration, the number of frames is "stepped down" by 4. So, the next trial >would >have 6 frames and the stimulus would last for 60ms. The step sizes decrease >in >later trials to hone in on the subjects true "inspection time". > >When I run myself as a subject, though, the data file seems off. Sometimes >when I do 4 right at a given duration, the number of reversals does not go >up by >one (even though the next trial presents the stimulus at a shorter >duration). >Other times, 4 right at a given duration does result in a reversal. > >The same is true with mistakes-- sometimes eprime will record the reversal, >and the duration for the next trial will increase; other times, the >reversal is >not recorded in eprime, even though the next trial does have an increased >duration. Here's the relevant (I think!) part of the code: > > if nOK>=REAVALUATE_CORRECT_COUNT then > ' decrease stim duration > nOK = 0 ' restart counting > if (nPrevFrameCount < nFrameCount) then nReversals = nReversals + >1 > nPrevFrameCount = nFrameCount > nFrameCount = nFrameCount - nStepSize > if nFrameCount<=0 then > nStepSize = nStepSize \ 2 > if nStepSize<1 then nStepSize=1 > nFrameCount = nStepSize > end if > >The fourth line makes no sense to me. I have 4 correct trials in a row, so >I >should get a reversal (the next trial should present the two lines at a >shorter duration). But how is it that the previous frame count could be >less than >the current frame count. Shouldn't it be the opposite (the previous frame >count >was higher-- the lines were displayed longer-- than the frame count for the >current trial). > >Sorry for the length of this post, perhaps I should stop here. If anyone >could help, I would sincerely appreciate it. > >Bryan > _________________________________________________________________ Geef jouw Hotmail kleur met Windows Live Mail! Stap nu over! http://imagine-windowslive.com/mail/launch/default.aspx?Locale=nl-nl From t.o.chr at web.de Mon Jan 8 01:47:01 2007 From: t.o.chr at web.de (Theodor Christow) Date: Mon, 8 Jan 2007 02:47:01 +0100 Subject: Cannot load sound file "a.wav" Message-ID: hello, in an experiment I?d like to use several sound files. When the experiment starts the following runtime error occures: cannot load sound file "a.wav" Data too large for buffer error number: 18005 This file has 188 KB, is it too big? How many KB are sound files allowed to have for use in eprime? Or may the problem be a different with a possibility to be solved? Many thanks in advance for some help on this problem! Theodor Christow From bianca.de-haan at klinikum.uni-tuebingen.de Wed Jan 10 15:10:38 2007 From: bianca.de-haan at klinikum.uni-tuebingen.de (B de Haan) Date: Wed, 10 Jan 2007 16:10:38 +0100 Subject: triggering TMS machine via serial port (com1) Message-ID: Hi all, I would like to trigger a TMS machine (Magstim SuperRapid) in E-prime via the serial port and somehow nothing I try works. Is there anyone out there who has successfully managed this? I have tried: 1) Similarly to the logic when triggering the LPT1 port, adding a bit of inline script after the stimulus: WritePort &H03F8, 255 WritePort &H03F8, 255 WritePort &H03F8, 255 WritePort &H03F8, 0 Adding the port as device never used to be necessary when I used the parallel port, but I tried it in all possible permutations of with/without adding a port device and with/without adding a serial device 2) I tried the solution mentioned in the post on http://listserv.linguistlist.org/cgi-bin/wa?A2=ind0609E &L=EPRIME&P=R2&I=-3 3) I tried using all the SerialWrite methods (Serial.WriteByte, Serial.WriteInteger, Serial.WriteLong, Serial.WriteString), although I must confess I was not always sure how to use these commands to set the serial port to HIGH. This again I tried with all possible permutations of with/without adding a port device and with/without adding a serial device. So, can anyone help me? I never had any problems with the Magstim Rapids, since they are triggered via the parallel port, but somehow I cannot manage to get a trigger through the serial port. Is there anyone out there using the new Magstim SuperRapids together with E-prime (or anyone else who might have an idea as to what I am doing wrong)? Any help would be greatly appreciated, Bianca de Haan -------------- next part -------------- An HTML attachment was scrubbed... URL: From Fabrizio.Ferri at uv.es Wed Jan 10 15:32:58 2007 From: Fabrizio.Ferri at uv.es (Fabrizio Ferri Benedetti) Date: Wed, 10 Jan 2007 16:32:58 +0100 Subject: triggering TMS machine via serial port (com1) In-Reply-To: <000001c734c9$8234fcd0$d87d0286@dehaan> Message-ID: Hi Bianca, I've never worked with a TMS machine; nevertheless, some ideas come to my mind: 1) Check whether you are using COM1 or not (E-Prime 1 can't use serial ports beyond COM4, and some PCs - especially laptops or brand new - already have all the ports used by other devices; check that under My PC -> Hardware -> Device Manager). 2) Some software only shows the triggers when the recording is up and running, and not while in idle mode. 3) Have you tried the DEBUG method to test the communication between the machines? 4) Just in case, try all the solutions with a simple E-Prime script, easily modifiable and runnable on another PC. My bet is that there's some I/O problem, perhaps related to wrong or busy port number, faulty cables or something similar. Cheers, Fabrizio B de Haan escribi?: > > Hi all, > > > > I would like to trigger a TMS machine (Magstim SuperRapid) in E-prime > via the serial port and somehow nothing I try works. Is there anyone > out there who has successfully managed this? > > > > I have tried: > > > > 1) Similarly to the logic when triggering the LPT1 port, adding a bit > of inline script after the stimulus: > > WritePort &H03F8, 255 > > WritePort &H03F8, 255 > > WritePort &H03F8, 255 > > WritePort &H03F8, 0 > > Adding the port as device never used to be necessary when I used the > parallel port, but I tried it in all possible permutations of > with/without adding a port device and with/without adding a serial device > > > > 2) I tried the solution mentioned in the post on > http://listserv.linguistlist.org/cgi-bin/wa?A2=ind0609E&L=EPRIME&P=R2&I=-3 > > > > > 3) I tried using all the SerialWrite methods (Serial.WriteByte, > Serial.WriteInteger, Serial.WriteLong, Serial.WriteString), although I > must confess I was not always sure how to use these commands to set > the serial port to HIGH. This again I tried with all possible > permutations of with/without adding a port device and with/without > adding a serial device. > > > > So, can anyone help me? I never had any problems with the Magstim > Rapids, since they are triggered via the parallel port, but somehow I > cannot manage to get a trigger through the serial port. Is there > anyone out there using the new Magstim SuperRapids together with > E-prime (or anyone else who might have an idea as to what I am doing > wrong)? > > > > Any help would be greatly appreciated, > > > > Bianca de Haan > -- Fabrizio Ferri Benedetti Departamento de Psicolog?a Evolutiva y Educativa Facultad de Psicolog?a Universidad de Valencia http://www.uv.es/fafebe From pauls_postbus at hotmail.com Wed Jan 10 15:59:29 2007 From: pauls_postbus at hotmail.com (Paul Gr) Date: Wed, 10 Jan 2007 16:59:29 +0100 Subject: triggering TMS machine via serial port (com1) In-Reply-To: <000001c734c9$8234fcd0$d87d0286@dehaan> Message-ID: Hi Bianca, Could you specify which pins of the COM port are used for triggering... This is very important because the LPT port functions very different compared to LPT ports. You could use any of the handshake output lines (like DTR and RTS), but then you would have to use a different port address instead (3FC). Address 3F8 is the register which is used for serial communication (Rx/Tx lines). This can be used, but only when you know what you are doing because transmission on the Tx line will be a serial bit pattern. The baudrate will determine the clock speed of this pattern. There is also another thing to realize before tying up COM ports to anything else: output voltages of COM port pins can be anywhere between -18 and +18 Volt. Not all hardware is designed to handle such voltages On the following web page the RTS and DTR output lines are used for a different purpose (power supply), but the information might help a bit: http://www.psy.vu.nl/download/menu/xml/eprime_howto_port_com.xml best, Paul >From: "B de Haan" >To: >Subject: triggering TMS machine via serial port (com1) >Date: Wed, 10 Jan 2007 16:10:38 +0100 > >Hi all, > > > >I would like to trigger a TMS machine (Magstim SuperRapid) in E-prime via >the serial port and somehow nothing I try works. Is there anyone out there >who has successfully managed this? > > > >I have tried: > > > >1) Similarly to the logic when triggering the LPT1 port, adding a bit of >inline script after the stimulus: > >WritePort &H03F8, 255 > >WritePort &H03F8, 255 > >WritePort &H03F8, 255 > >WritePort &H03F8, 0 > >Adding the port as device never used to be necessary when I used the >parallel port, but I tried it in all possible permutations of with/without >adding a port device and with/without adding a serial device > > > >2) I tried the solution mentioned in the post on >http://listserv.linguistlist.org/cgi-bin/wa?A2=ind0609E > >&L=EPRIME&P=R2&I=-3 > > > >3) I tried using all the SerialWrite methods (Serial.WriteByte, >Serial.WriteInteger, Serial.WriteLong, Serial.WriteString), although I must >confess I was not always sure how to use these commands to set the serial >port to HIGH. This again I tried with all possible permutations of >with/without adding a port device and with/without adding a serial device. > > > >So, can anyone help me? I never had any problems with the Magstim Rapids, >since they are triggered via the parallel port, but somehow I cannot manage >to get a trigger through the serial port. Is there anyone out there using >the new Magstim SuperRapids together with E-prime (or anyone else who might >have an idea as to what I am doing wrong)? > > > >Any help would be greatly appreciated, > > > >Bianca de Haan > _________________________________________________________________ Bekijk je berichten in 1 oogopslag met de indeling van Live Mail! http://imagine-windowslive.com/mail/launch/default.aspx?Locale=nl-nl From marilyne at psych.utoronto.ca Wed Jan 10 17:14:04 2007 From: marilyne at psych.utoronto.ca (Marilyne Ziegler) Date: Wed, 10 Jan 2007 12:14:04 -0500 Subject: triggering TMS machine via serial port (com1) Message-ID: WritePort &H378, 0 Sleep 5 WritePort &H378, 255 Sleep 5 WritePort &H378, 0 c.setattrib "startscanner", Clock.ReadMillisec We use this to start a MRI Scanner through the parallel port...seems to work... off on off...I guess. Marilyne ZieglerMarilyne Ziegler Research Officer Human Neuropsychology and Cognitive Sciences Lab Dept of Psychology University of Toronto 100 St. George St. Toronto, Ontario marilyne at psych.utoronto.ca 1-416-978-7029 ----- Original Message ----- From: B de Haan To: eprime at mail.talkbank.org Sent: Wednesday, January 10, 2007 10:10 AM Subject: triggering TMS machine via serial port (com1) Hi all, I would like to trigger a TMS machine (Magstim SuperRapid) in E-prime via the serial port and somehow nothing I try works. Is there anyone out there who has successfully managed this? I have tried: 1) Similarly to the logic when triggering the LPT1 port, adding a bit of inline script after the stimulus: WritePort &H03F8, 255 WritePort &H03F8, 255 WritePort &H03F8, 255 WritePort &H03F8, 0 Adding the port as device never used to be necessary when I used the parallel port, but I tried it in all possible permutations of with/without adding a port device and with/without adding a serial device 2) I tried the solution mentioned in the post on http://listserv.linguistlist.org/cgi-bin/wa?A2=ind0609E&L=EPRIME&P=R2&I=-3 3) I tried using all the SerialWrite methods (Serial.WriteByte, Serial.WriteInteger, Serial.WriteLong, Serial.WriteString), although I must confess I was not always sure how to use these commands to set the serial port to HIGH. This again I tried with all possible permutations of with/without adding a port device and with/without adding a serial device. So, can anyone help me? I never had any problems with the Magstim Rapids, since they are triggered via the parallel port, but somehow I cannot manage to get a trigger through the serial port. Is there anyone out there using the new Magstim SuperRapids together with E-prime (or anyone else who might have an idea as to what I am doing wrong)? Any help would be greatly appreciated, Bianca de Haan -------------- next part -------------- An HTML attachment was scrubbed... URL: From eddie at ling.ed.ac.uk Thu Jan 11 15:29:34 2007 From: eddie at ling.ed.ac.uk (Eddie Dubourg) Date: Thu, 11 Jan 2007 15:29:34 -0000 Subject: Experiment time limit, with warning... Message-ID: I'm writing an experiment that needs a specific duration of 20 minutes. Now, I know it's trivial to put a duration on the list that calls the experimental block (and I wish I could do this), but the researcher I'm working with needs to warn the subjects at 19 mins that the time is nearly up, and at 20 mins, the experiment needs to terminate. I've looked at the RTTime help files, and am working on a variants of :- if RteRunnableInputObject.RTTime >= 1140000 : <= 1200000 then goto LABEL1 else if RteRunnableInputObject.RTTime >= 1200000 then goto LABEL2 end if Am I approaching this from the right angle? Many thanks Eddie Dubourg From brobinso at mprc.umaryland.edu Thu Jan 11 15:50:03 2007 From: brobinso at mprc.umaryland.edu (Ben Robinson) Date: Thu, 11 Jan 2007 10:50:03 -0500 Subject: Experiment time limit, with warning... Message-ID: that looks like the right angle to me. all except for the use of the colon (">= 1140000 : <= 1200000"). i can't swear to it, but i don't think that syntax will work with eprime. i would recommend, instead, something like 'place the Dim statement in your User Script Dim warnThemOnlyOnce as Integer 'place this If Then wherever it belongs If RteRunnableInputObject.RTTime >= 1140000 And warnThemOnlyOnce = 0 Then warnThemOnlyOnce = 1 goto Label1 ElseIf RteRunnableInputObject.RTTime >= 1200000 Then goto Label2 End If >>> "Eddie Dubourg" 1/11/2007 10:29 AM >>> I'm writing an experiment that needs a specific duration of 20 minutes. Now, I know it's trivial to put a duration on the list that calls the experimental block (and I wish I could do this), but the researcher I'm working with needs to warn the subjects at 19 mins that the time is nearly up, and at 20 mins, the experiment needs to terminate. I've looked at the RTTime help files, and am working on a variants of :- if RteRunnableInputObject.RTTime >= 1140000 : <= 1200000 then goto LABEL1 else if RteRunnableInputObject.RTTime >= 1200000 then goto LABEL2 end if Am I approaching this from the right angle? Many thanks Eddie Dubourg From mooreks at umich.edu Wed Jan 17 19:28:13 2007 From: mooreks at umich.edu (Katherine Sledge Moore) Date: Wed, 17 Jan 2007 14:28:13 -0500 Subject: arrays of arrays? Message-ID: Is it possible in E-basic to make an array of arrays? So let's say you had the following: Dim array1(2) as Integer Dim array2(2) as Integer Dim array3(2) as Integer Array1(0) = 0 Array1(1) = 1 Array1(2) = 2 Array2(0) = 3 Array2(1) = 4 Array2(2) = 5 Array3(0) = 6 Array3(1) = 7 Array3(2) = 8 Can you then say: Dim allarray(2) as array Allarray(0) = array1 Allarray(1) = array2 Allarray(2) = array3 If I wanted to get to the 0th item in the 2nd array could I then say: x = allarray(2(0))? Is there some other way of doing it? From martin.buschkuehl at psy.unibe.ch Wed Jan 17 20:21:46 2007 From: martin.buschkuehl at psy.unibe.ch (=?ISO-8859-1?Q?Martin_Buschk=FChl?=) Date: Wed, 17 Jan 2007 21:21:46 +0100 Subject: arrays of arrays? In-Reply-To: <016a01c73a6d$a1b023b0$6601a8c0@psycjjonides14> Message-ID: Hi, maybe you can solve your problem with the use of multi-dimensional arrays. You have to declare such an array as follows: dim array(3,3) In this case, a variable (i.e. a two dimensional array) containing a 4 x 4 matrix (with a base index of 0) is declared. You are then able to access each item in this matrix by defining its coordinates with the two numbers in the brackets. You can find further information about multi-dimensional arrays on this website: http://en.wikipedia.org/wiki/Array#Multi-dimensional_arrays Note, that the function "randomizearray" does not work with multi-dimensional arrays. Best, Martin. Katherine Sledge Moore schrieb: > Is it possible in E-basic to make an array of arrays? > > So let's say you had the following: > Dim array1(2) as Integer > Dim array2(2) as Integer > Dim array3(2) as Integer > > Array1(0) = 0 > Array1(1) = 1 > Array1(2) = 2 > > Array2(0) = 3 > Array2(1) = 4 > Array2(2) = 5 > > Array3(0) = 6 > Array3(1) = 7 > Array3(2) = 8 > > > Can you then say: > > Dim allarray(2) as array > > Allarray(0) = array1 > Allarray(1) = array2 > Allarray(2) = array3 > > If I wanted to get to the 0th item in the 2nd array could I then say: > x = allarray(2(0))? Is there some other way of doing it? > > > > -- lic. phil. Martin Buschk?hl University of Bern Department of Psychology Division of Experimental Psychology and Neuropsychology Muesmattstrasse 45 3012 Bern Switzerland phone +41 (0)31 631 47 34 fax +41 (0)31 631 82 12 http://www.apn.psy.unibe.ch From pauls_postbus at hotmail.com Sat Jan 20 10:00:15 2007 From: pauls_postbus at hotmail.com (Paul Gr) Date: Sat, 20 Jan 2007 11:00:15 +0100 Subject: Repetitive Sound Presentation and Trigger Issues Message-ID: Hello Pamela, I currently don?t have enough time for a proper analysis of your code and setup, but there are few things to think about: 1) Try to preload the sound files into different Sound objects at the start of the experiment. This will prevent unpredictable delays caused by loading the audio files during a trial. Preloading should be possible by adding properly configured SoundOut objects to the ?unreferenced E-Objects? section. This should be done for each sound. You can simple start such sound objects by calling the Play or Run methods. 2) Note that some soundcards have problems playing very short tracks. This problem seems to be related with the internal buffering mechanism of the sound card (or the DirectX drivers.) In our lab we once had a situation where sometimes the tail of track A was replayed at the start of track B. We solved this issue by adding some silence at the start and end of each WAV-file. Another option is to create a single WAV-file which contains all the audio you would like to play. (We even developed a small library for this which can be used by EPrime to generate WAV-files at runtime by adding existing WAV files into one large audio stream.) 3) Because it is not always easy to check the exact onsets of the sound stimuli, it is sometimes desirable to be able to record the sound output itself along with the EEG. The easiest way would be to record the attenuated audio signal itself on a bipolar input. However, because galvanic connection of external equipment with the EEG amplifier is not allowed, you will require special isolation electronics to be able to do this safely. Another option would be some dedicated electronics that translates the audio signal into a digital trigger pulse, which can be recorded on the trigger input. In some cases this will eliminate the need of creating the digital triggers in EPrime. hope this helps. best, Paul Groot VU University Amsterdam Date: Thu, 18 Jan 2007 09:20:50 -0600From: pamela.n.carton at gmail.comTo: eprime at mail.talkbank.orgSubject: Repetitive Sound Presentation and Trigger IssuesHello-We are currently doing a study in which we will present pictures followed by a fixation point. During the pictures and the fixation points, we want to present clicks spaced at 100 ms repetitively. Also, we want to implement a startle probe that will play once randomly throughout the image presentation. Similarly, we want the clicks to resume after the startle probe presentation. Finally, a fixation point should appear when the image presentation is completed. During the fixation point, the clicks should simultaneously be presented. This will be done for 48 pictures.To clarify, the program should look as follows:-picture presentation with simultaneous 100 ms clicks-random startle probe once during the picture presentation-resume 100 ms clicks for the remainder of the picture presentation-present a fixation point on the screen with simultaneous 100 ms click presentation-repeatSeveral items to note before reading on:-We are using a NeuroScan SynAmps 2-The way we have our study designed on E-Prime, we are using slide objects with different active states. Specifically, we have inline coding initializing the Stimulus slide object. The Stimulus slide object has two active states: an image state that presents the image and a sound out (on the state) for the clicks, and a fixation state that presents the fixation point and another sound out (on the state as well) for the startle probe. We also have some more inline code to switch the Stimulus states following that slide object, and that is then followed by another slide object with two different active states. The first of those states is a fixation point with a sound out on it that plays the clicks. The second state of that object does not display any images, but it is supposed to present the startle probe.Now that the general set up of our program is out of the way, here's the trouble we are having:Firstly, when we try to get the clicks to play while we have WritePorts and triggers in the inline code, we are able to see triggers properly executed, but we cannot get the clicks to play in the correct, repetitive 100 ms manner. Specifically, it will sound as though the clicks are spaced out inconsistently and unevenly. This does not seem to have an effect on the startle probe, however, which is presented as it should be. When we expect to hear the clicks again post-startle probe presentation (but before the fixation point and clicks presentation), we get one or two unevenly spaced out clicks. Then, at the fixation point, the 100 ms clicks resume at a faster pace than how they should be presented. The pictures and the fixation points are displayed correctly during this set up, thank goodness.Here's some of the code we have tried using in our SwitchStimStates: ' Switches ActiveState to Startle, then waits until' startle is scheduled to playWhile StimDur < Cdbl(c.GetAttrib("StimStartleOffset"))*1000StimDur = Clock.ReadMicrosec - ClockReadClickTrig = StimDur\(ClickBin*1000)Writeport Triggerport, c.getattrib("StimTrigger") + ClickTrig + 1Stim.playSleep SleepDurLoopDur = 0ClockRead2 = Clock.ReadMicrosec'Click TriggerWhile LoopDur < ClickDur*500LoopDur = Clock.ReadMicrosec - ClockRead2WendWritePort TriggerPort, HoldValueSleep SleepDurWhile LoopDur < ClickDur*1000LoopDur = Clock.ReadMicrosec - ClockRead2WendWend'Set sound volume for startle probe and play itIf CInt(c.GetAttrib("StimStartleOffset")) <> 0 ThentheSound.Buffers(1).Volume = 0theSound.Buffers(1).filename = "E:\\Experiment Stimuli\\Startles\\startle_44100.wav"theSound.Buffers(1).loadStim.play'Trigger Startle ProbeWriteport Triggerport, c.getattrib("StimStartleTrigger")Sleep SleepDurWritePort TriggerPort, HoldValueSleep c.getattrib("StartleDuration") - SleepDur End If'Set sound volume back to baselinetheSound.Buffers(1).Volume = CInt(c.GetAttrib("SoundVolume"))theSound.Buffers(1).filename = "E:\\Experiment Stimuli\\Startles\\click_44100_100ms.wav"theSound.Buffers(1).load' Waits until stimulus is finishedWhile StimDur < CDbl(c.GetAttrib("StimDuration"))*1000 - ClickDur*1000StimDur = Clock.ReadMicrosec - ClockReadStim.playLoopDur = 0ClockRead2 = Clock.ReadMicrosec'Click TriggerClickTrig = StimDur\(ClickBin*1000)Writeport Triggerport, c.getattrib("StimTrigger") + ClickTrig + 1Sleep SleepDurWritePort TriggerPort, HoldValueSleep SleepDur 'Wait remainder of ClickDurWhile LoopDur < ClickDur*1000 LoopDur = Clock.ReadMicrosec - ClockRead2WendWendWe then tried to comment out the the Click Trigger section of code - thus, we were hoping that the program would present the sound stimuli properly when we eliminated certain triggers. Indeed, the clicks prior to the startle probe were presented as we hoped and the startle probe itself was presented as we would expect. In addition, the clicks during the fixation point were presented properly. The images were also presented correctly, the same as before. However, we face two problems in the set up of the program this way: 1) There were no triggers, obviously, and we need to find a way to get this program running correctly, both in sound presentation and in triggers, 2) We do NOT get the clicks presented at all after the startle probe. That is to say, we do get clicks presented properly during the fixation point and prior to the startle probe, just not immediately after the startle probe.We have tried to remedy these problems in several ways. We ensured that in our code, we use double back slashes in listing the directories for the sound files ? we know that E-Prime often has trouble interpreting where to find the sounds from a specific drive without the double back slashes. Also, we had upgraded E-Prime from version 1.1.4.1 to version 1.2. This did not seem to make difference at all in either way we attempted the program. In addition, we have tried using E-Prime Beta versions 2.0.1.52 and 2.0.1.57 to no avail. Finally, we tried recreating this program without images. Instead, we have tried to use the clicks and startle probe with Sound Out objects instead of on slide objects. More specifically, we created a PreStim slide object with a fixation point. This was followed by a Sound Out object that presents the 100 ms clicks. After that code, we added another Sound Out object with the startle probe sound. Finally, we added the PostStim slide object with two different active states. The first of those states is a fixation point with a sound out on it that plays the clicks. The second state of that object does not display any images, but it is supposed to present the startle probe.When we attempted this basic set up, it failed to perform as we hoped. The clicks and startles were presented, but the spacing of the clicks was not 100 ms ? they were spaced unevenly and in random chunks.So, again, we cannot get our program to successfully do the following:-play clicks at 100 ms intervals repetitively-simultaneously get the triggers working-get the clicks to play post-startle probe (but before the fixation point with clicks)If you have any suggestions as to how we might resolve these issues, which seem to be of a fundamental nature for E-Prime, please do not hesitate in responding.Thanks for reading this post. If you are confused or would like more clarification as to what we are trying to do in this program, I'll be happy to answer any questions.-Pam Carton ------------------------------------------Pamela N. Carton, Research AnalystVanderbilt University 301 Wilson Hall111 21st Ave SouthNashville, TN 37203office: (615) 343-5452cell: (914) 522-3905 _________________________________________________________________ Probeer Live.com: je eigen persoonlijke opstartpagina met alleen de dingen die jij belangrijk vindt op ??n plek. http://www.live.com/getstarted -------------- next part -------------- An HTML attachment was scrubbed... URL: From wells at mail.utexas.edu Sat Jan 20 19:00:52 2007 From: wells at mail.utexas.edu (wells at mail.utexas.edu) Date: Sat, 20 Jan 2007 13:00:52 -0600 Subject: .wav filename invalid Message-ID: If someone could help me with this I would certainly appreciate it... It seems that no matter what I do I cannot get eprime to play a certain .wav file. Everytime it gives me an error that "filename is invalid". I've made sure that the file is in the correct folder and the file I've listed in the sound out object exactly matches the one in the folder. I'm probably just overlooking something very simple, but any assistance would be appreciated. Thanks! - Tony -- Tony T. Wells, M.A. Mood Disorders Laboratory Department of Psychology University of Texas at Austin 1 University Station A8000 Austin, Texas 78712-0187 Lab Phone: 512.475.6817 From seif1301 at uni-trier.de Sat Jan 20 19:49:51 2007 From: seif1301 at uni-trier.de (Jan Seifert) Date: Sat, 20 Jan 2007 20:49:51 +0100 Subject: .wav filename invalid In-Reply-To: <1169319652.45b266e415865@webmailapp3.cc.utexas.edu> Message-ID: Hello Tony, E-Prime plays other sound files without complaining, I guess? Maybe it would be helpful to find out what is wrong if you told us the name of the file. Regards, Jan wells at mail.utexas.edu schrieb: > If someone could help me with this I would certainly appreciate it... > > It seems that no matter what I do I cannot get eprime to play a certain .wav > file. Everytime it gives me an error that "filename is invalid". I've made > sure that the file is in the correct folder and the file I've listed in the > sound out object exactly matches the one in the folder. I'm probably just > overlooking something very simple, but any assistance would be appreciated. > Thanks! > > - Tony From dhair at wfubmc.edu Mon Jan 22 21:44:31 2007 From: dhair at wfubmc.edu (David Hairston) Date: Mon, 22 Jan 2007 16:44:31 -0500 Subject: Information/property access to slide sub-objects Message-ID: I have a case where I'd like to have multiple events occurring within a slide object, both visual (.bmp) and auditory (.wav). In the most simple case, a .wav file is started playing while a .bmp is drawn. The two have differing durations, however, so that the experiment moves on to the next object while the sound is still going. Now in the data logging of a slide, it appears to report only the properties of the slide object as a whole, which in reality seem to reflect those of the graphical component. In particular, aside from needing actual timing info for the on/offset of the sound file, I need to be able to utilize the OnsetSignal and OffsetSignal properties for this component as well, separately from the on/offset of the screen drawing. However, the "object" for this sound is a sub-object of the general Slide object. Is there any way to get access to this information, or set the properties of the sub-objects? Thanks Dave W. David Hairston, Ph.D. ANSIR Lab Dept of Radiology Wake Forest University School of Medicine Medical Center Blvd Winston-Salem NC 27157 (336) 716-7160 (Offiice) (336) 716 0798 (Fax) -------------- next part -------------- An HTML attachment was scrubbed... URL: From Beamgau at gmx.de Tue Jan 23 10:07:06 2007 From: Beamgau at gmx.de (Felix Fischer) Date: Tue, 23 Jan 2007 11:07:06 +0100 Subject: canvas as background? Message-ID: hi everybody, i got a canvas, which i want to use as background. there a several coloured circles on it. now i want to have something like a foreground... i want to draw something on it, clear the foreground, draw and clear in a loop. the background should not be affected by this "loop". i tried to simply use one canvas for background, one for foreground, but this didn't work out... can someone tell me how to achieve this? thanks a lot felix fischer tu berlin -- "Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ... Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail From pauls_postbus at hotmail.com Tue Jan 23 15:58:36 2007 From: pauls_postbus at hotmail.com (Paul Gr) Date: Tue, 23 Jan 2007 16:58:36 +0100 Subject: canvas as background? Message-ID: hello felix, there are several way's to do this, but the easiest is probably the following: - use two offscreen canvas objects: 'background' and 'scratch' - prepare the background as you already did then, inside the loop: - copy 'background' to 'scratch' - draw something on top of scratch - wait for vertical retrace (WaitForVerticalBlank) - copy scratch to screenIf the background image can be created efficiently (i.e. just a few lines or circles), then it is probalby more efficient to forget the background object and erase and redraw the complete scratch image straight away inside the loop... best, Paul Paul Groot Vrije Universiteit Amsterdam > Date: Tue, 23 Jan 2007 11:07:06 +0100> From: Beamgau at gmx.de> Subject: canvas as background?> To: EPRIME at MAIL.TALKBANK.ORG> > hi everybody,> > i got a canvas, which i want to use as background. there a several coloured circles on it.> > now i want to have something like a foreground... i want to draw something on it, clear the foreground, draw and clear in a loop.> > the background should not be affected by this "loop". i tried to simply use one canvas for background, one for foreground, but this didn't work out...> > can someone tell me how to achieve this? > > thanks a lot> felix fischer> tu berlin> -- > "Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...> Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail> _________________________________________________________________ Leef je uit: ontwerp je startpagina precies zoals jij het wil hebben op Live.nl. http://www.live.com/getstarted -------------- next part -------------- An HTML attachment was scrubbed... URL: From Stephane.DeBrito at iop.kcl.ac.uk Tue Jan 23 19:58:34 2007 From: Stephane.DeBrito at iop.kcl.ac.uk (De Brito, Stephane) Date: Tue, 23 Jan 2007 19:58:34 -0000 Subject: Object alternation task Message-ID: Dear E-prime experts, I would like to program an object alternation task, which is a bit similar to the spatial alternation task I mentioned a few weeks ago on the e-prime list. Task description: The participant sees 2 objects (always a red tomato and a blue chair) and has to figure out which one is baited with a ?20 note. The participant task is to learn that the object behind which the ?20 note is located is being alternated after each correct response. After each correct response, a ?20 note appears on the screen. Basically, I would like to design the task so that the subject can click on the object behind which he thinks the ?20 note is hidden. My questions are: 1) Is there a way to display the same two objects but in different locations on the screen across trials? The objects should change locations on the screen in a random way. 2) I believe it is possible to use the mousse as an input device using the SlideState.HitTest method, but don't really know how to use it. Any suggestions would be much appreciated. Many thanks! Stephane ------------------------------------------ Stephane De Brito, PhD student Institute of Psychiatry King's College London Forensic Mental Health Science Department Box P023 De Crespigny Park Denmark Hill London SE5 8AF United Kingdom Tel: + 44 (0) 20 7848 0711 Fax: + 44 (0) 20 7848 0754 website: www.iop.kcl.ac.uk -------------- next part -------------- An HTML attachment was scrubbed... URL: From tlorat at psychology.ou.edu Wed Jan 24 17:04:57 2007 From: tlorat at psychology.ou.edu (Tim Lorat) Date: Wed, 24 Jan 2007 11:04:57 -0600 Subject: Alternating two pictures Message-ID: Hello, I am trying to program a change blindness experiment, with two pictures alternating, each displayed for a certain amount of time (e.g. 500ms), and a blank period in between those two pictures (of e.g. 200ms). The stimuli should alternate until the participant responds. As I am fairly new to E-Prime I am not sure how to do this and would be thankful for any help. Thanks, Tim -------------- next part -------------- An HTML attachment was scrubbed... URL: From helen.tibboel at ugent.be Thu Jan 25 07:19:59 2007 From: helen.tibboel at ugent.be (Helen Tibboel) Date: Thu, 25 Jan 2007 08:19:59 +0100 Subject: E-prime: using AZERTY-keyboards? Message-ID: L. S., I am currently trying to program an experiment using an AZERTY-keyboard. The hardware-settings for the keyboard are correct (typing script works fine). However, when I try to run the experiment, responses are logged as if I'm using a QWERTY-keyboard (so when I respond with "q", the data-file will show an "a" etc.). Is there any way to solve this problem? Thank you and kind regards, Helen Tibboel -- ********************************************************** Helen Tibboel Ghent University Department of Experimental-Clinical and Health Psychology Henri Dunantlaan 2, B-9000 Ghent, Belgium Tel: + 32 (0)9 264 63 97 Email: helen.tibboel at ugent.be Department site: http://allserv.ugent.be/~ydesmet/ ********************************************************** From sonia_pritchard at rogers.com Thu Jan 25 16:37:48 2007 From: sonia_pritchard at rogers.com (Sonia Pritchard) Date: Thu, 25 Jan 2007 11:37:48 -0500 Subject: Random ordering of trials within a block Message-ID: Dear E-Prime Users, In the Users Guide, Appendix B, page A-29, it is noted that the Gamblers Fallacy due to randomization can be avoided by setting the maximum of the number of repetitions of a single trial. However, there is no mention of how to achieve this. Perhaps there is some reference to this solution elsewhere in the manual, but I could not find it. I would be grateful to receive some advice on this issue. Regards, Sonia ------------------------------------------------------- Sonia Pritchard Psycholinguistics Lab University of Ottawa 70, Laurier Ave East Ottawa, ON, Canada K1N 6N5 Office: Arts 410 Phone #: (613) 562-5800, ext. 1772 Email: sprit001 at uottawa.ca sonia_pritchard at rogers.com From Fabrizio.Ferri at uv.es Mon Jan 29 17:38:26 2007 From: Fabrizio.Ferri at uv.es (Fabrizio Ferri Benedetti) Date: Mon, 29 Jan 2007 18:38:26 +0100 Subject: Sending a trigger during a stimulus' presentation Message-ID: Hi! I'll try to make it simple: - In my procedure, an InLine BEFORE the stimulus send a start trigger via serial port using OnSet method; an InLine AFTER the stimulus send triggers accounting for accuracy or lack of response (as the subject's answer terminates the slide) -In the same procedure, there is also a fixed-time pause after the stimulus. It happens that the subject may answer during the pause, and not during the stimulus. Now, as the pause (an empty slide) can't be terminated by the subject's answer, every trigger I process with an InLine after the pause itself will always be sent after the pause. Is there any way to send triggers (or perform actions) if the subject answers during the presentation of a stimulus (slide/text/pause/etc)? That is: I don't want the answer to terminate the stimulus or pause; I just want the answer to perform scripted actions (like sending triggers) along the duration of the slide. Hope I made myself clear... Cheers, Fabrizio -- Fabrizio Ferri Benedetti Departamento de Psicolog?a Evolutiva y Educativa Facultad de Psicolog?a Universidad de Valencia http://www.uv.es/fafebe From Fabrizio.Ferri at uv.es Mon Jan 29 22:26:25 2007 From: Fabrizio.Ferri at uv.es (Fabrizio Ferri Benedetti) Date: Mon, 29 Jan 2007 23:26:25 +0100 Subject: Sending a trigger during a stimulus' presentation In-Reply-To: <7.0.1.0.0.20070130073732.01bff008@une.edu.au> Message-ID: Hi Peter, > what are you sending triggers to? EEG unit? Yes. > if accuracy or no response is all the info you > want, why not just blend behavioural file with > EEG for sorting purposes. I'm not sure about what you mean by "blending"; of course, comparing an E-Prime output file with 500 stimuli with an equivalent EEG recording, can be quite a painful task if done manually. That's why I wanted to display the response in the EEG recording even during the inter stimulus interval. >e-prime executes code sequentially, so can't send triggers in the > middle of an object that is executing Bad news then :-( Thanks anyway, Fabrizio > > > > At 04:38 AM 30/01/2007, you wrote: > > >Hi! > > > >I'll try to make it simple: > > > >- In my procedure, an InLine BEFORE the stimulus > >send a start trigger via serial port using OnSet > >method; an InLine AFTER the stimulus send > >triggers accounting for accuracy or lack of > >response (as the subject's answer terminates the slide) > > > >-In the same procedure, there is also a > >fixed-time pause after the stimulus. It happens > >that the subject may answer during the pause, > >and not during the stimulus. Now, as the pause > >(an empty slide) can't be terminated by the > >subject's answer, every trigger I process with > >an InLine after the pause itself will always be sent after the pause. > > > >Is there any way to send triggers (or perform > >actions) if the subject answers during the > >presentation of a stimulus > >(slide/text/pause/etc)? That is: I don't want > >the answer to terminate the stimulus or pause; I > >just want the answer to perform scripted actions > >(like sending triggers) along the duration of the slide. > > > >Hope I made myself clear... > > > >Cheers, > > > >Fabrizio > > > >-- > >Fabrizio Ferri Benedetti > >Departamento de Psicolog?a Evolutiva y Educativa > >Facultad de Psicolog?a > >Universidad de Valencia > >http://www.uv.es/fafebe > > > > > > > > > > > > > >-- > >No virus found in this incoming message. > >Checked by AVG Free Edition. > >Version: 7.1.410 / Virus Database: 268.17.12/655 - Release Date: 28/01/2007 > > > > Peter Quain > School of Psychology > University of New England > Armidale, Australia, 2351 > Phone: 02 6773 5193 > Fax: 02 6773 3820 > > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.1.410 / Virus Database: 268.17.12/655 - Release Date: 28/01/2007 > > > > > -- Fabrizio Ferri Benedetti Departamento de Psicolog?a Evolutiva y Educativa Facultad de Psicolog?a Universidad de Valencia http://www.uv.es/fafebe From dhair at wfubmc.edu Mon Jan 29 22:37:07 2007 From: dhair at wfubmc.edu (David Hairston) Date: Mon, 29 Jan 2007 17:37:07 -0500 Subject: Sending a trigger during a stimulus' presentation Message-ID: It seems to me that if all you want is a trace of the response having happened, and are not concerned with other data on-line, then it might be easier to just bypass E-prime altogether. Look into the hardware for your response pad; most equipment has an additional line out. You could run this to an ADC line (surely you have one on the EEG recording unit). That channel will then tell when the subject responded. Just a thought. Dave -----Original Message----- From: eprime at mail.talkbank.org [mailto:eprime at mail.talkbank.org] On Behalf Of Fabrizio Ferri Benedetti Sent: Monday, January 29, 2007 5:26 PM To: eprime at mail.talkbank.org Cc: Peter Quain Subject: Re: Sending a trigger during a stimulus' presentation Hi Peter, > what are you sending triggers to? EEG unit? Yes. > if accuracy or no response is all the info you > want, why not just blend behavioural file with > EEG for sorting purposes. I'm not sure about what you mean by "blending"; of course, comparing an E-Prime output file with 500 stimuli with an equivalent EEG recording, can be quite a painful task if done manually. That's why I wanted to display the response in the EEG recording even during the inter stimulus interval. >e-prime executes code sequentially, so can't send triggers in the > middle of an object that is executing Bad news then :-( Thanks anyway, Fabrizio > > > > At 04:38 AM 30/01/2007, you wrote: > > >Hi! > > > >I'll try to make it simple: > > > >- In my procedure, an InLine BEFORE the stimulus > >send a start trigger via serial port using OnSet > >method; an InLine AFTER the stimulus send > >triggers accounting for accuracy or lack of > >response (as the subject's answer terminates the slide) > > > >-In the same procedure, there is also a > >fixed-time pause after the stimulus. It happens > >that the subject may answer during the pause, > >and not during the stimulus. Now, as the pause > >(an empty slide) can't be terminated by the > >subject's answer, every trigger I process with > >an InLine after the pause itself will always be sent after the pause. > > > >Is there any way to send triggers (or perform > >actions) if the subject answers during the > >presentation of a stimulus > >(slide/text/pause/etc)? That is: I don't want > >the answer to terminate the stimulus or pause; I > >just want the answer to perform scripted actions > >(like sending triggers) along the duration of the slide. > > > >Hope I made myself clear... > > > >Cheers, > > > >Fabrizio > > > >-- > >Fabrizio Ferri Benedetti > >Departamento de Psicolog?a Evolutiva y Educativa > >Facultad de Psicolog?a > >Universidad de Valencia > >http://www.uv.es/fafebe > > > > > > > > > > > > > >-- > >No virus found in this incoming message. > >Checked by AVG Free Edition. > >Version: 7.1.410 / Virus Database: 268.17.12/655 - Release Date: 28/01/2007 > > > > Peter Quain > School of Psychology > University of New England > Armidale, Australia, 2351 > Phone: 02 6773 5193 > Fax: 02 6773 3820 > > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.1.410 / Virus Database: 268.17.12/655 - Release Date: 28/01/2007 > > > > > -- Fabrizio Ferri Benedetti Departamento de Psicolog?a Evolutiva y Educativa Facultad de Psicolog?a Universidad de Valencia http://www.uv.es/fafebe From brobinso at mprc.umaryland.edu Tue Jan 30 14:30:10 2007 From: brobinso at mprc.umaryland.edu (Ben Robinson) Date: Tue, 30 Jan 2007 09:30:10 -0500 Subject: Sending a trigger during a stimulus' presentation Message-ID: yes. this can be done. we present our Stimulus ("TheStim") with a duration of 0 ms. assign the responses allowable, Time Limit = infinite, End Action = none. also, the background is Transparent, but i'm not certain this matters. immediately after TheStim we have this inline: *********************** WritePort &H378, 0 WritePort &H378, c.GetAttrib("EventCode") flag = 1 Do If TheStim.RT > 0 and flag = 1 then WritePort &H378, 0 WritePort &H378, TheStim.ACC + 8 timestamp = clock.read() flag = 2 c.SetAttrib"ReactTime", timestamp - TheStim.OnsetTime end if Loop until clock.read() > TheStim.OnsetTime + 190 ************************** the initial WritePort sends a zero to clear the line for the event code, which we pull from the list with the next WritePort command. we set up a flag so that the response code can only be sent one time, without any repeats. we use a Do Loop Until for the duration that we want TheStim to remain onscreen (in this case, approx 200 ms). within the Do Loop we continuously check TheStim's RT to find out when and if a response was made (RT > 0). if a response was made we immediately send the response code, set a timestamp for the response, and set the flag so that this sequence won't happen again during this trial. at the end of the Do Loop, whether or not a response has been given, we clear TheStim by presenting our fixation point, "Fixation," with an opaque background and a duration of 0 ms. following Fixation we have this inline: *************************** Dim flag2 as integer Dim Timestamp2 As long Dim duration as integer Timestamp2 = clock.read() duration = Random (900,1300) 'choose a random duration flag2 = 1 Do If TheStim.RT > 0 and flag2 = 1 and flag <> 2 then WritePort &H378, 0 WritePort &H378, TheStim.ACC + 8 timestamp = clock.read() flag2 = 2 c.SetAttrib"ReactTime", timestamp - TheStim.OnsetTime End If Loop until clock.read() > Timestamp2 + duration If c.GetAttrib("Target") = "y" Then TotalTarget = TotalTarget + 1 If TheStim.ACC = 1 Then ACC = ACC + 1 ACCTarget = ACCTarget + 1 End If Else If TheStim.ACC = 1 Then ACC = ACC + 1 End If End If Total = Total + 1 ************************* this inline is similar to the first inline i described. we set up another flag, so that only one response code can be sent. we jitter the duration of the fixation point between 900 and 1300 ms. we use another Do Loop Until to find the first response (we make sure neither flag has yet been tripped, either the current "flag2," or the previous "flag"). if we detect the first response we send a response code, record the time it happened, and keep looping until the Fixation duration elapses. the If, Else, End If part of the code helps keeps track of accuracy. hope that helps. ben robinson >>> Fabrizio Ferri Benedetti 1/29/2007 12:38 PM >>> Hi! I'll try to make it simple: - In my procedure, an InLine BEFORE the stimulus send a start trigger via serial port using OnSet method; an InLine AFTER the stimulus send triggers accounting for accuracy or lack of response (as the subject's answer terminates the slide) -In the same procedure, there is also a fixed-time pause after the stimulus. It happens that the subject may answer during the pause, and not during the stimulus. Now, as the pause (an empty slide) can't be terminated by the subject's answer, every trigger I process with an InLine after the pause itself will always be sent after the pause. Is there any way to send triggers (or perform actions) if the subject answers during the presentation of a stimulus (slide/text/pause/etc)? That is: I don't want the answer to terminate the stimulus or pause; I just want the answer to perform scripted actions (like sending triggers) along the duration of the slide. Hope I made myself clear... Cheers, Fabrizio -- Fabrizio Ferri Benedetti Departamento de Psicolog?a Evolutiva y Educativa Facultad de Psicolog?a Universidad de Valencia http://www.uv.es/fafebe