From tobias.fw at gmail.com Fri Jul 1 09:54:43 2011 From: tobias.fw at gmail.com (Tobias) Date: Fri, 1 Jul 2011 02:54:43 -0700 Subject: Refresh rate TFT Message-ID: HI together, as CRTs are hard to get nowadays, we equipped our labs with tft screens. I wrote short and simple experiment to test the timing. basically, there are 4 display elements, alternating black and white background with nothing on it. As the refresh rate is 60 Hertz, I first set the duration to 50 ms (which is about 3 refresh circles). Prerelease is set on 20 ms. These are the results (duration, duration error, onset delay [according to logged data in results file]) slide 1: 50, 0, 5 slide 2: 50, 0, 0 slide 3: 50, 0, 0 slide 4: 50, 0, 0 These are the results for a duration of 40 ms slide 1: 40, 0, 6 slide 2: 40, 0, 10 slide 3: 40, 0, 10 slide 4: 40, 0, 10 The first onset delay might be due to waiting for the next refresh circle to start. If the duration value matches the screen refresh rate, there seems to be no delay. If it doesn't (in this case, 40 ms), there is a delay that adds up to the next value that matches (50 ms). However, it is not clear to me how the duration arror can be 0 if refresh rate and duration value do not match. The screen should not be able to display something for 40 ms. Any ideas? Any hints for using TFTs or testing the timing of such screens? Thanks a lot! Cheers, Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From Michiel.Spape at nottingham.ac.uk Fri Jul 1 10:29:36 2011 From: Michiel.Spape at nottingham.ac.uk (Michiel Spape) Date: Fri, 1 Jul 2011 11:29:36 +0100 Subject: eye tracking reading study In-Reply-To: Message-ID: Hi Alon, Of course, what you say is true, and the 'word-centre' thing doesn't work for such. My main thing, however, with a rectangular 'hit-test' was the issue of distance, calculated between word (as defined by a rectangular sized shape) and gaze-position. That is, imagine you have a word of 100x20 pixels, and you want to know whether your eye-gaze position, located 20 pixels to the left of your word, is roughly 'hitting' the word (given noise, and so on). You might, with the hit-test manoeuvre, put a larger shape (a buffer, as you say), of 140x60 (to the left and right, top and bottom, adjusted with 20 pixels) on top of your word and voila, your eye-gaze position is correctly classified as "hitting" the word. Yet, imagine, your eye-gaze position is not merely 20 pixels to the left of the word, but actually 20 pixels to the left of the word AND 20 pixels down. Is it hitting your word? - Yes, says your hit-test object (being rectangular, and your eye-gaze position should fall in the lower-left corner of this shape). - No, if you calculate the smallest distance between the word (of 100x20 pixels) and the gaze position, since the minimum (Euclidean) distance is actually sqrt(20^2 + 20^2), or 28.28 pixels. Which is more than 20 pixels. Thus, the hit-test - in its original form (because obviously you could calculate the distance to correct for such errors) - is overly tolerant of diagonally displaced gaze positions. You can see from my code examples, I do too much (and often bad) code. I've since tried to tone down, but it is as hard as giving up smoking! Best, Mich Michiel Spapé Research Fellow Perception & Action group University of Nottingham School of Psychology www.cognitology.eu -----Original Message----- From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of Alon Hafri Sent: 30 June 2011 22:08 To: E-Prime Subject: Re: eye tracking reading study Hi Mich, Thanks for the reply and the scripts! It looks quite complex so it will take me a while to get through it all, but I did look over some of the InLine and took a practice run. I am afraid I still don't quite see the advantage of calculating the hits and misses using the word center and distance versus hittest and AOIs as defined by the text or image rectangle. I'm not sure how the word center/distance method would work since for example the distance from the center of the word "deli" will be different from the center of the word "delicious" horizontally but not vertically. Is the calculation routine for using the word center/distance something more complex than the distance formula? With rectangular AOIs and hittest, you could size the AOI with enough buffer space around the text that it will catch looks near to the word. Perhaps I'm missing something? Thanks for the code detailing displaying the eyegaze in real time, that is very useful! I also didn't know much about Slides but I like your idea for using them to implement different conditions with minimal code. Best, Alon On Jun 29, 12:49 pm, Michiel Spape wrote: > Hi Alon & List, > Turns out I later decided to do no online eye-tracking at all, but in an old version, I still have the following bit of code: > --------- > Set theGazeData = CTobiiEyeTrackerResponseData( TobiiEyeTracker.History(TobiiEyeTracker.History.Count)  ) > If Not theGazeData Is Nothing Then >         CurEye.x = theGazeData.CursorX >         CurEye.y = theGazeData.CursorY >         if c.GetAttrib("ShowEye") = "Yes" then donow = TekenCirkel (CurEye.X, CurEye.Y, c.GetAttrib ("BallSize")/2, "green") >         Set theGazeData = Nothing > End If > ---------- > > Which, if you have been through the Tobii code, you might notice is roughly based on the capture AOI code of an example of theirs. If you, or anyone else, goes through my code (I don't know whether the list now accepts attachments or not), notice how *AWFUL* my own code tends to be :). Embarrassing! > > Anyway, it does the trick. In 1g, attached, it takes the last bit of (i.e. TobiiEyeTracker.History(TobiiEyeTracker.History.Count)), which contains CursorX and CursorY. If you want to drive a participant absolutely mad, do what I do above and show a little dot at the position of the (captured) fixation-position. It's always a bit off, so you will follow it and thus drive it away - a bit like having a speckle of dust in your eye. Re: attached files, notice 1g is the older version, 1i is the later one; and they probably only work if you have the Tobii installed, and have a similar system as ours. > > As to your questions: > > "Is there an advantage of using solution two (fix.position) over > solution one? Using the fix.position, you would still end up doing the > calculations as in the first solution. Also, I didn't know you could > call the fixation position within an InLine, that's helpful -- is it > just "fix.position"? If you have that script, I would greatly > appreciate it." > > Sadly, it's a bit more difficult than Fix.Position - as above. But it can be done. The advantage, for instance, is that you could calculate the centre of words and figure out the distance between word-centre and gaze-position, which should be more accurate than using square AOIs. It's also plain cool, because it allows you to debug like my version above, using a dot on the screen :) It is, all in all, pretty good to figure out once, even if you later decide to abandon it. > > " Are you saying to have the words displayed successively, so say, the > first two words of the sentence on one state, then the next two on the > second state, etc.? How would the states advance? (I've never used > more than the default state, so forgive my ignorance). Do you have an > example of this?" > > No, I meant, if you have 3 conditions (for 1,2 or 3 words), then show one state depending on the condition. Or am I missing something and you want to use successive presentation of words? > Anyway, I gather that a lot of people plainly do not see that slides can have states, in fact, I never did anything with them either until some point. It can, however, provide a lot of clarity, as it can keep your experiment relatively free from code. So, make three states with names OneWord, TwoWords, ThreeWords (this can be changed in the properties panel, for instance - not very clearly visible). In the slide's (i.e. not in the state's) property, set ActiveState to "[HowManyWords]" and in the list, have an attribute of HowManyWords, with again, the three names of states. > > Hope that helps! > Best, > Mich > > Michiel Spapé > Research Fellow > Perception & Action group > University of Nottingham > School of Psychologywww.cognitology.eu > > -----Original Message----- > From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of Alon Hafri > Sent: 29 June 2011 15:47 > To: E-Prime > Subject: Re: eye tracking reading study > > Hi Mich, > > Thanks for your solutions! I'll respond to yours in order, below your > text: > > On Jun 29, 5:10 am, Michiel Spape > wrote: > > Hi, > > Here's my take: > > - given that E-Prime uses, I think, a font with constant letter symbol size (I forgot the official name, but the point is that an I takes as much space as a W - as in the font you're probably reading this), it is not that difficult to line them up, as you say. Say, one letter is 12 pixels (you can test that by trial and error), then the word WORDS is 60 pixels. If I want to have two AOIs for the words TWO WORDS, then, as per your second possible way to do this, I'd just show that as one slideText on the slide and make two AOIs. Given that our screen is 640x480 by default (or whatever you have), the we print the TWO WORDS as one slideText in the centre. TWO WORDS is 60 + 48 (TWO plus space makes 4x12=48 pixels) = 108 pixels and should therefore be positioned LEFT at 266 to RIGHT at 374* (LEFT: 320 (screen width centre) - 54 (i.e. 108 / 2) = 266 and RIGHT: 320 + 54 = 374). Thus, your left AIO, if you align it left, can be placed at 266, and should be 36 pixels (since the space shouldn't be included). The AIO right should be aligned right, and can be placed at 374. > > Depending on your knowledge of E-Prime (and you'd need some to get Tobii to work properly in E-Prime), that shouldn't be too hard to programme, but let me know if you need help. > > This would definitely work (the font is called Courier New). But I do > see your point below about wanting the AOIs to be a bit larger so > things are accurately detected, and it may be hard to do that with a > lot of words on screen. > > > - You could also do away with all the AOIs as programmed by the Tobii team and just look at the fixation position on the fly - that is, just take the fix.position, calculate distance to each word and figure out which is the likely candidate. I have some script for that, if you're interested. > > Is there an advantage of using solution two (fix.position) over > solution one? Using the fix.position, you would still end up doing the > calculations as in the first solution. Also, I didn't know you could > call the fixation position within an InLine, that's helpful -- is it > just "fix.position"? If you have that script, I would greatly > appreciate it. > > > - Alternatively, have you thought about just NOT lining up the words? That is, if you have a slide with 3 states, state 1 with one word, 2 with two words, 3 with three words, and put words on slide 2, for instance, at 35% and 65%, then this will be a LOT easier. I can see the point that it doesn't look right, but I think there's plenty that can be said for this experimentally: > > 1. you probably want to control for word length anyway > > 2. you probably want to control for saccade length anyway > > 3. Accurate as Tobii *can* be, I've often found I wanted my AOIs quite a bit larger so that things are accurately detected. > > Are you saying to have the words displayed successively, so say, the > first two words of the sentence on one state, then the next two on the > second state, etc.? How would the states advance? (I've never used > more than the default state, so forgive my ignorance). Do you have an > example of this? > > > - Finally, I've later come to realise it is a lot easier to just don't do much with Tobii in E-Prime and analyse the "gazedata" separately (in matlab). That is, it's pretty easy to find out later on what word people were fixating (at least, roughly), given that you at least save their positions on the screen. > > Yes this I've done before (even for E-Prime experiments, when the AOIs > were adjusted after running subjects) -- could work well. Again thanks > for your help. > > > Best, > > Mich > > > * obviously, this would make the region one pixel too large, but I'm not compensating for that to simplify matters. > > > Michiel Spapé > > Research Fellow > > Perception & Action group > > University of Nottingham > > School of Psychologywww.cognitology.eu > > > -----Original Message----- > > From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of Alon Hafri > > Sent: 28 June 2011 21:47 > > To: E-Prime > > Subject: eye tracking reading study > > > Hi, wondering if someone in the group can help me out. > > > I am creating an E-Prime experiment using the E-Prime Extensions for > > Tobii. For each trial, the participant will read a sentence, and I > > would like to record reading times for each window of size 1 to 3 > > words. > > > I have experience with using list attributes to set Slide Image > > position (and therefore AOI position) at runtime, as well as with > > using transparent Slide Images overtop of larger images to act as > > AOIs, but I've never done a reading study before. Since the words will > > vary in length for each trial, but will need to be evenly spaced (and > > on multiple lines conceivably), it would be great if position for > > every window would not have to be specified but could be determined by > > a script. > > > I can think of a few solutions, but perhaps someone has an easier one? > > 1) create a Slide Text object for each word (or window), and so they > > could act as their own AOIs. > > Drawbacks: You would have to specify locations for each one, and it > > could be tricky lining them up appropriately so words are evenly > > spaced. > > > 2) Have one Slide Text object for the whole sentence and have > > transparent AOIs overtop as the AOIs. > > Drawbacks: You would still have to specify locations for each, but the > > text would be in one object so would appear normal. > > > 3) Suggestions? > > > Thanks! > > Alon > > > -- > > You received this message because you are subscribed to the Google Groups "E-Prime" group. > > To post to this group, send email to e-prime at googlegroups.com. > > To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. > > For more options, visit this group athttp://groups.google.com/group/e-prime?hl=en. > > > This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it.   Please do not use, copy or disclose the information contained in this message or in any attachment.  Any views or opinions expressed by the author of this email do not > > ... > > read more » > >  Collision 1i.es > 328KViewDownload > >  Collision 1g.es > 315KViewDownload -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From lml1934 at gmail.com Fri Jul 1 12:53:32 2011 From: lml1934 at gmail.com (Lisa Levinson) Date: Fri, 1 Jul 2011 05:53:32 -0700 Subject: eye tracking reading study In-Reply-To: Message-ID: Not sure about this but for the EEG experiments I have helped with that explore reading they seem to use the list function to generate sentences. The words appear one at a time but it's the only way you can flag (for segmentation) the aspect of the sentence being investigated. Might be totally different for eye-tracking but that's how I have seen the reading experiments are organized for EEG. On Jun 28, 4:46 pm, Alon Hafri wrote: > Hi, wondering if someone in the group can help me out. > > I am creating an E-Prime experiment using the E-Prime Extensions for > Tobii. For each trial, the participant will read a sentence, and I > would like to record reading times for each window of size 1 to 3 > words. > > I have experience with using list attributes to set Slide Image > position (and therefore AOI position) at runtime, as well as with > using transparent Slide Images overtop of larger images to act as > AOIs, but I've never done a reading study before. Since the words will > vary in length for each trial, but will need to be evenly spaced (and > on multiple lines conceivably), it would be great if position for > every window would not have to be specified but could be determined by > a script. > > I can think of a few solutions, but perhaps someone has an easier one? > 1) create a Slide Text object for each word (or window), and so they > could act as their own AOIs. > Drawbacks: You would have to specify locations for each one, and it > could be tricky lining them up appropriately so words are evenly > spaced. > > 2) Have one Slide Text object for the whole sentence and have > transparent AOIs overtop as the AOIs. > Drawbacks: You would still have to specify locations for each, but the > text would be in one object so would appear normal. > > 3) Suggestions? > > Thanks! > Alon -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Fri Jul 1 14:10:57 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Fri, 1 Jul 2011 10:10:57 -0400 Subject: Refresh rate TFT In-Reply-To: <9963135e-c6d5-4bd9-b19c-023aa0970326@m10g2000yqd.googlegro ups.com> Message-ID: Tobias, Stock reminder: 1) I do not work for PST. 2) PST's trained staff takes any and all questions at http://support.pstnet.com/e%2Dprime/support/login.asp , and they strive to respond to all requests in 24-48 hours -- this is pretty much their substitute for proper documentation, so make full use of it. 3) If you do get an answer from PST Web Support, please extend the courtesy of posting their reply back here for the sake of others. That said, here is my take... Nice test, and excellent question. The problem arises because E-Prime uses two entirely different and incompatible definitions of "actual" duration: (1) Actual duration = (OnsetTime of next visual object) - (OnsetTime of this visual object) (2) Actual duration = (OffsetTime of this visual object) - (OnsetTime of this visual object) So, if DurationError = (Duration (i.e., specified Duration)) - ("actual" duration), then you have to know which definition of "actual" duration is used. Because a visual object typically remains visible until the onset of the next visual object, most of us think of "actual" duration in terms of definition (1), and so would expect that definition to be used for calculating DurationError. But if you think of that from a programming point of view, you will see the problem with that: E-Prime cannot know the OnsetTime of the next object until, well, that object appears, and by that time it is too late to use the value in logging anything regarding the previous object. So, E-Prime uses definition (2) for "actual" duration (see the RteRunnableInputObject.DurationError topic in the E-Basic Help facility), and your results follow. (Don't take my word for this, log all the appropriate values and see for yourself that it does the calculation as I describe.) IOW, at a (specified) Duration of 40 ms, the object OnsetTime occurs late (by 10 ms), but OffsetTime still occurs 40 ms later, thus DurationError = Duration - (OffsetTime - OnsetTime) = 40 ms, as measured (hmm, did you use Event or Cumulative timing mode? your results do not look quite right for Event timing mode); but since the next object again appears 10 ms late, the "actual" duration of each object (according to definition (1)) remains 50 ms. Follow? Perhaps they could have chosen better terminology, although offhand I have nothing better to suggest myself . One more note about measuring performance of LCD/TFT vs CRT. It may casually seem that images appear and disappear from the display with high performance, however, several years ago when we measured LCD performance with a photodetector and oscilloscope we found that it took a *long* time for "off" pixels to return to baseline (some hundreds of ms, as I recall). That may not matter for your studies, but it mattered to us at the time. We have not done that measurement again, so don't know how modern LCDs perform; instead, we have just stockpiled our own stash of CRTs to provide for our future studies. Regards, -- David McFarlane, Professional Faultfinder At 7/1/2011 05:54 AM Friday, you wrote: >HI together, > >as CRTs are hard to get nowadays, we equipped our labs with tft >screens. I wrote short and simple experiment to test the timing. >basically, there are 4 display elements, alternating black and white >background with nothing on it. As the refresh rate is 60 Hertz, I >first set the duration to 50 ms (which is about 3 refresh circles). >Prerelease is set on 20 ms. > >These are the results (duration, duration error, onset delay >[according to logged data in results file]) > >slide 1: 50, 0, 5 >slide 2: 50, 0, 0 >slide 3: 50, 0, 0 >slide 4: 50, 0, 0 > >These are the results for a duration of 40 ms > >slide 1: 40, 0, 6 >slide 2: 40, 0, 10 >slide 3: 40, 0, 10 >slide 4: 40, 0, 10 > >The first onset delay might be due to waiting for the next refresh >circle to start. If the duration value matches the screen refresh >rate, there seems to be no delay. If it doesn't (in this case, 40 ms), >there is a delay that adds up to the next value that matches (50 ms). >However, it is not clear to me how the duration arror can be 0 if >refresh rate and duration value do not match. The screen should not be >able to display something for 40 ms. > >Any ideas? Any hints for using TFTs or testing the timing of such >screens? > >Thanks a lot! Cheers, Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From evelina at illinois.edu Fri Jul 1 14:29:29 2011 From: evelina at illinois.edu (Evelina Tapia) Date: Fri, 1 Jul 2011 07:29:29 -0700 Subject: Pre-loading images and nested lists In-Reply-To: <03ffefa7-260e-4d9a-9a8e-7d9d9008924a@16g2000yqy.googlegroups.com> Message-ID: OK, I figured out what the problem was and in case anyone runs into the same issue, here's the solution and a couple of pointers: The InLine has to call the attribute in the main trial list, not the nested image list. For example, if the main list has column Target (that pulls images from a Nested list containing column BeachImage), the code should read: strTargetFile = c.GetAttrib("Target") Also, make sure that the image is loaded onto the slide image component that you, as a user, have called something. Here, the slide image component onto which the image is loaded is called "theTarget" LoadSlideImageFile Targetzero.States(Targetzero.ActiveState), "theTarget", strTargetFile Finally, if you want to pre-load several images for the same trial, the InLine should have an If...Then... loop. For example, "if trial condition X, then load image from nestedX to target1, load image from nestedY to target2, load image from nestedZ to target3; elseif trial conditionXX, then load image....." Good luck! Evelina On Jun 27, 1:13 pm, Evelina Tapia wrote: > Hello, > > I found InLine script for preloading images without using Canvas > scripting (written by Brandon Cernicky -- thank you! and available onhttp://godzilla.kennedykrieger.org/sw/eprime/samples/) but I am having > trouble implementing the InLine with nested lists. > > So, I have a List of 40 trials within which I have a couple nested > lists that contain about 100 images each. I want to randomly pull > images from those lists during the trial procedure. The InLine for > preloading is placed right at the beginning of the procedure but when > it should read the image file names, it reads direction to the nested > list (e.g. Target column says [BeachImage])and crashes. How could this > be solved? > > The relevant part of the InLine reads as follows: > > 'Variable used to store filenames > Dim strTargetFile as String > > 'Retrieve the filename from the Context > strTargetFile = c.GetAttrib("BeachImage")     'this is column name in > one of the nested lists > > 'Call the helper routine to load the image > 'into the SlideImage component > > LoadSlideImageFile Targetzero.States(Targetzero.ActiveState), > "theTarget", strTargetFile > > THANK YOU!!!! > > Evelina -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From Michiel.Spape at nottingham.ac.uk Fri Jul 1 15:08:10 2011 From: Michiel.Spape at nottingham.ac.uk (Michiel Spape) Date: Fri, 1 Jul 2011 16:08:10 +0100 Subject: Refresh rate TFT In-Reply-To: <4e0dd5e9.cf3c2b0a.75a2.ffffd479SMTPIN_ADDED@gmr-mx.google.com> Message-ID: Hi David & List, Stockpiling CRTs worked for us quite well as well, but the screens are getting quite old. As a results, it might be nice if we can ascertain where exactly the problem is and what we can practically do about it (given the instance where a CRT is unavailable). 1. As far as I know, the problem you describe used to be worse than it is these days; the sort of blurry effect one had when moving a mouse-pointer, for instance, seems to be pretty much gone. What to look for with LCD screens to get 'high performance'? 2. Am I correct in the understanding that it is not the problem that LCD pixels get bright fast, but, rather that they turn dark again slower? If so, it would, all in all, be a rare thing that one could not design an experiment around it. For instance, if I have a subliminal white prime with a duration of 16 ms, it won't turn dark after 16 ms. However, it won't turn dark on your retina either, and for this reason we usually mask stuff (say, a white pattern mask). Yet, if that would be impossible, would using inverse colours (a black prime), or some other colour scheme help? Anyway, these should be some simple questions for anyone with a bit more knowledge of hardware than I have - which is rather little (I like programming, but am incredibly clumsy, which never helped). Nevertheless, I think that it would be useful to have them answered on the list, as it does seem that CRT monitors, whether we like it or not, might go the way of the videotape. Best, Mich Michiel Spapé Research Fellow Perception & Action group University of Nottingham School of Psychology www.cognitology.eu ---------------- //snip One more note about measuring performance of LCD/TFT vs CRT. It may casually seem that images appear and disappear from the display with high performance, however, several years ago when we measured LCD performance with a photodetector and oscilloscope we found that it took a *long* time for "off" pixels to return to baseline (some hundreds of ms, as I recall). That may not matter for your studies, but it mattered to us at the time. We have not done that measurement again, so don't know how modern LCDs perform; instead, we have just stockpiled our own stash of CRTs to provide for our future studies. Regards, -- David McFarlane, Professional Faultfinder At 7/1/2011 05:54 AM Friday, you wrote: >HI together, > >as CRTs are hard to get nowadays, we equipped our labs with tft >screens. I wrote short and simple experiment to test the timing. >basically, there are 4 display elements, alternating black and white >background with nothing on it. As the refresh rate is 60 Hertz, I >first set the duration to 50 ms (which is about 3 refresh circles). >Prerelease is set on 20 ms. > >These are the results (duration, duration error, onset delay >[according to logged data in results file]) > >slide 1: 50, 0, 5 >slide 2: 50, 0, 0 >slide 3: 50, 0, 0 >slide 4: 50, 0, 0 > >These are the results for a duration of 40 ms > >slide 1: 40, 0, 6 >slide 2: 40, 0, 10 >slide 3: 40, 0, 10 >slide 4: 40, 0, 10 > >The first onset delay might be due to waiting for the next refresh >circle to start. If the duration value matches the screen refresh >rate, there seems to be no delay. If it doesn't (in this case, 40 ms), >there is a delay that adds up to the next value that matches (50 ms). >However, it is not clear to me how the duration arror can be 0 if >refresh rate and duration value do not match. The screen should not be >able to display something for 40 ms. > >Any ideas? Any hints for using TFTs or testing the timing of such >screens? > >Thanks a lot! Cheers, Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Fri Jul 1 20:11:20 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Fri, 1 Jul 2011 16:11:20 -0400 Subject: base timing of a trial on total time taken in previous trials--mismatch error? In-Reply-To: <4e0cea24.94592a0a.12e6.ffffafecSMTPIN_ADDED@gmr-mx.google. com> Message-ID: The original poster figured out a solution using an array, as posted on the PST Forum (http://www.pstnet.com/forum/Topic5419-7-1.aspx ). Since I already figured out an alternative solution without using an array, I am posting it here just to show that I could do it. First, I will restate the specifications: (1) A block of trials will last for either some specified time (e.g., 10 min) or for 12 trials, whichever comes first. (2) The stimulus on each trial will last for either some specified time (2 min), or for the remainder of the block duration, or until the subject responds, whichever comes first. Unpacking this, in effect it means that all trials except the final one last for the usual trial duration or until a response (whichever comes first), and the final trial lasts for the remainder of the block duration or until a response (whichever comes first). I already know some functions for working directly with the clock times of events, so for this problem I find it handier to think in terms of the clock times for when the blocks and trials will end, instead of the remaining block duration. So here is my solution (following good programming practices, such as using constants in place of "magic numbers"). I would first define a global variable on the User tab of the Script window. This will hold the clock time of when the block must end. (I like to use a "g_" prefix to remind me that it's a global and not a local variable): Dim g_BlockTargetOffsetTime as Long Then I would set up a structure with some InLines something like the following: BlockInitCode TrialList TrialProc TrialInitCode TrialStimSlide TrialStimSlide is the stimulus, with Duration set to [TrialDur]. BlockInitCode is an InLine object that simply stores the target offset time of the block for use later (it assumes that the first event in TrialProc is our stimulus, and uses the much overlooked GetNextTargetOnsetTime method, see that topic in the E-Basic Help facility): Const BlockDur as Long = 10 * 60 * 1000 g_BlockTargetOffsetTime = GetNextTargetOnsetTime + BlockDur And TrialInitCode is another InLine object that sets the TrialDur attribute according to specifications (1) and (2) above: Const TrialDur as Long = 2 * 60 * 1000 If ((GetNextTargetOnsetTime + TrialDur) <= g_BlockTargetOffsetTime) Then ' all but the final trial c.SetAttrib "TrialDur", TrialDur Else ' final trial c.SetAttrib "TrialDur", _ (g_BlockTargetOffsetTime - GetNextTargetOnsetTime) End If And if you don't mind using one of the less common coding conveniences of E-Basic/VBA, then you could shorten that to Const TrialDur as Long = 2 * 60 * 1000 c.SetAttrib "TrialDur", _ Iif( ((GetNextTargetOnsetTime + TrialDur) <= g_BlockTargetOffsetTime ), _ TrialDur, (g_BlockTargetOffsetTime - GetNextTargetOnsetTime) ) Pros to this solution: - It does not use any array, nor require the attending complications of computing array indexes. - It does not require any "If c.GetAttrib("Trial") > 1" test on each trial -- seems wasteful to run such a test on each trial when we know ahead of time that it will succeed on all trials except the first. Usually we can find a better way. - It works directly in terms of the target offset time for the block, which gets computed only once. It is thus more accurate with time (without care, accumulated computations of block time remaining might not take into account delays in actual stimulus duration, etc.). Criticisms of this solution: - Some users would find it more natural to work in terms of the remaining block duration instead of the target block offset time (but, without much trouble, this solution could be adapted to compute and use remaining block duration instead). - It uses the GetNextTargetOnsetTime method -- a very powerful concept in E-Prime, but kept well hidden in the documentation (I stumbled upon it myself only while searching the Forum for other things). - Instead of having all the code compactly gathered into one InLine (plus a bit of global User code), it is spread across two InLines (plus a bit of global User code). This may make it slightly harder for some to follow (I think Michiel Spapé has made well-put comments on this sort of tradeoff either on the Group or in his E-Primer). - You already have a perfectly good working solution that makes sense to you, so I'm a little late to the game, aren't I? -- David McFarlane, Professional Faultfinder At 6/30/2011 05:26 PM Thursday, David McFarlane wrote: >This got addressed on the PST Forum >(http://www.pstnet.com/forum/Topic5419-7-1.aspx >), but you did well to post here as well -- >generally I respond only here on the E-Prime >Group, and now I can post a few more details and >provide code with proper indentation. > >First, as you might find explained in Chapter 4 >of the User's Guide that came with E-Prime, and >have instead discovered the hard way, attributes >propogate only downward through logging levels, >they do not persist as you pop back up to higher >levels, and as a result they do not persist as >you pop up a level and then back down to the >same level, as happens at the end of a Procedure >run by a List. IOW, despite some appearance, >"attributes" are *not* "variables", and they >will not fulfill the role of >variables. Variables and attributes each have their own roles. > >So, as explained on the Forum, in short you need >to use a global variable. As explained in >Chapter 4 of the User's Guide, you do that in >the User tab of the Script view. Define a variable such as TRemaining, e.g., > >Dim TRemaining as Long > >Then use that global variable to keep track of >the value from trial to trial, as in ... well, >when I tried to write out the code it didn't >seem quite right, and I have to run off and >catch a bus now. Maybe you or someone else can >now sort this out based on the clues given so far. > >-- David McFarlane, Professional Faultfinder > >At 6/30/2011 02:18 PM Thursday, you wrote: >>I am programming an experiment where the total time a person can take >>is 10 minutes (600000 ms) (to do 12 trials), with a maximum of 2 >>minutes per trial (the trial terminates and starts the next trial >>after 2 minutes). I have set the program to terminate the list if the >>total time is over 10 minutes, however there is a problem--say a >>person has taken 9:45 do to 7 trials, so they have 15 seconds left. >>BUT...on trial 8, the duration is still set to max 2 min--so a person >>can theoretically have a total of 11:45, not 10:00 before it >>terminates. So I need to have the program know that if more than 8 >>minutes (480000) has been used, the duration of the trial should be >>600000-however much time has been used so far. >> >>I have tried to fix this by putting an attribute in the list object >>called "trial" which is just the number of the trial, and another >>attribute called "trialtime", which will be the duration of the slide >>object (where the stimulus/trial is presented). in the slide object >>properties, I have set timelimit to be the attribute "trialtime". >>Lastly, after each trial, the attribute "timertrial" is calculated, >>which essentially calculates the length of time taken for that trial >>and adds it to the previous time taken, so that this attribute is >>constantly updated to reflect the total time taken. All of this seems >>to work fine, and running through the program shows that "timertrial" >>is indeed calculating correctly and is recording in the edata file. >>the problem occurs, however, when I put all this together, and try to >>change the duration of the next trial based on the "timertrial" >>attribute. Here is my code: >> >>Using the inline statement below, I have set the first trial duration >>is 120 seconds, and every other trial after that the duration is >>calculated based on total time taken so far >> >>If c.GetAttrib ("trial") = 1 then c.SetAttrib "trialtime", 120000 >>If c.GetAttrib ("trial") > 1 then >>If c.getAttrib ("timertrial") >= 480000 then c.setAttrib "trialtime", >>600000 - c.getAttrib ("timertrial") >>If c.getAttrib ("timertrial") < 480000 then c.SetAttrib "trialtime", >>120000 >>End If >> >>The problem is, the program cannot find the attribute "timertrial"--it >>calculates fine at the end of each trial, but when I start a new trial >>(within the same list), it does not have a value yet for timertrial, >>since that is calculated at the END of the trial. How do I get it to >>pull the value of "timertrial" from the previous trial and use it as >>an attribute in the NEXT trial? I am sure this is simple, but I can't >>seem to get anywhere. >> >>Also, Note: I have tried using this code instead: >>If c.GetAttrib ("Trial") > 1 then >>if LetterSetList.GetPrevAttrib ("timertrial") >= 480000 then >>c.setAttrib "trialtime", 600000 - LetterSetList.GetPrevAttrib >>("timertrial") >>if LetterSetList.GetPrevAttrib ("timertrial") < 480000 then >>c.setAttrib "trialtime", 120000 >>End If >> >>And I keep getting type mismatch errors, which should be easy to >>resolve, but this one keep stumping me. Again, I'm sure this is >>something simple, but for some reason I can't get it. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From janet.trammell at gmail.com Fri Jul 1 21:00:24 2011 From: janet.trammell at gmail.com (Janet Trammell) Date: Fri, 1 Jul 2011 14:00:24 -0700 Subject: base timing of a trial on total time taken in previous trials--mismatch error? In-Reply-To: <4e0e29ed.c1602a0a.505f.ffffe433SMTPIN_ADDED@gmr-mx.google.com> Message-ID: I do now have a perfectly good working solution that makes sense, but the solution you just posted looks a whole lot "cleaner". I think this will be really useful if I ever need to do this again, and it looks like it can be adapted to similar situations. Many thanks for your help! Janet On Jul 1, 4:11 pm, David McFarlane wrote: > The original poster figured out a solution using > an array, as posted on the PST Forum > (http://www.pstnet.com/forum/Topic5419-7-1.aspx > ).  Since I already figured out an alternative > solution without using an array, I am posting it > here just to show that I could do it. > > First, I will restate the specifications: > > (1) A block of trials will last for either some > specified time (e.g., 10 min) or for 12 trials, whichever comes first. > > (2) The stimulus on each trial will last for > either some specified time (2 min), or for the > remainder of the block duration, or until the > subject responds, whichever comes > first.  Unpacking this, in effect it means that > all trials except the final one last for the > usual trial duration or until a response > (whichever comes first), and the final trial > lasts for the remainder of the block duration or > until a response (whichever comes first). > > I already know some functions for working > directly with the clock times of events, so for > this problem I find it handier to think in terms > of the clock times for when the blocks and trials > will end, instead of the remaining block > duration.  So here is my solution (following good > programming practices, such as using constants in place of "magic numbers"). > > I would first define a global variable on the > User tab of the Script window.  This will hold > the clock time of when the block must end.  (I > like to use a "g_" prefix to remind me that it's > a global and not a local variable): > >      Dim  g_BlockTargetOffsetTime as Long > > Then I would set up a structure with some InLines something like the following: > > BlockInitCode > TrialList >      TrialProc >          TrialInitCode >          TrialStimSlide > > TrialStimSlide is the stimulus, with Duration set to [TrialDur]. > > BlockInitCode is an InLine object that simply > stores the target offset time of the block for > use later (it assumes that the first event in > TrialProc is our stimulus, and uses the much > overlooked GetNextTargetOnsetTime method, see > that topic in the E-Basic Help facility): > >      Const  BlockDur as Long = 10 * 60 * 1000 >      g_BlockTargetOffsetTime = GetNextTargetOnsetTime + BlockDur > > And TrialInitCode is another InLine object that > sets the TrialDur attribute according to specifications (1) and (2) above: > >      Const  TrialDur as Long = 2 * 60 * 1000 >      If ((GetNextTargetOnsetTime + TrialDur) <= > g_BlockTargetOffsetTime) Then  ' all but the final trial >          c.SetAttrib "TrialDur", TrialDur >      Else  ' final trial >          c.SetAttrib "TrialDur", _ >              (g_BlockTargetOffsetTime - GetNextTargetOnsetTime) >      End If > > And if you don't mind using one of the less > common coding conveniences of E-Basic/VBA, then you could shorten that to > >      Const  TrialDur as Long = 2 * 60 * 1000 >      c.SetAttrib "TrialDur", _ >          Iif( ((GetNextTargetOnsetTime + > TrialDur) <= g_BlockTargetOffsetTime ), _ >          TrialDur, (g_BlockTargetOffsetTime - GetNextTargetOnsetTime) ) > > Pros to this solution: > - It does not use any array, nor require the > attending complications of computing array indexes. > > - It does not require any "If > c.GetAttrib("Trial") > 1" test on each trial -- > seems wasteful to run such a test on each trial > when we know ahead of time that it will succeed > on all trials except the first.  Usually we can find a better way. > > - It works directly in terms of the target offset > time for the block, which gets computed only > once.  It is thus more accurate with time > (without care, accumulated computations of block > time remaining might not take into account delays > in actual stimulus duration, etc.). > > Criticisms of this solution: > - Some users would find it more natural to work > in terms of the remaining block duration instead > of the target block offset time (but, without > much trouble, this solution could be adapted to > compute and use remaining block duration instead). > > - It uses the GetNextTargetOnsetTime method -- a > very powerful concept in E-Prime, but kept well > hidden in the documentation (I stumbled upon it > myself only while searching the Forum for other things). > > - Instead of having all the code compactly > gathered into one InLine (plus a bit of global > User code), it is spread across two InLines (plus > a bit of global User code).  This may make it > slightly harder for some to follow (I think > Michiel Spapé has made well-put comments on this > sort of tradeoff either on the Group or in his E-Primer). > > - You already have a perfectly good working > solution that makes sense to you, so I'm a little late to the game, aren't I? > > -- David McFarlane, Professional Faultfinder > > At 6/30/2011 05:26 PM Thursday, David McFarlane wrote: > > > > > > > > >This got addressed on the PST Forum > >(http://www.pstnet.com/forum/Topic5419-7-1.aspx > >), but you did well to post here as well -- > >generally I respond only here on the E-Prime > >Group, and now I can post a few more details and > >provide code with proper indentation. > > >First, as you might find explained in Chapter 4 > >of the User's Guide that came with E-Prime, and > >have instead discovered the hard way, attributes > >propogate only downward through logging levels, > >they do not persist as you pop back up to higher > >levels, and as a result they do not persist as > >you pop up a level and then back down to the > >same level, as happens at the end of a Procedure > >run by a List.  IOW, despite some appearance, > >"attributes" are *not* "variables", and they > >will not fulfill the role of > >variables.  Variables and attributes each have their own roles. > > >So, as explained on the Forum, in short you need > >to use a global variable.  As explained in > >Chapter 4 of the User's Guide, you do that in > >the User tab of the Script view.  Define a variable such as TRemaining, e.g., > > >Dim TRemaining as Long > > >Then use that global variable to keep track of > >the value from trial to trial, as in ...  well, > >when I tried to write out the code it didn't > >seem quite right, and I have to run off and > >catch a bus now.  Maybe you or someone else can > >now sort this out based on the clues given so far. > > >-- David McFarlane, Professional Faultfinder > > >At 6/30/2011 02:18 PM Thursday, you wrote: > >>I am programming an experiment where the total time a person can take > >>is 10 minutes (600000 ms) (to do 12 trials), with a maximum of 2 > >>minutes per trial (the trial terminates and starts the next trial > >>after 2 minutes). I have set the program to terminate the list if the > >>total time is over 10 minutes, however there is a problem--say a > >>person has taken 9:45 do to 7 trials, so they have 15 seconds left. > >>BUT...on trial 8, the duration is still set to max 2 min--so a person > >>can theoretically have a total of 11:45, not 10:00 before it > >>terminates. So I need to have the program know that if more than 8 > >>minutes (480000) has been used, the duration of the trial should be > >>600000-however much time has been used so far. > > >>I have tried to fix this by putting an attribute in the list object > >>called "trial" which is just the number of the trial, and another > >>attribute called "trialtime", which will be the duration of the slide > >>object (where the stimulus/trial is presented). in the slide object > >>properties, I have set timelimit to be the attribute "trialtime". > >>Lastly, after each trial, the attribute "timertrial" is calculated, > >>which essentially calculates the length of time taken for that trial > >>and adds it to the previous time taken, so that this attribute is > >>constantly updated to reflect the total time taken. All of this seems > >>to work fine, and running through the program shows that "timertrial" > >>is indeed calculating correctly and is recording in the edata file. > >>the problem occurs, however, when I put all this together, and try to > >>change the duration of the next trial based on the "timertrial" > >>attribute. Here is my code: > > >>Using the inline statement below, I have set the first trial duration > >>is 120 seconds, and every other trial after that the duration is > >>calculated based on total time taken so far > > >>If c.GetAttrib ("trial") = 1 then c.SetAttrib "trialtime", 120000 > >>If c.GetAttrib ("trial") > 1 then > >>If c.getAttrib ("timertrial") >= 480000 then c.setAttrib "trialtime", > >>600000 - c.getAttrib ("timertrial") > >>If c.getAttrib ("timertrial") < 480000 then c.SetAttrib "trialtime", > >>120000 > >>End If > > >>The problem is, the program cannot find the attribute "timertrial"--it > >>calculates fine at the end of each trial, but when I start a new trial > >>(within the same list), it does not have a value yet for timertrial, > >>since that is calculated at the END of the trial. How do I get it to > >>pull the value of "timertrial" from the previous trial and use it as > >>an attribute in the NEXT trial? I am sure this is simple, but I can't > >>seem to get anywhere. > > >>Also, Note: I have tried using this code instead: > >>If c.GetAttrib ("Trial") > 1 then > >>if LetterSetList.GetPrevAttrib ("timertrial") >= 480000 then > >>c.setAttrib "trialtime", 600000 - LetterSetList.GetPrevAttrib > >>("timertrial") > >>if LetterSetList.GetPrevAttrib ("timertrial") < 480000 then > >>c.setAttrib "trialtime", 120000 > >>End If > > >>And I keep getting type mismatch errors, which should be easy to > >>resolve, but this one keep stumping me.  Again, I'm sure this is > >>something simple, but for some reason I can't get it. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From tobias.fw at gmail.com Mon Jul 4 10:42:35 2011 From: tobias.fw at gmail.com (Tobias) Date: Mon, 4 Jul 2011 03:42:35 -0700 Subject: Refresh rate TFT In-Reply-To: <4e0dd5e9.cf3c2b0a.75a2.ffffd479SMTPIN_ADDED@gmr-mx.google.com> Message-ID: Thanks David for the detailed reply. If I understand you correctly, you assume that, entering a duration value of 40 ms, you will always have an actual duration of 50 ms (using the refresh rate of 60 Hz), right? Still, anoher question is, how long it physically takes for the pixels to cease glowing even after, let's say a black screen, sets on. This should be measured with external light sensitive hardware I guess... Best, Tobias On 1 Jul., 16:10, David McFarlane wrote: > Tobias, > > Stock reminder:  1) I do not work for PST.  2) PST's trained staff > takes any and all questions athttp://support.pstnet.com/e%2Dprime/support/login.asp, and they > strive to respond to all requests in 24-48 hours -- this is pretty > much their substitute for proper documentation, so make full use of > it.  3) If you do get an answer from PST Web Support, please extend > the courtesy of posting their reply back here for the sake of others. > > That said, here is my take... > > Nice test, and excellent question.  The problem arises because > E-Prime uses two entirely different and incompatible definitions of > "actual" duration: > > (1) Actual duration = (OnsetTime of next visual object) - (OnsetTime > of this visual object) > (2) Actual duration = (OffsetTime of this visual object) - (OnsetTime > of this visual object) > > So, if DurationError = (Duration (i.e., specified Duration)) - > ("actual" duration), then you have to know which definition of > "actual" duration is used. > > Because a visual object typically remains visible until the onset of > the next visual object, most of us think of "actual" duration in > terms of definition (1), and so would expect that definition to be > used for calculating DurationError.  But if you think of that from a > programming point of view, you will see the problem with > that:  E-Prime cannot know the OnsetTime of the next object until, > well, that object appears, and by that time it is too late to use the > value in logging anything regarding the previous object. > > So, E-Prime uses definition (2) for "actual" duration (see the > RteRunnableInputObject.DurationError topic in the E-Basic Help > facility), and your results follow.  (Don't take my word for this, > log all the appropriate values and see for yourself that it does the > calculation as I describe.)  IOW, at a (specified) Duration of 40 ms, > the object OnsetTime occurs late (by 10 ms), but OffsetTime still > occurs 40 ms later, thus DurationError = Duration - (OffsetTime - > OnsetTime) = 40 ms, as measured (hmm, did you use Event or Cumulative > timing mode?  your results do not look quite right for Event timing > mode); but since the next object again appears 10 ms late, the > "actual" duration of each object (according to definition (1)) > remains 50 ms.  Follow? > > Perhaps they could have chosen better terminology, although offhand I > have nothing better to suggest myself . > > One more note about measuring performance of LCD/TFT vs CRT.  It may > casually seem that images appear and disappear from the display with > high performance, however, several years ago when we measured LCD > performance with a photodetector and oscilloscope we found that it > took a *long* time for "off" pixels to return to baseline (some > hundreds of ms, as I recall).  That may not matter for your studies, > but it mattered to us at the time.  We have not done that measurement > again, so don't know how modern LCDs perform; instead, we have just > stockpiled our own stash of CRTs to provide for our future studies. > > Regards, > -- David McFarlane, Professional Faultfinder > > At 7/1/2011 05:54 AM Friday, you wrote: > > > > > > > > >HI together, > > >as CRTs are hard to get nowadays, we equipped our labs with tft > >screens. I wrote short and simple experiment to test the timing. > >basically, there are 4 display elements, alternating black and white > >background with nothing on it. As the refresh rate is 60 Hertz, I > >first set the duration to 50 ms (which is about 3 refresh circles). > >Prerelease is set on 20 ms. > > >These are the results (duration, duration error, onset delay > >[according to logged data in results file]) > > >slide 1: 50, 0, 5 > >slide 2: 50, 0, 0 > >slide 3: 50, 0, 0 > >slide 4: 50, 0, 0 > > >These are the results for a duration of 40 ms > > >slide 1: 40, 0, 6 > >slide 2: 40, 0, 10 > >slide 3: 40, 0, 10 > >slide 4: 40, 0, 10 > > >The first onset delay might be due to waiting for the next refresh > >circle to start. If the duration value matches the screen refresh > >rate, there seems to be no delay. If it doesn't (in this case, 40 ms), > >there is a delay that adds up to the next value that matches (50 ms). > >However, it is not clear to me how the duration arror can be 0 if > >refresh rate and duration value do not match. The screen should not be > >able to display something for 40 ms. > > >Any ideas? Any hints for using TFTs or testing the timing of such > >screens? > > >Thanks a lot! Cheers, Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From tobias.fw at gmail.com Mon Jul 4 10:48:06 2011 From: tobias.fw at gmail.com (Tobias) Date: Mon, 4 Jul 2011 03:48:06 -0700 Subject: Refresh rate TFT In-Reply-To: <09DAEA8BC192C94EB62C8E71FC35A5D92F7ACB5E4F@EXCHANGE3.ad.nottingham.ac.uk> Message-ID: I totally agree with you that CRTs will not endure forever, at some point in the future all stocks are gone and everyone will have to cope with using TFT or LCD or whatever... unless there is some clever company producing custom-made CRTs for experimental psychologists ;-) There are so many people nowadays in visual science that use very short presentation times that I would expect some expertise in this connection. However, it's hard to find any data... some database with LCD/ TFT screens would be nice. Researchers all over the world could measure the pixel latency and all sorts of other parameters and one could compare screens regarding these factors... On 1 Jul., 17:08, Michiel Spape wrote: > Hi David & List, > Stockpiling CRTs worked for us quite well as well, but the screens are getting quite old. As a results, it might be nice if we can ascertain where exactly the problem is and what we can practically do about it (given the instance where a CRT is unavailable). > 1. As far as I know, the problem you describe used to be worse than it is these days; the sort of blurry effect one had when moving a mouse-pointer, for instance, seems to be pretty much gone. What to look for with LCD screens to get 'high performance'? > 2. Am I correct in the understanding that it is not the problem that LCD pixels get bright fast, but, rather that they turn dark again slower? If so, it would, all in all, be a rare thing that one could not design an experiment around it. For instance, if I have a subliminal white prime with a duration of 16 ms, it won't turn dark after 16 ms. However, it won't turn dark on your retina either, and for this reason we usually mask stuff (say, a white pattern mask). Yet, if that would be impossible, would using inverse colours (a black prime), or some other colour scheme help? > Anyway, these should be some simple questions for anyone with a bit more knowledge of hardware than I have - which is rather little (I like programming, but am incredibly clumsy, which never helped). Nevertheless, I think that it would be useful to have them answered on the list, as it does seem that CRT monitors, whether we like it or not, might go the way of the videotape. > Best, > Mich > > Michiel Spapé > Research Fellow > Perception & Action group > University of Nottingham > School of Psychologywww.cognitology.eu > > ---------------- > //snip > One more note about measuring performance of LCD/TFT vs CRT.  It may > casually seem that images appear and disappear from the display with > high performance, however, several years ago when we measured LCD > performance with a photodetector and oscilloscope we found that it > took a *long* time for "off" pixels to return to baseline (some > hundreds of ms, as I recall).  That may not matter for your studies, > but it mattered to us at the time.  We have not done that measurement > again, so don't know how modern LCDs perform; instead, we have just > stockpiled our own stash of CRTs to provide for our future studies. > > Regards, > -- David McFarlane, Professional Faultfinder > > At 7/1/2011 05:54 AM Friday, you wrote: > > > > > > > > > > >HI together, > > >as CRTs are hard to get nowadays, we equipped our labs with tft > >screens. I wrote short and simple experiment to test the timing. > >basically, there are 4 display elements, alternating black and white > >background with nothing on it. As the refresh rate is 60 Hertz, I > >first set the duration to 50 ms (which is about 3 refresh circles). > >Prerelease is set on 20 ms. > > >These are the results (duration, duration error, onset delay > >[according to logged data in results file]) > > >slide 1: 50, 0, 5 > >slide 2: 50, 0, 0 > >slide 3: 50, 0, 0 > >slide 4: 50, 0, 0 > > >These are the results for a duration of 40 ms > > >slide 1: 40, 0, 6 > >slide 2: 40, 0, 10 > >slide 3: 40, 0, 10 > >slide 4: 40, 0, 10 > > >The first onset delay might be due to waiting for the next refresh > >circle to start. If the duration value matches the screen refresh > >rate, there seems to be no delay. If it doesn't (in this case, 40 ms), > >there is a delay that adds up to the next value that matches (50 ms). > >However, it is not clear to me how the duration arror can be 0 if > >refresh rate and duration value do not match. The screen should not be > >able to display something for 40 ms. > > >Any ideas? Any hints for using TFTs or testing the timing of such > >screens? > > >Thanks a lot! Cheers, Tobias > > -- > You received this message because you are subscribed to the Google Groups "E-Prime" group. > To post to this group, send email to e-prime at googlegroups.com. > To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. > For more options, visit this group athttp://groups.google.com/group/e-prime?hl=en. > > This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it.   Please do not use, copy or disclose the information contained in this message or in any attachment.  Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. > > This message has been checked for viruses but the contents of an attachment > may still contain software viruses which could damage your computer system: > you are advised to perform your own checks. Email communications with the > University of Nottingham may be monitored as permitted by UK legislation. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From ahafri at gmail.com Tue Jul 5 16:11:06 2011 From: ahafri at gmail.com (Alon Hafri) Date: Tue, 5 Jul 2011 09:11:06 -0700 Subject: eye tracking reading study In-Reply-To: Message-ID: Thanks Lisa and Mich! Mich, yesterday I actually implemented the distance-to-image-center calculation for a non-reading study to determine which of several images on screen a participant clicked on, and it worked very well, so thanks for that suggestion. It is true that a hit-test on an AOI rectangle with a buffer on all sides is overly tolerant of diagonally displaced gaze positions. You could correct it (as you said) with the following: -When the hit-test coords lie within the AOI rectangle, it is coded as a hit -When the closest point to the hit-test coords is any side of the AOI rectangle, the hit-test coordinates must be within 20 pixels horizontally or vertically from the AOI rectangle -When the closest point to the hit-test coords is the corner, measure the distance between the hit-test and the corner sqrt(x^2 + y^2), which must be <=20 pixels I'll have a crack at designing the reading study now, and take everyone's suggestions into account. Alon On Jul 1, 8:53 am, Lisa Levinson wrote: > Not sure about this but for the EEG experiments I have helped with > that explore reading they seem to use the list function to generate > sentences. The words appear one at a time but it's the only way you > can flag (for segmentation) the aspect of the sentence being > investigated. Might be totally different for eye-tracking but that's > how I have seen the reading experiments are organized for EEG. > > On Jun 28, 4:46 pm, Alon Hafri wrote: > > > Hi, wondering if someone in the group can help me out. > > > I am creating an E-Prime experiment using the E-Prime Extensions for > > Tobii. For each trial, the participant will read a sentence, and I > > would like to record reading times for each window of size 1 to 3 > > words. > > > I have experience with using list attributes to set Slide Image > > position (and therefore AOI position) at runtime, as well as with > > using transparent Slide Images overtop of larger images to act as > > AOIs, but I've never done a reading study before. Since the words will > > vary in length for each trial, but will need to be evenly spaced (and > > on multiple lines conceivably), it would be great if position for > > every window would not have to be specified but could be determined by > > a script. > > > I can think of a few solutions, but perhaps someone has an easier one? > > 1) create a Slide Text object for each word (or window), and so they > > could act as their own AOIs. > > Drawbacks: You would have to specify locations for each one, and it > > could be tricky lining them up appropriately so words are evenly > > spaced. > > > 2) Have one Slide Text object for the whole sentence and have > > transparent AOIs overtop as the AOIs. > > Drawbacks: You would still have to specify locations for each, but the > > text would be in one object so would appear normal. > > > 3) Suggestions? > > > Thanks! > > Alon -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Tue Jul 5 19:27:00 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Tue, 5 Jul 2011 15:27:00 -0400 Subject: Refresh rate TFT In-Reply-To: Message-ID: At 7/4/2011 06:42 AM Monday, you wrote: >Thanks David for the detailed reply. If I understand you correctly, >you assume that, entering a duration value of 40 ms, you will always >have an actual duration of 50 ms (using the refresh rate of 60 Hz), >right? As far as I understand, yes. Of course, it would be best to further verify this with a photodector and oscilloscope. >Still, anoher question is, how long it physically takes for the pixels >to cease glowing even after, let's say a black screen, sets on. This >should be measured with external light sensitive hardware I guess... Exactly. Checking the "Response time" article at Wikipedia, I see that LCD response times are defined as the time for a pixel to go from black, to white, and back to black. With response times defined as such, and LCD manufacturers claiming response times under 10 ms, we should be in good shape. But I would not trust those numbers unless I measured it for myself, as I still wonder whether these claims actually include the white-to-black time. Furthermore, some manufacturers use "repsonse time" to refer to a gray-to-gray-to-gray transition, which is a another whole matter. As I said earlier, when we measured this ourselves several years ago, white-to-black took a *long* time. As I recall, it was actually a biphasic decay, with a rapid early phase (say, down to 10% of baseline after 10-20 ms), with a long slow tail (over 100 ms to get closer to baseline). As always, as scientists, we cannot take the word of equipment manufacturers (or even other scientists), it is incumbent upon us to measure our own equipment in our own labs. Regards, -- David McFarlane, Professional Faultfinder "You got to test that lab equipment, You got to test it for yourself, No one else can test it for you, You got to test it for yourself." (Apologies to the Fairfield Four) >Best, >Tobias > > >On 1 Jul., 16:10, David McFarlane wrote: > > Tobias, > > > > Stock reminder: 1) I do not work for PST. 2) PST's trained staff > > takes any and all questions > athttp://support.pstnet.com/e%2Dprime/support/login.asp, and they > > strive to respond to all requests in 24-48 hours -- this is pretty > > much their substitute for proper documentation, so make full use of > > it. 3) If you do get an answer from PST Web Support, please extend > > the courtesy of posting their reply back here for the sake of others. > > > > That said, here is my take... > > > > Nice test, and excellent question. The problem arises because > > E-Prime uses two entirely different and incompatible definitions of > > "actual" duration: > > > > (1) Actual duration = (OnsetTime of next visual object) - (OnsetTime > > of this visual object) > > (2) Actual duration = (OffsetTime of this visual object) - (OnsetTime > > of this visual object) > > > > So, if DurationError = (Duration (i.e., specified Duration)) - > > ("actual" duration), then you have to know which definition of > > "actual" duration is used. > > > > Because a visual object typically remains visible until the onset of > > the next visual object, most of us think of "actual" duration in > > terms of definition (1), and so would expect that definition to be > > used for calculating DurationError. But if you think of that from a > > programming point of view, you will see the problem with > > that: E-Prime cannot know the OnsetTime of the next object until, > > well, that object appears, and by that time it is too late to use the > > value in logging anything regarding the previous object. > > > > So, E-Prime uses definition (2) for "actual" duration (see the > > RteRunnableInputObject.DurationError topic in the E-Basic Help > > facility), and your results follow. (Don't take my word for this, > > log all the appropriate values and see for yourself that it does the > > calculation as I describe.) IOW, at a (specified) Duration of 40 ms, > > the object OnsetTime occurs late (by 10 ms), but OffsetTime still > > occurs 40 ms later, thus DurationError = Duration - (OffsetTime - > > OnsetTime) = 40 ms, as measured (hmm, did you use Event or Cumulative > > timing mode? your results do not look quite right for Event timing > > mode); but since the next object again appears 10 ms late, the > > "actual" duration of each object (according to definition (1)) > > remains 50 ms. Follow? > > > > Perhaps they could have chosen better terminology, although offhand I > > have nothing better to suggest myself . > > > > One more note about measuring performance of LCD/TFT vs CRT. It may > > casually seem that images appear and disappear from the display with > > high performance, however, several years ago when we measured LCD > > performance with a photodetector and oscilloscope we found that it > > took a *long* time for "off" pixels to return to baseline (some > > hundreds of ms, as I recall). That may not matter for your studies, > > but it mattered to us at the time. We have not done that measurement > > again, so don't know how modern LCDs perform; instead, we have just > > stockpiled our own stash of CRTs to provide for our future studies. > > > > Regards, > > -- David McFarlane, Professional Faultfinder > > > > At 7/1/2011 05:54 AM Friday, you wrote: > > > > > > > > > > > > > > > > >HI together, > > > > >as CRTs are hard to get nowadays, we equipped our labs with tft > > >screens. I wrote short and simple experiment to test the timing. > > >basically, there are 4 display elements, alternating black and white > > >background with nothing on it. As the refresh rate is 60 Hertz, I > > >first set the duration to 50 ms (which is about 3 refresh circles). > > >Prerelease is set on 20 ms. > > > > >These are the results (duration, duration error, onset delay > > >[according to logged data in results file]) > > > > >slide 1: 50, 0, 5 > > >slide 2: 50, 0, 0 > > >slide 3: 50, 0, 0 > > >slide 4: 50, 0, 0 > > > > >These are the results for a duration of 40 ms > > > > >slide 1: 40, 0, 6 > > >slide 2: 40, 0, 10 > > >slide 3: 40, 0, 10 > > >slide 4: 40, 0, 10 > > > > >The first onset delay might be due to waiting for the next refresh > > >circle to start. If the duration value matches the screen refresh > > >rate, there seems to be no delay. If it doesn't (in this case, 40 ms), > > >there is a delay that adds up to the next value that matches (50 ms). > > >However, it is not clear to me how the duration arror can be 0 if > > >refresh rate and duration value do not match. The screen should not be > > >able to display something for 40 ms. > > > > >Any ideas? Any hints for using TFTs or testing the timing of such > > >screens? > > > > >Thanks a lot! Cheers, Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From pati.confidence at gmail.com Wed Jul 6 05:17:10 2011 From: pati.confidence at gmail.com (pati-confidence) Date: Tue, 5 Jul 2011 22:17:10 -0700 Subject: Several flickering tasks run simultaneously Message-ID: I want to build a BCI system, which presents four targets on LCD screen, with flickering frequencies of 12Hz, 10Hz, 8.6Hz and 7.5Hz. respectively. And the four targets are flickering simultaneously. Can E-prime achieve the goal? Any tips will be appreciate. Thank you. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From ucfmicah at gmail.com Wed Jul 6 08:21:31 2011 From: ucfmicah at gmail.com (Micah) Date: Wed, 6 Jul 2011 01:21:31 -0700 Subject: OSPAN-task In-Reply-To: <4dee2fc1.cf3c2b0a.47ff.609eSMTPIN_ADDED@gmr-mx.google.com> Message-ID: The snark is strong in this answer, but I think google has foiled you. The top hit is now this post. Hence creating a totally unhelpful infinite loop. ;) BW, Micah On Jun 7, 4:03 pm, David McFarlane wrote: > http://www.lmgtfy.com/?q=e-prime+ospan > > -- David McFarlane, Professional Faultfinder > > > > > > > > >Hi alltogether, > > >I am wondering if anyone has a script sample for the OSPAN-task or if > >someone can help me with the program. > >My problem is the simplest possible programming of the rising number > >of calculations and the corresponding rise in the number of stimuli to > >memorize. > > >Thanks for any help!! > > >Alexander -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From Michiel.Spape at nottingham.ac.uk Wed Jul 6 08:43:42 2011 From: Michiel.Spape at nottingham.ac.uk (Michiel Spape) Date: Wed, 6 Jul 2011 09:43:42 +0100 Subject: Several flickering tasks run simultaneously In-Reply-To: Message-ID: Hi, Well, yes, it can (given the right monitor), though you would obviously be looking at ways to code your frequencies in duration of stimulus + duration between stimuli (e.g. 10 Hz = one stimulus every 100 ms, therefore, an image taking 17 ms, and an ISI of 83, would give the effect). If, however, it is a psychophysical (or vision science) experiment, I'd suggest something like Psychopy, or Matlab, instead of E-Prime however, the latter being much more catered towards intricate psychological designs than vision science as such. Best, Mich Michiel Spapé Research Fellow Perception & Action group University of Nottingham School of Psychology www.cognitology.eu -----Original Message----- From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of pati-confidence Sent: 06 July 2011 06:17 To: E-Prime Subject: Several flickering tasks run simultaneously I want to build a BCI system, which presents four targets on LCD screen, with flickering frequencies of 12Hz, 10Hz, 8.6Hz and 7.5Hz. respectively. And the four targets are flickering simultaneously. Can E-prime achieve the goal? Any tips will be appreciate. Thank you. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From Michiel.Spape at nottingham.ac.uk Wed Jul 6 09:12:17 2011 From: Michiel.Spape at nottingham.ac.uk (Michiel Spape) Date: Wed, 6 Jul 2011 10:12:17 +0100 Subject: Several flickering tasks run simultaneously In-Reply-To: Message-ID: Oh, wait, simultaneous tasks, you say? I think there are a few ways of handling this... How about you make one slide with your four targets. These are four text "sub objects". Each target has a colour: white (as in, off, since the background is white), or black. See first how you can make them black or white (it's the background colour thing). Then, set each to [Target1Colour], [Target2Colour], [Target3Colour] and [Target4Colour] instead. The slide has a duration of slightly below your maximum refresh rate (i.e. 15 ms if your monitor runs at 60 Hz), and onset sync is on. Make a list, sequential selection, 1 procedure, and set Exit after to 1 sec (i.e., it repeats for one second). Drag the slide you just made to the one procedure. Add 4 procedures to the list: Target1Colour, Target2Colour, Target3Colour, Target4Colour. Think of the list as one second, and add levels accordingly: if your monitor runs at 60 Hz, there should be at least 60 levels. Find out, at each level, which of the targets is black. For instance, your second target, flickering at 10 Hz, should be black at the first level (time = 0 ms), 7th level (time = 100 ms), 13th level (time = 200 ms) and so on, but white at level 2-6, and so on. Well, voila, there you go, it should now flicker. Of course, nothing is randomised, but it should work, and I think you might be able to take it from there. Also, no code yet. Best, Michiel Michiel Spapé Research Fellow Perception & Action group University of Nottingham School of Psychology www.cognitology.eu -----Original Message----- From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of pati-confidence Sent: 06 July 2011 06:17 To: E-Prime Subject: Several flickering tasks run simultaneously I want to build a BCI system, which presents four targets on LCD screen, with flickering frequencies of 12Hz, 10Hz, 8.6Hz and 7.5Hz. respectively. And the four targets are flickering simultaneously. Can E-prime achieve the goal? Any tips will be appreciate. Thank you. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From linda.toscani at gmail.com Wed Jul 6 14:43:58 2011 From: linda.toscani at gmail.com (Linda T) Date: Wed, 6 Jul 2011 07:43:58 -0700 Subject: recording response Message-ID: Hi! I have a problem with E-prime. I have an image display (my stimulus) and the subject can respond when they see this slide but it is really fast (500ms) then after this image display I used a wait. The problem is that the subjects can respond when there is the stimulus and also when there is the wait. If the subjects respond when there is the stimulus e-prime show equally the wait. I would like to say to the program that if the subjects respond when there is the stimulus it doesn't employ the wait. Because now the program record two responses if the subject respond twice. I hope I was clear. Linda -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From liwenna at gmail.com Thu Jul 7 10:32:39 2011 From: liwenna at gmail.com (liwenna) Date: Thu, 7 Jul 2011 03:32:39 -0700 Subject: recording response In-Reply-To: Message-ID: Hi Linda, This probably isn't the most elegant solution but it will work... inbetween your slide and your wait place an inline with a text like: If SLIDENAME.InputMasks.Responses.Count > 0 then goto skipwaitlabel after the wait place a label that you call skipwaitlabel. Now if a response is given during the slide then the program will "jump" to the location of the skipwaitlabel, thereby skipping the wait. Best, liw On 6 jul, 10:43, Linda T wrote: > Hi! > > I have a problem with E-prime. > I have an image display (my stimulus) and the subject can respond when > they see this slide but it is really fast (500ms) then after this > image display I used a wait. The problem is that the subjects can > respond when there is the stimulus and also when there is the wait. If > the subjects respond when there is the stimulus e-prime show equally > the wait. I would like to say to the program that if the subjects > respond when there is the stimulus it doesn't employ the wait. Because > now the program record two responses if the subject respond twice. > > I hope I was clear. > > Linda -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From liwenna at gmail.com Thu Jul 7 10:43:38 2011 From: liwenna at gmail.com (liwenna) Date: Thu, 7 Jul 2011 03:43:38 -0700 Subject: recording response In-Reply-To: Message-ID: actually... a feature I never use (learned about it only later :p) enables you to do this without code. In the slide itself you can specify that when a response is given it should go to a jumplabel. In the slide properties there is this box reading something like 'if response is given then', default setting is 'terminate' can also set it to 'goto jumplabel'. best liw On 7 jul, 12:32, liwenna wrote: > Hi Linda, > > This probably isn't the most elegant solution but it will work... > inbetween your slide and your wait place an inline with a text like: > > If SLIDENAME.InputMasks.Responses.Count > 0 then goto skipwaitlabel > > after the wait place a label that you call skipwaitlabel. Now if a > response is given during the slide then the program will "jump" to the > location of the skipwaitlabel, thereby skipping the wait. > > Best, > > liw > > On 6 jul, 10:43, Linda T wrote: > > > Hi! > > > I have a problem with E-prime. > > I have an image display (my stimulus) and the subject can respond when > > they see this slide but it is really fast (500ms) then after this > > image display I used a wait. The problem is that the subjects can > > respond when there is the stimulus and also when there is the wait. If > > the subjects respond when there is the stimulus e-prime show equally > > the wait. I would like to say to the program that if the subjects > > respond when there is the stimulus it doesn't employ the wait. Because > > now the program record two responses if the subject respond twice. > > > I hope I was clear. > > > Linda -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From linda.toscani at gmail.com Thu Jul 7 12:43:39 2011 From: linda.toscani at gmail.com (Linda T) Date: Thu, 7 Jul 2011 05:43:39 -0700 Subject: recording response In-Reply-To: <1002d72d-887d-4cad-81af-c8af124e75f7@e18g2000vbx.googlegroups.com> Message-ID: Thanks! I used the inline. In the other case I didn't understand in which way I can indicate the jumplabel. Do I have to use a number or a name to indicate the level that I want to go? best Linda On Jul 7, 12:43 pm, liwenna wrote: > actually... a feature I never use (learned about it only later :p) > enables you to do this without code. In the slide itself you can > specify that when a response is given it should go to a jumplabel. In > the slide properties there is this box reading something like 'if > response is given then', default setting is 'terminate' can also set > it to 'goto jumplabel'. > > best > > liw > > On 7 jul, 12:32, liwenna wrote: > > > > > > > > > Hi Linda, > > > This probably isn't the most elegant solution but it will work... > > inbetween your slide and your wait place an inline with a text like: > > > If SLIDENAME.InputMasks.Responses.Count > 0 then goto skipwaitlabel > > > after the wait place a label that you call skipwaitlabel. Now if a > > response is given during the slide then the program will "jump" to the > > location of the skipwaitlabel, thereby skipping the wait. > > > Best, > > > liw > > > On 6 jul, 10:43, Linda T wrote: > > > > Hi! > > > > I have a problem with E-prime. > > > I have an image display (my stimulus) and the subject can respond when > > > they see this slide but it is really fast (500ms) then after this > > > image display I used a wait. The problem is that the subjects can > > > respond when there is the stimulus and also when there is the wait. If > > > the subjects respond when there is the stimulus e-prime show equally > > > the wait. I would like to say to the program that if the subjects > > > respond when there is the stimulus it doesn't employ the wait. Because > > > now the program record two responses if the subject respond twice. > > > > I hope I was clear. > > > > Linda -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Thu Jul 7 16:20:14 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Thu, 7 Jul 2011 12:20:14 -0400 Subject: recording response In-Reply-To: Message-ID: Linda, Hmm. I wonder what task you want to perform, because offhand this design seems very clumsy -- You present an ImageDisplay for 500 ms, then follow that with a Wait object, but since a Wait object does not replace the previous visual display, this means that the subject will continue to see the ImageDisplay during the Wait. Why would you do such a thing? Then you go and collect a response to the Wait, which you do not want. Why did you add an input mask to the Wait object in the first place? If you just remove any input mask from the Wait object, then you will not get two responses, which seems to be what you are asking about. I must be missing something. -- David McFarlane, Professional Faultfinder At 7/6/2011 10:43 AM Wednesday, you wrote: >I have a problem with E-prime. >I have an image display (my stimulus) and the subject can respond when >they see this slide but it is really fast (500ms) then after this >image display I used a wait. The problem is that the subjects can >respond when there is the stimulus and also when there is the wait. If >the subjects respond when there is the stimulus e-prime show equally >the wait. I would like to say to the program that if the subjects >respond when there is the stimulus it doesn't employ the wait. Because >now the program record two responses if the subject respond twice. > >I hope I was clear. > >Linda -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From tobias.fw at gmail.com Thu Jul 7 17:20:14 2011 From: tobias.fw at gmail.com (Tobias) Date: Thu, 7 Jul 2011 10:20:14 -0700 Subject: refresh rate USB Message-ID: Hi together, I plan an experiment in which Reaction Times for two conditions will be compared and not too much of a difference is expected. Let's say 15 ms. I am wondering if an USB keyboard is the appropriate choice for such an experiment. I've heard that USB usually has a refresh rate of 120 Hz, meaning that responses are checked every 8 ms. That's a lot of noise added to the real reaction times. On the other hand, EEG data and other stuff CAN be transferred much faster than 120 Hz via USB cable. THe question is, whether Windows (or E-Prime) can handle this. What is your experience here? Thanks a lot and so long, Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From tobias.fw at gmail.com Thu Jul 7 17:23:45 2011 From: tobias.fw at gmail.com (Tobias) Date: Thu, 7 Jul 2011 10:23:45 -0700 Subject: Slide duration defined by variable, not attribute Message-ID: Hi, I would like to define the duration of an object (slide in this case) in E-Prime with a variable. As far as I know, instead of specifying the duration directly by a number, you can also use square brackets and enter, let's say [durationA]. This refers to the attribute in the current list named "durationA". However, using attributes is much more complicated and not really straight forward. Is there a way of using variables instead? Thanks a lot in advance! Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Thu Jul 7 17:56:09 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Thu, 7 Jul 2011 13:56:09 -0400 Subject: Slide duration defined by variable, not attribute In-Reply-To: Message-ID: Tobias, First, I disagree with your premise about attribute references being "more complicated and not really straight forward" than variables. It is just as simple and straightforward to use attribute references in code as it is to use variables in code, and in most cases attribute references offer distince advantages. I started out using variables just as you describe (and so will get around to actually answering your question :)), but once I understood attribute references better I switched to using those whenever I can, for the following reasons: - Using a variable for, say, Duration, leaves *no* clue in the program design that that value will vary -- to the contrary, the object's Duration will show as a constant, so programmers just have to "know" that this value will vary in some code somewhere. By contrast, an attribute reference in the object serves notice that that value varies, and thus is much "friendlier" to programmers. - Using a variable does *not* log the varying value, so after the experiment you have no record of what really happened. Using an attribute reference fixes this at no extra cost. Yes, you could throw in a c.SetAttrib "DurationA", durationA just to log the, but once you go to that length you might as well just use the attribute in your object, no? So except for extreme cases, if I need to vary a property value from code instead of a List, I always do something like c.SetAttrib "DurationA", durationA and then use [DurationA] for the Duration property of my stimulus object. But let's suppose that you really have a valid purpose for this (or wish to simply ignore my sage advice). Here's how you do that. Suppose you want to set the Duration property of a stimlus object called StimText to a variable called durationA. In code, you simply do StimText.Duration = durationA That's it! Absurdly simple. You can do this for a whole host of object properties, just look at the E-Basic Help page for any desired object. For that matter, work through Chapter 4 of the User's Guide that came with E-Prime, and take a course in Introduction to Computer Programming. Regards, -- David McFarlane, Professional Faultfinder At 7/7/2011 01:23 PM Thursday, you wrote: >Hi, > >I would like to define the duration of an object (slide in this case) >in E-Prime with a variable. As far as I know, instead of specifying >the duration directly by a number, you can also use square brackets >and enter, let's say [durationA]. This refers to the attribute in the >current list named "durationA". However, using attributes is much more >complicated and not really straight forward. Is there a way of using >variables instead? > >Thanks a lot in advance! >Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Thu Jul 7 18:17:11 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Thu, 7 Jul 2011 14:17:11 -0400 Subject: refresh rate USB In-Reply-To: <04d38ccd-8bcb-4308-b704-3a4066fd025d@b21g2000yqc.googlegro ups.com> Message-ID: Tobias, Sorry, I do not have citations handy, I will leave that as an academic exercise for you. But I believe this question, and a related one, has been covered over the years in publications such as "Behavior Research Methods", as well as in a white paper that I believe came from PST (and may appear in the E-Prime User Guide). First, the rate-limiting issue seems to *not* be the transfer rate of USB, but rather the characteristics of the keyboard hardware. Even if USB transfers at 120 Hz or higher, that does *not* mean that the device (in this case the keyboard) itself collects & sends data at that rate. With keyboards especially, this seems to be a bad assumption. First, individual keyboards are all over the map with regard to response latencies and variance, so even if you measure one you have no idea how that applies to others, even others of the same manufacturer and model! With that warning, it seems that keyboards often have variable latencies in the ballpark of 0 - 15 ms. This means that if you get an individual RT of, say 300 ms, you don't know if it was really 300 ms, or 285 ms, or somewhere in between. So if you really need to know *individual* RTs down to the ms, then you need to use something other than a keyboard (e.g., SRBox; buttons on computer mice have been shown to have long but low-variance latencies, which could help, but mouse movement may interfere with this -- once again, search the literature, or better do your own tests). But most studies either do not need that much precision, or do not need to know *individual* RTs. In particular, the behaviors that we wish to measure often have variance that far exceeds the variance in our sloppy input devices. And this was the thesis of the white paper that I referred to at the beginning. The authors did some computations to show that, in almost every case, simply adding a few more trials or subjects to measure an average RT brings the variance down as good as we could get by going to great lengths to use a more precise input device. So we should just quit fretting about this in most cases, and save that worrry for the few times that it really applies. I will be interested to hear others weigh in. -- David McFarlane, Professional Faultfinder "You got to test that device performance, You got to test it for yourself, No one else can test it for you, You got to test it for yourself." (Apologies to the Fairfield Four) >I plan an experiment in which Reaction Times for two conditions will >be compared and not too much of a difference is expected. Let's say 15 >ms. I am wondering if an USB keyboard is the appropriate choice for >such an experiment. I've heard that USB usually has a refresh rate of >120 Hz, meaning that responses are checked every 8 ms. That's a lot of >noise added to the real reaction times. > >On the other hand, EEG data and other stuff CAN be transferred much >faster than 120 Hz via USB cable. THe question is, whether Windows (or >E-Prime) can handle this. > >What is your experience here? > >Thanks a lot and so long, >Tobias > >-- >You received this message because you are subscribed to the Google >Groups "E-Prime" group. >To post to this group, send email to e-prime at googlegroups.com. >To unsubscribe from this group, send email to >e-prime+unsubscribe at googlegroups.com. >For more options, visit this group at >http://groups.google.com/group/e-prime?hl=en. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Thu Jul 7 19:03:55 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Thu, 7 Jul 2011 15:03:55 -0400 Subject: Several flickering tasks run simultaneously In-Reply-To: <09DAEA8BC192C94EB62C8E71FC35A5D92F7F21FE49@EXCHANGE3.ad.no ttingham.ac.uk> Message-ID: Mich beat me to the punch, and with the answer that I would have given at first. And Mich adds a crucial concern that I would have overlooked, namely that your chosen flicker times only work if they are each commensurate with your display refresh rate, which they probably are not (your chosen flicker frequencies translate to periods of 83.3, 100, 116.3, and 113.3 ms, respectively, and you would have to find a common divisor to all of those in the range of roughly 8.3 to 16, good luck!). But I can't resist weighing in further... Setting aside your incommensurate flicker rates, can E-Prime do this? Well (as Mich already said), yes, in principle; but in practice, for this particular task you might be far better off using something like Presentation, or MATLAB with the Psychophysics Toolkit (my own first choice for your task). You would like a toolset that includes pre-made objects that can flicker themselves at specified rates, and then set those running. AFAIK, EP has no such facility, but maybe Presentation or MATLAB or Psychopy do, and then Bob's your uncle! Next, you could try Mich's fine suggestion, but once again I fear that incommensurability will raise its ugly head. Now you not only need a common divisor, but you need a List that contains the pattern of on-off images for each time point until the entire temporal pattern repeats, and that will not happen until you reach the least-common-multiple of the individual period times, and in your case that will be greater than, say, 83.3 * 113.3 = 9.5 s, and perhaps as great as 83.3 * 100 * 116.3 * 113.3 = 30.7 h. Yikes! Of course, if you are not wedded to these period times, then you might adust them to more workable values (there's a nice academic exercise for you). But I said E-Prime could do this, and here's how. It would require some intricate code, the same way that you could do it in any full-featured programming language, such as C or C++ or even JavaScript, and I have done things like this myself in C. You would need to contruct your own "event loop" (do a search of the Group or the Forum on that phrase to see where I have discussed this before). In short, you create an array that holds the upcoming transition time for each object (in this case, your four flickering targets). Each time through the loop it just checks each of these times against the current clock time, and when any one reaches its next transition time then the loop updates that target and adjuts its transition time for the next one. Your loop just does that for the duration of the display. Here is some pseudo-code for that (using my own odd mixture of C-like and other notation): while( presentation_ongoing ) for( i = 1 to nTargets ) if( Clock.Read >= target[i].tNext ) target[i].toggle target[i].tNext = target[i].tNext + target[i].tPeriod Of course, you also have to initialize .tPeriod and .tNext for each target, and I left out the mechanics of how to implement anything like a .toggle method to redraw a target between its two states, but I leave those as exercises. -- David McFarlane, Professional Faultfinder (P.s. For those who know more C-like notation, the pseudo-code above could be more nicely written as while( presentation_ongoing ) for( i = 1 to nTargets ) if( Clock.Read >= target[i].tNext ) target[i].toggle target[i].tNext += target[i].tPeriod Isnt' that nice?) At 7/6/2011 05:12 AM Wednesday, Michiel Spape wrote: >Oh, wait, simultaneous tasks, you say? >I think there are a few ways of handling this... >How about you make one slide with your four >targets. These are four text "sub objects". Each >target has a colour: white (as in, off, since >the background is white), or black. See first >how you can make them black or white (it's the >background colour thing). Then, set each to >[Target1Colour], [Target2Colour], >[Target3Colour] and [Target4Colour] instead. The >slide has a duration of slightly below your >maximum refresh rate (i.e. 15 ms if your monitor >runs at 60 Hz), and onset sync is on. >Make a list, sequential selection, 1 procedure, >and set Exit after to 1 sec (i.e., it repeats >for one second). Drag the slide you just made to the one procedure. >Add 4 procedures to the list: Target1Colour, >Target2Colour, Target3Colour, Target4Colour. >Think of the list as one second, and add levels >accordingly: if your monitor runs at 60 Hz, >there should be at least 60 levels. Find out, at >each level, which of the targets is black. For >instance, your second target, flickering at 10 >Hz, should be black at the first level (time = 0 >ms), 7th level (time = 100 ms), 13th level (time >= 200 ms) and so on, but white at level 2-6, and so on. > >Well, voila, there you go, it should now >flicker. Of course, nothing is randomised, but >it should work, and I think you might be able to >take it from there. Also, no code yet. >Best, >Michiel > >Michiel Spapé >Research Fellow >Perception & Action group >University of Nottingham >School of Psychology >www.cognitology.eu > > >-----Original Message----- >From: e-prime at googlegroups.com >[mailto:e-prime at googlegroups.com] On Behalf Of pati-confidence >Sent: 06 July 2011 06:17 >To: E-Prime >Subject: Several flickering tasks run simultaneously > >I want to build a BCI system, which presents four targets on LCD >screen, with flickering frequencies of 12Hz, 10Hz, 8.6Hz and 7.5Hz. >respectively. > >And the four targets are flickering simultaneously. > >Can E-prime achieve the goal? > >Any tips will be appreciate. Thank you. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Thu Jul 7 19:08:39 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Thu, 7 Jul 2011 15:08:39 -0400 Subject: Several flickering tasks run simultaneously In-Reply-To: <4e160346.94592a0a.12e6.15f3SMTPIN_ADDED@gmr-mx.google.com> Message-ID: Ah, checked my own E-Prime FAQ, and here is the link of where I have addressed this kind of question before: http://groups.google.com/group/e-prime/browse_thread/thread/fda0b9bbe3a149c3 -- David McFarlane, Professional Faultfinder (Now next time someone asks this, I will try to direct them to the thread from today :)) At 7/7/2011 03:03 PM Thursday, David McFarlane wrote: >Mich beat me to the punch, and with the answer >that I would have given at first. And Mich adds >a crucial concern that I would have overlooked, >namely that your chosen flicker times only work >if they are each commensurate with your display >refresh rate, which they probably are not (your >chosen flicker frequencies translate to periods >of 83.3, 100, 116.3, and 113.3 ms, respectively, >and you would have to find a common divisor to >all of those in the range of roughly 8.3 to 16, >good luck!). But I can't resist weighing in further... > >Setting aside your incommensurate flicker rates, >can E-Prime do this? Well (as Mich already >said), yes, in principle; but in practice, for >this particular task you might be far better off >using something like Presentation, or MATLAB >with the Psychophysics Toolkit (my own first >choice for your task). You would like a toolset >that includes pre-made objects that can flicker >themselves at specified rates, and then set >those running. AFAIK, EP has no such facility, >but maybe Presentation or MATLAB or Psychopy do, and then Bob's your uncle! > >Next, you could try Mich's fine suggestion, but >once again I fear that incommensurability will >raise its ugly head. Now you not only need a >common divisor, but you need a List that >contains the pattern of on-off images for each >time point until the entire temporal pattern >repeats, and that will not happen until you >reach the least-common-multiple of the >individual period times, and in your case that >will be greater than, say, 83.3 * 113.3 = 9.5 s, >and perhaps as great as 83.3 * 100 * 116.3 * >113.3 = 30.7 h. Yikes! Of course, if you are >not wedded to these period times, then you might >adust them to more workable values (there's a nice academic exercise for you). > >But I said E-Prime could do this, and here's >how. It would require some intricate code, the >same way that you could do it in any >full-featured programming language, such as C or >C++ or even JavaScript, and I have done things >like this myself in C. You would need to >contruct your own "event loop" (do a search of >the Group or the Forum on that phrase to see >where I have discussed this before). In short, >you create an array that holds the upcoming >transition time for each object (in this case, >your four flickering targets). Each time >through the loop it just checks each of these >times against the current clock time, and when >any one reaches its next transition time then >the loop updates that target and adjuts its >transition time for the next one. Your loop >just does that for the duration of the >display. Here is some pseudo-code for that >(using my own odd mixture of C-like and other notation): > >while( presentation_ongoing ) > for( i = 1 to nTargets ) > if( Clock.Read >= target[i].tNext ) > target[i].toggle > target[i].tNext = target[i].tNext + target[i].tPeriod > >Of course, you also have to initialize .tPeriod >and .tNext for each target, and I left out the >mechanics of how to implement anything like a >.toggle method to redraw a target between its >two states, but I leave those as exercises. > >-- David McFarlane, Professional Faultfinder > > >(P.s. For those who know more C-like notation, >the pseudo-code above could be more nicely written as > >while( presentation_ongoing ) > for( i = 1 to nTargets ) > if( Clock.Read >= target[i].tNext ) > target[i].toggle > target[i].tNext += target[i].tPeriod > >Isnt' that nice?) > > >At 7/6/2011 05:12 AM Wednesday, Michiel Spape wrote: >>Oh, wait, simultaneous tasks, you say? >>I think there are a few ways of handling this... >>How about you make one slide with your four >>targets. These are four text "sub objects". >>Each target has a colour: white (as in, off, >>since the background is white), or black. See >>first how you can make them black or white >>(it's the background colour thing). Then, set >>each to [Target1Colour], [Target2Colour], >>[Target3Colour] and [Target4Colour] instead. >>The slide has a duration of slightly below your >>maximum refresh rate (i.e. 15 ms if your >>monitor runs at 60 Hz), and onset sync is on. >>Make a list, sequential selection, 1 procedure, >>and set Exit after to 1 sec (i.e., it repeats >>for one second). Drag the slide you just made to the one procedure. >>Add 4 procedures to the list: Target1Colour, >>Target2Colour, Target3Colour, Target4Colour. >>Think of the list as one second, and add levels >>accordingly: if your monitor runs at 60 Hz, >>there should be at least 60 levels. Find out, >>at each level, which of the targets is black. >>For instance, your second target, flickering at >>10 Hz, should be black at the first level (time >>= 0 ms), 7th level (time = 100 ms), 13th level >>(time = 200 ms) and so on, but white at level 2-6, and so on. >> >>Well, voila, there you go, it should now >>flicker. Of course, nothing is randomised, but >>it should work, and I think you might be able >>to take it from there. Also, no code yet. >>Best, >>Michiel >> >>Michiel Spapé >>Research Fellow >>Perception & Action group >>University of Nottingham >>School of Psychology >>www.cognitology.eu >> >> >>-----Original Message----- >>From: e-prime at googlegroups.com >>[mailto:e-prime at googlegroups.com] On Behalf Of pati-confidence >>Sent: 06 July 2011 06:17 >>To: E-Prime >>Subject: Several flickering tasks run simultaneously >> >>I want to build a BCI system, which presents four targets on LCD >>screen, with flickering frequencies of 12Hz, 10Hz, 8.6Hz and 7.5Hz. >>respectively. >> >>And the four targets are flickering simultaneously. >> >>Can E-prime achieve the goal? >> >>Any tips will be appreciate. Thank you. > >-- >You received this message because you are >subscribed to the Google Groups "E-Prime" group. >To post to this group, send email to e-prime at googlegroups.com. >To unsubscribe from this group, send email to >e-prime+unsubscribe at googlegroups.com. >For more options, visit this group at >http://groups.google.com/group/e-prime?hl=en. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From pquain at une.edu.au Thu Jul 7 21:35:32 2011 From: pquain at une.edu.au (Peter Quain) Date: Fri, 8 Jul 2011 07:35:32 +1000 Subject: refresh rate USB In-Reply-To: <04d38ccd-8bcb-4308-b704-3a4066fd025d@b21g2000yqc.googlegro ups.com> Message-ID: I think USB polling rate and USB data transfer rate are 2 different things At 03:20 AM 8/07/2011, you wrote: >Hi together, > >I plan an experiment in which Reaction Times for two conditions will >be compared and not too much of a difference is expected. Let's say 15 >ms. I am wondering if an USB keyboard is the appropriate choice for >such an experiment. I've heard that USB usually has a refresh rate of >120 Hz, meaning that responses are checked every 8 ms. That's a lot of >noise added to the real reaction times. > >On the other hand, EEG data and other stuff CAN be transferred much >faster than 120 Hz via USB cable. THe question is, whether Windows (or >E-Prime) can handle this. > >What is your experience here? > >Thanks a lot and so long, >Tobias > >-- >You received this message because you are subscribed to the Google >Groups "E-Prime" group. >To post to this group, send email to e-prime at googlegroups.com. >To unsubscribe from this group, send email to >e-prime+unsubscribe at googlegroups.com. >For more options, visit this group at >http://groups.google.com/group/e-prime?hl=en. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From pati.confidence at gmail.com Fri Jul 8 00:11:27 2011 From: pati.confidence at gmail.com (pati-confidence) Date: Fri, 8 Jul 2011 08:11:27 +0800 Subject: Several flickering tasks run simultaneously In-Reply-To: <4e16043e.83842b0a.705c.003fSMTPIN_ADDED@gmr-mx.google.com> Message-ID: Thank you for your so detailed and valuable relies. I have implemented the required task by the use of the Slide, with four targets flickering in 10Hz, 11Hz, 12Hz and 15Hz respectively, which is much easier than flickering in 7.5Hz, 8.6Hz, 10Hz, 12Hz. And I will attempt your method later. Thank you very much! guobing Wu On Fri, Jul 8, 2011 at 3:08 AM, David McFarlane wrote: > Ah, checked my own E-Prime FAQ, and here is the link of where I have > addressed this kind of question before: http://groups.google.com/** > group/e-prime/browse_thread/**thread/fda0b9bbe3a149c3 > > -- David McFarlane, Professional Faultfinder > (Now next time someone asks this, I will try to direct them to the thread > from today :)) > > > > At 7/7/2011 03:03 PM Thursday, David McFarlane wrote: > >> Mich beat me to the punch, and with the answer that I would have given at >> first. And Mich adds a crucial concern that I would have overlooked, namely >> that your chosen flicker times only work if they are each commensurate with >> your display refresh rate, which they probably are not (your chosen flicker >> frequencies translate to periods of 83.3, 100, 116.3, and 113.3 ms, >> respectively, and you would have to find a common divisor to all of those in >> the range of roughly 8.3 to 16, good luck!). But I can't resist weighing in >> further... >> >> Setting aside your incommensurate flicker rates, can E-Prime do this? >> Well (as Mich already said), yes, in principle; but in practice, for this >> particular task you might be far better off using something like >> Presentation, or MATLAB with the Psychophysics Toolkit (my own first choice >> for your task). You would like a toolset that includes pre-made objects >> that can flicker themselves at specified rates, and then set those running. >> AFAIK, EP has no such facility, but maybe Presentation or MATLAB or >> Psychopy do, and then Bob's your uncle! >> >> Next, you could try Mich's fine suggestion, but once again I fear that >> incommensurability will raise its ugly head. Now you not only need a common >> divisor, but you need a List that contains the pattern of on-off images for >> each time point until the entire temporal pattern repeats, and that will not >> happen until you reach the least-common-multiple of the individual period >> times, and in your case that will be greater than, say, 83.3 * 113.3 = 9.5 >> s, and perhaps as great as 83.3 * 100 * 116.3 * 113.3 = 30.7 h. Yikes! Of >> course, if you are not wedded to these period times, then you might adust >> them to more workable values (there's a nice academic exercise for you). >> >> But I said E-Prime could do this, and here's how. It would require some >> intricate code, the same way that you could do it in any full-featured >> programming language, such as C or C++ or even JavaScript, and I have done >> things like this myself in C. You would need to contruct your own "event >> loop" (do a search of the Group or the Forum on that phrase to see where I >> have discussed this before). In short, you create an array that holds the >> upcoming transition time for each object (in this case, your four flickering >> targets). Each time through the loop it just checks each of these times >> against the current clock time, and when any one reaches its next transition >> time then the loop updates that target and adjuts its transition time for >> the next one. Your loop just does that for the duration of the display. >> Here is some pseudo-code for that (using my own odd mixture of C-like and >> other notation): >> >> while( presentation_ongoing ) >> for( i = 1 to nTargets ) >> if( Clock.Read >= target[i].tNext ) >> target[i].toggle >> target[i].tNext = target[i].tNext + target[i].tPeriod >> >> Of course, you also have to initialize .tPeriod and .tNext for each >> target, and I left out the mechanics of how to implement anything like a >> .toggle method to redraw a target between its two states, but I leave those >> as exercises. >> >> -- David McFarlane, Professional Faultfinder >> >> >> (P.s. For those who know more C-like notation, the pseudo-code above >> could be more nicely written as >> >> while( presentation_ongoing ) >> for( i = 1 to nTargets ) >> if( Clock.Read >= target[i].tNext ) >> target[i].toggle >> target[i].tNext += target[i].tPeriod >> >> Isnt' that nice?) >> >> >> At 7/6/2011 05:12 AM Wednesday, Michiel Spape wrote: >> >>> Oh, wait, simultaneous tasks, you say? >>> I think there are a few ways of handling this... >>> How about you make one slide with your four targets. These are four text >>> "sub objects". Each target has a colour: white (as in, off, since the >>> background is white), or black. See first how you can make them black or >>> white (it's the background colour thing). Then, set each to [Target1Colour], >>> [Target2Colour], [Target3Colour] and [Target4Colour] instead. The slide has >>> a duration of slightly below your maximum refresh rate (i.e. 15 ms if your >>> monitor runs at 60 Hz), and onset sync is on. >>> Make a list, sequential selection, 1 procedure, and set Exit after to 1 >>> sec (i.e., it repeats for one second). Drag the slide you just made to the >>> one procedure. >>> Add 4 procedures to the list: Target1Colour, Target2Colour, >>> Target3Colour, Target4Colour. Think of the list as one second, and add >>> levels accordingly: if your monitor runs at 60 Hz, there should be at least >>> 60 levels. Find out, at each level, which of the targets is black. For >>> instance, your second target, flickering at 10 Hz, should be black at the >>> first level (time = 0 ms), 7th level (time = 100 ms), 13th level (time = 200 >>> ms) and so on, but white at level 2-6, and so on. >>> >>> Well, voila, there you go, it should now flicker. Of course, nothing is >>> randomised, but it should work, and I think you might be able to take it >>> from there. Also, no code yet. >>> Best, >>> Michiel >>> >>> Michiel Spapé >>> Research Fellow >>> Perception & Action group >>> University of Nottingham >>> School of Psychology >>> www.cognitology.eu >>> >>> >>> -----Original Message----- >>> From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.**com] >>> On Behalf Of pati-confidence >>> Sent: 06 July 2011 06:17 >>> To: E-Prime >>> Subject: Several flickering tasks run simultaneously >>> >>> I want to build a BCI system, which presents four targets on LCD >>> screen, with flickering frequencies of 12Hz, 10Hz, 8.6Hz and 7.5Hz. >>> respectively. >>> >>> And the four targets are flickering simultaneously. >>> >>> Can E-prime achieve the goal? >>> >>> Any tips will be appreciate. Thank you. >>> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "E-Prime" group. >> To post to this group, send email to e-prime at googlegroups.com. >> To unsubscribe from this group, send email to e-prime+unsubscribe@** >> googlegroups.com . >> For more options, visit this group at http://groups.google.com/** >> group/e-prime?hl=en . >> > > -- > You received this message because you are subscribed to the Google Groups > "E-Prime" group. > To post to this group, send email to e-prime at googlegroups.com. > To unsubscribe from this group, send email to e-prime+unsubscribe@** > googlegroups.com . > For more options, visit this group at http://groups.google.com/** > group/e-prime?hl=en . > > -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcfarla9 at msu.edu Fri Jul 8 03:43:31 2011 From: mcfarla9 at msu.edu (dkmcf) Date: Thu, 7 Jul 2011 20:43:31 -0700 Subject: Several flickering tasks run simultaneously In-Reply-To: Message-ID: Glad you got it to work so easily! And your report of success made me realize the error of my excessive computations -- of course you did not need to continue the List out to the least-common-multiple of your period times, you only needed to cover the few seconds of the stimulus, which, after adjusting the period times a bit, is quite manageable. Kudos to you & Mich together. -- David McFarlane, Professional Faultfinder On Jul 7, 8:11 pm, pati-confidence wrote: > Thank you for your so detailed and valuable relies. > I have implemented the required task by the use of the Slide, with four > targets flickering in 10Hz, 11Hz, 12Hz and 15Hz respectively, which is much > easier than flickering in 7.5Hz, 8.6Hz, 10Hz, 12Hz. > And I will attempt your method later. > Thank you very much! > > guobing Wu > > > > > > > > On Fri, Jul 8, 2011 at 3:08 AM, David McFarlane wrote: > > Ah, checked my own E-Prime FAQ, and here is the link of where I have > > addressed this kind of question before:http://groups.google.com/** > > group/e-prime/browse_thread/**thread/fda0b9bbe3a149c3 > > > -- David McFarlane, Professional Faultfinder > > (Now next time someone asks this, I will try to direct them to the thread > > from today :)) > > > At 7/7/2011 03:03 PM Thursday, David McFarlane wrote: > > >> Mich beat me to the punch, and with the answer that I would have given at > >> first.  And Mich adds a crucial concern that I would have overlooked, namely > >> that your chosen flicker times only work if they are each commensurate with > >> your display refresh rate, which they probably are not (your chosen flicker > >> frequencies translate to periods of 83.3, 100, 116.3, and 113.3 ms, > >> respectively, and you would have to find a common divisor to all of those in > >> the range of roughly 8.3 to 16, good luck!).  But I can't resist weighing in > >> further... > > >> Setting aside your incommensurate flicker rates, can E-Prime do this? > >>  Well (as Mich already said), yes, in principle; but in practice, for this > >> particular task you might be far better off using something like > >> Presentation, or MATLAB with the Psychophysics Toolkit (my own first choice > >> for your task).  You would like a toolset that includes pre-made objects > >> that can flicker themselves at specified rates, and then set those running. > >>  AFAIK, EP has no such facility, but maybe Presentation or MATLAB or > >> Psychopy do, and then Bob's your uncle! > > >> Next, you could try Mich's fine suggestion, but once again I fear that > >> incommensurability will raise its ugly head.  Now you not only need a common > >> divisor, but you need a List that contains the pattern of on-off images for > >> each time point until the entire temporal pattern repeats, and that will not > >> happen until you reach the least-common-multiple of the individual period > >> times, and in your case that will be greater than, say, 83.3 * 113.3 = 9.5 > >> s, and perhaps as great as 83.3 * 100 * 116.3 * 113.3 = 30.7 h.  Yikes!  Of > >> course, if you are not wedded to these period times, then you might adust > >> them to more workable values (there's a nice academic exercise for you). > > >> But I said E-Prime could do this, and here's how.  It would require some > >> intricate code, the same way that you could do it in any full-featured > >> programming language, such as C or C++ or even JavaScript, and I have done > >> things like this myself in C.  You would need to contruct your own "event > >> loop" (do a search of the Group or the Forum on that phrase to see where I > >> have discussed this before).  In short, you create an array that holds the > >> upcoming transition time for each object (in this case, your four flickering > >> targets).  Each time through the loop it just checks each of these times > >> against the current clock time, and when any one reaches its next transition > >> time then the loop updates that target and adjuts its transition time for > >> the next one.  Your loop just does that for the duration of the display. > >>  Here is some pseudo-code for that (using my own odd mixture of C-like and > >> other notation): > > >> while( presentation_ongoing ) > >>    for( i = 1 to nTargets ) > >>        if( Clock.Read >= target[i].tNext ) > >>            target[i].toggle > >>            target[i].tNext = target[i].tNext + target[i].tPeriod > > >> Of course, you also have to initialize .tPeriod and .tNext for each > >> target, and I left out the mechanics of how to implement anything like a > >> .toggle method to redraw a target between its two states, but I leave those > >> as exercises. > > >> -- David McFarlane, Professional Faultfinder > > >> (P.s.  For those who know more C-like notation, the pseudo-code above > >> could be more nicely written as > > >> while( presentation_ongoing ) > >>    for( i = 1 to nTargets ) > >>        if( Clock.Read >= target[i].tNext ) > >>            target[i].toggle > >>            target[i].tNext += target[i].tPeriod > > >> Isnt' that nice?) > > >> At 7/6/2011 05:12 AM Wednesday, Michiel Spape wrote: > > >>> Oh, wait, simultaneous tasks, you say? > >>> I think there are a few ways of handling this... > >>> How about you make one slide with your four targets. These are four text > >>> "sub objects". Each target has a colour: white (as in, off, since the > >>> background is white), or black. See first how you can make them black or > >>> white (it's the background colour thing). Then, set each to [Target1Colour], > >>> [Target2Colour], [Target3Colour] and [Target4Colour] instead. The slide has > >>> a duration of slightly below your maximum refresh rate (i.e. 15 ms if your > >>> monitor runs at 60 Hz), and onset sync is on. > >>> Make a list, sequential selection, 1 procedure, and set Exit after to 1 > >>> sec (i.e., it repeats for one second). Drag the slide you just made to the > >>> one procedure. > >>> Add 4 procedures to the list: Target1Colour, Target2Colour, > >>> Target3Colour, Target4Colour. Think of the list as one second, and add > >>> levels accordingly: if your monitor runs at 60 Hz, there should be at least > >>> 60 levels. Find out, at each level, which of the targets is black. For > >>> instance, your second target, flickering at 10 Hz, should be black at the > >>> first level (time = 0 ms), 7th level (time = 100 ms), 13th level (time = 200 > >>> ms) and so on, but white at level 2-6, and so on. > > >>> Well, voila, there you go, it should now flicker. Of course, nothing is > >>> randomised, but it should work, and I think you might be able to take it > >>> from there. Also, no code yet. > >>> Best, > >>> Michiel > > >>> Michiel Spapé > >>> Research Fellow > >>> Perception & Action group > >>> University of Nottingham > >>> School of Psychology > >>>www.cognitology.eu > > >>> -----Original Message----- > >>> From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.**com] > >>> On Behalf Of pati-confidence > >>> Sent: 06 July 2011 06:17 > >>> To: E-Prime > >>> Subject: Several flickering tasks run simultaneously > > >>> I want to build a BCI system, which presents four targets on LCD > >>> screen, with flickering frequencies of 12Hz, 10Hz, 8.6Hz and 7.5Hz. > >>> respectively. > > >>> And the four targets are flickering simultaneously. > > >>> Can E-prime achieve the goal? > > >>> Any tips will be appreciate.  Thank you. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From Michiel.Spape at nottingham.ac.uk Fri Jul 8 09:04:38 2011 From: Michiel.Spape at nottingham.ac.uk (Michiel Spape) Date: Fri, 8 Jul 2011 10:04:38 +0100 Subject: refresh rate USB In-Reply-To: <201107072135.p67LZbDp030945@mail14.tpg.com.au> Message-ID: Hi, Whilst that is true, he might just have meant the EEG (and so on) sampling rate. Obviously, indeed, "windows" can handle sub-millisecond accuracy just fine (provided, provided, provided), but the type of port (USB/PS2/Parallel/etc) and device make much more of a difference. If I remember correctly, PST had something to say on the matter, long ago, and advised always to use USB keyboards at least (rather than PS/2 keyboards). Have a look here: http://www.pstnet.com/eprimedevice.cfm ... I did, just now, and it turns out you might well be right in a way. Have a look at timing characteristics and read through the article. Personally, I have a pragmatic attitude towards these things. It may well be, for instance, that the PST SRBOX has superb timing characteristics, but have you ever tried pressing their buttons? I know, for a psychologist - mind and timing is everything - it is hard to remember, but those buttons take quite a bit of force to press. Imagine, for one, that it *must* take longer to press these buttons (they seem like soviet pieces of tech to me - i tend to like the look, but...), as opposed to say, a touchpad (which hardly needs any press), and that motor noise may well influence your experiments. For instance, if I do a finger-tapping test (press the space bar as often as you can within 10 seconds), I get average values of about 55 - pretty much exactly the norm from clinical literature. Now, I do the same with a mac keyboard (those white ones with buttons of about 3 mm above the rest of the keyboard, really light press required) - and suddenly i get values ranging from 65 to a massive 80. I say this difference (181 ms/press vs ~138 ms/press) is pretty massive (more than my average effect). So, my attitude is then: get good equipment, but don't stare yourself blind on the numbers. Best, Mich ________________________________________ From: e-prime at googlegroups.com [e-prime at googlegroups.com] On Behalf Of Peter Quain [pquain at une.edu.au] Sent: 07 July 2011 22:35 To: e-prime at googlegroups.com Subject: Re: refresh rate USB I think USB polling rate and USB data transfer rate are 2 different things At 03:20 AM 8/07/2011, you wrote: >Hi together, > >I plan an experiment in which Reaction Times for two conditions will >be compared and not too much of a difference is expected. Let's say 15 >ms. I am wondering if an USB keyboard is the appropriate choice for >such an experiment. I've heard that USB usually has a refresh rate of >120 Hz, meaning that responses are checked every 8 ms. That's a lot of >noise added to the real reaction times. > >On the other hand, EEG data and other stuff CAN be transferred much >faster than 120 Hz via USB cable. THe question is, whether Windows (or >E-Prime) can handle this. > >What is your experience here? > >Thanks a lot and so long, >Tobias > >-- >You received this message because you are subscribed to the Google >Groups "E-Prime" group. >To post to this group, send email to e-prime at googlegroups.com. >To unsubscribe from this group, send email to >e-prime+unsubscribe at googlegroups.com. >For more options, visit this group at >http://groups.google.com/group/e-prime?hl=en. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From tobias.fw at gmail.com Fri Jul 8 11:14:42 2011 From: tobias.fw at gmail.com (Tobias) Date: Fri, 8 Jul 2011 04:14:42 -0700 Subject: refresh rate USB In-Reply-To: <09DAEA8BC192C94EB62C8E71FC35A5D92F7F42200B@EXCHANGE3.ad.nottingham.ac.uk> Message-ID: Hi, In fact, we do have a SRBox and I so far refused to take it because the buttons are so hard to press. For this particular experiment I think, however, it might still be okay, because I don't want to compare beteween subjects, but between conditions. So the wispy girl might have longer reaction times than the weightlifter, but the differences between conditions should be visible for fast and slow responders. With the SRBox we actually have other problems too (I'll open another thread concerning this as this seems to be a hardware problem). ANother thing is, I just learned that a parallel port would have best timing characteristics. Serial ports are still quite slow. Maybe we will just use single buttons sending a signal via individual pins to the parallel port. I have never used it but there seems to be a way of using parallel ports in E-Prime (if you look at "devices"). Thanks a lot for your input! BEst, TObias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From tobias.fw at gmail.com Fri Jul 8 11:23:24 2011 From: tobias.fw at gmail.com (Tobias) Date: Fri, 8 Jul 2011 04:23:24 -0700 Subject: Slide duration defined by variable, not attribute In-Reply-To: <4e15f33a.c9d12a0a.0132.108bSMTPIN_ADDED@gmr-mx.google.com> Message-ID: Thanks for your sage advice. I think I just found it annoying to always use "c.setattrib" etc., never really knowing by heart the exact syntax. Also, I sometimes had error mesagges because the variable types didn't match etc. I'll think about it, but for the moment: THis snip of code you were writing, at what point in the procedure should I include it? I was actually aware that "StimText.Duration = durationA" should work, but if I put at a point before the object, the value entered in the object will overwrite it. And after the object, it's already too late :-p Best, Tobias On 7 Jul., 19:56, David McFarlane wrote: > Tobias, > > First, I disagree with your premise about attribute references being > "more complicated and not really straight forward" than > variables.  It is just as simple and straightforward to use attribute > references in code as it is to use variables in code, and in most > cases attribute references offer distince advantages.  I started out > using variables just as you describe (and so will get around to > actually answering your question :)), but once I understood attribute > references better I switched to using those whenever I can, for the > following reasons: > > - Using a variable for, say, Duration, leaves *no* clue in the > program design that that value will vary -- to the contrary, the > object's Duration will show as a constant, so programmers just have > to "know" that this value will vary in some code somewhere.  By > contrast, an attribute reference in the object serves notice that > that value varies, and thus is much "friendlier" to programmers. > > - Using a variable does *not* log the varying value, so after the > experiment you have no record of what really happened.  Using an > attribute reference fixes this at no extra cost.  Yes, you could > throw in a c.SetAttrib "DurationA", durationA just to log the, but > once you go to that length you might as well just use the attribute > in your object, no? > > So except for extreme cases, if I need to vary a property value from > code instead of a List, I always do something like > > c.SetAttrib "DurationA", durationA > > and then use [DurationA] for the Duration property of my stimulus object. > > But let's suppose that you really have a valid purpose for this (or > wish to simply ignore my sage advice).  Here's how you do > that.  Suppose you want to set the Duration property of a stimlus > object called StimText to a variable called durationA.  In code, you simply do > > StimText.Duration = durationA > > That's it!  Absurdly simple.  You can do this for a whole host of > object properties, just look at the E-Basic Help page for any desired > object.  For that matter, work through Chapter 4 of the User's Guide > that came with E-Prime, and take a course in Introduction to Computer > Programming. > > Regards, > -- David McFarlane, Professional Faultfinder > > At 7/7/2011 01:23 PM Thursday, you wrote: > > > > > > > > >Hi, > > >I would like to define the duration of an object (slide in this case) > >in E-Prime with a variable. As far as I know, instead of specifying > >the duration directly by a number, you can also use square brackets > >and enter, let's say [durationA]. This refers to the attribute in the > >current list named "durationA". However, using attributes is much more > >complicated and not really straight forward. Is there a way of using > >variables instead? > > >Thanks a lot in advance! > >Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From Michiel.Spape at nottingham.ac.uk Fri Jul 8 12:43:53 2011 From: Michiel.Spape at nottingham.ac.uk (Michiel Spape) Date: Fri, 8 Jul 2011 13:43:53 +0100 Subject: refresh rate USB In-Reply-To: <4ac9aea9-ff44-4f3d-90a9-fe7ece48d12a@v12g2000vby.googlegroups.com> Message-ID: Hi, Good that you thought of it. I am, however, not so sure of the weightlifter/wispy person thing. 1. Obviously, I know the idea behind testing within subjects - all my work has been like that (until now, actually). By your own words, however, you seem concerned enough for noise within subjects - the point of the current thread. I wholeheartedly agree, in fact, that you wish the 8 ms error (which should likewise be similar between conditions) to be gone, but have argued that the motor noise will be *much* higher than this tiny bit of variance. Only, after all, if your bodybuilder will *always* take, say, 30 ms to press the button, and the wispy person, say 60 ms, you would not have a problem. This is immensely unlikely. Of course, once you have an effect, I will not say it's because of this or that, but theoretically, it should take more trials for your noise to be cancelled out by your effect. 2. The problem may be worse, though. As I'm sure you know, a lot of stuff is said to happen at a rather late stage of response processing. What if, for instance (although I agree this is unlikely), your subject is able to inhibit/speed up/etc his/her response 20 ms prior to its registration in the SRBOX - halfway between the beginning of a press and the end thereof? What I am saying is that it is conceivable that one condition (depending on where in the decision model you place your effect) might well be more affected by the heavy button than another, thus making mince of even a within-subject design. Whether this is true or not, I think the problem can be easily circumvented by just using a very light button box. Best, Mich Michiel Spapé Research Fellow Perception & Action group University of Nottingham School of Psychology www.cognitology.eu -----Original Message----- From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of Tobias Sent: 08 July 2011 12:15 To: E-Prime Subject: Re: refresh rate USB Hi, In fact, we do have a SRBox and I so far refused to take it because the buttons are so hard to press. For this particular experiment I think, however, it might still be okay, because I don't want to compare beteween subjects, but between conditions. So the wispy girl might have longer reaction times than the weightlifter, but the differences between conditions should be visible for fast and slow responders. With the SRBox we actually have other problems too (I'll open another thread concerning this as this seems to be a hardware problem). ANother thing is, I just learned that a parallel port would have best timing characteristics. Serial ports are still quite slow. Maybe we will just use single buttons sending a signal via individual pins to the parallel port. I have never used it but there seems to be a way of using parallel ports in E-Prime (if you look at "devices"). Thanks a lot for your input! BEst, TObias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Fri Jul 8 14:03:52 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Fri, 8 Jul 2011 10:03:52 -0400 Subject: Slide duration defined by variable, not attribute In-Reply-To: Message-ID: Tobias, Hmm, well, from this distance I cannot tell what you are doing wrong, I just put the code anywhere before the object and it works perfectly for me (I tried just now and made absolutely sure). (I did have to make sure to type in the correct number -- I first mistakenly typed "5" for 5 s, forgetting that I had to enter 5000 for 5000 ms, once I did that it was OK. So do make sure you have entered the correct values.) More importantly, on the object itself I just left the Duration at its default of 1000. The exact value does not matter at all, but you must, *must* use a literal value in the Duration property of the object itself, do *not* use an attribute reference!! If you use an attribute reference for the duration then that attribute value will replace the value from your earlier code -- you could see this for yourself simply by looking at the source code that E-Studio generates, you don't need my help to figure this out. Of course, putting a literal value in for the Duration of the object will deceive users into thinking that the Duration for that object is that literal value, instead of the value that comes from your inline code, which is the point of my first objection below. And if you can get this to work by setting an attribute reference in code, then why bother getting it to work withouth the attribute reference, except as a mere academic exercise (of which I would approve)? -- David McFarlane, Professional Faultfinder At 7/8/2011 07:23 AM Friday, you wrote: >Thanks for your sage advice. I think I just found it annoying to >always use "c.setattrib" etc., never really knowing by heart the exact >syntax. Also, I sometimes had error mesagges because the variable >types didn't match etc. I'll think about it, but for the moment: THis >snip of code you were writing, at what point in the procedure should I >include it? I was actually aware that "StimText.Duration = durationA" >should work, but if I put at a point before the object, the value >entered in the object will overwrite it. And after the object, it's >already too late :-p > >Best, >Tobias > >On 7 Jul., 19:56, David McFarlane wrote: > > Tobias, > > > > First, I disagree with your premise about attribute references being > > "more complicated and not really straight forward" than > > variables. It is just as simple and straightforward to use attribute > > references in code as it is to use variables in code, and in most > > cases attribute references offer distince advantages. I started out > > using variables just as you describe (and so will get around to > > actually answering your question :)), but once I understood attribute > > references better I switched to using those whenever I can, for the > > following reasons: > > > > - Using a variable for, say, Duration, leaves *no* clue in the > > program design that that value will vary -- to the contrary, the > > object's Duration will show as a constant, so programmers just have > > to "know" that this value will vary in some code somewhere. By > > contrast, an attribute reference in the object serves notice that > > that value varies, and thus is much "friendlier" to programmers. > > > > - Using a variable does *not* log the varying value, so after the > > experiment you have no record of what really happened. Using an > > attribute reference fixes this at no extra cost. Yes, you could > > throw in a c.SetAttrib "DurationA", durationA just to log the, but > > once you go to that length you might as well just use the attribute > > in your object, no? > > > > So except for extreme cases, if I need to vary a property value from > > code instead of a List, I always do something like > > > > c.SetAttrib "DurationA", durationA > > > > and then use [DurationA] for the Duration property of my stimulus object. > > > > But let's suppose that you really have a valid purpose for this (or > > wish to simply ignore my sage advice). Here's how you do > > that. Suppose you want to set the Duration property of a stimlus > > object called StimText to a variable called durationA. In code, > you simply do > > > > StimText.Duration = durationA > > > > That's it! Absurdly simple. You can do this for a whole host of > > object properties, just look at the E-Basic Help page for any desired > > object. For that matter, work through Chapter 4 of the User's Guide > > that came with E-Prime, and take a course in Introduction to Computer > > Programming. > > > > Regards, > > -- David McFarlane, Professional Faultfinder > > > > At 7/7/2011 01:23 PM Thursday, you wrote: > > >Hi, > > > > >I would like to define the duration of an object (slide in this case) > > >in E-Prime with a variable. As far as I know, instead of specifying > > >the duration directly by a number, you can also use square brackets > > >and enter, let's say [durationA]. This refers to the attribute in the > > >current list named "durationA". However, using attributes is much more > > >complicated and not really straight forward. Is there a way of using > > >variables instead? > > > > >Thanks a lot in advance! > > >Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Fri Jul 8 14:32:09 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Fri, 8 Jul 2011 10:32:09 -0400 Subject: refresh rate USB In-Reply-To: <4ac9aea9-ff44-4f3d-90a9-fe7ece48d12a@v12g2000vby.googlegro ups.com> Message-ID: Tobias, I checked through my FAQ, and found the following foundational citation: Segalowitz & Graves (1990), Beh Res Meth Instr Comp 22:283-289. It's rather outdated now, but it sets the stage, and if you search for later papers that cite this one then you will learn a lot. At 7/8/2011 07:14 AM Friday, you wrote: >In fact, we do have a SRBox and I so far refused to take it because >the buttons are so hard to press. When we use a SRBox for tapping time tasks, we do *not* use the buttons on the SRBox itself. If you look at the documention for the SRBox, you will find that you can connect any simple button box you like through a connector inside the SRBox. By that means, you can use buttons that suit your tastes, but still use the electronics of the SRBox to get the responses from your buttons into E-Prime, it is really quite trivial. As I have mentioned in several other threads here and/or on the PST Forum, I just grab some parts from Radio Shack, or a local electronics supplier, or an online source (e.g., Newark, or Allied) -- we like to use high-quality easy-push "clicky" pushbuttons -- build a box and an adapter cable, plug it all in through the SRBox, and E-Prime never knows the difference. I don't know why everybody doesn't do this. >ANother thing is, I just learned that a parallel port would have best >timing characteristics. Serial ports are still quite slow. Maybe we >will just use single buttons sending a signal via individual pins to >the parallel port. I have never used it but there seems to be a way of >using parallel ports in E-Prime (if you look at "devices"). Indeed, the parallel port or an ordinary digital I/O expansion card could give you near-instant latencies (microsecond range?). The down side, as you will find by reading the articles on the PST Knowledge Base, or the book "Parallel Port Complete", or threads on the Group or the Forum, using the parallel port does take some finesse. In the old days before Windows XP we could add a digital I/O card to make the programming simpler, but now that requires specialized drivers and libraries simply to execute a single I/O command. That said, if you think through the specifications of the SRBox, you will see that with proper configuration it achieves sub-millisecond latency, with minimal programming finesse. That does not seem so bad to me. Hmm, seems to me that we had much of this discussion in an earlier thread, but I do not have a reference handy. But checking through my FAQ, I found references to a couple of pertinent links: Empirisoft promises a keyboard with sub-millisecond latency, see http://www.empirisoft.com/Hardware.aspx?index=2 . And Ergodex offers a way to build an arbitrary keyboard layout, although its timing characteristics may be no better than an ordinary keyboard, see www.ergodex.com . Aha, using "Ergodex" as a search term on the Group, I found the earlier discussion, here is the link: http://groups.google.com/group/e-prime/browse_thread/thread/d42447cfc9a061af . Among other things, this thread contains more citations to studies on timing performance of various input devices. Have fun! -- David McFarlane, Professional Faultfinder -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From linda.toscani at gmail.com Fri Jul 8 14:40:41 2011 From: linda.toscani at gmail.com (Linda T) Date: Fri, 8 Jul 2011 07:40:41 -0700 Subject: recording response In-Reply-To: <4e15dcc5.94592a0a.12e6.0de7SMTPIN_ADDED@gmr-mx.google.com> Message-ID: In theory in the properties of the ImageDisplay I could indicate the duration time (500ms) and the response time limit. The problem is if I indicate a response time limit longer than the duration time e-prime does not wait the response and go to the next trial after 500ms without recording the response. I employed a Wait to this reason. What is an input mask? I fixed the problem with the liwena's inline. :-) Best Linda On Jul 7, 6:20 pm, David McFarlane wrote: > Linda, > > Hmm.  I wonder what task you want to perform, because offhand this > design seems very clumsy -- You present an ImageDisplay for 500 ms, > then follow that with a Wait object, but since a Wait object does not > replace the previous visual display, this means that the subject will > continue to see the ImageDisplay during the Wait.  Why would you do > such a thing?  Then you go and collect a response to the Wait, which > you do not want.  Why did you add an input mask to the Wait object in > the first place?  If you just remove any input mask from the Wait > object, then you will not get two responses, which seems to be what > you are asking about. > > I must be missing something. > > -- David McFarlane, Professional Faultfinder > > At 7/6/2011 10:43 AM Wednesday, you wrote: > > > > > > > > >I have a problem with E-prime. > >I have an image display (my stimulus) and the subject can respond when > >they see this slide but it is really fast (500ms) then after this > >image display I used a wait. The problem is that the subjects can > >respond when there is the stimulus and also when there is the wait. If > >the subjects respond when there is the stimulus e-prime show equally > >the wait. I would like to say to the program that if the subjects > >respond when there is the stimulus it doesn't employ the wait. Because > >now the program record two responses if the subject respond twice. > > >I hope I was clear. > > >Linda -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Fri Jul 8 15:20:53 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Fri, 8 Jul 2011 11:20:53 -0400 Subject: recording response In-Reply-To: <56d30898-4167-4809-bbe2-cab2549d2f59@q1g2000vbj.googlegrou ps.com> Message-ID: Linda, "Input mask" is E-Prime lingo for the facilities that actually collect a response -- it is a core concept of E-Prime, although I do not know anywhere where it is well described or explained. But note, for instance, that when you add a Keyboard as an "input mask" to a stimulus object, that input mask is not strictly a part of the stimulus object, it in fact runs independently from and concurrently with its associated stimulus object. That is how "extended input" (see Appendix C of the User's Guide) works. Anyway, glad you got it to work the way you want, but here is what still baffles me: From what you describe your trial works as follows. You run a Slide object for 500 ms. The subject may respond during that time -- you do not specify what happens if the subject does respond then, do you terminate the Slide or does it complete its 500 ms? Regardless, if the subject responds then you move on to the next trial. If the subject does not respond then (using a Wait object) *the Slide remains on the screen* while the subject gets some extra (unspecified) time to respond. So in effect, the Slide simply remains visible until the subject responds or the end of the Wait period, whichever comes first. Well, if that is all you wanted, you could have simply given the full Duration to your Slide in the first place, and set End Action to Terminate. It just seems to me that you are going through extra trouble in order to do something trivial, and I feel the need to clarify this so that others who later stumble onto this thread do not make the same mistake. So what am I missing? Finally, if you have not already, I will give you the same advice that I give over and over again here -- before you write your first experiment in E-Prime, you *must* work through *all* of the tutorials in the Getting Started Guide and User's Guide that came with E-Prime, otherwise you just do a disservice to yourself and everyone else. (And "all" includes Appendix C of the User's Guide.) As insufficient as those Guides are, some folks at PST worked very hard to produce them for us, so we owe it to them to make use of whatever they did provide us. -- David McFarlane, Professional Faultfinder >In theory in the properties of the ImageDisplay I could indicate the >duration time (500ms) and the response time limit. The problem is if I >indicate a response time limit longer than the duration time e-prime >does not wait the response and go to the next trial after 500ms >without recording the response. I employed a Wait to this reason. > >What is an input mask? > >I fixed the problem with the liwena's inline. :-) > >Best > >Linda > >On Jul 7, 6:20 pm, David McFarlane wrote: > > Linda, > > > > Hmm. I wonder what task you want to perform, because offhand this > > design seems very clumsy -- You present an ImageDisplay for 500 ms, > > then follow that with a Wait object, but since a Wait object does not > > replace the previous visual display, this means that the subject will > > continue to see the ImageDisplay during the Wait. Why would you do > > such a thing? Then you go and collect a response to the Wait, which > > you do not want. Why did you add an input mask to the Wait object in > > the first place? If you just remove any input mask from the Wait > > object, then you will not get two responses, which seems to be what > > you are asking about. > > > > I must be missing something. > > > > -- David McFarlane, Professional Faultfinder > > > > At 7/6/2011 10:43 AM Wednesday, you wrote: > > >I have a problem with E-prime. > > >I have an image display (my stimulus) and the subject can respond when > > >they see this slide but it is really fast (500ms) then after this > > >image display I used a wait. The problem is that the subjects can > > >respond when there is the stimulus and also when there is the wait. If > > >the subjects respond when there is the stimulus e-prime show equally > > >the wait. I would like to say to the program that if the subjects > > >respond when there is the stimulus it doesn't employ the wait. Because > > >now the program record two responses if the subject respond twice. > > > > >I hope I was clear. > > > > >Linda -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From tobias.fw at gmail.com Mon Jul 11 10:03:26 2011 From: tobias.fw at gmail.com (Tobias) Date: Mon, 11 Jul 2011 03:03:26 -0700 Subject: Slide duration defined by variable, not attribute In-Reply-To: <4e170e4b.ce5e2a0a.697d.40c9SMTPIN_ADDED@gmr-mx.google.com> Message-ID: The problem was that I was still referring to an attribute... so thanks for the hint! best, Tobias On 8 Jul., 16:03, David McFarlane wrote: > Tobias, > > Hmm, well, from this distance I cannot tell what you are doing wrong, > I just put the code anywhere before the object and it works perfectly > for me (I tried just now and made absolutely sure).  (I did have to > make sure to type in the correct number -- I first mistakenly typed > "5" for 5 s, forgetting that I had to enter 5000 for 5000 ms, once I > did that it was OK.  So do make sure you have entered the correct > values.)  More importantly, on the object itself I just left the > Duration at its default of 1000.  The exact value does not matter at > all, but you must, *must* use a literal value in the Duration > property of the object itself, do *not* use an attribute > reference!!  If you use an attribute reference for the duration then > that attribute value will replace the value from your earlier code -- > you could see this for yourself simply by looking at the source code > that E-Studio generates, you don't need my help to figure this out. > > Of course, putting a literal value in for the Duration of the object > will deceive users into thinking that the Duration for that object is > that literal value, instead of the value that comes from your inline > code, which is the point of my first objection below.  And if you can > get this to work by setting an attribute reference in code, then why > bother getting it to work withouth the attribute reference, except as > a mere academic exercise (of which I would approve)? > > -- David McFarlane, Professional Faultfinder > > At 7/8/2011 07:23 AM Friday, you wrote: > > > > > > > > >Thanks for your sage advice. I think I just found it annoying to > >always use "c.setattrib" etc., never really knowing by heart the exact > >syntax. Also, I sometimes had error mesagges because the variable > >types didn't match etc. I'll think about it, but for the moment: THis > >snip of code you were writing, at what point in the procedure should I > >include it? I was actually aware that "StimText.Duration = durationA" > >should work, but if I put at a point before the object, the value > >entered in the object will overwrite it. And after the object, it's > >already too late :-p > > >Best, > >Tobias > > >On 7 Jul., 19:56, David McFarlane wrote: > > > Tobias, > > > > First, I disagree with your premise about attribute references being > > > "more complicated and not really straight forward" than > > > variables.  It is just as simple and straightforward to use attribute > > > references in code as it is to use variables in code, and in most > > > cases attribute references offer distince advantages.  I started out > > > using variables just as you describe (and so will get around to > > > actually answering your question :)), but once I understood attribute > > > references better I switched to using those whenever I can, for the > > > following reasons: > > > > - Using a variable for, say, Duration, leaves *no* clue in the > > > program design that that value will vary -- to the contrary, the > > > object's Duration will show as a constant, so programmers just have > > > to "know" that this value will vary in some code somewhere.  By > > > contrast, an attribute reference in the object serves notice that > > > that value varies, and thus is much "friendlier" to programmers. > > > > - Using a variable does *not* log the varying value, so after the > > > experiment you have no record of what really happened.  Using an > > > attribute reference fixes this at no extra cost.  Yes, you could > > > throw in a c.SetAttrib "DurationA", durationA just to log the, but > > > once you go to that length you might as well just use the attribute > > > in your object, no? > > > > So except for extreme cases, if I need to vary a property value from > > > code instead of a List, I always do something like > > > > c.SetAttrib "DurationA", durationA > > > > and then use [DurationA] for the Duration property of my stimulus object. > > > > But let's suppose that you really have a valid purpose for this (or > > > wish to simply ignore my sage advice).  Here's how you do > > > that.  Suppose you want to set the Duration property of a stimlus > > > object called StimText to a variable called durationA.  In code, > > you simply do > > > > StimText.Duration = durationA > > > > That's it!  Absurdly simple.  You can do this for a whole host of > > > object properties, just look at the E-Basic Help page for any desired > > > object.  For that matter, work through Chapter 4 of the User's Guide > > > that came with E-Prime, and take a course in Introduction to Computer > > > Programming. > > > > Regards, > > > -- David McFarlane, Professional Faultfinder > > > > At 7/7/2011 01:23 PM Thursday, you wrote: > > > >Hi, > > > > >I would like to define the duration of an object (slide in this case) > > > >in E-Prime with a variable. As far as I know, instead of specifying > > > >the duration directly by a number, you can also use square brackets > > > >and enter, let's say [durationA]. This refers to the attribute in the > > > >current list named "durationA". However, using attributes is much more > > > >complicated and not really straight forward. Is there a way of using > > > >variables instead? > > > > >Thanks a lot in advance! > > > >Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From tobias.fw at gmail.com Mon Jul 11 15:39:36 2011 From: tobias.fw at gmail.com (Tobias) Date: Mon, 11 Jul 2011 08:39:36 -0700 Subject: recording current experimental time Message-ID: Hi together, I programmed an experiment in which a lot of positions and stimuli have to be calculated online. Calculation of slides happens BEFORE they are executed. Interestingly, this can cause a delay of up to 5 sec (not ms!) for some computer, 2 sec for other computers and only 1 sec on a third computer. Importantly, these computers are comparable regarding their hardware, i.e. processor, RAM etc. To test what exactly takes E-Prime so long under some circumstances, Iw ould like to measure the experimental time at several points in time during a single trial. So I can find out which part of the programming should be optimized or if there's even an error I don't recognize. Therefore I would like to have, let's say 10 attributes and assign 10 times the current run time to one of these attributes. Unfortunately I couldn't find the right command for this operation in the manual. Does any of you know how I could do so? Or did sth similar (i.e. this delay) happen to one of you? Best, Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From pquain at une.edu.au Mon Jul 11 15:57:31 2011 From: pquain at une.edu.au (Peter Quain) Date: Tue, 12 Jul 2011 01:57:31 +1000 Subject: recording current experimental time In-Reply-To: <9921cc55-f5e2-47d3-9841-c5daf2d8970c@t7g2000vbv.googlegrou ps.com> Message-ID: in the e-basic help look up: Clock.Read. It is ms since start of the script. You can store value in variables and compute various durations if you want. Example: 'Make some Global Variables (in 'User' Tab) Dim time1, time2, dur1 as Long 'At some later time in your script, grab time since script started time1 = Clock.Read '[.... some more part of your experiment ....] 'Grab time since script started time2 = Clock.Read 'Compute interval, time1 to time2 dur1 = time2 - time1 At 01:39 AM 12/07/2011, you wrote: >Hi together, > >I programmed an experiment in which a lot of positions and stimuli >have to be calculated online. Calculation of slides happens BEFORE >they are executed. Interestingly, this can cause a delay of up to 5 >sec (not ms!) for some computer, 2 sec for other computers and only 1 >sec on a third computer. Importantly, these computers are comparable >regarding their hardware, i.e. processor, RAM etc. > >To test what exactly takes E-Prime so long under some circumstances, >Iw ould like to measure the experimental time at several points in >time during a single trial. So I can find out which part of the >programming should be optimized or if there's even an error I don't >recognize. > >Therefore I would like to have, let's say 10 attributes and assign 10 >times the current run time to one of these attributes. Unfortunately I >couldn't find the right command for this operation in the manual. > >Does any of you know how I could do so? Or did sth similar (i.e. this >delay) happen to one of you? > >Best, >Tobias > >-- >You received this message because you are subscribed to the Google >Groups "E-Prime" group. >To post to this group, send email to e-prime at googlegroups.com. >To unsubscribe from this group, send email to >e-prime+unsubscribe at googlegroups.com. >For more options, visit this group at >http://groups.google.com/group/e-prime?hl=en. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From tobias.fw at gmail.com Mon Jul 11 17:37:02 2011 From: tobias.fw at gmail.com (Tobias) Date: Mon, 11 Jul 2011 10:37:02 -0700 Subject: recording current experimental time In-Reply-To: <201107111557.p6BFvW3t026059@mail16.tpgi.com.au> Message-ID: Thanks Peter! That command and your suggested syntax perfectly worked out. Now I know which part of my code was so time consuming. However, I am not sure if I can reduce the timing and still I don't know why the loading time differs so much between computers. Here is the crucial part of the code: for i = 1 to 101 'matrix positions Set ResponseMask_SlideImage = New SlideImage ResponseMask_SlideImage.Name = "Image" & i InitSlideImageDefaults ResponseMask_SlideImage ResponseMask_SlideImage.X = "104 " + ((i-1) mod 10)*48 ResponseMask_SlideImage.Y = "24" + ((i-1) \ 10)*48 ResponseMask_SlideImage.Width = "40" ResponseMask_SlideImage.Height = "40" ResponseMask.States.Item("Default").Objects.Add ResponseMask_SlideImage, "Image" & i Select Case ResponseMask.ActiveState Case "Default" Set ResponseMask_SlideImage = CSlideImage(ResponseMask.States.Item("Default").Objects(i)) ResponseMask_SlideImage.Filename = "Mask.bmp" if i = 1 then ResponseMask_SlideImage.Filename = "fixation.bmp" ResponseMask_SlideImage.Load Set ResponseMask_SlideImage = Nothing end select next i Especially the "ResponseMask_SlideImage.Load" takes 5-8 ms. As I have a display of 100 elements this adds up to almost a second. However, there are only two types of stimuli, so maybe there is way that the two bitmaps are loaded once each but "built up" on all 100 positions? Any clue why loading time differs so much between computers with comparable hardware? Thanks a lot in advance! Best, Tobias On 11 Jul., 17:57, Peter Quain wrote: > in the e-basic help look up: Clock.Read. It is ms since start of the > script. You can store value in variables and compute various > durations if you want. > > Example: > 'Make some Global Variables (in 'User' Tab) > Dim time1, time2, dur1 as Long > 'At some later time in your script, grab time since script started > time1 = Clock.Read > '[.... some more part of your experiment ....] > 'Grab time since script started > time2 = Clock.Read > 'Compute interval, time1 to time2 > dur1 = time2 - time1 > > At 01:39 AM 12/07/2011, you wrote: > > >Hi together, > > >I programmed an experiment in which a lot of positions and stimuli > >have to be calculated online. Calculation of slides happens BEFORE > >they are executed. Interestingly, this can cause a delay of up to 5 > >sec (not ms!) for some computer, 2 sec for other computers and only 1 > >sec on a third computer. Importantly, these computers are comparable > >regarding their hardware, i.e. processor, RAM etc. > > >To test what exactly takes E-Prime so long under some circumstances, > >Iw ould like to measure the experimental time at several points in > >time during a single trial. So I can find out which part of the > >programming should be optimized or if there's even an error I don't > >recognize. > > >Therefore I would like to have, let's say 10 attributes and assign 10 > >times the current run time to one of these attributes. Unfortunately I > >couldn't find the right command for this operation in the manual. > > >Does any of you know how I could do so? Or did sth similar (i.e. this > >delay) happen to one of you? > > >Best, > >Tobias > > >-- > >You received this message because you are subscribed to the Google > >Groups "E-Prime" group. > >To post to this group, send email to e-prime at googlegroups.com. > >To unsubscribe from this group, send email to > >e-prime+unsubscribe at googlegroups.com. > >For more options, visit this group at > >http://groups.google.com/group/e-prime?hl=en. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Mon Jul 11 17:40:26 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Mon, 11 Jul 2011 13:40:26 -0400 Subject: recording current experimental time In-Reply-To: <201107111557.p6BFvW3t026059@mail16.tpgi.com.au> Message-ID: In addition, you may use Clock.Read to log the current session time as attributes and then inspect it all in the .edat file later, thus, c.SetAttrib "t.1", Clock.Read ' ... c.SetAttrib "t.2", Clock.Read ' ... c.SetAttrib "t.3", Clock.Read ' ... I have done this myself for some troubleshooting, works well. -- David McFarlane, Professional Faultfinder At 7/11/2011 11:57 AM Monday, Peter Quain wrote: >in the e-basic help look up: Clock.Read. It is ms since start of the >script. You can store value in variables and compute various >durations if you want. > >Example: >'Make some Global Variables (in 'User' Tab) >Dim time1, time2, dur1 as Long >'At some later time in your script, grab time since script started >time1 = Clock.Read >'[.... some more part of your experiment ....] >'Grab time since script started >time2 = Clock.Read >'Compute interval, time1 to time2 >dur1 = time2 - time1 > >At 01:39 AM 12/07/2011, you wrote: >>Hi together, >> >>I programmed an experiment in which a lot of positions and stimuli >>have to be calculated online. Calculation of slides happens BEFORE >>they are executed. Interestingly, this can cause a delay of up to 5 >>sec (not ms!) for some computer, 2 sec for other computers and only 1 >>sec on a third computer. Importantly, these computers are comparable >>regarding their hardware, i.e. processor, RAM etc. >> >>To test what exactly takes E-Prime so long under some circumstances, >>Iw ould like to measure the experimental time at several points in >>time during a single trial. So I can find out which part of the >>programming should be optimized or if there's even an error I don't >>recognize. >> >>Therefore I would like to have, let's say 10 attributes and assign 10 >>times the current run time to one of these attributes. Unfortunately I >>couldn't find the right command for this operation in the manual. >> >>Does any of you know how I could do so? Or did sth similar (i.e. this >>delay) happen to one of you? >> >>Best, >>Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From pquain at une.edu.au Mon Jul 11 17:55:32 2011 From: pquain at une.edu.au (Peter Quain) Date: Tue, 12 Jul 2011 03:55:32 +1000 Subject: LCD monitors and Input lag In-Reply-To: Message-ID: The issue of LCD monitors has been raised periodically on this list. Because CRTs have gone way of the dinosaur many labs use LCDs now for experiment presentation, and my guess is that some aren't aware of some possible pitfalls of doing so. My understanding is, basically, LCDs work differently to CRT monitors, and the key issue for display timing accuracy is that LCD monitors have onboard image processing engines that do their own thing with the frames sent to them by graphics card, prior to displaying them, and this processing can take (varied) time, with range that can be perhaps 0 to 70 ms across frames, and average lag which can be in the 30-40 ms range. The variation compounds the problem LCD screens may pose for some types of experimental psychology. This means 1) that you don't have a clue what is going on with display timing unless you test your LCD monitors for input lag (and then it likely will fluctuate across trials anyway) ; and 2) Just because it shows a picture, you can't just treat an LCD monitor as though it is a CRT monitor for purposes of time critical paradigms. Additionally, any concurrent audio would be out of sync because the audio is not routed through the display, and so would experience no delay. Also, without testing the monitor, it may not be possible to trust the "refresh rate" setting at anything other than the native refresh (mostly 60Hz) even though Windows may provide an option for the monitor to run at a higher "refresh" (say 75Hz), which some researchers may choose in their experiment. I have seen results showing that when refresh is set to 75Hz on a 60Hz native refresh LCD, frames are redrawn every ~13ms (instead of ~17ms), however 1 in every 6 frames was skipped (no display). So, in 167ms only 10 frames were displayed, not 12. Looked like the engine was correcting back to native refresh. You test this with high speed camera (same as to test input lag). As far as e-prime goes, this means that you could write a tidy paradigm where timing was tested as perfect on a good PC, and e-prime would log all durations as being so. However, at the display level the timing could be all over the place. Nobody would know, and effectively all the time taken to use e-prime for millisecond precision would be wasted. On monitors that have a big range of input lag, some paradigms would really be impossible to implement accurately.? I'm no expert in this, have just been fishing round on the net. For anyone who might be interested, below are some useful links providing a little digestible background on how LCDs work, how they differ from CRTs, and how to go about testing for input lag. Note that to do this properly you need a CRT monitor as baseline. Don't be tempted to use another LCD, which would include using a laptop screen, and my advice would be to definitely use a PC (with dual head graphics card in clone mode) not a laptop. ---------------------------------------------------------------------- Good old Wikipedia defining input lag: http://en.wikipedia.org/wiki/Input_lag A basic primer on how LCDs / CRTs function, and differences: http://www.bit-tech.net/hardware/2006/03/20/how_crt_and_lcd_monitors_work/ Here is an interesting site describing CRTs and LCDs (from gamer perspective). Navigate through the next few pages forward / backward using buttons down the bottom: http://www.tweakguides.com/Graphics_7.html How to test your monitors for input lag? Here is a brief description, and a little counter program you can download: http://www.flatpanelshd.com/focus.php?subaction=showfull&id=1229335064 Here is another description with some useful info about type of camera that is suitable: http://www.avsforum.com/avs-vb/showthread.php?t=1131464 A neat site who say they have done a lot of testing re: input lag, and provide comparison output for many LCD monitors. Note, lags might be different on your monitor even though it is same model tested. You need to test each individual monitor: http://www.digitalversus.com/duels.php?ty=6&ma1=35&mo1=121&p1=1303&ma2=284&mo2=326&p2=3097&ph=12 ----------------------------------------------------------------------------- Peter -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. -------------- next part -------------- An HTML attachment was scrubbed... URL: From pquain at une.edu.au Mon Jul 11 18:11:52 2011 From: pquain at une.edu.au (Peter Quain) Date: Tue, 12 Jul 2011 04:11:52 +1000 Subject: recording current experimental time In-Reply-To: <0709a6ca-454d-4569-817d-10297b798304@e21g2000vbz.googlegro ups.com> Message-ID: Hi Tobias, That much difference between machines sounds pretty bad, and they can't be too 'comparable' hardware wise. Could be a faulty graphics card / driver on the 5 second machine? Is it a GeForce card, perhaps? They can perform really badly. Maybe it has a bunch of processes running background, chewing up CPU? Anyway, 5 seconds is an age, I'd be wary about using that machine. If you only have 2 stimuli, what are they? (why do they need to be bitmaps) Peter At 03:37 AM 12/07/2011, you wrote: >Thanks Peter! > >That command and your suggested syntax perfectly worked out. Now I >know which part of my code was so time consuming. >However, I am not sure if I can reduce the timing and still I don't >know why the loading time differs so much between computers. > >Here is the crucial part of the code: > > > >for i = 1 to 101 >'matrix positions > Set ResponseMask_SlideImage = New SlideImage > ResponseMask_SlideImage.Name = "Image" & i > InitSlideImageDefaults ResponseMask_SlideImage > ResponseMask_SlideImage.X = "104 " + ((i-1) mod 10)*48 > ResponseMask_SlideImage.Y = "24" + ((i-1) \ 10)*48 > ResponseMask_SlideImage.Width = "40" > ResponseMask_SlideImage.Height = "40" > ResponseMask.States.Item("Default").Objects.Add >ResponseMask_SlideImage, "Image" & i > >Select Case ResponseMask.ActiveState >Case "Default" > > Set ResponseMask_SlideImage = >CSlideImage(ResponseMask.States.Item("Default").Objects(i)) > ResponseMask_SlideImage.Filename = "Mask.bmp" > if i = 1 then ResponseMask_SlideImage.Filename = > "fixation.bmp" > ResponseMask_SlideImage.Load > Set ResponseMask_SlideImage = Nothing > > >end select >next i > > > >Especially the "ResponseMask_SlideImage.Load" takes 5-8 ms. As I have >a display of 100 elements this adds up to almost a second. However, >there are only two types of stimuli, so maybe there is way that the >two bitmaps are loaded once each but "built up" on all 100 positions? > >Any clue why loading time differs so much between computers with >comparable hardware? > >Thanks a lot in advance! >Best, >Tobias > > >On 11 Jul., 17:57, Peter Quain wrote: > > in the e-basic help look up: Clock.Read. It is ms since start of the > > script. You can store value in variables and compute various > > durations if you want. > > > > Example: > > 'Make some Global Variables (in 'User' Tab) > > Dim time1, time2, dur1 as Long > > 'At some later time in your script, grab time since script started > > time1 = Clock.Read > > '[.... some more part of your experiment ....] > > 'Grab time since script started > > time2 = Clock.Read > > 'Compute interval, time1 to time2 > > dur1 = time2 - time1 > > > > At 01:39 AM 12/07/2011, you wrote: > > > > >Hi together, > > > > >I programmed an experiment in which a lot of positions and stimuli > > >have to be calculated online. Calculation of slides happens BEFORE > > >they are executed. Interestingly, this can cause a delay of up to 5 > > >sec (not ms!) for some computer, 2 sec for other computers and only 1 > > >sec on a third computer. Importantly, these computers are comparable > > >regarding their hardware, i.e. processor, RAM etc. > > > > >To test what exactly takes E-Prime so long under some circumstances, > > >Iw ould like to measure the experimental time at several points in > > >time during a single trial. So I can find out which part of the > > >programming should be optimized or if there's even an error I don't > > >recognize. > > > > >Therefore I would like to have, let's say 10 attributes and assign 10 > > >times the current run time to one of these attributes. Unfortunately I > > >couldn't find the right command for this operation in the manual. > > > > >Does any of you know how I could do so? Or did sth similar (i.e. this > > >delay) happen to one of you? > > > > >Best, > > >Tobias > > > > >-- > > >You received this message because you are subscribed to the Google > > >Groups "E-Prime" group. > > >To post to this group, send email to e-prime at googlegroups.com. > > >To unsubscribe from this group, send email to > > >e-prime+unsubscribe at googlegroups.com. > > >For more options, visit this group at > > >http://groups.google.com/group/e-prime?hl=en. > >-- >You received this message because you are subscribed to the Google >Groups "E-Prime" group. >To post to this group, send email to e-prime at googlegroups.com. >To unsubscribe from this group, send email to >e-prime+unsubscribe at googlegroups.com. >For more options, visit this group at >http://groups.google.com/group/e-prime?hl=en. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Mon Jul 11 18:53:01 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Mon, 11 Jul 2011 14:53:01 -0400 Subject: sending trigger to other devices locked on to the time of response In-Reply-To: <4e09fe34.8c7a2a0a.6f8f.184fSMTPIN_ADDED@gmr-mx.google.com> Message-ID: Hmm, another correction to this old thread. As a result of an off-list discussion with Kenneth Campbell (School of Psychology, University of Ottawa, Canada), I see that in my post of 2 Sep 2010 I took some things for granted and left out some needed explanation. So to clarify, that solution assumes two other things: - Set the response Time Limit of the stimlus (e.g., StimText) to match how long you want to allow for a response (i.e., use "extended input" (see Appendix C of the E-Prime User's Guide)). (This is implied in one of the later comments in the code excerpt, but is worth making more explicit.) - If you want to allow the stimulus to complete its Duration after a receiving a response, then set the End Action of its input masks to (none). Also, I now notice that the comment "... StimText will last at least as long its input mask Time Limit" is not quite correct, but at the moment I don't know quite how to accurately express the resulting interactions between Duration, Time Limit, End Action, and response, so I will leave that as an exercise for others. Hope that helps, -- David McFarlane, Professional Faultfinder At 6/28/2011 12:15 PM Tuesday, David McFarlane wrote: >Gosh, looking over this old thread, I see that I overinterpreted the >question and answered one more complex than the question asked. I >addressed the question of how to send an output signal following a >response that did *not* terminate the stimulus (i.e., End Action = >(none), so stimulus finishes its Duration after the response). > >More likely the questioner had a simpler case in mind, i.e., a >self-paced stimulus where the response terminates the stimulus, and >then E-Prime sends an output signal. For that simpler case, please >see discussion at >http://groups.google.com/group/e-prime/browse_thread/thread/ef0e5a8d8b87aa0c . > >-- David McFarlane, Professional Faultfinder > > >At 9/2/2010 03:08 PM Thursday, you wrote: >>Good timing -- It just so happens that I have been working on this >>very issue for a lab here. You have to make the proper settings in >>your stimulus, and use a bit of inline code following the >>stimulus. Here is the fully-commented inline code for my solution: >> >> >>'/---------------------------------------------------------------------- >>' We wish to present a stimulus (in this case, StimText), get a >>' response during that stimlus, and raise a signal as soon as the >>' subject responds. >>' >>' To do that, we need to run this inline code during StimText. We >>' could simply set the Duration of StimText to 0 or so (depending on >>' considerations such as leaving some time between stimulus .OnsetSignal >>' and .OffsetSignal) and then our code would have to also handle >>' further stimulus timing. But with judicious use of Duration and >>' PreRelease, E-Prime will automatically take care of stimulus timing >>' for us. >>' >>' So instead we simply set the Duration of StimText as desired (which >>' as a result automatically determines the target onset time for the >>' next stimulus object), and we set the PreRelease of StimText to a >>' suitably large value (preferably >= Duration, but perhaps less due >>' to other considerations as mentioned earlier). Now this code will >>' start to run soon after the onset of StimText, and handle the >>' reaction to the subject response. >>' >>' Finally, this code simply makes use of .IsPending() to detect the >>' response (see the InputMask.IsPending topic in the online E-Basic >>' Help). Note that as a result StimText will last at least as long >>' its input mask Time Limit, regardless of its Duration (if you just >>' keep Time Limit at the default of "(same as duration)" then this >>' will not pose a problem). >> >>Const LptDataPort as Integer = &H0378 ' adjust this for your system >>Const SignalData as Integer = &HFF ' adjust this for your device >>Const LoopDelay as Long = 2 'ms; set as small as possible for your >> ' system >> >>Do While StimText.InputMasks.IsPending() >> ' Some slower machines (such as my home laptop) need a delay so that >> ' EP can detect & handle input: >> Sleep LoopDelay >>Loop >>WritePort LptDataPort, SignalData >>'\---------------------------------------------------------------------- >> >> >>This is fine as long as you limit the response to coming during the >>stimulus. If you want to present a train of stimuli during the >>response period then you must do a little more. I also have a >>solution for that, but it is rather intricate and too much trouble >>to go into here, so I hope this is good enough for now. >> >>-- David McFarlane, Professional Faultfinder >> >> >>At 9/1/2010 02:38 AM Wednesday, Jaeyong Lee wrote: >>>I was wondering if there is a way to send trigger signals locked on >>>the response time. >>> >>>For instance, >>> >>>Stim.OnsetSignalEnabled = True >>>Stim.OnsetSignalPort = &H378 >>>Stim.OnsetSignalData = 1 >>> >>> >>>WritePort &h378, 0 >>> >>>the above code send triggers at the onset of the object "Stim". >>> >>>However, I am trying to figure out a way to send triggers at the time >>>of response of "Stim". >>> >>>I would greatly appreciate all tips and advices from you. Thanks. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Mon Jul 11 19:36:58 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Mon, 11 Jul 2011 15:36:58 -0400 Subject: Making movie clips for E-Prime? Message-ID: Well fellow E-Prime mavens, now I could use your experience & advice. I first checked in the New Features Guide, and did a cursory search through the PST Knowledge Base, the PST Forum, and the E-Prime Google Group, and did not find this addressed anywhere, so I hope I have done my homework at least as well as I expect others to :). Two related questions: 1) Suppose we want to make some short clips from a larger, existing movie file for use in E-Prime. What software would you recommend for this? 2) Suppose we want to record our own movie clips from scratch for use in E-Prime. What systems would you recommend for that? I might also reframe those questions as, "What did *you* use?" or, "What worked for *you*?" Note that the KB and online discussions have addressed at length how to get *existing* clips to work with E-Prime (installing codec libraries, etc.). I instead want to avoid those problems by preparing our clips in the first place in a way that plays well with E-Prime "out-of-the-box". Any advice? Thanks, -- David McFarlane, Professional Faultfinder -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Mon Jul 11 20:19:38 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Mon, 11 Jul 2011 16:19:38 -0400 Subject: Making movie clips for E-Prime? In-Reply-To: <4e1b50e0.83842b0a.705c.ffffccd5SMTPIN_ADDED@gmr-mx.google. com> Message-ID: Telephoning and Googling around trying to answer my own question #1... First general-purpose answer I got was Windows Movie Maker, which already comes with recent versions of MS Windows. Have any of you found success with that? A more serious source recommends Final Cut Pro (or perhaps the less expensive Final Cut Express). Anyone have any experience with that? It will render in a host of codecs, so it should do a good job of rendering clips for E-Prime. But it is a Mac-only product. So I looked for Windows alternatives to FCP, and came up with Adobe Premiere, or Sony Vegas. Can anybody tell me something about these products? Thanks again, -- David McFarlane, Professional Faultfinder At 7/11/2011 03:36 PM Monday, David McFarlane wrote: >Well fellow E-Prime mavens, now I could use your experience & >advice. I first checked in the New Features Guide, and did a >cursory search through the PST Knowledge Base, the PST Forum, and >the E-Prime Google Group, and did not find this addressed anywhere, >so I hope I have done my homework at least as well as I expect others to :). > >Two related questions: > >1) Suppose we want to make some short clips from a larger, existing >movie file for use in E-Prime. What software would you recommend for this? > >2) Suppose we want to record our own movie clips from scratch for >use in E-Prime. What systems would you recommend for that? > >I might also reframe those questions as, "What did *you* use?" or, >"What worked for *you*?" > >Note that the KB and online discussions have addressed at length how >to get *existing* clips to work with E-Prime (installing codec >libraries, etc.). I instead want to avoid those problems by >preparing our clips in the first place in a way that plays well with >E-Prime "out-of-the-box". Any advice? > >Thanks, >-- David McFarlane, Professional Faultfinder -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From Michiel.Spape at nottingham.ac.uk Tue Jul 12 09:32:56 2011 From: Michiel.Spape at nottingham.ac.uk (Michiel Spape) Date: Tue, 12 Jul 2011 10:32:56 +0100 Subject: Making movie clips for E-Prime? In-Reply-To: <4e1b50e0.83842b0a.705c.ffffccd5SMTPIN_ADDED@gmr-mx.google.com> Message-ID: Hi David, Noticed you answered your own questions mostly, but I'd like to draw your attention to Virtualdubmod (http://virtualdubmod.sourceforge.net/) anyway - if I remember correctly from some time ago when I was dabbling in video stuff, you can do most useful things for lab purposes: re-encode, strip audio, save audio, save bits of film, and save to bmp. Personally, I'm pretty fond of saving films to bmp, so that you don't need e-prime 2 :) As for recording: for simple stuff windows movie maker works fine, more heavy stuff might be better done with commercial packages (depending on your budget). Best, Mich Michiel Spapé Research Fellow Perception & Action group University of Nottingham School of Psychology www.cognitology.eu -----Original Message----- From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of David McFarlane Sent: 11 July 2011 20:37 To: e-prime at googlegroups.com Subject: Making movie clips for E-Prime? Well fellow E-Prime mavens, now I could use your experience & advice. I first checked in the New Features Guide, and did a cursory search through the PST Knowledge Base, the PST Forum, and the E-Prime Google Group, and did not find this addressed anywhere, so I hope I have done my homework at least as well as I expect others to :). Two related questions: 1) Suppose we want to make some short clips from a larger, existing movie file for use in E-Prime. What software would you recommend for this? 2) Suppose we want to record our own movie clips from scratch for use in E-Prime. What systems would you recommend for that? I might also reframe those questions as, "What did *you* use?" or, "What worked for *you*?" Note that the KB and online discussions have addressed at length how to get *existing* clips to work with E-Prime (installing codec libraries, etc.). I instead want to avoid those problems by preparing our clips in the first place in a way that plays well with E-Prime "out-of-the-box". Any advice? Thanks, -- David McFarlane, Professional Faultfinder -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From tobias.fw at gmail.com Tue Jul 12 10:54:07 2011 From: tobias.fw at gmail.com (Tobias) Date: Tue, 12 Jul 2011 03:54:07 -0700 Subject: recording current experimental time In-Reply-To: <201107111811.p6BIBrUr012025@mail5.tpg.com.au> Message-ID: Well, the computers have some differences, the slowest is a Core2 Pentium, the fastest an i5. But we are talking of really small bitmaps of 40x40 pixels, I guess this shouldn't make much of a difference even for a 486er. The two bitmaps are a horizontal and a vertical line. They are distributed on a matrix of 10x10 positions. On 11 Jul., 20:11, Peter Quain wrote: > Hi Tobias, > > That much difference between machines sounds pretty bad, and they > can't be too 'comparable' hardware wise. Could be a faulty graphics > card / driver on the 5 second machine? Is it a GeForce card, perhaps? > They can perform really badly. Maybe it has a bunch of processes > running background, chewing up CPU? Anyway, 5 seconds is an age, I'd > be wary about using that machine. > > If you only have 2 stimuli, what are they? (why do they need to be bitmaps) > > Peter > > At 03:37 AM 12/07/2011, you wrote: > > > > > > > > >Thanks Peter! > > >That command and your suggested syntax perfectly worked out. Now I > >know which part of my code was so time consuming. > >However, I am not sure if I can reduce the timing and still I don't > >know why the loading time differs so much between computers. > > >Here is the crucial part of the code: > > >for i = 1 to 101 > >'matrix positions > >                 Set ResponseMask_SlideImage = New SlideImage > >                 ResponseMask_SlideImage.Name = "Image" & i > >                 InitSlideImageDefaults ResponseMask_SlideImage > >                 ResponseMask_SlideImage.X = "104 " + ((i-1) mod 10)*48 > >                 ResponseMask_SlideImage.Y = "24" + ((i-1) \ 10)*48 > >                 ResponseMask_SlideImage.Width = "40" > >                 ResponseMask_SlideImage.Height = "40" > >                 ResponseMask.States.Item("Default").Objects.Add > >ResponseMask_SlideImage, "Image" & i > > >Select Case ResponseMask.ActiveState > >Case "Default" > > >                 Set ResponseMask_SlideImage = > >CSlideImage(ResponseMask.States.Item("Default").Objects(i)) > >                 ResponseMask_SlideImage.Filename = "Mask.bmp" > >                 if i = 1 then ResponseMask_SlideImage.Filename = > > "fixation.bmp" > >                 ResponseMask_SlideImage.Load > >                 Set ResponseMask_SlideImage = Nothing > > >end select > >next i > > >Especially the "ResponseMask_SlideImage.Load" takes 5-8 ms. As I have > >a display of 100 elements this adds up to almost a second. However, > >there are only two types of stimuli, so maybe there is way that the > >two bitmaps are loaded once each but "built up" on all 100 positions? > > >Any clue why loading time differs so much between computers with > >comparable hardware? > > >Thanks a lot in advance! > >Best, > >Tobias > > >On 11 Jul., 17:57, Peter Quain wrote: > > > in the e-basic help look up: Clock.Read. It is ms since start of the > > > script. You can store value in variables and compute various > > > durations if you want. > > > > Example: > > > 'Make some Global Variables (in 'User' Tab) > > > Dim time1, time2, dur1 as Long > > > 'At some later time in your script, grab time since script started > > > time1 = Clock.Read > > > '[.... some more part of your experiment ....] > > > 'Grab time since script started > > > time2 = Clock.Read > > > 'Compute interval, time1 to time2 > > > dur1 = time2 - time1 > > > > At 01:39 AM 12/07/2011, you wrote: > > > > >Hi together, > > > > >I programmed an experiment in which a lot of positions and stimuli > > > >have to be calculated online. Calculation of slides happens BEFORE > > > >they are executed. Interestingly, this can cause a delay of up to 5 > > > >sec (not ms!) for some computer, 2 sec for other computers and only 1 > > > >sec on a third computer. Importantly, these computers are comparable > > > >regarding their hardware, i.e. processor, RAM etc. > > > > >To test what exactly takes E-Prime so long under some circumstances, > > > >Iw ould like to measure the experimental time at several points in > > > >time during a single trial. So I can find out which part of the > > > >programming should be optimized or if there's even an error I don't > > > >recognize. > > > > >Therefore I would like to have, let's say 10 attributes and assign 10 > > > >times the current run time to one of these attributes. Unfortunately I > > > >couldn't find the right command for this operation in the manual. > > > > >Does any of you know how I could do so? Or did sth similar (i.e. this > > > >delay) happen to one of you? > > > > >Best, > > > >Tobias > > > > >-- > > > >You received this message because you are subscribed to the Google > > > >Groups "E-Prime" group. > > > >To post to this group, send email to e-prime at googlegroups.com. > > > >To unsubscribe from this group, send email to > > > >e-prime+unsubscribe at googlegroups.com. > > > >For more options, visit this group at > > > >http://groups.google.com/group/e-prime?hl=en. > > >-- > >You received this message because you are subscribed to the Google > >Groups "E-Prime" group. > >To post to this group, send email to e-prime at googlegroups.com. > >To unsubscribe from this group, send email to > >e-prime+unsubscribe at googlegroups.com. > >For more options, visit this group at > >http://groups.google.com/group/e-prime?hl=en. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From tobias.fw at gmail.com Tue Jul 12 10:57:13 2011 From: tobias.fw at gmail.com (Tobias) Date: Tue, 12 Jul 2011 03:57:13 -0700 Subject: recording current experimental time In-Reply-To: <4e1b358f.83842b0a.705c.ffffc768SMTPIN_ADDED@gmr-mx.google.com> Message-ID: Thanks for the hint - that is more or less what I did. I had it this way: [code] t1 = clock.read [more code] t2 = clock.read c.setttrib "code1.dur", t2 - t1 Do you have an idea how to shorten the time it takes to load the bitmaps? Note that it is actually only two different bitmaps, that have to be loaded each 50 times, though. Best, Tobias On 11 Jul., 19:40, David McFarlane wrote: > In addition, you may use Clock.Read to log the current session time > as attributes and then inspect it all in the .edat file later, thus, > > c.SetAttrib "t.1", Clock.Read > ' ... > c.SetAttrib "t.2", Clock.Read > ' ... > c.SetAttrib "t.3", Clock.Read > ' ... > > I have done this myself for some troubleshooting, works well. > > -- David McFarlane, Professional Faultfinder > > At 7/11/2011 11:57 AM Monday, Peter Quain wrote: > > > > > > > > >in the e-basic help look up: Clock.Read. It is ms since start of the > >script. You can store value in variables and compute various > >durations if you want. > > >Example: > >'Make some Global Variables (in 'User' Tab) > >Dim time1, time2, dur1 as Long > >'At some later time in your script, grab time since script started > >time1 = Clock.Read > >'[.... some more part of your experiment ....] > >'Grab time since script started > >time2 = Clock.Read > >'Compute interval, time1 to time2 > >dur1 = time2 - time1 > > >At 01:39 AM 12/07/2011, you wrote: > >>Hi together, > > >>I programmed an experiment in which a lot of positions and stimuli > >>have to be calculated online. Calculation of slides happens BEFORE > >>they are executed. Interestingly, this can cause a delay of up to 5 > >>sec (not ms!) for some computer, 2 sec for other computers and only 1 > >>sec on a third computer. Importantly, these computers are comparable > >>regarding their hardware, i.e. processor, RAM etc. > > >>To test what exactly takes E-Prime so long under some circumstances, > >>Iw ould like to measure the experimental time at several points in > >>time during a single trial. So I can find out which part of the > >>programming should be optimized or if there's even an error I don't > >>recognize. > > >>Therefore I would like to have, let's say 10 attributes and assign 10 > >>times the current run time to one of these attributes. Unfortunately I > >>couldn't find the right command for this operation in the manual. > > >>Does any of you know how I could do so? Or did sth similar (i.e. this > >>delay) happen to one of you? > > >>Best, > >>Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From Michiel.Spape at nottingham.ac.uk Tue Jul 12 11:05:37 2011 From: Michiel.Spape at nottingham.ac.uk (Michiel Spape) Date: Tue, 12 Jul 2011 12:05:37 +0100 Subject: recording current experimental time In-Reply-To: Message-ID: Hi, I'd sooner see the difference in ram/hdd performance - I've not noticed E-Prime making any marked use of the GPU (and some of its visual performance is pretty abhorrent, if you try canvas stuff). Anyway, two suggestions from a different angle, perhaps they help: - Rather than using bitmaps, why not use text displays? You can always add a little border to a text, and don't display any text at all. Or Ascii, works pretty well as well... Anyway, that saves all bmp loading. - Also, you could use canvas stuff instead of bitmaps, and draw everything to a separate buffered display. That way, all loading can be done at your leisure (although for 100 lines, it won't be *that much*) and only at the vital moment, your buffered display is swapped for the 'real' one. Best, Mich Michiel Spapé Research Fellow Perception & Action group University of Nottingham School of Psychology www.cognitology.eu -----Original Message----- From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of Tobias Sent: 12 July 2011 11:54 To: E-Prime Subject: Re: recording current experimental time Well, the computers have some differences, the slowest is a Core2 Pentium, the fastest an i5. But we are talking of really small bitmaps of 40x40 pixels, I guess this shouldn't make much of a difference even for a 486er. The two bitmaps are a horizontal and a vertical line. They are distributed on a matrix of 10x10 positions. On 11 Jul., 20:11, Peter Quain wrote: > Hi Tobias, > > That much difference between machines sounds pretty bad, and they > can't be too 'comparable' hardware wise. Could be a faulty graphics > card / driver on the 5 second machine? Is it a GeForce card, perhaps? > They can perform really badly. Maybe it has a bunch of processes > running background, chewing up CPU? Anyway, 5 seconds is an age, I'd > be wary about using that machine. > > If you only have 2 stimuli, what are they? (why do they need to be bitmaps) > > Peter > > At 03:37 AM 12/07/2011, you wrote: > > > > > > > > >Thanks Peter! > > >That command and your suggested syntax perfectly worked out. Now I > >know which part of my code was so time consuming. > >However, I am not sure if I can reduce the timing and still I don't > >know why the loading time differs so much between computers. > > >Here is the crucial part of the code: > > >for i = 1 to 101 > >'matrix positions > >                 Set ResponseMask_SlideImage = New SlideImage > >                 ResponseMask_SlideImage.Name = "Image" & i > >                 InitSlideImageDefaults ResponseMask_SlideImage > >                 ResponseMask_SlideImage.X = "104 " + ((i-1) mod 10)*48 > >                 ResponseMask_SlideImage.Y = "24" + ((i-1) \ 10)*48 > >                 ResponseMask_SlideImage.Width = "40" > >                 ResponseMask_SlideImage.Height = "40" > >                 ResponseMask.States.Item("Default").Objects.Add > >ResponseMask_SlideImage, "Image" & i > > >Select Case ResponseMask.ActiveState > >Case "Default" > > >                 Set ResponseMask_SlideImage = > >CSlideImage(ResponseMask.States.Item("Default").Objects(i)) > >                 ResponseMask_SlideImage.Filename = "Mask.bmp" > >                 if i = 1 then ResponseMask_SlideImage.Filename = > > "fixation.bmp" > >                 ResponseMask_SlideImage.Load > >                 Set ResponseMask_SlideImage = Nothing > > >end select > >next i > > >Especially the "ResponseMask_SlideImage.Load" takes 5-8 ms. As I have > >a display of 100 elements this adds up to almost a second. However, > >there are only two types of stimuli, so maybe there is way that the > >two bitmaps are loaded once each but "built up" on all 100 positions? > > >Any clue why loading time differs so much between computers with > >comparable hardware? > > >Thanks a lot in advance! > >Best, > >Tobias > > >On 11 Jul., 17:57, Peter Quain wrote: > > > in the e-basic help look up: Clock.Read. It is ms since start of the > > > script. You can store value in variables and compute various > > > durations if you want. > > > > Example: > > > 'Make some Global Variables (in 'User' Tab) > > > Dim time1, time2, dur1 as Long > > > 'At some later time in your script, grab time since script started > > > time1 = Clock.Read > > > '[.... some more part of your experiment ....] > > > 'Grab time since script started > > > time2 = Clock.Read > > > 'Compute interval, time1 to time2 > > > dur1 = time2 - time1 > > > > At 01:39 AM 12/07/2011, you wrote: > > > > >Hi together, > > > > >I programmed an experiment in which a lot of positions and stimuli > > > >have to be calculated online. Calculation of slides happens BEFORE > > > >they are executed. Interestingly, this can cause a delay of up to 5 > > > >sec (not ms!) for some computer, 2 sec for other computers and only 1 > > > >sec on a third computer. Importantly, these computers are comparable > > > >regarding their hardware, i.e. processor, RAM etc. > > > > >To test what exactly takes E-Prime so long under some circumstances, > > > >Iw ould like to measure the experimental time at several points in > > > >time during a single trial. So I can find out which part of the > > > >programming should be optimized or if there's even an error I don't > > > >recognize. > > > > >Therefore I would like to have, let's say 10 attributes and assign 10 > > > >times the current run time to one of these attributes. Unfortunately I > > > >couldn't find the right command for this operation in the manual. > > > > >Does any of you know how I could do so? Or did sth similar (i.e. this > > > >delay) happen to one of you? > > > > >Best, > > > >Tobias > > > > >-- > > > >You received this message because you are subscribed to the Google > > > >Groups "E-Prime" group. > > > >To post to this group, send email to e-prime at googlegroups.com. > > > >To unsubscribe from this group, send email to > > > >e-prime+unsubscribe at googlegroups.com. > > > >For more options, visit this group at > > > >http://groups.google.com/group/e-prime?hl=en. > > >-- > >You received this message because you are subscribed to the Google > >Groups "E-Prime" group. > >To post to this group, send email to e-prime at googlegroups.com. > >To unsubscribe from this group, send email to > >e-prime+unsubscribe at googlegroups.com. > >For more options, visit this group at > >http://groups.google.com/group/e-prime?hl=en. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From tobias.fw at gmail.com Tue Jul 12 15:02:13 2011 From: tobias.fw at gmail.com (Tobias) Date: Tue, 12 Jul 2011 08:02:13 -0700 Subject: Substitute one out of 100 images on a slide Message-ID: Hey there, as you might have read in other posts, I try to save computing time for a current experiment in which 100 bitmaps are loaded for one slide. As two slides are exactly identical apart from one single stimulus among these 100, I thought maybe it is possible to replace one of the 100 stimuli with another one. Thus I could save time but not loading the other 99 images again. This is the way I define the images for one the slides: for i = 1 to 101 'matrix positions Set Mask_SlideImage = New SlideImage Mask_SlideImage.Name = "Image" & i InitSlideImageDefaults Mask_SlideImage Mask_SlideImage.X = "104 " + ((i-1) mod 10)*48 Mask_SlideImage.Y = "24" + ((i-1) \ 10)*48 Mask_SlideImage.Width = "40" Mask_SlideImage.Height = "40" Mask.States.Item("Default").Objects.Add Mask_SlideImage, "Image" & i Select Case Mask.ActiveState Case "Default" Set Mask_SlideImage = CSlideImage(Mask.States.Item("Default").Objects(i)) Mask_SlideImage.Filename = "mask.bmp" if i = 1 then Mask_SlideImage.Filename = "fixation.bmp" Mask_SlideImage.Load Set Mask_SlideImage = Nothing end select next i My idea is that one of the 100 images will be redefined concerning the Filename. I would just have to re-load the SlideImage with a certain number "i" (that refers to a position in the matrix). The problem is: I don't know how to tell the computer WHICH of the images should get a new filename. The command "Mask_SlideImage.Filename = "mask.bmp"" does not refer to a number defining which image of the slide is meant... I hope you have some more clue than me! :) Best, Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Tue Jul 12 15:32:44 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Tue, 12 Jul 2011 11:32:44 -0400 Subject: Substitute one out of 100 images on a slide In-Reply-To: <79dcf92b-21cf-4e05-bfc6-7bf5dbec45d0@c41g2000yqm.googlegro ups.com> Message-ID: Try something like Mask_SlideImage.Filename = "mask" & i & ".bmp" where image file names take the form "mask1.bmp", "mask2.bmp", etc. You get the idea. BTW, why do you have a Select Case... clause in your code excerpt? Since you have only one case, you could eliminate that. Also, why have a For loop from 1 to 101, and then include an If clause for i=1? Why not instead just do i=1 outside the loop, and then loop for i = 2 to 101? Also, this should make no difference, but you could move the Set Mask_SlideImage = New SlideImage and Set Mask_SlideImage = Nothing statements outside of the loop. Regarding an earlier question about the time it takes to Load the same image 100 times, most machines already do automatic disk caching, so once your program has loaded the file the first time then it should just load the image from the memory cache all the other times. We have taken advantage of that behavior ourselves in some programs. So I don't know what takes your computer so long to do this. But I agree with Mich on the other thread that you might get maximum performance by judicious use of the Canvas. -- David McFarlane, Professional Faultfinder >Hey there, > >as you might have read in other posts, I try to save computing time >for a current experiment in which 100 bitmaps are loaded for one >slide. > >As two slides are exactly identical apart from one single stimulus >among these 100, I thought maybe it is possible to replace one of the >100 stimuli with another one. Thus I could save time but not loading >the other 99 images again. > >This is the way I define the images for one the slides: > > >for i = 1 to 101 >'matrix positions > Set Mask_SlideImage = New SlideImage > Mask_SlideImage.Name = "Image" & i > InitSlideImageDefaults Mask_SlideImage > Mask_SlideImage.X = "104 " + ((i-1) mod 10)*48 > Mask_SlideImage.Y = "24" + ((i-1) \ 10)*48 > Mask_SlideImage.Width = "40" > Mask_SlideImage.Height = "40" > Mask.States.Item("Default").Objects.Add > Mask_SlideImage, "Image" & i > >Select Case Mask.ActiveState >Case "Default" > > Set Mask_SlideImage = >CSlideImage(Mask.States.Item("Default").Objects(i)) > Mask_SlideImage.Filename = "mask.bmp" > if i = 1 then Mask_SlideImage.Filename = > "fixation.bmp" > Mask_SlideImage.Load > Set Mask_SlideImage = Nothing > >end select >next i > > > >My idea is that one of the 100 images will be redefined concerning the >Filename. I would just have to re-load the SlideImage with a certain >number "i" (that refers to a position in the matrix). > >The problem is: I don't know how to tell the computer WHICH of the >images should get a new filename. The command >"Mask_SlideImage.Filename = "mask.bmp"" does not refer to a number >defining which image of the slide is meant... > >I hope you have some more clue than me! :) > >Best, >Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From tobias.fw at gmail.com Tue Jul 12 16:28:11 2011 From: tobias.fw at gmail.com (Tobias) Date: Tue, 12 Jul 2011 09:28:11 -0700 Subject: Substitute one out of 100 images on a slide In-Reply-To: <4e1c6921.83842b0a.705c.0016SMTPIN_ADDED@gmr-mx.google.com> Message-ID: On 12 Jul., 17:32, David McFarlane wrote: > Try something like > > Mask_SlideImage.Filename = "mask" & i & ".bmp" > > where image file names take the form "mask1.bmp", "mask2.bmp", > etc.  You get the idea. Thanks for the answer, but I think I expressed myself a bit unclearly. The if-slope from the above code is an excerpt from an object called "slide1". So far, I additionally had "slide2" with the exact same code except for this fallowing line: if c.getattrib("ProbePos") = (i-1) then ProbeMask_SlideImage.Filename = "probe.bmp" After defining the slides with this code, I have: run.slide1 run.slide2 My idea was that I should use: run.slide1 [some code that changes one of the 100 images of slide1] run.slide2 > BTW, why do you have a Select Case... clause in your code > excerpt?  Since you have only one case, you could eliminate > that.  Also, why have a For loop from 1 to 101, and then include an > If clause for i=1?  Why not instead just do i=1 outside the loop, and > then loop for i = 2 to 101?  Also, this should make no difference, > but you could move the Set Mask_SlideImage = New SlideImage and Set > Mask_SlideImage = Nothing statements outside of the loop. > > Regarding an earlier question about the time it takes to Load the > same image 100 times, most machines already do automatic disk > caching, so once your program has loaded the file the first time then > it should just load the image from the memory cache all the other > times.  We have taken advantage of that behavior ourselves in some > programs.  So I don't know what takes your computer so long to do > this.  But I agree with Mich on the other thread that you might get > maximum performance by judicious use of the Canvas. You are right, this does not make too much sense. It is an artifact from another experiment when it made sense :-p Nevertheless, this does not seem to be time-consuming. Best, Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Tue Jul 12 16:37:21 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Tue, 12 Jul 2011 12:37:21 -0400 Subject: Substitute one out of 100 images on a slide In-Reply-To: Message-ID: At 7/12/2011 12:28 PM Tuesday, Tobias wrote: > > BTW, why do you have a Select Case... clause in your code > > excerpt? Since you have only one case, you could eliminate > > that. Also, why have a For loop from 1 to 101, and then include an > > If clause for i=1? Why not instead just do i=1 outside the loop, and > > then loop for i = 2 to 101? Also, this should make no difference, > > but you could move the Set Mask_SlideImage = New SlideImage and Set > > Mask_SlideImage = Nothing statements outside of the loop. ... >You are right, this does not make too much sense. It is an artifact >from another experiment when it made sense :-p >Nevertheless, this does not seem to be time-consuming. Except for the time & effort spent when someone tries to read & decipher the code. -- David McFarlane, Professional Faultfinder -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From tobias.fw at gmail.com Tue Jul 12 16:47:08 2011 From: tobias.fw at gmail.com (Tobias) Date: Tue, 12 Jul 2011 09:47:08 -0700 Subject: Substitute one out of 100 images on a slide In-Reply-To: <4e1c7847.c9d12a0a.0132.1854SMTPIN_ADDED@gmr-mx.google.com> Message-ID: Yes, you're right. Sorry for that. Didn't do it on purpose but rather because I was afraid to change sth. :-p On 12 Jul., 18:37, David McFarlane wrote: > At 7/12/2011 12:28 PM Tuesday, Tobias wrote: > > > > BTW, why do you have a Select Case... clause in your code > > > excerpt?  Since you have only one case, you could eliminate > > > that.  Also, why have a For loop from 1 to 101, and then include an > > > If clause for i=1?  Why not instead just do i=1 outside the loop, and > > > then loop for i = 2 to 101?  Also, this should make no difference, > > > but you could move the Set Mask_SlideImage = New SlideImage and Set > > > Mask_SlideImage = Nothing statements outside of the loop. > ... > >You are right, this does not make too much sense. It is an artifact > >from another experiment when it made sense :-p > >Nevertheless, this does not seem to be time-consuming. > > Except for the time & effort spent when someone tries to read & > decipher the code. > > -- David McFarlane, Professional Faultfinder -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From santistevan64 at gmail.com Tue Jul 12 19:18:24 2011 From: santistevan64 at gmail.com (Anthony) Date: Tue, 12 Jul 2011 12:18:24 -0700 Subject: InLine response time data logging Message-ID: Hello All, I am currently having issues logging the response time from a slide. The program setup is such that the slide does not advance until an InLine conditional has been met (the subject clicks on a box). The slide advances fine; however, the response time data is not logged because I have setup the slide properties such that it does not advance on any click (because I only want clicks in the box to advance the slide). My question is: how can I log response times from an InLine code under certain conditional circumstances? Thank you, Anthony -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To view this discussion on the web visit https://groups.google.com/d/msg/e-prime/-/qtP9EZbi1cgJ. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcfarla9 at msu.edu Tue Jul 12 19:47:39 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Tue, 12 Jul 2011 15:47:39 -0400 Subject: InLine response time data logging In-Reply-To: <23669065.1707.1310498304074.JavaMail.geo-discussion-forums @prmp7> Message-ID: Anthony, Stock reminder: 1) I do not work for PST. 2) PST's trained staff takes any and all questions at http://support.pstnet.com/e%2Dprime/support/login.asp , and they strive to respond to all requests in 24-48 hours -- this is pretty much their substitute for proper documentation, so make full use of it. 3) If you do get an answer from PST Web Support, please extend the courtesy of posting their reply back here for the sake of others. That said, here is my take... Not sure that I fully understand the issue, but if you have an input mask launched from a stimulus object called, say, StimSlide, then you may log responses at any time using inline code such as c.SetAttrib "StimSlide.Resp", StimSlide.Resp c.SetAttrib "StimSlide.RT", StimSlide.RT You can see this for yourself just by looking at the logging code automatically generated by E-Studio whenever you enable logging. For that matter, just because you do not want the Slide to advance on a mouse click does not mean that you cannot use automatice data logging on it. Try enabling data logging on your stimulus Slide, and see if that does it for you. -- David McFarlane, Professional Faultfinder >I am currently having issues logging the response time from a slide. >The program setup is such that the slide does not advance until an >InLine conditional has been met (the subject clicks on a box). The >slide advances fine; however, the response time data is not logged >because I have setup the slide properties such that it does not >advance on any click (because I only want clicks in the box to >advance the slide). My question is: how can I log response times >from an InLine code under certain conditional circumstances? > > >Thank you, >Anthony -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Tue Jul 12 21:05:06 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Tue, 12 Jul 2011 17:05:06 -0400 Subject: Making movie clips for E-Prime? In-Reply-To: <09DAEA8BC192C94EB62C8E71FC35A5D92F80386FA2@EXCHANGE3.ad.no ttingham.ac.uk> Message-ID: Mich, Thanks. As it turns out, VirtualDubMod has been discontinued since about 2006. But if we just shorten that to "VirtualDub", we get to the current product (http://www.virtualdub.org ). And it also turns out that David Vinson recommended the same product at http://groups.google.com/group/e-prime/browse_thread/thread/8a3086f95f315fc5 . It does seem to be an extensive video editing package, could be handy. -- David McFarlane, Professional Faultfinder At 7/12/2011 05:32 AM Tuesday, Michiel Spape wrote: >Hi David, >Noticed you answered your own questions mostly, >but I'd like to draw your attention to >Virtualdubmod >(http://virtualdubmod.sourceforge.net/) anyway - >if I remember correctly from some time ago when >I was dabbling in video stuff, you can do most >useful things for lab purposes: re-encode, strip >audio, save audio, save bits of film, and save >to bmp. Personally, I'm pretty fond of saving >films to bmp, so that you don't need e-prime 2 :) >As for recording: for simple stuff windows movie >maker works fine, more heavy stuff might be >better done with commercial packages (depending on your budget). >Best, >Mich > >Michiel Spapé >Research Fellow >Perception & Action group >University of Nottingham >School of Psychology >www.cognitology.eu -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Tue Jul 12 21:24:37 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Tue, 12 Jul 2011 17:24:37 -0400 Subject: Making movie clips for E-Prime? In-Reply-To: <4e1b5af9.ce5e2a0a.697d.ffffe435SMTPIN_ADDED@gmr-mx.google. com> Message-ID: OK, we got something to work, so here is my report in case anybody else can use this. I would be very interested if others could weigh in with what they have used. First, turns out my user really wanted to extract short clips (~1 min) from commercial movie DVDs. In short, I managed to use AoA DVD Ripper (http://www.aoamedia.com/dvd_ripper.htm ) to visually select a segment to clip from a commercial DVD, set DVD Ripper to encode it as MPEG-1/VCD (*.mpg), and the resulting file played in stock E-Prime with no further fuss. (That will work fine as long as the DVDs that the user wants do not foil us with some futher copy protection, and assuming that our use falls within Fair Use.) More details for those who care... In general, we have two strategies we might apply here -- configure E-Prime to work with movie files as we supply them, or make sure that the movie files we supply are configured to work with stock E-Prime. I prefer the latter strategy, because (1) I figure that the E-Prime developers have optimized E-Prime for a limited range of formats even if we can trick it up to accept other formats, and (2) I would rather not have to reconfigure E-Prime with custom codecs every time we move the experiment to a new machine. So first I used GSpot (http://www.headbands.com/gspot/ ) and MediaInfo (http://mediainfo.sourceforge.net/en )to see what format/codec E-Prime uses for its own examples. They use .mpg files, encoded as MPEG Video (Version 1). So I set that as my goal. I tried two products for ripping the DVD samples. First I tried HandBrake (http://handbrake.fr ), but (1) the interface does not seem to have a good visual way to select arbitrary clips, (2) it was *very* slow (we canceled before it finished), and (3) HandBrake itself insists that it is only a transcoder, *not* a DVD ripper. After Googling around a bit I moved on to AoA DVD Ripper. This provides a good-enough visual interface for selecting arbitrary clips, worked pretty fast, and produced an .avi file that played in Media Player. That file did not play in stock E-Prime, however, but once I reconfigured DVD Ripper to output MPEG-1 all was well. (I also set File Split Mode to Infinite just to avoid splitting files.) Note that by default DVD Ripper outputs .avi at 720x480 resolution, or .mpg at 352x240 resolution, so you might want to fiddle with that further. (It costs US$40 (cheap!) to register DVD Ripper, and I do not know how the paid version differs from the free one, but if you find the program useful then please do the right thing and pay for it.) Now as it turns out, when I installed AoA DVD Ripper it also installed an Xvid codec, so then the .avi file played in E-Prime as well. But the .mpg file continued to play in E-Prime even after I uninstalled the Xvid codec, so I feel safer sticking with .mpg (MPEG-1). For the record, if we did want to fiddle with codecs for E-Prime, in addition to letting AoA DVD Ripper install Xvid, PST recommends the ffdshow (http://www.free-codecs.com/download/ffdshow.htm ) and SUPER (http://www.erightsoft.com/SUPER.html ) codec libraries (see http://support.pstnet.com/forum/Topic635-12-1.aspx and http://www.pstnet.com/forum/Topic2986-5-1.aspx ). Finally, as mentioned earlier in this thread, for more extensive video editing VirtualDub (http://www.virtualdub.org ) might come into play. This outputs only in .avi format, so would require installing codecs for E-Prime, or using A0A DVD Ripper or HandBrake to transcode the output files as needed for use in E-Prime. I still have no idea what system to use in case we ever want to generate video for E-Prime from scratch, but I guess we will cross that bridge when we come to it. -- David McFarlane, Professional Faultfinder At 7/11/2011 04:19 PM Monday, David McFarlane wrote: >Telephoning and Googling around trying to answer my own question #1... > >First general-purpose answer I got was Windows Movie Maker, which >already comes with recent versions of MS Windows. Have any of you >found success with that? > >A more serious source recommends Final Cut Pro (or perhaps the less >expensive Final Cut Express). Anyone have any experience with >that? It will render in a host of codecs, so it should do a good >job of rendering clips for E-Prime. But it is a Mac-only product. > >So I looked for Windows alternatives to FCP, and came up with Adobe >Premiere, or Sony Vegas. Can anybody tell me something about these products? > >Thanks again, >-- David McFarlane, Professional Faultfinder > > >At 7/11/2011 03:36 PM Monday, David McFarlane wrote: >>Well fellow E-Prime mavens, now I could use your experience & >>advice. I first checked in the New Features Guide, and did a >>cursory search through the PST Knowledge Base, the PST Forum, and >>the E-Prime Google Group, and did not find this addressed anywhere, >>so I hope I have done my homework at least as well as I expect others to :). >> >>Two related questions: >> >>1) Suppose we want to make some short clips from a larger, existing >>movie file for use in E-Prime. What software would you recommend for this? >> >>2) Suppose we want to record our own movie clips from scratch for >>use in E-Prime. What systems would you recommend for that? >> >>I might also reframe those questions as, "What did *you* use?" or, >>"What worked for *you*?" >> >>Note that the KB and online discussions have addressed at length >>how to get *existing* clips to work with E-Prime (installing codec >>libraries, etc.). I instead want to avoid those problems by >>preparing our clips in the first place in a way that plays well >>with E-Prime "out-of-the-box". Any advice? >> >>Thanks, >>-- David McFarlane, Professional Faultfinder -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From santistevan64 at gmail.com Tue Jul 12 21:34:21 2011 From: santistevan64 at gmail.com (Anthony) Date: Tue, 12 Jul 2011 14:34:21 -0700 Subject: InLine response time data logging In-Reply-To: <4e1ca4e2.ce5e2a0a.697d.232fSMTPIN_ADDED@gmr-mx.google.com> Message-ID: The problem that I encounter when I try to use automatic data logging is that it logs the first response, regardless of where it is on the screen. I only want to log the response time that it took for the subject to click within the boundaries of the box on the screen.My code is below, if this helps: 'This code was taken from http://groups.google.com/group/e-prime/browse_thread/thread/6411f6b4b8614f19/b794d83bb662dfef?pli=1 'and adapted for use by Anthony ******* 'Designate "theState" as the Default Slide State, which is the 'current, ActiveState on the Slide object "Stimulus" Dim theState as SlideState Set theState = DisplayScreen.States("Default") Dim next_mX as Long, next_mY as Long Dim strHit As String Dim theMouseResponseData As MouseResponseData Do 'Was there a response? If DisplayScreen.InputMasks.Responses.Count > 0 Then 'Get the mouse response Set theMouseResponseData = CMouseResponseData(DisplayScreen.InputMasks.Responses(1)) 'Determine string name of SlideImage or SlideText object at 'mouse click coordinates. Assign that value to strHit strHit = theState.HitTest(theMouseResponseData.CursorX, theMouseResponseData.CursorY) 'Compare string name where mouse click occurred to CorrectAnswer 'attribute on each trial, and dispense a treat if they are equal (i.e., the target was clicked) 'NOTE: This comparison is case sensitive If strHit = "Image1" Then writeport &H378,1 WritePort &H378,2 End If End If Do Until (strHit = "Image1") 'Capture & process further mouse clicks: If (Mouse.Buttons And ebMouseButton1) Then Mouse.GetCursorPos next_mX, next_mY strHit = theState.HitTest( next_mX, next_mY ) End If If strHit = "Image1" Then writeport &H378,1 WritePort &H378,2 End If 'Loops until the button is clicked Loop Loop Until (strHit = "Image1") On Jul 12, 12:47 pm, David McFarlane wrote: > Anthony, > > Stock reminder:  1) I do not work for PST.  2) PST's trained staff > takes any and all questions athttp://support.pstnet.com/e%2Dprime/support/login.asp, and they > strive to respond to all requests in 24-48 hours -- this is pretty > much their substitute for proper documentation, so make full use of > it.  3) If you do get an answer from PST Web Support, please extend > the courtesy of posting their reply back here for the sake of others. > > That said, here is my take... > > Not sure that I fully understand the issue, but if you have an input > mask launched from a stimulus object called, say, StimSlide, then you > may log responses at any time using inline code such as > > c.SetAttrib "StimSlide.Resp", StimSlide.Resp > c.SetAttrib "StimSlide.RT", StimSlide.RT > > You can see this for yourself just by looking at the logging code > automatically generated by E-Studio whenever you enable logging. > > For that matter, just because you do not want the Slide to advance on > a mouse click does not mean that you cannot use automatice data > logging on it.  Try enabling data logging on your stimulus Slide, and > see if that does it for you. > > -- David McFarlane, Professional Faultfinder > > > > > > > > >I am currently having issues logging the response time from a slide. > >The program setup is such that the slide does not advance until an > >InLine conditional has been met (the subject clicks on a box). The > >slide advances fine; however, the response time data is not logged > >because I have setup the slide properties such that it does not > >advance on any click (because I only want clicks in the box to > >advance the slide). My question is: how can I log response times > >from an InLine code under certain conditional circumstances? > > >Thank you, > >Anthony -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From santistevan64 at gmail.com Tue Jul 12 21:36:46 2011 From: santistevan64 at gmail.com (Anthony) Date: Tue, 12 Jul 2011 14:36:46 -0700 Subject: InLine response time data logging In-Reply-To: <0956be1f-1e82-4e2d-8885-f462a8ed2b00@q29g2000prj.googlegroups.com> Message-ID: Essentially, I want to record RT's after the "If strHit = 'Image1'" conditions. On Jul 12, 2:34 pm, Anthony wrote: > The problem that I encounter when I try to use automatic data logging > is that it logs the first response, regardless of where it is on the > screen. I only want to log the response time that it took for the > subject to click within the boundaries of the box on the screen.My > code is below, if this helps: > >       'This code was taken fromhttp://groups.google.com/group/e-prime/browse_thread/thread/6411f6b4b... >            'and adapted for use by Anthony ******* > >            'Designate "theState" as the Default Slide State, which is the >        'current, ActiveState on the Slide object "Stimulus" >         Dim theState as SlideState >         Set theState = DisplayScreen.States("Default") >         Dim next_mX as Long, next_mY as Long >         Dim strHit As String >         Dim theMouseResponseData As MouseResponseData >         Do >         'Was there a response? >                 If DisplayScreen.InputMasks.Responses.Count > 0 Then >                         'Get the mouse response >                         Set theMouseResponseData = > CMouseResponseData(DisplayScreen.InputMasks.Responses(1)) >                         'Determine string name of SlideImage or > SlideText object at >                         'mouse click coordinates. Assign that value to > strHit >                         strHit = > theState.HitTest(theMouseResponseData.CursorX, > theMouseResponseData.CursorY) >                         'Compare string name where mouse click > occurred to CorrectAnswer >                         'attribute on each trial, and dispense a treat > if they are equal (i.e., the target was clicked) >                         'NOTE: This comparison is case sensitive >                         If strHit = "Image1" Then >                                                         writeport &H378,1 >                                                         WritePort &H378,2 >                         End If >                 End If >                 Do Until (strHit = "Image1") >                 'Capture & process further mouse clicks: >                         If (Mouse.Buttons And ebMouseButton1) Then >                                 Mouse.GetCursorPos next_mX, next_mY >                                 strHit = theState.HitTest( next_mX, > next_mY ) >                         End If >                         If strHit = "Image1" Then >                                                         writeport &H378,1 >                                                         WritePort &H378,2 >                                                 End If > >                                 'Loops until the button is clicked >                 Loop >                                 Loop Until (strHit = "Image1") > > On Jul 12, 12:47 pm, David McFarlane wrote: > > > > > > > > > Anthony, > > > Stock reminder:  1) I do not work for PST.  2) PST's trained staff > > takes any and all questions athttp://support.pstnet.com/e%2Dprime/support/login.asp, and they > > strive to respond to all requests in 24-48 hours -- this is pretty > > much their substitute for proper documentation, so make full use of > > it.  3) If you do get an answer from PST Web Support, please extend > > the courtesy of posting their reply back here for the sake of others. > > > That said, here is my take... > > > Not sure that I fully understand the issue, but if you have an input > > mask launched from a stimulus object called, say, StimSlide, then you > > may log responses at any time using inline code such as > > > c.SetAttrib "StimSlide.Resp", StimSlide.Resp > > c.SetAttrib "StimSlide.RT", StimSlide.RT > > > You can see this for yourself just by looking at the logging code > > automatically generated by E-Studio whenever you enable logging. > > > For that matter, just because you do not want the Slide to advance on > > a mouse click does not mean that you cannot use automatice data > > logging on it.  Try enabling data logging on your stimulus Slide, and > > see if that does it for you. > > > -- David McFarlane, Professional Faultfinder > > > >I am currently having issues logging the response time from a slide. > > >The program setup is such that the slide does not advance until an > > >InLine conditional has been met (the subject clicks on a box). The > > >slide advances fine; however, the response time data is not logged > > >because I have setup the slide properties such that it does not > > >advance on any click (because I only want clicks in the box to > > >advance the slide). My question is: how can I log response times > > >from an InLine code under certain conditional circumstances? > > > >Thank you, > > >Anthony -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From tobias.fw at gmail.com Wed Jul 13 10:57:14 2011 From: tobias.fw at gmail.com (Tobias) Date: Wed, 13 Jul 2011 03:57:14 -0700 Subject: Substitute one out of 100 images on a slide In-Reply-To: <88f87b88-ee13-455e-8dce-01cb06411c6f@w24g2000yqw.googlegroups.com> Message-ID: I found out why the timing was so different on different computers! On two of them I copied the folder with the eprime files on the desktop which was - as I discovered recently - not on the local harddrive but on a server. Accordingly, each bitmap had to be transferred from the server to the local computer. So after using different, screens, graphic cards and bitmaps I finally found the you might say rather obvious reason :-p Anyway thanks for your help. May my failure help others to not fail! On 12 Jul., 18:47, Tobias wrote: > Yes, you're right. Sorry for that. Didn't do it on purpose but rather > because I was afraid to change sth. :-p > > On 12 Jul., 18:37, David McFarlane wrote: > > > > > > > > > At 7/12/2011 12:28 PM Tuesday, Tobias wrote: > > > > > BTW, why do you have a Select Case... clause in your code > > > > excerpt?  Since you have only one case, you could eliminate > > > > that.  Also, why have a For loop from 1 to 101, and then include an > > > > If clause for i=1?  Why not instead just do i=1 outside the loop, and > > > > then loop for i = 2 to 101?  Also, this should make no difference, > > > > but you could move the Set Mask_SlideImage = New SlideImage and Set > > > > Mask_SlideImage = Nothing statements outside of the loop. > > ... > > >You are right, this does not make too much sense. It is an artifact > > >from another experiment when it made sense :-p > > >Nevertheless, this does not seem to be time-consuming. > > > Except for the time & effort spent when someone tries to read & > > decipher the code. > > > -- David McFarlane, Professional Faultfinder -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From d.vinson at ucl.ac.uk Wed Jul 13 11:43:14 2011 From: d.vinson at ucl.ac.uk (David Vinson) Date: Wed, 13 Jul 2011 12:43:14 +0100 Subject: Making movie clips for E-Prime? In-Reply-To: <4e1cbbc4.83842b0a.705c.10cfSMTPIN_ADDED@gmr-mx.google.com> Message-ID: Thanks David for this detailed description! I work with videos a lot and there are all kinds of possible pitfalls, so I thought I'd weigh in on a few of the issues while the topic is fresh in my mind. It's incredibly important to develop dependable and consistent systems of creating stimuli that work for your hardware and software. I very much agree with David's option: that wherever possible it's best to create video files with stock E-Prime in mind, rather than trying to coerce E-Prime into working with whatever video files you have. With the latter you may experience weeks of trouble (and repeated back-and-forth correspondence with E-Prime Support who may or may not be able to replicate your video problems on their hardware!). The Codec Config tool is very useful in dealing with various video formats but it only goes so far - and files that pass the codec config test may still cause crashes when run for real. Our test procedure when developing video experiments is something like this. At each step there's a chance for failure (but less if you follow the same steps as in a previous successful study)! (Our experiments: we are mostly using clips of sign language stimuli 1-2 seconds long, perhaps 150-200 per experiment, possibly repeated a few times in the course of a study). 1 - convert the very first video clip into the desired format/size etc. (we prefer to display videos at their actual size rather than using E-Prime's stretch function), and run Codec Config to see if the clip passes this simple test. 2 - create the simplest possible program that displays that one video using a MovieDisplay. If it works proceed to the next step. 3 - convert some more clips (15-20 should suffice, or just do them all in batch mode). While you (or someone else) proceeds with the editing process, set up a "stress test" experiment that repeatedly displays these clips, one after another, with a reasonable interval between each (otherwise you may start getting build-up of loading lags and thoroughly unpleasant performance) Make sure this experiment logs data (even if it's just non-responses). I might set it to 100 repetitions of a randomized List. Then just set it off - if it crashes along the way (ie, doesn't get to the end and convert the running text log into an edat2 file) this is a sign you may have a harder-to-detect codec issue to sort out. Better that it happens this way than with a real participant. 4 - if you get this far, set up your real experiment and test it completely under "realistic participant" conditions. Keep in mind that the stress test in (3) may succeed but the real experiment may still crash for one reason or another. In addition to making sure your experiment does not crash, if timing is an important consideration (and when is it not?), keep in mind that it takes significant time to load and display video files. There are a number of additional time audit features specific to MovieDisplays - it's very wise to log these and get your timing sorted out before you start running. Timing can be a real mess when you deal with video stimuli and seems to depend a lot on the hardware. For all of this, if you run into real problems, I strongly urge you to open a support request with E-Prime support (even though you may want a solution "today" and the support queue may be 10-12 days). Video problems can be so complicated and idiosyncratic, and there may be known bugs or still-undocumented features that could help you out a great deal. I've had very good responses from support staff over the years, but patience is required especially during the peak periods (eg start of academic terms). Whew, that's enough about my life story with video problems. When it comes to video capture and conversion - our main setup for generating E-Prime video from scratch involves initial processing on Apple hardware (Final Cut Pro) from a range of DV cameras (our studio/video hardware is apple-based), although I still use VirtualDub on some occasions. Our biggest problems have come from videos that have gone through quicktime formats (ugh!) and my advice is always to minimize the number of conversions if you want an E-Prime-friendly video type - and stick to a standard process using the same camera/settings/etc once you get something that works - different cameras have different default settings and it's best to stick with something that works wherever possible. And don't ditch your original video files (even if they're huge) until you know you have a conversion that works. Many researchers will work hard to develop video stimulus materials that display as well as possible in a media player, but this does not always transfer to clean E-prime performance - if you know you are going to use E-Prime with your videos, it's a good idea to get them E-Prime-friendly first (really this is just as important a part of materials development as other experimental controls you include). If your experiment doesn't work there's no point in having nice presentation quality video stimuli. hope this is useful to somebody! -dv On 12/07/2011 22:24, David McFarlane wrote: > OK, we got something to work, so here is my report in case anybody else > can use this. I would be very interested if others could weigh in with > what they have used. > > First, turns out my user really wanted to extract short clips (~1 min) > from commercial movie DVDs. In short, I managed to use AoA DVD Ripper > (http://www.aoamedia.com/dvd_ripper.htm ) to visually select a segment > to clip from a commercial DVD, set DVD Ripper to encode it as MPEG-1/VCD > (*.mpg), and the resulting file played in stock E-Prime with no further > fuss. (That will work fine as long as the DVDs that the user wants do > not foil us with some futher copy protection, and assuming that our use > falls within Fair Use.) > > More details for those who care... > > In general, we have two strategies we might apply here -- configure > E-Prime to work with movie files as we supply them, or make sure that > the movie files we supply are configured to work with stock E-Prime. I > prefer the latter strategy, because (1) I figure that the E-Prime > developers have optimized E-Prime for a limited range of formats even if > we can trick it up to accept other formats, and (2) I would rather not > have to reconfigure E-Prime with custom codecs every time we move the > experiment to a new machine. > > So first I used GSpot (http://www.headbands.com/gspot/ ) and MediaInfo > (http://mediainfo.sourceforge.net/en )to see what format/codec E-Prime > uses for its own examples. They use .mpg files, encoded as MPEG Video > (Version 1). So I set that as my goal. > > I tried two products for ripping the DVD samples. First I tried > HandBrake (http://handbrake.fr ), but (1) the interface does not seem to > have a good visual way to select arbitrary clips, (2) it was *very* slow > (we canceled before it finished), and (3) HandBrake itself insists that > it is only a transcoder, *not* a DVD ripper. > > After Googling around a bit I moved on to AoA DVD Ripper. This provides > a good-enough visual interface for selecting arbitrary clips, worked > pretty fast, and produced an .avi file that played in Media Player. That > file did not play in stock E-Prime, however, but once I reconfigured DVD > Ripper to output MPEG-1 all was well. (I also set File Split Mode to > Infinite just to avoid splitting files.) Note that by default DVD Ripper > outputs .avi at 720x480 resolution, or .mpg at 352x240 resolution, so > you might want to fiddle with that further. (It costs US$40 (cheap!) to > register DVD Ripper, and I do not know how the paid version differs from > the free one, but if you find the program useful then please do the > right thing and pay for it.) > > Now as it turns out, when I installed AoA DVD Ripper it also installed > an Xvid codec, so then the .avi file played in E-Prime as well. But the > .mpg file continued to play in E-Prime even after I uninstalled the Xvid > codec, so I feel safer sticking with .mpg (MPEG-1). > > For the record, if we did want to fiddle with codecs for E-Prime, in > addition to letting AoA DVD Ripper install Xvid, PST recommends the > ffdshow (http://www.free-codecs.com/download/ffdshow.htm ) and SUPER > (http://www.erightsoft.com/SUPER.html ) codec libraries (see > http://support.pstnet.com/forum/Topic635-12-1.aspx and > http://www.pstnet.com/forum/Topic2986-5-1.aspx ). > > Finally, as mentioned earlier in this thread, for more extensive video > editing VirtualDub (http://www.virtualdub.org ) might come into play. > This outputs only in .avi format, so would require installing codecs for > E-Prime, or using A0A DVD Ripper or HandBrake to transcode the output > files as needed for use in E-Prime. > > I still have no idea what system to use in case we ever want to generate > video for E-Prime from scratch, but I guess we will cross that bridge > when we come to it. > > -- David McFarlane, Professional Faultfinder > > > At 7/11/2011 04:19 PM Monday, David McFarlane wrote: >> Telephoning and Googling around trying to answer my own question #1... >> >> First general-purpose answer I got was Windows Movie Maker, which >> already comes with recent versions of MS Windows. Have any of you >> found success with that? >> >> A more serious source recommends Final Cut Pro (or perhaps the less >> expensive Final Cut Express). Anyone have any experience with that? It >> will render in a host of codecs, so it should do a good job of >> rendering clips for E-Prime. But it is a Mac-only product. >> >> So I looked for Windows alternatives to FCP, and came up with Adobe >> Premiere, or Sony Vegas. Can anybody tell me something about these >> products? >> >> Thanks again, >> -- David McFarlane, Professional Faultfinder >> >> >> At 7/11/2011 03:36 PM Monday, David McFarlane wrote: >>> Well fellow E-Prime mavens, now I could use your experience & advice. >>> I first checked in the New Features Guide, and did a cursory search >>> through the PST Knowledge Base, the PST Forum, and the E-Prime Google >>> Group, and did not find this addressed anywhere, so I hope I have >>> done my homework at least as well as I expect others to :). >>> >>> Two related questions: >>> >>> 1) Suppose we want to make some short clips from a larger, existing >>> movie file for use in E-Prime. What software would you recommend for >>> this? >>> >>> 2) Suppose we want to record our own movie clips from scratch for use >>> in E-Prime. What systems would you recommend for that? >>> >>> I might also reframe those questions as, "What did *you* use?" or, >>> "What worked for *you*?" >>> >>> Note that the KB and online discussions have addressed at length how >>> to get *existing* clips to work with E-Prime (installing codec >>> libraries, etc.). I instead want to avoid those problems by preparing >>> our clips in the first place in a way that plays well with E-Prime >>> "out-of-the-box". Any advice? >>> >>> Thanks, >>> -- David McFarlane, Professional Faultfinder > -- David Vinson, Ph.D. Senior Postdoctoral Researcher Cognitive, Perceptual and Brain Sciences Research Department University College London 26 Bedford Way, London WC1H 0AP Tel +44 (0)20 7679 5311 (UCL internal ext. 25311) -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From tobias.fw at gmail.com Thu Jul 14 10:36:34 2011 From: tobias.fw at gmail.com (Tobias) Date: Thu, 14 Jul 2011 03:36:34 -0700 Subject: debounce time Message-ID: Dear E-Prime community, I have just received a nice self-made buttonbox with three buttons that can be attached to a parallel port. THus I have very good timing of RTs for my experiments now :) However, there seems to be a problem with the bouncing of the keys. Single key presses cause several signals in a row. That is, if I have two consecutive slides with a duration of "-1", one key press is enough to terminate both slides. A collegue of mine said that in the experimental software 'Presentation', a debounce time can be specified so that such double responses are not possible. Is there any way of doing so in E-Prime? Best, Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From Michiel.Spape at nottingham.ac.uk Thu Jul 14 11:12:03 2011 From: Michiel.Spape at nottingham.ac.uk (Michiel Spape) Date: Thu, 14 Jul 2011 12:12:03 +0100 Subject: debounce time In-Reply-To: Message-ID: Hi, I think that rather depends on your button box, how it is connected, and so forth. That is, if it were connected as a keyboard, you could change settings (or at least, one used to be able) in the BIOS. It's basically the same if you press a spacebar long enough: you can see a short pause before it starts giving more and more spacebars (until the annoying "sticky keys" window pops up! Arg!). This is what you might call the "debounce" time. Anyway, one way would be to dump a little slide in between your two slides, which has as an allowable key the unpress (-) version of the same thing you have in the first slide. Thus, this slide would be terminated upon unpressing same key - which should do the trick unless your button box sends 1010101 instead of 111111 (i.e. no voltage change). Just a thought, but perhaps it helps. Best, Mich Michiel Spapé Research Fellow Perception & Action group University of Nottingham School of Psychology www.cognitology.eu -----Original Message----- From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of Tobias Sent: 14 July 2011 11:37 To: E-Prime Subject: debounce time Dear E-Prime community, I have just received a nice self-made buttonbox with three buttons that can be attached to a parallel port. THus I have very good timing of RTs for my experiments now :) However, there seems to be a problem with the bouncing of the keys. Single key presses cause several signals in a row. That is, if I have two consecutive slides with a duration of "-1", one key press is enough to terminate both slides. A collegue of mine said that in the experimental software 'Presentation', a debounce time can be specified so that such double responses are not possible. Is there any way of doing so in E-Prime? Best, Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From pfc.groot at gmail.com Thu Jul 14 11:54:36 2011 From: pfc.groot at gmail.com (Paul Groot) Date: Thu, 14 Jul 2011 13:54:36 +0200 Subject: debounce time In-Reply-To: Message-ID: Hi Tobias, You're right. Mechanical switches suffer from this debounce effect. Especially if the switch becomes older! In most cases this is not an issue if you are only interested in the response time of a single button press. When repeating presses are allowed, an 'ignore interval' of about 50 ms should be enough for even the worst switches. Things become more complicated when several buttons are allowed to be pressed. An electrical solution using a Schmitt trigger is preferred in that case (for example: http://www.labbookpages.co.uk/electronics/debounce.html) Unfortunately Eprime has no dead-time setting as Presentation does...;-(( best Paul 2011/7/14 Tobias : > Dear E-Prime community, > > I have just received a nice self-made buttonbox with three buttons > that can be attached to a parallel port. THus I have very good timing > of RTs for my experiments now :) > > However, there seems to be a problem with the bouncing of the keys. > Single key presses cause several signals in a row. That is, if I have > two consecutive slides with a duration of "-1", one key press is > enough to terminate both slides. > > A collegue of mine said that in the experimental software > 'Presentation', a debounce time can be specified so that such double > responses are not possible. > > Is there any way of doing so in E-Prime? > > Best, > Tobias > > -- > You received this message because you are subscribed to the Google Groups "E-Prime" group. > To post to this group, send email to e-prime at googlegroups.com. > To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. > For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. > > -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From tobias.fw at gmail.com Thu Jul 14 12:36:13 2011 From: tobias.fw at gmail.com (Tobias) Date: Thu, 14 Jul 2011 05:36:13 -0700 Subject: debounce time In-Reply-To: Message-ID: > > Unfortunately Eprime has no dead-time setting as Presentation does...;-(( That's too bad. Shouldn't be too much of a hazzle to implement that. Am I the only one here using parallel port buttons? :-p -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From tobias.fw at gmail.com Thu Jul 14 12:42:08 2011 From: tobias.fw at gmail.com (Tobias) Date: Thu, 14 Jul 2011 05:42:08 -0700 Subject: two screens, two refresh rates: timing? Message-ID: Hi, in our lab we have a brand new flat screen that can run at up to 120 Hz (I use it at 100 Hz right now). We also have an additional screen in the neighbor room to check if everything is alright with the stimuli presented, to see the feedback the subjects gets etc. Anyway, this second screen is not able to run at such high refresh rates. I have set the screens as "clone". I am wondering how E-Prime handles this concerning duration error, onset delay, screen sync etc. Any experience with that? Best, Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From Michiel.Spape at nottingham.ac.uk Thu Jul 14 13:36:36 2011 From: Michiel.Spape at nottingham.ac.uk (Michiel Spape) Date: Thu, 14 Jul 2011 14:36:36 +0100 Subject: two screens, two refresh rates: timing? In-Reply-To: <066d7fe6-488f-4997-9c4b-b72818fea7c0@q1g2000vbj.googlegroups.com> Message-ID: Hi, You're shooting topics around, aren't you :) Anyway, this is just to say: my experience is terrible, dreadful and horrible, when using screens in certain modes. Perhaps it is because we're using a switch, but essentially, I can do whatever I like, the screen in my lab won't do anything other than 60 Hz (on a CRT screen, mind you). A number of times, I got it to work better, but fidgeting with the small settings in the video driver menu is a nightmare. If you use E-Prime 2, you might be able to use multiple monitors in a more sane way, 'send this to display1, this to display2', and that ought to work. I imagine, however, that in my own situation (E-Prime 1), there is no such thing as 2 refresh rates; the primary system is the only thing that "exists", as far as E-Prime is concerned. Anyway, very few tips from my side, just a word of caution: whether your E-Prime will say refresh rate is brilliant or not, see it for your own eyes anyway. On a CRT screen in a dark room, using the corners of your eyes, you should be able to see the difference between 60 Hz and 100 Hz. Best, Mich Michiel Spapé Research Fellow Perception & Action group University of Nottingham School of Psychology www.cognitology.eu -----Original Message----- From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of Tobias Sent: 14 July 2011 13:42 To: E-Prime Subject: two screens, two refresh rates: timing? Hi, in our lab we have a brand new flat screen that can run at up to 120 Hz (I use it at 100 Hz right now). We also have an additional screen in the neighbor room to check if everything is alright with the stimuli presented, to see the feedback the subjects gets etc. Anyway, this second screen is not able to run at such high refresh rates. I have set the screens as "clone". I am wondering how E-Prime handles this concerning duration error, onset delay, screen sync etc. Any experience with that? Best, Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From pquain at une.edu.au Thu Jul 14 15:12:22 2011 From: pquain at une.edu.au (Peter Quain) Date: Fri, 15 Jul 2011 01:12:22 +1000 Subject: two screens, two refresh rates: timing? In-Reply-To: <066d7fe6-488f-4997-9c4b-b72818fea7c0@q1g2000vbj.googlegrou ps.com> Message-ID: can you get a signal on both monitors? I thought that in clone mode, the same video frames in the video memory are output to two displays, hence the resolutions and refresh rate must the same. Perhaps you can use two displays of different resolutions/refresh rates in "extended" desktop mode?? But this has nothing to do with e-prime, display constraints are determined by the graphics card / drivers, I think. Or have you got a special graphics card with driver settings for two seperately configured displays? I don't know how e-prime would respond to this? Otherwise, if you are in clone mode and getting a signal on both monitors than my guess is that the graphics drivers are throttling the refresh and resolution of both monitors to the lowest values across the monitors. Just my guess. .At 10:42 PM 14/07/2011, you wrote: >Hi, > >in our lab we have a brand new flat screen that can run at up to 120 >Hz (I use it at 100 Hz right now). We also have an additional screen >in the neighbor room to check if everything is alright with the >stimuli presented, to see the feedback the subjects gets etc. Anyway, >this second screen is not able to run at such high refresh rates. I >have set the screens as "clone". > >I am wondering how E-Prime handles this concerning duration error, >onset delay, screen sync etc. Any experience with that? > >Best, >Tobias > >-- >You received this message because you are subscribed to the Google >Groups "E-Prime" group. >To post to this group, send email to e-prime at googlegroups.com. >To unsubscribe from this group, send email to >e-prime+unsubscribe at googlegroups.com. >For more options, visit this group at >http://groups.google.com/group/e-prime?hl=en. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobias.fw at gmail.com Thu Jul 14 15:26:10 2011 From: tobias.fw at gmail.com (Tobias) Date: Thu, 14 Jul 2011 08:26:10 -0700 Subject: two screens, two refresh rates: timing? In-Reply-To: <09DAEA8BC192C94EB62C8E71FC35A5D92F8038728C@EXCHANGE3.ad.nottingham.ac.uk> Message-ID: I don't have a switch but a graphic card with two outputs. What I can do in my graphic card settings is to select the primary screen. And actually that seems to be the crucial part. The weaker screen (60 Hz, i.e. refresh circle of 16.6 ms) and the better screen (100 Hz, refresh circle of 10 ms) are NOT used as several devices in my E-Prime 2 settings. I presented two slides (black and white) with a to-be duration of 38 ms each. This should round up to 40 ms for the 100 Hz screen and is quite far from anything the 60 Hz screen can do (33.3 ms or 50 ms). If the faster screen is the primary one, I see artificial shapes or borders on the slower screen but presumably perfect black-white switches on the faster screen. If the slower screen is the primary one, it is exactly the other way round. More interestingly, I logged the duration errors and onset delays. Duration error was always 0 which seems to be due to the way E-Prime records the timing, see an earlier post my David. The onset delay, however, was -5 ms if the slower screen was the primary one. This somehow makes sense as two circles are 33.3 ms. As the screen was supposed to show the stimuli for 38 ms, it is an "delay" of -5 ms. If the faster screen was the primary one, the delay was always 2 ms which also makes sense, it just can't stop after 38 ms because a full refresh circle is 40 ms, i.e. 2 ms more. Alltogether, I assume that the refresh rate of the primary screen (as set in Windows) defines for how long a stimulus is actually presented. The secondary screen will show flickering if it's refresh rate does not fit the to-be duration of the stimulus. I hope this is helpful for others who use two screens. Best, Tobias P.S.: The 100 Hz flatscreen we use here is the Samsung Syncmaster 2233BW. On 14 Jul., 15:36, Michiel Spape wrote: > Hi, > You're shooting topics around, aren't you :) Anyway, this is just to say: my experience is terrible, dreadful and horrible, when using screens in certain modes. Perhaps it is because we're using a switch, but essentially, I can do whatever I like, the screen in my lab won't do anything other than 60 Hz (on a CRT screen, mind you). A number of times, I got it to work better, but fidgeting with the small settings in the video driver menu is a nightmare. If you use E-Prime 2, you might be able to use multiple monitors in a more sane way, 'send this to display1, this to display2', and that ought to work. I imagine, however, that in my own situation (E-Prime 1), there is no such thing as 2 refresh rates; the primary system is the only thing that "exists", as far as E-Prime is concerned. > Anyway, very few tips from my side, just a word of caution: whether your E-Prime will say refresh rate is brilliant or not, see it for your own eyes anyway. On a CRT screen in a dark room, using the corners of your eyes, you should be able to see the difference between 60 Hz and 100 Hz. > Best, > Mich > > Michiel Spapé > Research Fellow > Perception & Action group > University of Nottingham > School of Psychologywww.cognitology.eu > > -----Original Message----- > From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of Tobias > Sent: 14 July 2011 13:42 > To: E-Prime > Subject: two screens, two refresh rates: timing? > > Hi, > > in our lab we have a brand new flat screen that can run at up to 120 > Hz (I use it at 100 Hz right now). We also have an additional screen > in the neighbor room to check if everything is alright with the > stimuli presented, to see the feedback the subjects gets etc. Anyway, > this second screen is not able to run at such high refresh rates. I > have set the screens as "clone". > > I am wondering how E-Prime handles this concerning duration error, > onset delay, screen sync etc. Any experience with that? > > Best, > Tobias > > -- > You received this message because you are subscribed to the Google Groups "E-Prime" group. > To post to this group, send email to e-prime at googlegroups.com. > To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. > For more options, visit this group athttp://groups.google.com/group/e-prime?hl=en. > > This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it.   Please do not use, copy or disclose the information contained in this message or in any attachment.  Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. > > This message has been checked for viruses but the contents of an attachment > may still contain software viruses which could damage your computer system: > you are advised to perform your own checks. Email communications with the > University of Nottingham may be monitored as permitted by UK legislation. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From ahafri at gmail.com Thu Jul 14 15:59:56 2011 From: ahafri at gmail.com (Alon Hafri) Date: Thu, 14 Jul 2011 08:59:56 -0700 Subject: playing SoundIn audio within the same trial Message-ID: Hi all, I just experimented with using the SoundIn object for the first time yesterday in order to play a captured image description within the same trial. I want to note the difficulties I had, how I got it to work, and then some questions about how it could have been done easier, perhaps. My experiment is a production task, where viewers are eyetracked as they describe an image aloud, and their description is recorded via a SlideIn object. For demonstration purposes I give the option of playing back viewer eyegaze concurrently with the audio of their description within the same trial -- which is where I ran into difficulty! By examining the compiled script, I see that the SlideIn audio is stored in a SoundCaptureBuffer object, but this is not saved to a wav file until the end of the procedure, where it is automatically saved by a call to a "SaveToFile" method (e.g. Sound1SoundCaptureBuffer.SaveToFile). So ordinarily the recorded sound is not accessible until the end of trial, which is not what I want. I could not figure out a way to play the SoundCaptureBuffer itself (I tried a call to SoundOut1SoundCaptureBuffer.Play, but that method doesn't exist), so I got around this by calling the SaveToFile method early on in an InLine. I then used a later SoundOut object to play this newly created audio file. The SlideIn object had "@Auto" as the filename, which means it automatically created a unique wav file name to save to, and so I created an attribute "ProductionFilename", saved the SoundCaptureBuffer filename to this attribute, and then the SoundOut object called this attribute as its filename. The biggest difficulty I had was the automatic SaveToFile that occurred at the end of the procedure -- since the file had already been created with my earlier SaveToFile in the InLine, I got an error "Writing captured audio to file failed". I got around this by changing the SoundCaptureBuffer filename after calling SaveToFile, to "temp.wav". For some reason, even though it was overwriting the "temp.wav" file every trial, no error was produced, whereas before when it was trying to write over the newly created file (@Auto, e.g. "Trial1-SoundIn1-1.wav") it failed. So here's the setup I have now that works (simplified, with irrelevant objects removed): SoundIn1 object (duration = 0, stopafter = no, filename = @Auto) --> start capturing sound and immediately advance to test picture TestPicture image object (wait for Spacebar) --> picture to be described InLine: SoundIn1SoundCaptureBuffer.SaveToFile 'save sound file early c.SetAttrib "ProductionFilename", SoundIn1SoundCaptureBuffer.Filename 'set a ProductionFilename attribute so the later SoundOut object can play the saved sound file SoundIn1SoundCaptureBuffer.Filename = "temp.wav" 'for some reason this prevents an error... SoundOut1 object (duration = 0, stopafter = no, filename = [ProductionFilename]) --> plays the recorded sound file and immediately advances to the gaze replay TETGazeReplay (the eyegaze replay package call) --> replays the viewer eyegaze overtop the test picture (while the audio from the SoundOut object is still playing) ... end of procedure: there is an additional SoundIn1SoundCaptureBuffer.SaveToFile call that I imagine is not preventable (you can see it in the compiled Full script) My questions are: 1) Why when I change the sound capture filename to "temp.wav" is the script successful (even though the SaveToFile method is called at the end of the procedure again so is overwriting the temp.wav file), whereas without changing the filename, I get an error? 2) Was there an easier way to do this? 3) Is there documentation on the properties of the SoundIn object available in E-basic? I couldn't find any in the E-Basic help, so had to figure it out by looking at the compiled script. For example, it would be nice to know if there is a way to play the SoundCaptureBuffer before it is saved to file (I tried a SoundIn1SoundCaptureBuffer.Play method but it didn't work). 4) A separate and minor question, but can you specify the filename for the SoundOUT object at runtime (so I don't have to do it by way of an attribute)? I hope everything was clear in the above. Thanks in advance for your help! Alon -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Thu Jul 14 16:41:08 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Thu, 14 Jul 2011 12:41:08 -0400 Subject: playing SoundIn audio within the same trial In-Reply-To: Message-ID: Alon, Wow, thanks for posting this documentation -- I do not yet use SoundIn (although I have to write a lesson on it shortly!), but I might find this useful some time. As to your questions.. First, it seems to me that these belong to PST Web Support (http://support.pstnet.com/e%2Dprime/support/login.asp ), so I hope you post them there as well (and post back here with their response). Anyway, here is my take... >My questions are: >1) Why when I change the sound capture filename to "temp.wav" is the >script successful (even though the SaveToFile method is called at >the end of the procedure again so is overwriting the temp.wav file), >whereas without changing the filename, I get an error? I have no idea, I think we will have to leave this one to PST. >2) Was there an easier way to do this? Again, I have no experience yet with SoundIn. But I would guess that instead of using the @Auto automatic file naming you could generate file names yourself in your code and that might avoid the "write fail" problem. Since you already use inline code to handle playing the captured audio, generating your own file names should add no extra burden. Sometimes all that extra "automation" just gets in the way, I like to turn it all off and supply my own code. >3) Is there documentation on the properties of the SoundIn object >available in E-basic? I couldn't find any in the E-Basic help, Indeed, the E-Basic Help lacks a SoundIn topic, and topics for any new features of EP2. As far as I can tell, the EB Help in EP2 contains exactly the same content as for EP1. No telling when PST will supply us the missing documentation, but if you contact Web Support they will often supply documentation privately on a "need to know" basis. If you get that, then please make that documentation public here. Thanks. > so had to figure it out by looking at the compiled script. Indeed, that is how I have figured out a *lot* of how EP actually works, even with the EB Help on hand (and that learning process works a *lot* better with good-old EP1 than with EP2). And as I have said elsewhere, beware that the EB Help is incomplete, and in some cases misleading or just plain wrong, so you have to test everything out for yourself. >For example, it would be nice to know if there is a way to play the >SoundCaptureBuffer before it is saved to file I suspect there is no such method, and no plan to add one. Again, a question best handled by PST staff. >(I tried a SoundIn1SoundCaptureBuffer.Play method but it didn't work). Nice bit of hacking for you to try the method anyway, sometimes you do uncover undocumented features that way ;). >4) A separate and minor question, but can you specify the filename >for the SoundOUT object at runtime (so I don't have to do it by way >of an attribute)? SoundOut file names are actually handled by an associated SoundBuffer object, using the .Filename property and .Load method. See the SoundBuffer topic in the EB Help, and look at the code that E-Studio generates for any SoundOut object. Regards, -- David McFarlane, Professional Faultfinder -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From ahafri at gmail.com Thu Jul 14 18:44:59 2011 From: ahafri at gmail.com (Alon Hafri) Date: Thu, 14 Jul 2011 11:44:59 -0700 Subject: playing SoundIn audio within the same trial In-Reply-To: <4e1f1c2b.94592a0a.09a9.1bf4SMTPIN_ADDED@gmr-mx.google.com> Message-ID: Hi David, first of all thanks for your quick reply and insights! I will post this to PST support as well and see what they say. In the meantime, I messed with the experiment a bit more and I realized that the problem lies not with calling ".SaveToFile" twice in the same trial (once in my InLine, once unavoidably at the end of the procedure from automatic code inserted into the script by E-Prime). Instead it has something to do with my trying to save a file with the same name as the one I just PLAYED with the SoundOut object earlier in the trial. When I removed the SoundOut object so the captured sound file was no longer played, there were no errors (even when .SaveToFile was called twice, both times with the same filename). So maybe the played file is not closed completely, and so is not accessible to be written over by the .SaveToFile method and produces the "Writing captured audio to file failed" error. Maybe you have some ideas on how to make sure the file is closed completely after it is played? Also, let me clarify things in response to what you wrote: > >2) Was there an easier way to do this? > > Again, I have no experience yet with SoundIn.  But I would guess that > instead of using the @Auto automatic file naming you could generate > file names yourself in your code and that might avoid the "write > fail" problem.  Since you already use inline code to handle playing > the captured audio, generating your own file names should add no > extra burden.  Sometimes all that extra "automation" just gets in the > way, I like to turn it all off and supply my own code. > I didn't try using code to generate the name, but I did look at the code used to automatically generate the file, and it generated a string with the experiment name, subject #, session #, SoundIn object name, and finally a unique index number, and then set the SoundCaptureBuffer.Filename equal to the string, like this: strSoundIn1CaptureName = "" If c.AttribExists("Experiment") = True Then strSoundIn1CaptureName = strSoundIn1CaptureName & c.GetAttrib("Experiment") & "-" If c.AttribExists("Subject") = True Then strSoundIn1CaptureName = strSoundIn1CaptureName & c.GetAttrib("Subject") & "-" If c.AttribExists("Session") = True Then strSoundIn1CaptureName = strSoundIn1CaptureName & c.GetAttrib("Session") & "-" strSoundIn1CaptureName = strSoundIn1CaptureName & SoundIn1.Name & "-" strSoundIn1CaptureName = strSoundIn1CaptureName & CStr(SoundIn1SoundCaptureBuffer.GetNextCaptureIndex) & ".wav" SoundIn1SoundCaptureBuffer.Filename = strSoundIn1CaptureName So I could have done something similar in an InLine before the SoundIn object was executed. But as seen above, the captured filename is actually not the problem, but playing the file and then trying to save over that file is. Also, the .SaveToFile call at the end of the procedure is unavoidable as far as I can tell -- it is automatically generated by E-Prime whenever you have a SoundIn object in your experiment. > SoundOut file names are actually handled by an associated SoundBuffer > object, using the .Filename property and .Load method.  See the > SoundBuffer topic in the EB Help, and look at the code that E-Studio > generates for any SoundOut object. > Interesting -- I tried doing this through code to avoid having to use an Attribute for this purpose, but couldn't figure out how to actually modify and call methods of a SoundBuffer object without having a SoundOut object already exist. And when I tried modifying the filename in an InLine right before the SoundOut object was executed, it defaulted to the filename as set in the properties window of the object in the E-Studio user interface. Perhaps there is a way to do it without any SoundOut object, or alternatively a way to change the filename in an InLine so it remains changed throughout the trial? Thanks again, Alon -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Thu Jul 14 19:37:41 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Thu, 14 Jul 2011 15:37:41 -0400 Subject: debounce time In-Reply-To: Message-ID: Tobias, Hmm, "I have just received a nice self-made buttonbox..."?? If it is self-made then you could not receive it, because you already have it; if you just received it then it is not self-made. Perhaps you meant "custom-made". But I quibble... Like Paul Groot said, it is best to use hardware-debounced switches, and the circuitry for that is very straightforward, you can also find instructions in the classic text "The Art of Electronics" by Horowitz & Hill. Every lab should have someone who is familiar with that text. Nevertheless I rarely follow that advice myself because, even though the circuitry is trivial, it requires a power source, and that just makes things a tad too inconvenient for me (the parallel port does not include any power source). I like simmple passive circuitry whenever I can get away with it. And in almost every case the task itself presents sufficient delay between responses so that switch bouncing does not present a problem. But I gather you need this for something like a rapid tapping task, where switch bounces become a problem. For our tapping tasks we solve this by running a custom passive-switch box much like yours through an SRBox -- that way we get switches with good mechanical feel combined with the ease of use of the SRBox, and still have sub-millisecond resolution. But as a last resort I will do software debouncing. The cheapest way to do that is just to add a sufficient Sleep after a response, and trust both that no further responses come in during that Sleep and that the switch finishes bouncing during that Sleep. I would rather have something more secure. So here is an example of the sort of code I might use, using a ReadPort (you would have to modify this if you use an input mask, but you can handle that) (I did not test this, just constructed it from memory, so caveat user): Const PortAdd as Integer = &hABCD ' just an example, replace with real port address Const BitMask as Integer = &H01 Const DtDebounce as Long = 50 ' ms Dim tDebounce as Long tDebounce = Clock.Read + DtDebounce Do Until (Clock.Read >= tDebounce) If ((ReadPort(PortAdd) and BitMask) <> 0) Then _ tDebounce = Clock.Read + DtDebounce Loop The example supposes that we are only interested in bit 0 of the input, and that a bit value of 1 indicates button pressed, while a bit value of 0 indicates button released. The code simply considers bouncing to be over as soon as it finds that the button has been released for (in this example) 50 ms without interruption. More specifically, it starts by setting a goal of (in this example) 50 ms from now. It then monitors the input until it reaches the goal time. If it detects another button press during this time, then it resets the goal for (in this example) 50 ms more from the current time, and continues. As a result, the program runs this loop as long as the button is pressed, and does not move on until 50 ms after the button has been fully released and all bouncing is done. This code could go either right before you want to get a response, or right after you have gotten your response. Pretty cool if Presentation has a "dead-time" setting, maybe yet another reason to consider it as an alternative to E-Prime. -- David McFarlane, Professional Faultfinder At 7/14/2011 07:54 AM Thursday, Paul Groot wrote: >Hi Tobias, > >You're right. Mechanical switches suffer from this debounce effect. >Especially if the switch becomes older! In most cases this is not an >issue if you are only interested in the response time of a single >button press. When repeating presses are allowed, an 'ignore interval' >of about 50 ms should be enough for even the worst switches. Things >become more complicated when several buttons are allowed to be >pressed. An electrical solution using a Schmitt trigger is preferred >in that case (for example: >http://www.labbookpages.co.uk/electronics/debounce.html) > >Unfortunately Eprime has no dead-time setting as Presentation does...;-(( > >best >Paul > >2011/7/14 Tobias : > > Dear E-Prime community, > > > > I have just received a nice self-made buttonbox with three buttons > > that can be attached to a parallel port. THus I have very good timing > > of RTs for my experiments now :) > > > > However, there seems to be a problem with the bouncing of the keys. > > Single key presses cause several signals in a row. That is, if I have > > two consecutive slides with a duration of "-1", one key press is > > enough to terminate both slides. > > > > A collegue of mine said that in the experimental software > > 'Presentation', a debounce time can be specified so that such double > > responses are not possible. > > > > Is there any way of doing so in E-Prime? > > > > Best, > > Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From markbfm at gmail.com Sat Jul 16 02:18:39 2011 From: markbfm at gmail.com (Mark A) Date: Fri, 15 Jul 2011 19:18:39 -0700 Subject: How to avoid presenting targets consecutively Message-ID: Dear E-Prime group, I am fairly new to E-Prime, but thus far have found online discussions within the group, as well as PST instructions and examples that have allowed me to program everything required, with one exception. The experimental task is simple: A participant listens to a series of words and presses a button whenever a particular word is heard (i.e., the target word, "apple" in the example below). The target word is presented 4 times. My problem is this: I wish to present a series of stimuli (.wav files) randomly, with the restriction that I do not want "Target" files to be presented consecutively. Rather, I want them to be separated by at least one distractor (or non-target). To illustrate, this is an excerpt from one of my lists: Weight Nested Procedure   Sound Talker Target SoundDur 1 MAppleTrial m1apple.wav m1 yes 422 1 MAppleTrial f4apple.wav f4 yes 546 1 MAppleTrial m1apple.wav m1 yes 422 1 MAppleTrial f4apple.wav f4 yes 546 1 MAppleTrial m2bear.wav m2 no 332 1 MAppleTrial f3bin.wav    f3 no 375 1 MAppleTrial m3cat.wav         m3 no 383 1 MAppleTrial f2chalk.wav f2 no 586 ..... and so forth (there are 4 targets and 23 distractors). Currently, I have the list set to "Random", however, this does not guarantee that the Target files (top 4 rows) will not occur consecutively. I think that the solution will involve a conditional statement (perhaps using In line) comparing whether the previous file presented was a target, but I am unsure how to implement this. An additional consideration is what to do if there are only 2 cycles left, and the two files left are both target files. If this is very hard to avoid, I am willing to live with this, as it is unlikely to occur very often. Any tips or links to helpful discussions on similar topics will be very much appreciated. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From david.averill.nicholson at gmail.com Mon Jul 18 15:50:06 2011 From: david.averill.nicholson at gmail.com (David Nicholson) Date: Mon, 18 Jul 2011 08:50:06 -0700 Subject: Multiple choice quiz graying out incorrect answers until correct chosen Message-ID: Hello, I'm creating an experiment where the participant first chooses a difficulty level and is directed to one of three tests. I already have this part created and working correctly. It is not the most nicely structured program as the best way I found to accomplish this is to use unreferenced e-objects, but it works. That is not my current problem or what I am focusing on at the moment. But I'm open to suggestions if a better method is known. What i'm currently trying to do is create a slide with a question and four multiple choice answers. The subject will choose an answer until the correct answer is chosen. I will be using a ranking system of points to score them. (4pts for first try, 3 for second, etc.) I will also require a certain percentage correct or it will kick them out and have to restart, or just jump back to the start. What I cannot figure out is how to keep the same question and answers displayed and gray out the incorrect answer(s). Then move forward to the next question when the correct answer is picked. I've been thinking of a few ideas but I am still unsure what the best way to structure and write this. Thanks in advance for all your help! David Nicholson -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From ucfmicah at gmail.com Thu Jul 21 14:45:28 2011 From: ucfmicah at gmail.com (Micah) Date: Thu, 21 Jul 2011 07:45:28 -0700 Subject: Tips needed for tweaking the standard likert scale script Message-ID: Hallo, I've got an fMRI paradigm that is almost finished. I've embedded a customized version of the likert script, and could use a little help with a simple tweak. I'm a moderately skilled e-basic coder, so if you can suggest a general strategy, I can probably implement it. As it is coded now, the likert scale waits for a response before closing. The actual slideobject it draws to has 0 duration, and as far as I can tell, the script simply stops the the slide once a response is given. I'd like to ensure that there is a time limit for the response, so that the total possible time to respond is 6 seconds. I.e. if a participant answers in 2 seconds, there would be 4 seconds of fixation following the answer, before moving on. I much appreciate any tips you can lend. Here is the inline that controls the Likert scale: 'Declare a variable for accessing each SlideText object and changing properties. Dim theSlideText As SlideText Dim strName As String Dim nLastResponseCount As Integer nLastResponseCount = 0 Dim nNextMoveTime As Long Dim strLastResponse As String Dim boolMove As Boolean boolMove = False Dim theKeyboardResponseData As KeyboardResponseData Do While Stimulus.InputMasks.IsPending() 'Was there a response? If Stimulus.InputMasks.Responses.Count > nLastResponseCount Then nLastResponseCount = nLastResponseCount +1 Set theKeyboardResponseData = CKeyboardResponseData(Stimulus.InputMasks.Responses(nLastResponseCount)) If theKeyboardResponseData.RESP = "2" Then 'Subject has already selected the highest rating. If intCurrent < 7 Then 'Increment the current selection. intPrevious = intCurrent intCurrent = intCurrent + 1 'Change border color of previously selected box back to white, change border 'color of currently selected box to red. strName = "Text" & intPrevious Set theSlideText = CSlideText(Stimulus.States.Item("Default").Objects(strName)) theSlideText.BorderColor = CColor("white") strName = "Text" & intCurrent Set theSlideText = CSlideText(Stimulus.States.Item("Default").Objects(strName)) theSlideText.BorderColor = CColor("red") boolMove = False ' nNextMoveTime = Clock.Read + 500 strLastResponse = "2" End If ElseIf theKeyboardResponseData.RESP = "1" Then 'Subject has already selected the lowest rating. If intCurrent > 1 Then 'Decrement the current selection. intPrevious = intCurrent intCurrent = intCurrent - 1 'Change border color of previously selected box back to white, change border 'color of currently selected box to red. strName = "Text" & intPrevious Set theSlideText = CSlideText(Stimulus.States.Item("Default").Objects(strName)) theSlideText.BorderColor = CColor("white") strName = "Text" & intCurrent Set theSlideText = CSlideText(Stimulus.States.Item("Default").Objects(strName)) theSlideText.BorderColor = CColor("red") boolMove = False nNextMoveTime = Clock.Read + 500 strLastResponse = "1" End If ElseIf theKeyboardResponseData.RESP = "{-2}" Or theKeyboardResponseData.RESP = "{-1}" Then If Mid(theKeyboardResponseData.RESP, 3, 1) = strLastResponse Then boolMove = False End If End If ElseIf boolMove = True And (Clock.Read > nNextMoveTime) Then If strLastResponse = "2" Then 'Subject has already selected the highest rating. If intCurrent < 7 Then 'Increment the current selection. intPrevious = intCurrent intCurrent = intCurrent + 1 'Change border color of previously selected box back to white, change border 'color of currently selected box to red. strName = "Text" & intPrevious Set theSlideText = CSlideText(Stimulus.States.Item("Default").Objects(strName)) theSlideText.BorderColor = CColor("white") strName = "Text" & intCurrent Set theSlideText = CSlideText(Stimulus.States.Item("Default").Objects(strName)) theSlideText.BorderColor = CColor("red") End If Else 'Subject has already selected the lowest rating. If intCurrent > 1 Then 'Decrement the current selection. intPrevious = intCurrent intCurrent = intCurrent - 1 'Change border color of previously selected box back to white, change border 'color of currently selected box to red. strName = "Text" & intPrevious Set theSlideText = CSlideText(Stimulus.States.Item("Default").Objects(strName)) theSlideText.BorderColor = CColor("white") strName = "Text" & intCurrent Set theSlideText = CSlideText(Stimulus.States.Item("Default").Objects(strName)) theSlideText.BorderColor = CColor("red") End If End If nNextMoveTime = Clock.Read + 500 End If Stimulus.Draw Loop 'Change the BackColor property of the selected box to red to show the subject 'that the response has been collected. strName = "Text" & intCurrent Set theSlideText = CSlideText(Stimulus.States.Item("Default").Objects(strName)) theSlideText.BackColor = CColor("red") 'Redraw the Slide to show changes. Stimulus.Draw 'Log rating in the data file under the attribute "Rating" c.SetAttrib "Rating", intCurrent Sleep 1000 'Return box to default appearance. theSlideText.BackColor = CColor("green") theSlideText.BorderColor = CColor("white") strName = "Text4" Set theSlideText = CSlideText(Stimulus.States.Item("Default").Objects(strName)) theSlideText.BorderColor = CColor("red") Stimulus.Draw Set theSlideText = Nothing -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Thu Jul 21 15:59:45 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Thu, 21 Jul 2011 11:59:45 -0400 Subject: Tips needed for tweaking the standard likert scale script In-Reply-To: Message-ID: Stock reminder: 1) I do not work for PST. 2) PST's trained staff takes any and all questions at http://support.pstnet.com/e%2Dprime/support/login.asp , and they strive to respond to all requests in 24-48 hours -- this is pretty much their substitute for proper documentation, so make full use of it. 3) If you do get an answer from PST Web Support, please extend the courtesy of posting their reply back here for the sake of others. That said, here is my take... Try replacing Do While Stimulus.InputMasks.IsPending() ... with something like Const StimulusDur as Long = 6000 Dim StimulusTargetOffsetTime as Long StimulusTargetOffsetTime = Clock.Read + StimulusDur Do While (Stimulus.InputMasks.IsPending() and _ (Clock.Read < StimulusTargetOffsetTime) ) ... Alternatively, if you prefer to set stimulus duration in its Property Pages instead of with an InLine constant, then set both Duration and PreRelease to 6000 (in this case), and E-Prime will automatically compute the TargetOffsetTime for you, so the code simplifies to something like Do While (Stimulus.InputMasks.IsPending() and _ (Clock.Read < Stimulus.TargetOffsetTime) ) ... Of course, you will find confusion either way. For the first way, any time you want to change stimulus duration you will have to remember to dive into the code. For the second way, you can change stimulus Duration in the normal way, but then you have to remember to always change PreRelease to the same thing (or, be daring and set PreRelease to some one enormous value, but not so large that TargetOnsetTime + Duration - PreRelease ever becomes negative!). -- David McFarlane, Professional Faultfinder ... six of one and half dozen of the other, you pays your money and takes your choice. >I've got an fMRI paradigm that is almost finished. I've embedded a >customized version of the likert script, and could use a little help >with a simple tweak. I'm a moderately skilled e-basic coder, so if you >can suggest a general strategy, I can probably implement it. As it is >coded now, the likert scale waits for a response before closing. The >actual slideobject it draws to has 0 duration, and as far as I can >tell, the script simply stops the the slide once a response is given. >I'd like to ensure that there is a time limit for the response, so >that the total possible time to respond is 6 seconds. I.e. if a >participant answers in 2 seconds, there would be 4 seconds of fixation >following the answer, before moving on. I much appreciate any tips you >can lend. > >Here is the inline that controls the Likert scale: > >'Declare a variable for accessing each SlideText object and changing >properties. >Dim theSlideText As SlideText > >Dim strName As String >Dim nLastResponseCount As Integer >nLastResponseCount = 0 > >Dim nNextMoveTime As Long > >Dim strLastResponse As String > >Dim boolMove As Boolean >boolMove = False > >Dim theKeyboardResponseData As KeyboardResponseData > > >Do While Stimulus.InputMasks.IsPending() > > 'Was there a response? > If Stimulus.InputMasks.Responses.Count > nLastResponseCount Then > > nLastResponseCount = nLastResponseCount +1 > > Set theKeyboardResponseData = >CKeyboardResponseData(Stimulus.InputMasks.Responses(nLastResponseCount)) > > If theKeyboardResponseData.RESP = "2" Then > > 'Subject has already selected the highest rating. > If intCurrent < 7 Then > > 'Increment the current selection. > intPrevious = intCurrent > intCurrent = intCurrent + 1 > > 'Change border color of previously > selected box back to white, >change border > 'color of currently selected box to red. > strName = "Text" & intPrevious > Set theSlideText = >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > theSlideText.BorderColor = CColor("white") > > strName = "Text" & intCurrent > Set theSlideText = >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > theSlideText.BorderColor = CColor("red") > > boolMove = False > > ' nNextMoveTime = Clock.Read + 500 > strLastResponse = "2" > > End If > > ElseIf theKeyboardResponseData.RESP = "1" Then > > 'Subject has already selected the lowest rating. > If intCurrent > 1 Then > > 'Decrement the current selection. > intPrevious = intCurrent > intCurrent = intCurrent - 1 > > 'Change border color of previously > selected box back to white, >change border > 'color of currently selected box to red. > strName = "Text" & intPrevious > Set theSlideText = >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > theSlideText.BorderColor = CColor("white") > > strName = "Text" & intCurrent > Set theSlideText = >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > theSlideText.BorderColor = CColor("red") > > boolMove = False > > nNextMoveTime = Clock.Read + 500 > strLastResponse = "1" > > End If > > ElseIf theKeyboardResponseData.RESP = "{-2}" Or >theKeyboardResponseData.RESP = "{-1}" Then > > If Mid(theKeyboardResponseData.RESP, 3, 1) > = strLastResponse Then > > boolMove = False > > End If > > End If > > ElseIf boolMove = True And (Clock.Read > nNextMoveTime) Then > > If strLastResponse = "2" Then > > 'Subject has already selected the highest rating. > If intCurrent < 7 Then > > 'Increment the current selection. > intPrevious = intCurrent > intCurrent = intCurrent + 1 > > 'Change border color of previously > selected box back to white, >change border > 'color of currently selected box to red. > strName = "Text" & intPrevious > Set theSlideText = >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > theSlideText.BorderColor = CColor("white") > > strName = "Text" & intCurrent > Set theSlideText = >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > theSlideText.BorderColor = CColor("red") > > End If > > Else > > 'Subject has already selected the lowest rating. > If intCurrent > 1 Then > > 'Decrement the current selection. > intPrevious = intCurrent > intCurrent = intCurrent - 1 > > 'Change border color of previously > selected box back to white, >change border > 'color of currently selected box to red. > strName = "Text" & intPrevious > Set theSlideText = >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > theSlideText.BorderColor = CColor("white") > > strName = "Text" & intCurrent > Set theSlideText = >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > theSlideText.BorderColor = CColor("red") > > End If > > End If > > nNextMoveTime = Clock.Read + 500 > > End If > > Stimulus.Draw > >Loop > >'Change the BackColor property of the selected box to red to show the >subject >'that the response has been collected. >strName = "Text" & intCurrent >Set theSlideText = >CSlideText(Stimulus.States.Item("Default").Objects(strName)) >theSlideText.BackColor = CColor("red") > >'Redraw the Slide to show changes. >Stimulus.Draw > >'Log rating in the data file under the attribute "Rating" >c.SetAttrib "Rating", intCurrent > >Sleep 1000 > >'Return box to default appearance. >theSlideText.BackColor = CColor("green") >theSlideText.BorderColor = CColor("white") > >strName = "Text4" >Set theSlideText = >CSlideText(Stimulus.States.Item("Default").Objects(strName)) >theSlideText.BorderColor = CColor("red") > >Stimulus.Draw > >Set theSlideText = Nothing -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From ucfmicah at gmail.com Thu Jul 21 16:42:29 2011 From: ucfmicah at gmail.com (Micah) Date: Thu, 21 Jul 2011 09:42:29 -0700 Subject: Tips needed for tweaking the standard likert scale script In-Reply-To: <4e284cf8.8c7a2a0a.2b8f.3813SMTPIN_ADDED@gmr-mx.google.com> Message-ID: Thank you Todd! That's an excellent solution. I knew I'd need to somehow do a clock read and feed that into the loop, but I wasn't able to quite get there. Not to tax you, but there are two unresolved issues with this solution- 1. The scale now records wherever the 'slider' is when the time limit ends. I think it's probably much safer to record these as no response, and I'm not sure how to manipulate the loop do so. I need to make some kind of check, so that if it times out, it sets the value to NaN/etc. 2. The scale still ends immediately if a response is made. I've worked out a way to stop that- by adding: dim responsetime as integer ....... (the loop) ...bottom of the inline: responsetime=Stimulus.RT Sleep 6000-response time However, I don't think that is compatible with your solution. BW, Micah On Jul 21, 5:59 pm, David McFarlane wrote: > Stock reminder:  1) I do not work for PST.  2) PST's trained staff > takes any and all questions athttp://support.pstnet.com/e%2Dprime/support/login.asp, and they > strive to respond to all requests in 24-48 hours -- this is pretty > much their substitute for proper documentation, so make full use of > it.  3) If you do get an answer from PST Web Support, please extend > the courtesy of posting their reply back here for the sake of others. > > That said, here is my take... > > Try replacing > > Do While Stimulus.InputMasks.IsPending() >     ... > > with something like > > Const  StimulusDur as Long = 6000 > Dim  StimulusTargetOffsetTime as Long > StimulusTargetOffsetTime = Clock.Read + StimulusDur > Do While (Stimulus.InputMasks.IsPending() and _ >      (Clock.Read < StimulusTargetOffsetTime) ) >      ... > > Alternatively, if you prefer to set stimulus duration in its Property > Pages instead of with an InLine constant, then set both Duration and > PreRelease to 6000 (in this case), and E-Prime will automatically > compute the TargetOffsetTime for you, so the code simplifies to something like > > Do While (Stimulus.InputMasks.IsPending() and _ >      (Clock.Read < Stimulus.TargetOffsetTime) ) >      ... > > Of course, you will find confusion either way.  For the first way, > any time you want to change stimulus duration you will have to > remember to dive into the code.  For the second way, you can change > stimulus Duration in the normal way, but then you have to remember to > always change PreRelease to the same thing (or, be daring and set > PreRelease to some one enormous value, but not so large that > TargetOnsetTime + Duration - PreRelease ever becomes negative!). > > -- David McFarlane, Professional Faultfinder > ... six of one and half dozen of the other, you pays your money and > takes your choice. > > > > > > > > >I've got an fMRI paradigm that is almost finished. I've embedded a > >customized version of the likert script, and could use a little help > >with a simple tweak. I'm a moderately skilled e-basic coder, so if you > >can suggest a general strategy, I can probably implement it. As it is > >coded now, the likert scale waits for a response before closing. The > >actual slideobject it draws to has 0 duration, and as far as I can > >tell, the script simply stops the the slide once a response is given. > >I'd like to ensure that there is a time limit for the response, so > >that the total possible time to respond is 6 seconds. I.e.  if a > >participant answers in 2 seconds, there would be 4 seconds of fixation > >following the answer, before moving on. I much appreciate any tips you > >can lend. > > >Here is the inline that controls the Likert scale: > > >'Declare a variable for accessing each SlideText object and changing > >properties. > >Dim theSlideText As SlideText > > >Dim strName As String > >Dim nLastResponseCount As Integer > >nLastResponseCount = 0 > > >Dim nNextMoveTime As Long > > >Dim strLastResponse As String > > >Dim boolMove As Boolean > >boolMove = False > > >Dim theKeyboardResponseData As KeyboardResponseData > > >Do While Stimulus.InputMasks.IsPending() > > >         'Was there a response? > >         If Stimulus.InputMasks.Responses.Count > nLastResponseCount Then > > >                 nLastResponseCount = nLastResponseCount +1 > > >                 Set theKeyboardResponseData = > >CKeyboardResponseData(Stimulus.InputMasks.Responses(nLastResponseCount)) > > >                 If theKeyboardResponseData.RESP = "2" Then > > >                         'Subject has already selected the highest rating. > >                         If intCurrent < 7 Then > > >                                 'Increment the current selection. > >                                 intPrevious = intCurrent > >                                 intCurrent = intCurrent + 1 > > >                                 'Change border color of previously > > selected box back to white, > >change border > >                                 'color of currently selected box to red. > >                                 strName = "Text" & intPrevious > >                                 Set theSlideText = > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > >                                 theSlideText.BorderColor = CColor("white") > > >                                 strName = "Text" & intCurrent > >                                 Set theSlideText = > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > >                                 theSlideText.BorderColor = CColor("red") > > >                                 boolMove = False > > >                         '       nNextMoveTime = Clock.Read + 500 > >                                 strLastResponse = "2" > > >                         End If > > >                 ElseIf theKeyboardResponseData.RESP = "1" Then > > >                         'Subject has already selected the lowest rating. > >                         If intCurrent > 1 Then > > >                                 'Decrement the current selection. > >                                 intPrevious = intCurrent > >                                 intCurrent = intCurrent - 1 > > >                                 'Change border color of previously > > selected box back to white, > >change border > >                                 'color of currently selected box to red. > >                                 strName = "Text" & intPrevious > >                                 Set theSlideText = > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > >                                 theSlideText.BorderColor = CColor("white") > > >                                 strName = "Text" & intCurrent > >                                 Set theSlideText = > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > >                                 theSlideText.BorderColor = CColor("red") > > >                                 boolMove = False > > >                                 nNextMoveTime = Clock.Read + 500 > >                                 strLastResponse = "1" > > >                         End If > > >                 ElseIf theKeyboardResponseData.RESP = "{-2}" Or > >theKeyboardResponseData.RESP = "{-1}" Then > > >                         If Mid(theKeyboardResponseData.RESP, 3, 1) > > = strLastResponse Then > > >                                 boolMove = False > > >                         End If > > >                 End If > > >         ElseIf boolMove = True And (Clock.Read > nNextMoveTime) Then > > >                 If strLastResponse = "2" Then > > >                         'Subject has already selected the highest rating. > >                         If intCurrent < 7 Then > > >                                 'Increment the current selection. > >                                 intPrevious = intCurrent > >                                 intCurrent = intCurrent + 1 > > >                                 'Change border color of previously > > selected box back to white, > >change border > >                                 'color of currently selected box to red. > >                                 strName = "Text" & intPrevious > >                                 Set theSlideText = > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > >                                 theSlideText.BorderColor = CColor("white") > > >                                 strName = "Text" & intCurrent > >                                 Set theSlideText = > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > >                                 theSlideText.BorderColor = CColor("red") > > >                         End If > > >                 Else > > >                         'Subject has already selected the lowest rating. > >                         If intCurrent > 1 Then > > >                                 'Decrement the current selection. > >                                 intPrevious = intCurrent > >                                 intCurrent = intCurrent - 1 > > >                                 'Change border color of previously > > selected box back to white, > >change border > >                                 'color of currently selected box to red. > >                                 strName = "Text" & intPrevious > >                                 Set theSlideText = > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > >                                 theSlideText.BorderColor = CColor("white") > > >                                 strName = "Text" & intCurrent > >                                 Set theSlideText = > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > >                                 theSlideText.BorderColor = CColor("red") > > >                         End If > > >                 End If > > >                 nNextMoveTime = Clock.Read + 500 > > >         End If > > >         Stimulus.Draw > > >Loop > > >'Change the BackColor property of the selected box to red to show the > >subject > >'that the response has been collected. > >strName = "Text" & intCurrent > >Set theSlideText = > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > >theSlideText.BackColor = CColor("red") > > >'Redraw the Slide to show changes. > >Stimulus.Draw > > >'Log rating in the data file under the attribute "Rating" > >c.SetAttrib "Rating", intCurrent > > >Sleep 1000 > > >'Return box to default appearance. > >theSlideText.BackColor = CColor("green") > >theSlideText.BorderColor = CColor("white") > > >strName = "Text4" > >Set theSlideText = > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > >theSlideText.BorderColor = CColor("red") > > >Stimulus.Draw > > >Set theSlideText = Nothing -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From ucfmicah at gmail.com Thu Jul 21 17:17:23 2011 From: ucfmicah at gmail.com (Micah) Date: Thu, 21 Jul 2011 10:17:23 -0700 Subject: Tips needed for tweaking the standard likert scale script In-Reply-To: <5653cd77-f486-4292-a873-b1107c86e07a@l18g2000yql.googlegroups.com> Message-ID: Actually, I may have a solution to 1: add a check at the end of the inline; if RT=0, then set no-response =1, else =0 kind of thing. that way I can easily determine in my logs which trials are no response, and either exclude them or not. I am still not sure how to fix problem 2 however. On Jul 21, 6:42 pm, Micah wrote: > Thank you Todd! That's an excellent solution. I knew I'd need to > somehow do a clock read and feed that into the loop, but I wasn't able > to quite get there. Not to tax you, but there are two unresolved > issues with this solution- > > 1. The scale now records wherever the 'slider' is when the time limit > ends. I think it's probably much safer to record these as no response, > and I'm not sure how to manipulate the loop do so. I need to make some > kind of check, so that if it times out, it sets the value to NaN/etc. > > 2. The scale still ends immediately if a response is made. I've worked > out a way to stop that- by adding: > > dim responsetime as integer > > ....... (the loop) > > ...bottom of the inline: > > responsetime=Stimulus.RT > > Sleep 6000-response time > > However, I don't think that is compatible with your solution. > > BW, > Micah > > On Jul 21, 5:59 pm, David McFarlane wrote: > > > > > > > > > Stock reminder:  1) I do not work for PST.  2) PST's trained staff > > takes any and all questions athttp://support.pstnet.com/e%2Dprime/support/login.asp, and they > > strive to respond to all requests in 24-48 hours -- this is pretty > > much their substitute for proper documentation, so make full use of > > it.  3) If you do get an answer from PST Web Support, please extend > > the courtesy of posting their reply back here for the sake of others. > > > That said, here is my take... > > > Try replacing > > > Do While Stimulus.InputMasks.IsPending() > >     ... > > > with something like > > > Const  StimulusDur as Long = 6000 > > Dim  StimulusTargetOffsetTime as Long > > StimulusTargetOffsetTime = Clock.Read + StimulusDur > > Do While (Stimulus.InputMasks.IsPending() and _ > >      (Clock.Read < StimulusTargetOffsetTime) ) > >      ... > > > Alternatively, if you prefer to set stimulus duration in its Property > > Pages instead of with an InLine constant, then set both Duration and > > PreRelease to 6000 (in this case), and E-Prime will automatically > > compute the TargetOffsetTime for you, so the code simplifies to something like > > > Do While (Stimulus.InputMasks.IsPending() and _ > >      (Clock.Read < Stimulus.TargetOffsetTime) ) > >      ... > > > Of course, you will find confusion either way.  For the first way, > > any time you want to change stimulus duration you will have to > > remember to dive into the code.  For the second way, you can change > > stimulus Duration in the normal way, but then you have to remember to > > always change PreRelease to the same thing (or, be daring and set > > PreRelease to some one enormous value, but not so large that > > TargetOnsetTime + Duration - PreRelease ever becomes negative!). > > > -- David McFarlane, Professional Faultfinder > > ... six of one and half dozen of the other, you pays your money and > > takes your choice. > > > >I've got an fMRI paradigm that is almost finished. I've embedded a > > >customized version of the likert script, and could use a little help > > >with a simple tweak. I'm a moderately skilled e-basic coder, so if you > > >can suggest a general strategy, I can probably implement it. As it is > > >coded now, the likert scale waits for a response before closing. The > > >actual slideobject it draws to has 0 duration, and as far as I can > > >tell, the script simply stops the the slide once a response is given. > > >I'd like to ensure that there is a time limit for the response, so > > >that the total possible time to respond is 6 seconds. I.e.  if a > > >participant answers in 2 seconds, there would be 4 seconds of fixation > > >following the answer, before moving on. I much appreciate any tips you > > >can lend. > > > >Here is the inline that controls the Likert scale: > > > >'Declare a variable for accessing each SlideText object and changing > > >properties. > > >Dim theSlideText As SlideText > > > >Dim strName As String > > >Dim nLastResponseCount As Integer > > >nLastResponseCount = 0 > > > >Dim nNextMoveTime As Long > > > >Dim strLastResponse As String > > > >Dim boolMove As Boolean > > >boolMove = False > > > >Dim theKeyboardResponseData As KeyboardResponseData > > > >Do While Stimulus.InputMasks.IsPending() > > > >         'Was there a response? > > >         If Stimulus.InputMasks.Responses.Count > nLastResponseCount Then > > > >                 nLastResponseCount = nLastResponseCount +1 > > > >                 Set theKeyboardResponseData = > > >CKeyboardResponseData(Stimulus.InputMasks.Responses(nLastResponseCount)) > > > >                 If theKeyboardResponseData.RESP = "2" Then > > > >                         'Subject has already selected the highest rating. > > >                         If intCurrent < 7 Then > > > >                                 'Increment the current selection. > > >                                 intPrevious = intCurrent > > >                                 intCurrent = intCurrent + 1 > > > >                                 'Change border color of previously > > > selected box back to white, > > >change border > > >                                 'color of currently selected box to red. > > >                                 strName = "Text" & intPrevious > > >                                 Set theSlideText = > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > >                                 theSlideText.BorderColor = CColor("white") > > > >                                 strName = "Text" & intCurrent > > >                                 Set theSlideText = > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > >                                 theSlideText.BorderColor = CColor("red") > > > >                                 boolMove = False > > > >                         '       nNextMoveTime = Clock.Read + 500 > > >                                 strLastResponse = "2" > > > >                         End If > > > >                 ElseIf theKeyboardResponseData.RESP = "1" Then > > > >                         'Subject has already selected the lowest rating. > > >                         If intCurrent > 1 Then > > > >                                 'Decrement the current selection. > > >                                 intPrevious = intCurrent > > >                                 intCurrent = intCurrent - 1 > > > >                                 'Change border color of previously > > > selected box back to white, > > >change border > > >                                 'color of currently selected box to red. > > >                                 strName = "Text" & intPrevious > > >                                 Set theSlideText = > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > >                                 theSlideText.BorderColor = CColor("white") > > > >                                 strName = "Text" & intCurrent > > >                                 Set theSlideText = > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > >                                 theSlideText.BorderColor = CColor("red") > > > >                                 boolMove = False > > > >                                 nNextMoveTime = Clock.Read + 500 > > >                                 strLastResponse = "1" > > > >                         End If > > > >                 ElseIf theKeyboardResponseData.RESP = "{-2}" Or > > >theKeyboardResponseData.RESP = "{-1}" Then > > > >                         If Mid(theKeyboardResponseData.RESP, 3, 1) > > > = strLastResponse Then > > > >                                 boolMove = False > > > >                         End If > > > >                 End If > > > >         ElseIf boolMove = True And (Clock.Read > nNextMoveTime) Then > > > >                 If strLastResponse = "2" Then > > > >                         'Subject has already selected the highest rating. > > >                         If intCurrent < 7 Then > > > >                                 'Increment the current selection. > > >                                 intPrevious = intCurrent > > >                                 intCurrent = intCurrent + 1 > > > >                                 'Change border color of previously > > > selected box back to white, > > >change border > > >                                 'color of currently selected box to red. > > >                                 strName = "Text" & intPrevious > > >                                 Set theSlideText = > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > >                                 theSlideText.BorderColor = CColor("white") > > > >                                 strName = "Text" & intCurrent > > >                                 Set theSlideText = > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > >                                 theSlideText.BorderColor = CColor("red") > > > >                         End If > > > >                 Else > > > >                         'Subject has already selected the lowest rating. > > >                         If intCurrent > 1 Then > > > >                                 'Decrement the current selection. > > >                                 > > ... > > read more » -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From ucfmicah at gmail.com Thu Jul 21 17:19:02 2011 From: ucfmicah at gmail.com (Micah) Date: Thu, 21 Jul 2011 10:19:02 -0700 Subject: Tips needed for tweaking the standard likert scale script In-Reply-To: <3ff69606-0efc-4bd6-aba4-cf897a54c4d2@ft10g2000vbb.googlegroups.com> Message-ID: Darn, wish I could edit that post. That will actually only work if the participant presses nothing, not if they never confirm the response (which is controlled by a termination key (3) in the advanced properties page). Not sure how to check if that button is pressed. On Jul 21, 7:17 pm, Micah wrote: > Actually, I may have a solution to 1: add a check at the end of the > inline; if RT=0, then set no-response =1, else =0 kind of thing. that > way I can easily determine in my logs which trials are no response, > and either exclude them or not. I am still not sure how to fix problem > 2 however. > > On Jul 21, 6:42 pm, Micah wrote: > > > > > > > > > Thank you Todd! That's an excellent solution. I knew I'd need to > > somehow do a clock read and feed that into the loop, but I wasn't able > > to quite get there. Not to tax you, but there are two unresolved > > issues with this solution- > > > 1. The scale now records wherever the 'slider' is when the time limit > > ends. I think it's probably much safer to record these as no response, > > and I'm not sure how to manipulate the loop do so. I need to make some > > kind of check, so that if it times out, it sets the value to NaN/etc. > > > 2. The scale still ends immediately if a response is made. I've worked > > out a way to stop that- by adding: > > > dim responsetime as integer > > > ....... (the loop) > > > ...bottom of the inline: > > > responsetime=Stimulus.RT > > > Sleep 6000-response time > > > However, I don't think that is compatible with your solution. > > > BW, > > Micah > > > On Jul 21, 5:59 pm, David McFarlane wrote: > > > > Stock reminder:  1) I do not work for PST.  2) PST's trained staff > > > takes any and all questions athttp://support.pstnet.com/e%2Dprime/support/login.asp, and they > > > strive to respond to all requests in 24-48 hours -- this is pretty > > > much their substitute for proper documentation, so make full use of > > > it.  3) If you do get an answer from PST Web Support, please extend > > > the courtesy of posting their reply back here for the sake of others. > > > > That said, here is my take... > > > > Try replacing > > > > Do While Stimulus.InputMasks.IsPending() > > >     ... > > > > with something like > > > > Const  StimulusDur as Long = 6000 > > > Dim  StimulusTargetOffsetTime as Long > > > StimulusTargetOffsetTime = Clock.Read + StimulusDur > > > Do While (Stimulus.InputMasks.IsPending() and _ > > >      (Clock.Read < StimulusTargetOffsetTime) ) > > >      ... > > > > Alternatively, if you prefer to set stimulus duration in its Property > > > Pages instead of with an InLine constant, then set both Duration and > > > PreRelease to 6000 (in this case), and E-Prime will automatically > > > compute the TargetOffsetTime for you, so the code simplifies to something like > > > > Do While (Stimulus.InputMasks.IsPending() and _ > > >      (Clock.Read < Stimulus.TargetOffsetTime) ) > > >      ... > > > > Of course, you will find confusion either way.  For the first way, > > > any time you want to change stimulus duration you will have to > > > remember to dive into the code.  For the second way, you can change > > > stimulus Duration in the normal way, but then you have to remember to > > > always change PreRelease to the same thing (or, be daring and set > > > PreRelease to some one enormous value, but not so large that > > > TargetOnsetTime + Duration - PreRelease ever becomes negative!). > > > > -- David McFarlane, Professional Faultfinder > > > ... six of one and half dozen of the other, you pays your money and > > > takes your choice. > > > > >I've got an fMRI paradigm that is almost finished. I've embedded a > > > >customized version of the likert script, and could use a little help > > > >with a simple tweak. I'm a moderately skilled e-basic coder, so if you > > > >can suggest a general strategy, I can probably implement it. As it is > > > >coded now, the likert scale waits for a response before closing. The > > > >actual slideobject it draws to has 0 duration, and as far as I can > > > >tell, the script simply stops the the slide once a response is given. > > > >I'd like to ensure that there is a time limit for the response, so > > > >that the total possible time to respond is 6 seconds. I.e.  if a > > > >participant answers in 2 seconds, there would be 4 seconds of fixation > > > >following the answer, before moving on. I much appreciate any tips you > > > >can lend. > > > > >Here is the inline that controls the Likert scale: > > > > >'Declare a variable for accessing each SlideText object and changing > > > >properties. > > > >Dim theSlideText As SlideText > > > > >Dim strName As String > > > >Dim nLastResponseCount As Integer > > > >nLastResponseCount = 0 > > > > >Dim nNextMoveTime As Long > > > > >Dim strLastResponse As String > > > > >Dim boolMove As Boolean > > > >boolMove = False > > > > >Dim theKeyboardResponseData As KeyboardResponseData > > > > >Do While Stimulus.InputMasks.IsPending() > > > > >         'Was there a response? > > > >         If Stimulus.InputMasks.Responses.Count > nLastResponseCount Then > > > > >                 nLastResponseCount = nLastResponseCount +1 > > > > >                 Set theKeyboardResponseData = > > > >CKeyboardResponseData(Stimulus.InputMasks.Responses(nLastResponseCount)) > > > > >                 If theKeyboardResponseData.RESP = "2" Then > > > > >                         'Subject has already selected the highest rating. > > > >                         If intCurrent < 7 Then > > > > >                                 'Increment the current selection. > > > >                                 intPrevious = intCurrent > > > >                                 intCurrent = intCurrent + 1 > > > > >                                 'Change border color of previously > > > > selected box back to white, > > > >change border > > > >                                 'color of currently selected box to red. > > > >                                 strName = "Text" & intPrevious > > > >                                 Set theSlideText = > > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > > >                                 theSlideText.BorderColor = CColor("white") > > > > >                                 strName = "Text" & intCurrent > > > >                                 Set theSlideText = > > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > > >                                 theSlideText.BorderColor = CColor("red") > > > > >                                 boolMove = False > > > > >                         '       nNextMoveTime = Clock.Read + 500 > > > >                                 strLastResponse = "2" > > > > >                         End If > > > > >                 ElseIf theKeyboardResponseData.RESP = "1" Then > > > > >                         'Subject has already selected the lowest rating. > > > >                         If intCurrent > 1 Then > > > > >                                 'Decrement the current selection. > > > >                                 intPrevious = intCurrent > > > >                                 intCurrent = intCurrent - 1 > > > > >                                 'Change border color of previously > > > > selected box back to white, > > > >change border > > > >                                 'color of currently selected box to red. > > > >                                 strName = "Text" & intPrevious > > > >                                 Set theSlideText = > > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > > >                                 theSlideText.BorderColor = CColor("white") > > > > >                                 strName = "Text" & intCurrent > > > >                                 Set theSlideText = > > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > > >                                 theSlideText.BorderColor = CColor("red") > > > > >                                 boolMove = False > > > > >                                 nNextMoveTime = Clock.Read + 500 > > > >                                 strLastResponse = "1" > > > > >                         End If > > > > >                 ElseIf theKeyboardResponseData.RESP = "{-2}" Or > > > >theKeyboardResponseData.RESP = "{-1}" Then > > > > >                         If Mid(theKeyboardResponseData.RESP, 3, 1) > > > > = strLastResponse Then > > > > >                                 boolMove = False > > > > >                         End If > > > > >                 End If > > > > >         ElseIf boolMove = True And (Clock.Read > nNextMoveTime) Then > > > > >                 If strLastResponse = "2" Then > > > > >                         'Subject has already selected the highest rating. > > > >                         If intCurrent < 7 Then > > > > >                                 'Increment the current selection. > > > >                                 intPrevious = intCurrent > > > >                                 intCurrent = intCurrent + 1 > > > > >                                 'Change border color of previously > > > > selected box back to white, > > > >change border > > > >                                 'color of currently selected box to red. > > > >                                 strName = "Text" & intPrevious > > > >                                 Set theSlideText = > > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > > >                                 theSlideText.BorderColor = CColor("white") > > > > >                           > > ... > > read more » -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Thu Jul 21 17:37:04 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Thu, 21 Jul 2011 13:37:04 -0400 Subject: Tips needed for tweaking the standard likert scale script In-Reply-To: <5653cd77-f486-4292-a873-b1107c86e07a@l18g2000yql.googlegro ups.com> Message-ID: Micah, 1. Indeed, you do need to "make some kind of check, so that if it times out, it sets the value to NaN/etc." I think you can manage that without me. 2. Oops. First, I have to correct something I implied about my second solution (PreRelease >= Duration), namely, the second solution should already solve what you want to do here. The second solution would have been a problem if you *did* want a response to move on to the next stimulus. Even after the offset of a stimulus, the next stimulus will not run until it reaches the NextTargetOnsetTime (see the GetNextTargetOnsetTime and SetNextTargetOnsetTime topics in the E-Basic Help facility). (This, BTW, is how PreRelease works.) Because the second solution automatically sets NextTargetOnsetTime to, say, 6000 ms from the OnsetTime (or TargetOnsetTime, depending on Timing mode) of the scale, even after the scale code loop ends the next stimulus will not run until it reaches that NextTargetOnsetTime. Savvy? Better yet, try this and see if I know what I am talking about :). But back to the first solution. Your modification is what almost anyone would come up with and in many cases is Good Enough, although you may get some slop of a ms or so every once in a while. If you still want something a little tidier, and absolutely precise, then instead of a Sleep, I would simply do one of the following (depending on desired Timing mode) at *any* time either before or after the loop: SetNextTargetOnsetTime Stimulus.OnsetTime + Stimulus.Duration ' use this for Event timing mode - or - SetNextTargetOnsetTime Stimulus.TargetOnsetTime + Stimulus.Duration ' use this for Cumulativetiming mode If you followed the earlier discussion, you will see that this just expictly does in code what E-Prime would have done for you automatically using the second solution. As a result, I much prefer following the second approach myself, leveraging the features built into E-Prime, but that does require deeper understanding of the architecture of E-Prime. Mere mortals must stick with the first approach and write more code. -- David McFarlane, Professional Faultfinder >Thank you Todd [sic -- should be David]! That's an excellent >solution. I knew I'd need to >somehow do a clock read and feed that into the loop, but I wasn't able >to quite get there. Not to tax you, but there are two unresolved >issues with this solution- > >1. The scale now records wherever the 'slider' is when the time limit >ends. I think it's probably much safer to record these as no response, >and I'm not sure how to manipulate the loop do so. I need to make some >kind of check, so that if it times out, it sets the value to NaN/etc. > >2. The scale still ends immediately if a response is made. I've worked >out a way to stop that- by adding: > >dim responsetime as integer > >....... (the loop) > >...bottom of the inline: > >responsetime=Stimulus.RT > >Sleep 6000-response time > >However, I don't think that is compatible with your solution. > >BW, >Micah > >On Jul 21, 5:59 pm, David McFarlane wrote: > > Stock reminder: 1) I do not work for PST. 2) PST's trained staff > > takes any and all questions > athttp://support.pstnet.com/e%2Dprime/support/login.asp, and they > > strive to respond to all requests in 24-48 hours -- this is pretty > > much their substitute for proper documentation, so make full use of > > it. 3) If you do get an answer from PST Web Support, please extend > > the courtesy of posting their reply back here for the sake of others. > > > > That said, here is my take... > > > > Try replacing > > > > Do While Stimulus.InputMasks.IsPending() > > ... > > > > with something like > > > > Const StimulusDur as Long = 6000 > > Dim StimulusTargetOffsetTime as Long > > StimulusTargetOffsetTime = Clock.Read + StimulusDur > > Do While (Stimulus.InputMasks.IsPending() and _ > > (Clock.Read < StimulusTargetOffsetTime) ) > > ... > > > > Alternatively, if you prefer to set stimulus duration in its Property > > Pages instead of with an InLine constant, then set both Duration and > > PreRelease to 6000 (in this case), and E-Prime will automatically > > compute the TargetOffsetTime for you, so the code simplifies to > something like > > > > Do While (Stimulus.InputMasks.IsPending() and _ > > (Clock.Read < Stimulus.TargetOffsetTime) ) > > ... > > > > Of course, you will find confusion either way. For the first way, > > any time you want to change stimulus duration you will have to > > remember to dive into the code. For the second way, you can change > > stimulus Duration in the normal way, but then you have to remember to > > always change PreRelease to the same thing (or, be daring and set > > PreRelease to some one enormous value, but not so large that > > TargetOnsetTime + Duration - PreRelease ever becomes negative!). > > > > -- David McFarlane, Professional Faultfinder > > ... six of one and half dozen of the other, you pays your money and > > takes your choice. > > > > > > > > > > > > > > > > >I've got an fMRI paradigm that is almost finished. I've embedded a > > >customized version of the likert script, and could use a little help > > >with a simple tweak. I'm a moderately skilled e-basic coder, so if you > > >can suggest a general strategy, I can probably implement it. As it is > > >coded now, the likert scale waits for a response before closing. The > > >actual slideobject it draws to has 0 duration, and as far as I can > > >tell, the script simply stops the the slide once a response is given. > > >I'd like to ensure that there is a time limit for the response, so > > >that the total possible time to respond is 6 seconds. I.e. if a > > >participant answers in 2 seconds, there would be 4 seconds of fixation > > >following the answer, before moving on. I much appreciate any tips you > > >can lend. > > > > >Here is the inline that controls the Likert scale: > > > > >'Declare a variable for accessing each SlideText object and changing > > >properties. > > >Dim theSlideText As SlideText > > > > >Dim strName As String > > >Dim nLastResponseCount As Integer > > >nLastResponseCount = 0 > > > > >Dim nNextMoveTime As Long > > > > >Dim strLastResponse As String > > > > >Dim boolMove As Boolean > > >boolMove = False > > > > >Dim theKeyboardResponseData As KeyboardResponseData > > > > >Do While Stimulus.InputMasks.IsPending() > > > > > 'Was there a response? > > > If Stimulus.InputMasks.Responses.Count > nLastResponseCount Then > > > > > nLastResponseCount = nLastResponseCount +1 > > > > > Set theKeyboardResponseData = > > >CKeyboardResponseData(Stimulus.InputMasks.Responses(nLastResponseCount)) > > > > > If theKeyboardResponseData.RESP = "2" Then > > > > > 'Subject has already selected the highest rating. > > > If intCurrent < 7 Then > > > > > 'Increment the current selection. > > > intPrevious = intCurrent > > > intCurrent = intCurrent + 1 > > > > > 'Change border color of previously > > > selected box back to white, > > >change border > > > 'color of currently selected box to red. > > > strName = "Text" & intPrevious > > > Set theSlideText = > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > > theSlideText.BorderColor = > CColor("white") > > > > > strName = "Text" & intCurrent > > > Set theSlideText = > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > > theSlideText.BorderColor = CColor("red") > > > > > boolMove = False > > > > > ' nNextMoveTime = Clock.Read + 500 > > > strLastResponse = "2" > > > > > End If > > > > > ElseIf theKeyboardResponseData.RESP = "1" Then > > > > > 'Subject has already selected the lowest rating. > > > If intCurrent > 1 Then > > > > > 'Decrement the current selection. > > > intPrevious = intCurrent > > > intCurrent = intCurrent - 1 > > > > > 'Change border color of previously > > > selected box back to white, > > >change border > > > 'color of currently selected box to red. > > > strName = "Text" & intPrevious > > > Set theSlideText = > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > > theSlideText.BorderColor = > CColor("white") > > > > > strName = "Text" & intCurrent > > > Set theSlideText = > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > > theSlideText.BorderColor = CColor("red") > > > > > boolMove = False > > > > > nNextMoveTime = Clock.Read + 500 > > > strLastResponse = "1" > > > > > End If > > > > > ElseIf theKeyboardResponseData.RESP = "{-2}" Or > > >theKeyboardResponseData.RESP = "{-1}" Then > > > > > If Mid(theKeyboardResponseData.RESP, 3, 1) > > > = strLastResponse Then > > > > > boolMove = False > > > > > End If > > > > > End If > > > > > ElseIf boolMove = True And (Clock.Read > nNextMoveTime) Then > > > > > If strLastResponse = "2" Then > > > > > 'Subject has already selected the highest rating. > > > If intCurrent < 7 Then > > > > > 'Increment the current selection. > > > intPrevious = intCurrent > > > intCurrent = intCurrent + 1 > > > > > 'Change border color of previously > > > selected box back to white, > > >change border > > > 'color of currently selected box to red. > > > strName = "Text" & intPrevious > > > Set theSlideText = > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > > theSlideText.BorderColor = > CColor("white") > > > > > strName = "Text" & intCurrent > > > Set theSlideText = > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > > theSlideText.BorderColor = CColor("red") > > > > > End If > > > > > Else > > > > > 'Subject has already selected the lowest rating. > > > If intCurrent > 1 Then > > > > > 'Decrement the current selection. > > > intPrevious = intCurrent > > > intCurrent = intCurrent - 1 > > > > > 'Change border color of previously > > > selected box back to white, > > >change border > > > 'color of currently selected box to red. > > > strName = "Text" & intPrevious > > > Set theSlideText = > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > > theSlideText.BorderColor = > CColor("white") > > > > > strName = "Text" & intCurrent > > > Set theSlideText = > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > > theSlideText.BorderColor = CColor("red") > > > > > End If > > > > > End If > > > > > nNextMoveTime = Clock.Read + 500 > > > > > End If > > > > > Stimulus.Draw > > > > >Loop > > > > >'Change the BackColor property of the selected box to red to show the > > >subject > > >'that the response has been collected. > > >strName = "Text" & intCurrent > > >Set theSlideText = > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > >theSlideText.BackColor = CColor("red") > > > > >'Redraw the Slide to show changes. > > >Stimulus.Draw > > > > >'Log rating in the data file under the attribute "Rating" > > >c.SetAttrib "Rating", intCurrent > > > > >Sleep 1000 > > > > >'Return box to default appearance. > > >theSlideText.BackColor = CColor("green") > > >theSlideText.BorderColor = CColor("white") > > > > >strName = "Text4" > > >Set theSlideText = > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > >theSlideText.BorderColor = CColor("red") > > > > >Stimulus.Draw > > > > >Set theSlideText = Nothing -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From ucfmicah at gmail.com Thu Jul 21 18:07:30 2011 From: ucfmicah at gmail.com (Micah) Date: Thu, 21 Jul 2011 11:07:30 -0700 Subject: Tips needed for tweaking the standard likert scale script In-Reply-To: <4e2863c1.83842b0a.4f0a.4e69SMTPIN_ADDED@gmr-mx.google.com> Message-ID: Great advice- there are a few problems however; 1. The second solution actually breaks the slider. It appears if you set the duration in the properties page, this prevents the loop from "animating" the slider properly. It just stays stuck at the default position and then selects that as the rating when the duration runs out. I can't figure this one out, so on to solution 1 2. Inserting that line of code does not seem to do anything. To make sure, I set the duration variable to 10000, and it was terminating instantly after making a selection. I'm thinking that the best option might be to put a textobject immediately after the slideobject (i.e. "Stimulus") that presents the scale, where the duration is set to 6000-stimulus.duration. I'll see if I can do that now. P.S. I can easily log non-responses, but it's trickier to log responses where they move the slider but never confirm. The .resp show sup as (for example) =11223, or =11113 for confirmed responses, but =1112 etc for non-confirmed. Is there a function to search a stored variable for a specific number? I tried setting the "allowed" in the advanced collection options to [allowed], where allowed is a list variable with 3 in each row. This would have been perfect, as if it only logs "3"s then I have my solution. Seems weird they give us this option if it doesn't work (it didn't seem to change the logs at all). BW, Micah On Jul 21, 7:37 pm, David McFarlane wrote: > Micah, > > 1. Indeed, you do need to "make some kind of check, so that if it > times out, it sets the value to NaN/etc."  I think you can manage > that without me. > > 2. Oops.  First, I have to correct something I implied about my > second solution (PreRelease >= Duration), namely, the second solution > should already solve what you want to do here.  The second solution > would have been a problem if you *did* want a response to move on to > the next stimulus.  Even after the offset of a stimulus, the next > stimulus will not run until it reaches the NextTargetOnsetTime (see > the GetNextTargetOnsetTime and SetNextTargetOnsetTime topics in the > E-Basic Help facility).  (This, BTW, is how PreRelease > works.)  Because the second solution automatically sets > NextTargetOnsetTime to, say, 6000 ms from the OnsetTime (or > TargetOnsetTime, depending on Timing mode) of the scale, even after > the scale code loop ends the next stimulus will not run until it > reaches that NextTargetOnsetTime.  Savvy?  Better yet, try this and > see if I know what I am talking about :). > > But back to the first solution.  Your modification is what almost > anyone would come up with and in many cases is Good Enough, although > you may get some slop of a ms or so every once in a while.  If you > still want something a little tidier, and absolutely precise, then > instead of a Sleep, I would simply do one of the following (depending > on desired Timing mode) at *any* time either before or after the loop: > > SetNextTargetOnsetTime Stimulus.OnsetTime + Stimulus.Duration  ' use > this for Event timing mode > > - or - > > SetNextTargetOnsetTime Stimulus.TargetOnsetTime + > Stimulus.Duration  ' use this for Cumulativetiming mode > > If you followed the earlier discussion, you will see that this just > expictly does in code what E-Prime would have done for you > automatically using the second solution.  As a result, I much prefer > following the second approach myself, leveraging the features built > into E-Prime, but that does require deeper understanding of the > architecture of E-Prime.  Mere mortals must stick with the first > approach and write more code. > > -- David McFarlane, Professional Faultfinder > > > > > > > > >Thank you Todd [sic -- should be David]! That's an excellent > >solution. I knew I'd need to > >somehow do a clock read and feed that into the loop, but I wasn't able > >to quite get there. Not to tax you, but there are two unresolved > >issues with this solution- > > >1. The scale now records wherever the 'slider' is when the time limit > >ends. I think it's probably much safer to record these as no response, > >and I'm not sure how to manipulate the loop do so. I need to make some > >kind of check, so that if it times out, it sets the value to NaN/etc. > > >2. The scale still ends immediately if a response is made. I've worked > >out a way to stop that- by adding: > > >dim responsetime as integer > > >....... (the loop) > > >...bottom of the inline: > > >responsetime=Stimulus.RT > > >Sleep 6000-response time > > >However, I don't think that is compatible with your solution. > > >BW, > >Micah > > >On Jul 21, 5:59 pm, David McFarlane wrote: > > > Stock reminder:  1) I do not work for PST.  2) PST's trained staff > > > takes any and all questions > > athttp://support.pstnet.com/e%2Dprime/support/login.asp, and they > > > strive to respond to all requests in 24-48 hours -- this is pretty > > > much their substitute for proper documentation, so make full use of > > > it.  3) If you do get an answer from PST Web Support, please extend > > > the courtesy of posting their reply back here for the sake of others. > > > > That said, here is my take... > > > > Try replacing > > > > Do While Stimulus.InputMasks.IsPending() > > >     ... > > > > with something like > > > > Const  StimulusDur as Long = 6000 > > > Dim  StimulusTargetOffsetTime as Long > > > StimulusTargetOffsetTime = Clock.Read + StimulusDur > > > Do While (Stimulus.InputMasks.IsPending() and _ > > >      (Clock.Read < StimulusTargetOffsetTime) ) > > >      ... > > > > Alternatively, if you prefer to set stimulus duration in its Property > > > Pages instead of with an InLine constant, then set both Duration and > > > PreRelease to 6000 (in this case), and E-Prime will automatically > > > compute the TargetOffsetTime for you, so the code simplifies to > > something like > > > > Do While (Stimulus.InputMasks.IsPending() and _ > > >      (Clock.Read < Stimulus.TargetOffsetTime) ) > > >      ... > > > > Of course, you will find confusion either way.  For the first way, > > > any time you want to change stimulus duration you will have to > > > remember to dive into the code.  For the second way, you can change > > > stimulus Duration in the normal way, but then you have to remember to > > > always change PreRelease to the same thing (or, be daring and set > > > PreRelease to some one enormous value, but not so large that > > > TargetOnsetTime + Duration - PreRelease ever becomes negative!). > > > > -- David McFarlane, Professional Faultfinder > > > ... six of one and half dozen of the other, you pays your money and > > > takes your choice. > > > > >I've got an fMRI paradigm that is almost finished. I've embedded a > > > >customized version of the likert script, and could use a little help > > > >with a simple tweak. I'm a moderately skilled e-basic coder, so if you > > > >can suggest a general strategy, I can probably implement it. As it is > > > >coded now, the likert scale waits for a response before closing. The > > > >actual slideobject it draws to has 0 duration, and as far as I can > > > >tell, the script simply stops the the slide once a response is given. > > > >I'd like to ensure that there is a time limit for the response, so > > > >that the total possible time to respond is 6 seconds. I.e.  if a > > > >participant answers in 2 seconds, there would be 4 seconds of fixation > > > >following the answer, before moving on. I much appreciate any tips you > > > >can lend. > > > > >Here is the inline that controls the Likert scale: > > > > >'Declare a variable for accessing each SlideText object and changing > > > >properties. > > > >Dim theSlideText As SlideText > > > > >Dim strName As String > > > >Dim nLastResponseCount As Integer > > > >nLastResponseCount = 0 > > > > >Dim nNextMoveTime As Long > > > > >Dim strLastResponse As String > > > > >Dim boolMove As Boolean > > > >boolMove = False > > > > >Dim theKeyboardResponseData As KeyboardResponseData > > > > >Do While Stimulus.InputMasks.IsPending() > > > > >         'Was there a response? > > > >         If Stimulus.InputMasks.Responses.Count > nLastResponseCount Then > > > > >                 nLastResponseCount = nLastResponseCount +1 > > > > >                 Set theKeyboardResponseData = > > > >CKeyboardResponseData(Stimulus.InputMasks.Responses(nLastResponseCount)) > > > > >                 If theKeyboardResponseData.RESP = "2" Then > > > > >                         'Subject has already selected the highest rating. > > > >                         If intCurrent < 7 Then > > > > >                                 'Increment the current selection. > > > >                                 intPrevious = intCurrent > > > >                                 intCurrent = intCurrent + 1 > > > > >                                 'Change border color of previously > > > > selected box back to white, > > > >change border > > > >                                 'color of currently selected box to red. > > > >                                 strName = "Text" & intPrevious > > > >                                 Set theSlideText = > > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > > >                                 theSlideText.BorderColor = > > CColor("white") > > > > >                                 strName = "Text" & intCurrent > > > >                                 Set theSlideText = > > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > > >                                 theSlideText.BorderColor = CColor("red") > > > > >                                 boolMove = False > > > > >                         '       nNextMoveTime = Clock.Read + 500 > > > >                                 strLastResponse = "2" > > > > >                         End If > > > > >                 ElseIf theKeyboardResponseData.RESP = "1" Then > > > > >                         'Subject has already selected the lowest rating. > > > >                         If intCurrent > 1 Then > > > > >                                 'Decrement the current selection. > > > >                                 intPrevious = intCurrent > > > >                                 intCurrent = intCurrent - 1 > > > > >                                 'Change border color of previously > > > > selected box back to white, > > > >change border > > > >                                 'color of currently selected box to red. > > > >                                 strName = "Text" & intPrevious > > > >                                 Set theSlideText = > > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > > >                                 theSlideText.BorderColor = > > CColor("white") > > > > >                                 strName = "Text" & intCurrent > > > >                                 Set theSlideText = > > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > > >                                 theSlideText.BorderColor = CColor("red") > > > > >                                 boolMove = False > > > > >                                 nNextMoveTime = Clock.Read + 500 > > > >                                 strLastResponse = "1" > > > > >                         End If > > > > >                 ElseIf theKeyboardResponseData.RESP = "{-2}" Or > > > >theKeyboardResponseData.RESP = "{-1}" Then > > > > >                         If Mid(theKeyboardResponseData.RESP, 3, 1) > > > > = strLastResponse Then > > > > >                                 boolMove = False > > > > >                         End If > > > > >                 End If > > > > >         ElseIf boolMove = True And (Clock.Read > nNextMoveTime) Then > > ... > > read more » -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From ucfmicah at gmail.com Thu Jul 21 18:25:30 2011 From: ucfmicah at gmail.com (Micah) Date: Thu, 21 Jul 2011 11:25:30 -0700 Subject: Tips needed for tweaking the standard likert scale script In-Reply-To: Message-ID: Woohoo! It actually works to add a textdisplay that inherits duration from the scale stimulus. So now it works perfectly; it times out after 6 seconds, which makes the "ISI" 0 duration, or it waits for 6- duration. So the scale can never take longer than 6 seconds, making a nice neat paradigm. I've also got it logging non-responses (in case the participant falls asleep) although have not yet come up with a solution for "confirmed" responses. Is there a wildcard variable in e- basic? If so I could do a check like, if stimulus.RESP = *3* then confirmed =1. Otherwise I may have to write a post-scan matlab script to search for any responses not containing "3", which is a blah solution. Tak, Micah On Jul 21, 8:07 pm, Micah wrote: > Great advice- there are a few problems however; > > 1. The second solution actually breaks the slider. It appears if you > set the duration in the properties page, this prevents the loop from > "animating" the slider properly. It just stays stuck at the default > position and then selects that as the rating when the duration runs > out. I can't figure this one out, so on to solution 1 > > 2. Inserting that line of code does not seem to do anything. To make > sure, I set the duration variable to 10000, and it was terminating > instantly after making a selection. > > I'm thinking that the best option might be to put a textobject > immediately after the slideobject (i.e. "Stimulus") that presents the > scale, where the duration is set to 6000-stimulus.duration. I'll see > if I can do that now. > > P.S. I can easily log non-responses, but it's trickier to log > responses where they move the slider but never confirm. The .resp show > sup as (for example) =11223, or =11113 for confirmed responses, but > =1112 etc for non-confirmed. Is there a function to search a stored > variable for a specific number? I tried setting the "allowed" in the > advanced collection options to [allowed], where allowed is a list > variable with 3 in each row. This would have been perfect, as if it > only logs "3"s then I have my solution. Seems weird they give us this > option if it doesn't work (it didn't seem to change the logs at all). > > BW, > Micah > > On Jul 21, 7:37 pm, David McFarlane wrote: > > > > > > > > > Micah, > > > 1. Indeed, you do need to "make some kind of check, so that if it > > times out, it sets the value to NaN/etc."  I think you can manage > > that without me. > > > 2. Oops.  First, I have to correct something I implied about my > > second solution (PreRelease >= Duration), namely, the second solution > > should already solve what you want to do here.  The second solution > > would have been a problem if you *did* want a response to move on to > > the next stimulus.  Even after the offset of a stimulus, the next > > stimulus will not run until it reaches the NextTargetOnsetTime (see > > the GetNextTargetOnsetTime and SetNextTargetOnsetTime topics in the > > E-Basic Help facility).  (This, BTW, is how PreRelease > > works.)  Because the second solution automatically sets > > NextTargetOnsetTime to, say, 6000 ms from the OnsetTime (or > > TargetOnsetTime, depending on Timing mode) of the scale, even after > > the scale code loop ends the next stimulus will not run until it > > reaches that NextTargetOnsetTime.  Savvy?  Better yet, try this and > > see if I know what I am talking about :). > > > But back to the first solution.  Your modification is what almost > > anyone would come up with and in many cases is Good Enough, although > > you may get some slop of a ms or so every once in a while.  If you > > still want something a little tidier, and absolutely precise, then > > instead of a Sleep, I would simply do one of the following (depending > > on desired Timing mode) at *any* time either before or after the loop: > > > SetNextTargetOnsetTime Stimulus.OnsetTime + Stimulus.Duration  ' use > > this for Event timing mode > > > - or - > > > SetNextTargetOnsetTime Stimulus.TargetOnsetTime + > > Stimulus.Duration  ' use this for Cumulativetiming mode > > > If you followed the earlier discussion, you will see that this just > > expictly does in code what E-Prime would have done for you > > automatically using the second solution.  As a result, I much prefer > > following the second approach myself, leveraging the features built > > into E-Prime, but that does require deeper understanding of the > > architecture of E-Prime.  Mere mortals must stick with the first > > approach and write more code. > > > -- David McFarlane, Professional Faultfinder > > > >Thank you Todd [sic -- should be David]! That's an excellent > > >solution. I knew I'd need to > > >somehow do a clock read and feed that into the loop, but I wasn't able > > >to quite get there. Not to tax you, but there are two unresolved > > >issues with this solution- > > > >1. The scale now records wherever the 'slider' is when the time limit > > >ends. I think it's probably much safer to record these as no response, > > >and I'm not sure how to manipulate the loop do so. I need to make some > > >kind of check, so that if it times out, it sets the value to NaN/etc. > > > >2. The scale still ends immediately if a response is made. I've worked > > >out a way to stop that- by adding: > > > >dim responsetime as integer > > > >....... (the loop) > > > >...bottom of the inline: > > > >responsetime=Stimulus.RT > > > >Sleep 6000-response time > > > >However, I don't think that is compatible with your solution. > > > >BW, > > >Micah > > > >On Jul 21, 5:59 pm, David McFarlane wrote: > > > > Stock reminder:  1) I do not work for PST.  2) PST's trained staff > > > > takes any and all questions > > > athttp://support.pstnet.com/e%2Dprime/support/login.asp, and they > > > > strive to respond to all requests in 24-48 hours -- this is pretty > > > > much their substitute for proper documentation, so make full use of > > > > it.  3) If you do get an answer from PST Web Support, please extend > > > > the courtesy of posting their reply back here for the sake of others. > > > > > That said, here is my take... > > > > > Try replacing > > > > > Do While Stimulus.InputMasks.IsPending() > > > >     ... > > > > > with something like > > > > > Const  StimulusDur as Long = 6000 > > > > Dim  StimulusTargetOffsetTime as Long > > > > StimulusTargetOffsetTime = Clock.Read + StimulusDur > > > > Do While (Stimulus.InputMasks.IsPending() and _ > > > >      (Clock.Read < StimulusTargetOffsetTime) ) > > > >      ... > > > > > Alternatively, if you prefer to set stimulus duration in its Property > > > > Pages instead of with an InLine constant, then set both Duration and > > > > PreRelease to 6000 (in this case), and E-Prime will automatically > > > > compute the TargetOffsetTime for you, so the code simplifies to > > > something like > > > > > Do While (Stimulus.InputMasks.IsPending() and _ > > > >      (Clock.Read < Stimulus.TargetOffsetTime) ) > > > >      ... > > > > > Of course, you will find confusion either way.  For the first way, > > > > any time you want to change stimulus duration you will have to > > > > remember to dive into the code.  For the second way, you can change > > > > stimulus Duration in the normal way, but then you have to remember to > > > > always change PreRelease to the same thing (or, be daring and set > > > > PreRelease to some one enormous value, but not so large that > > > > TargetOnsetTime + Duration - PreRelease ever becomes negative!). > > > > > -- David McFarlane, Professional Faultfinder > > > > ... six of one and half dozen of the other, you pays your money and > > > > takes your choice. > > > > > >I've got an fMRI paradigm that is almost finished. I've embedded a > > > > >customized version of the likert script, and could use a little help > > > > >with a simple tweak. I'm a moderately skilled e-basic coder, so if you > > > > >can suggest a general strategy, I can probably implement it. As it is > > > > >coded now, the likert scale waits for a response before closing. The > > > > >actual slideobject it draws to has 0 duration, and as far as I can > > > > >tell, the script simply stops the the slide once a response is given. > > > > >I'd like to ensure that there is a time limit for the response, so > > > > >that the total possible time to respond is 6 seconds. I.e.  if a > > > > >participant answers in 2 seconds, there would be 4 seconds of fixation > > > > >following the answer, before moving on. I much appreciate any tips you > > > > >can lend. > > > > > >Here is the inline that controls the Likert scale: > > > > > >'Declare a variable for accessing each SlideText object and changing > > > > >properties. > > > > >Dim theSlideText As SlideText > > > > > >Dim strName As String > > > > >Dim nLastResponseCount As Integer > > > > >nLastResponseCount = 0 > > > > > >Dim nNextMoveTime As Long > > > > > >Dim strLastResponse As String > > > > > >Dim boolMove As Boolean > > > > >boolMove = False > > > > > >Dim theKeyboardResponseData As KeyboardResponseData > > > > > >Do While Stimulus.InputMasks.IsPending() > > > > > >         'Was there a response? > > > > >         If Stimulus.InputMasks.Responses.Count > nLastResponseCount Then > > > > > >                 nLastResponseCount = nLastResponseCount +1 > > > > > >                 Set theKeyboardResponseData = > > > > >CKeyboardResponseData(Stimulus.InputMasks.Responses(nLastResponseCount)) > > > > > >                 If theKeyboardResponseData.RESP = "2" Then > > > > > >                         'Subject has already selected the highest rating. > > > > >                         If intCurrent < 7 Then > > > > > >                                 'Increment the current selection. > > > > >                                 intPrevious = intCurrent > > > > >                                 intCurrent = intCurrent + 1 > > > > > >                                 'Change border color of previously > > > > > selected box back to white, > > > > >change border > > > > >                                 'color of currently selected box to red. > > > > >                                 strName = "Text" & intPrevious > > > > >                                 Set theSlideText = > > > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > > > >                                 theSlideText.BorderColor = > > > CColor("white") > > > > > >                                 strName = "Text" & intCurrent > > > > >                                 Set theSlideText = > > > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > > > >                 > > ... > > read more » -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From ucfmicah at gmail.com Thu Jul 21 18:41:40 2011 From: ucfmicah at gmail.com (Micah) Date: Thu, 21 Jul 2011 11:41:40 -0700 Subject: How to avoid presenting targets consecutively In-Reply-To: <83a39d45-3cc3-4924-879b-9cfc4cd6b855@e35g2000yqc.googlegroups.com> Message-ID: Just as a general comment, and certainly not the best solution: I generally do my stimulus randomizations outside of e-prime. It's much easier to specific a pseudo-random or fully random sequence of stimuli outside of e-prime (in excel for example) and to then import it into one triallist that is sequentially sampled. This way you can randomize the list while keeping a look out for exactly the kinds of problem you mention. Hope that helps, Micah Mark A wrote: > Dear E-Prime group, > I am fairly new to E-Prime, but thus far have found online discussions > within the group, as well as PST instructions and examples that have > allowed me to program everything required, with one exception. The > experimental task is simple: A participant listens to a series of > words and presses a button whenever a particular word is heard (i.e., > the target word, "apple" in the example below). The target word is > presented 4 times. > > My problem is this: I wish to present a series of stimuli (.wav files) > randomly, with the restriction that I do not want "Target" files to be > presented consecutively. Rather, I want them to be separated by at > least one distractor (or non-target). > > To illustrate, this is an excerpt from one of my lists: > > Weight Nested Procedure   Sound Talker Target SoundDur > 1 MAppleTrial m1apple.wav m1 yes 422 > 1 MAppleTrial f4apple.wav f4 yes 546 > 1 MAppleTrial m1apple.wav m1 yes 422 > 1 MAppleTrial f4apple.wav f4 yes 546 > 1 MAppleTrial m2bear.wav m2 no 332 > 1 MAppleTrial f3bin.wav    f3 no 375 > 1 MAppleTrial m3cat.wav         m3 no 383 > 1 MAppleTrial f2chalk.wav f2 no 586 > ..... and so forth (there are 4 targets and 23 distractors). > > Currently, I have the list set to "Random", however, this does not > guarantee that the Target files (top 4 rows) will not occur > consecutively. I think that the solution will involve a conditional > statement (perhaps using In line) comparing whether the previous file > presented was a target, but I am unsure how to implement this. > > An additional consideration is what to do if there are only 2 cycles > left, and the two files left are both target files. If this is very > hard to avoid, I am willing to live with this, as it is unlikely to > occur very often. Any tips or links to helpful discussions on similar > topics will be very much appreciated. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Thu Jul 21 21:04:58 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Thu, 21 Jul 2011 17:04:58 -0400 Subject: How to avoid presenting targets consecutively In-Reply-To: Message-ID: Micah, Great answer. I often get so wrapped up in looking for sophisticated automated solutions that I overlook the simple ones, and what you recommend is exactly what we do for fMRI in order to avoid problems with accidental multicollinearity (which flusters correlation & deconvolution analyses). And as it turns out, this answer also appeared in a discussion at http://support.pstnet.com/forum/Topic3166-5-1.aspx . -- David McFarlane, Professional Faultfinder >Just as a general comment, and certainly not the best solution: > >I generally do my stimulus randomizations outside of e-prime. It's >much easier to specific a pseudo-random or fully random sequence of >stimuli outside of e-prime (in excel for example) and to then import >it into one triallist that is sequentially sampled. This way you can >randomize the list while keeping a look out for exactly the kinds of >problem you mention. > >Hope that helps, >Micah > >Mark A wrote: > > Dear E-Prime group, > > I am fairly new to E-Prime, but thus far have found online discussions > > within the group, as well as PST instructions and examples that have > > allowed me to program everything required, with one exception. The > > experimental task is simple: A participant listens to a series of > > words and presses a button whenever a particular word is heard (i.e., > > the target word, "apple" in the example below). The target word is > > presented 4 times. > > > > My problem is this: I wish to present a series of stimuli (.wav files) > > randomly, with the restriction that I do not want "Target" files to be > > presented consecutively. Rather, I want them to be separated by at > > least one distractor (or non-target). > > > > To illustrate, this is an excerpt from one of my lists: > > > > > Weight Nested Procedure Sound Talker Target SoundDur > > > 1 MAppleTrial m1apple.wav m1 > yes 422 > > > 1 MAppleTrial f4apple.wav f4 > yes 546 > > > 1 MAppleTrial m1apple.wav m1 > yes 422 > > > 1 MAppleTrial f4apple.wav f4 > yes 546 > > > 1 MAppleTrial m2bear.wav m2 > no 332 > > > 1 MAppleTrial f3bin.wav f3 > no 375 > > > 1 MAppleTrial m3cat.wav > m3 no 383 > > > 1 MAppleTrial f2chalk.wav f2 > no 586 > > ..... and so forth (there are 4 targets and 23 distractors). > > > > Currently, I have the list set to "Random", however, this does not > > guarantee that the Target files (top 4 rows) will not occur > > consecutively. I think that the solution will involve a conditional > > statement (perhaps using In line) comparing whether the previous file > > presented was a target, but I am unsure how to implement this. > > > > An additional consideration is what to do if there are only 2 cycles > > left, and the two files left are both target files. If this is very > > hard to avoid, I am willing to live with this, as it is unlikely to > > occur very often. Any tips or links to helpful discussions on similar > > topics will be very much appreciated. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Thu Jul 21 21:15:16 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Thu, 21 Jul 2011 17:15:16 -0400 Subject: Tips needed for tweaking the standard likert scale script In-Reply-To: Message-ID: Micah, At 7/21/2011 02:07 PM Thursday, you wrote: >Is there a function to search a stored variable for a specific number? Perhaps the Mid$() function will do? See that topic in the E-Basic Help facility (or consult any VBA reference, e.g., my favorites, "VBA for Dummies" or "VBA in a Nutshell"). InStr() might be another thing to try. Then at 7/21/2011 02:25 PM Thursday, you wrote: >Is there a wildcard variable in e-basic? If so I could do a check >like, if stimulus.RESP = *3* then >confirmed =1. That would be nice, but E-Basic/VBA does not work quite that way, although you could build something like that using the Mid$() or InStr() functions. I think wildcards like that are features of scripting languages like Perl or sed, not regular computer languages like VBA/E-Basic or C or JavaScript, etc. I didn't look carefully at the full code that you are working on so I don't know what I missed in my responses, I was just talking off the top of my head based on general principles. Glad you got most everything to work. -- David McFarlane, Professional Faultfinder -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From Michiel.Spape at nottingham.ac.uk Fri Jul 22 09:02:14 2011 From: Michiel.Spape at nottingham.ac.uk (Michiel Spape) Date: Fri, 22 Jul 2011 10:02:14 +0100 Subject: How to avoid presenting targets consecutively In-Reply-To: <4e28947c.c1602a0a.31f4.ffff80fbSMTPIN_ADDED@gmr-mx.google.com> Message-ID: Hi all, Pseudo- (or actually offline) randomisation, would work depending on the task and duration (if indeed fMRI, I'd go for that - but EEG with hundreds of trials, not so much). Another answer may be found inspired in an old trick for programming an attentional blink (see my post here: http://www.google.co.uk/url?sa=t&source=web&cd=4&ved=0CDoQFjAD&url=http%3A%2F%2Fgroups.google.com%2Fgroup%2Fe-prime%2Fbrowse_thread%2Fthread%2Fd2aaae391b3cd922&ei=2zkpTsLAN8iKhQfTl8XpCw&usg=AFQjCNGtIS2XS5p9Eg2UWXGo7L1sCgvN5g ) Outtake: ----------- If the image-sequence is a procedure in a blocklist, make that something like (start procedure)-->imagedisplay1-->imagedisplay2-->...-->imagedisplay9 Let the blocklist have 9 attributes: "imagefile1", "imagefile2",.., "imagefile9", and two nested lists: distracters and targets, set them both to randomise. Give them both an attribute, respectively "distracter" and "target". Fill these attributes with all the targets and distracters you like. Let these lists randomise. Set the filename properties of the 9 imagedisplays to [imagefile1], [imagefile2], .., [imagefile9]. Set the attributes of imagefile1 to 9 (i.e. in the blocklist) to [distracter:1] [distracter:2] [distracter:3] [distracter:4] [distracter:5] [target:1] [distracter:6] [distracter:7] [distracter:8] For a trial sequence in which the 6th display is the different (i.e. target, odd) picture. Obviously, you need two more lines, for the other 7th or 8th image to be the target. ---------------- Given that you want something like distractor/distractor/distractor/target/distractor... etc, it may well be best to programme your experiment such that rather than having a "target" trial, you have a number of slides (or whatnots) after another in a single trial. You can then make your list so that sequences are randomised between trials, rather than trials themselves. So, if I have a list like: Slide1Word,Slide2Word,Slide3Word,Slide4Word [Distractor:1],[Target:1],[Distractor:2],Target:2],[Distractor:3] [Distractor:1],[Target:1],[Distractor:2],[Distractor:3],[Target:2] [Distractor:1],[Distractor:2],[Target1],[Distractor:3],[Target:2] ... And the list randomises between these 3 sequences, 1) there's no way that two targets can come after another, 2) targets/distractors are randomised and 3) orders are randomised to a very safe degree (since it's unlikely that for one participant, for example, all targets will come relatively to the end). Hope that helps. Best, Mich Michiel Spapé Research Fellow Perception & Action group University of Nottingham School of Psychology www.cognitology.eu -----Original Message----- From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of David McFarlane Sent: 21 July 2011 22:05 To: e-prime at googlegroups.com Subject: Re: How to avoid presenting targets consecutively Micah, Great answer. I often get so wrapped up in looking for sophisticated automated solutions that I overlook the simple ones, and what you recommend is exactly what we do for fMRI in order to avoid problems with accidental multicollinearity (which flusters correlation & deconvolution analyses). And as it turns out, this answer also appeared in a discussion at http://support.pstnet.com/forum/Topic3166-5-1.aspx . -- David McFarlane, Professional Faultfinder >Just as a general comment, and certainly not the best solution: > >I generally do my stimulus randomizations outside of e-prime. It's >much easier to specific a pseudo-random or fully random sequence of >stimuli outside of e-prime (in excel for example) and to then import >it into one triallist that is sequentially sampled. This way you can >randomize the list while keeping a look out for exactly the kinds of >problem you mention. > >Hope that helps, >Micah > >Mark A wrote: > > Dear E-Prime group, > > I am fairly new to E-Prime, but thus far have found online discussions > > within the group, as well as PST instructions and examples that have > > allowed me to program everything required, with one exception. The > > experimental task is simple: A participant listens to a series of > > words and presses a button whenever a particular word is heard (i.e., > > the target word, "apple" in the example below). The target word is > > presented 4 times. > > > > My problem is this: I wish to present a series of stimuli (.wav files) > > randomly, with the restriction that I do not want "Target" files to be > > presented consecutively. Rather, I want them to be separated by at > > least one distractor (or non-target). > > > > To illustrate, this is an excerpt from one of my lists: > > > > > Weight Nested Procedure Sound Talker Target SoundDur > > > 1 MAppleTrial m1apple.wav m1 > yes 422 > > > 1 MAppleTrial f4apple.wav f4 > yes 546 > > > 1 MAppleTrial m1apple.wav m1 > yes 422 > > > 1 MAppleTrial f4apple.wav f4 > yes 546 > > > 1 MAppleTrial m2bear.wav m2 > no 332 > > > 1 MAppleTrial f3bin.wav f3 > no 375 > > > 1 MAppleTrial m3cat.wav > m3 no 383 > > > 1 MAppleTrial f2chalk.wav f2 > no 586 > > ..... and so forth (there are 4 targets and 23 distractors). > > > > Currently, I have the list set to "Random", however, this does not > > guarantee that the Target files (top 4 rows) will not occur > > consecutively. I think that the solution will involve a conditional > > statement (perhaps using In line) comparing whether the previous file > > presented was a target, but I am unsure how to implement this. > > > > An additional consideration is what to do if there are only 2 cycles > > left, and the two files left are both target files. If this is very > > hard to avoid, I am willing to live with this, as it is unlikely to > > occur very often. Any tips or links to helpful discussions on similar > > topics will be very much appreciated. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From tobias.fw at gmail.com Fri Jul 22 13:03:44 2011 From: tobias.fw at gmail.com (Tobias) Date: Fri, 22 Jul 2011 06:03:44 -0700 Subject: debounce time In-Reply-To: <4e1f4586.c1602a0a.7810.2410SMTPIN_ADDED@gmr-mx.google.com> Message-ID: Sorry for my bad English, I just literally translated from German where "self-made" (selbstgemacht) doesn't necessarily mean that you yourself made it but also that someone else might have made it himself. As opposed to mass production related stuff. Anyway, your code works. Thanks for that! On 14 Jul., 21:37, David McFarlane wrote: > Tobias, > > > Hmm, "I have just received a nice self-made buttonbox..."??  If it is > self-made then you could not receive it, because you already have it; > if you just received it then it is not self-made.  Perhaps you meant > "custom-made".  But I quibble... > > > Like Paul Groot said, it is best to use hardware-debounced switches, > and the circuitry for that is very straightforward, you can also find > instructions in the classic text "The Art of Electronics" by Horowitz > & Hill.  Every lab should have someone who is familiar with that text. > > Nevertheless I rarely follow that advice myself because, even though > the circuitry is trivial, it requires a power source, and that just > makes things a tad too inconvenient for me (the parallel port does > not include any power source).  I like simmple passive circuitry > whenever I can get away with it.  And in almost every case the task > itself presents sufficient delay between responses so that switch > bouncing does not present a problem. > > But I gather you need this for something like a rapid tapping task, > where switch bounces become a problem.  For our tapping tasks we > solve this by running a custom passive-switch box much like yours > through an SRBox -- that way we get switches with good mechanical > feel combined with the ease of use of the SRBox, and still have > sub-millisecond resolution. > > But as a last resort I will do software debouncing.  The cheapest way > to do that is just to add a sufficient Sleep after a response, and > trust both that no further responses come in during that Sleep and > that the switch finishes bouncing during that Sleep.  I would rather > have something more secure.  So here is an example of the sort of > code I might use, using a ReadPort (you would have to modify this if > you use an input mask, but you can handle that) (I did not test this, > just constructed it from memory, so caveat user): > > Const  PortAdd as Integer = &hABCD  ' just an example, replace with > real port address > Const  BitMask as Integer = &H01 > Const  DtDebounce as Long = 50  ' ms > Dim  tDebounce as Long > tDebounce = Clock.Read + DtDebounce > Do Until (Clock.Read >= tDebounce) >      If ((ReadPort(PortAdd) and BitMask) <> 0) Then _ >          tDebounce = Clock.Read + DtDebounce > Loop > > The example supposes that we are only interested in bit 0 of the > input, and that a bit value of 1 indicates button pressed, while a > bit value of 0 indicates button released.  The code simply considers > bouncing to be over as soon as it finds that the button has been > released for (in this example) 50 ms without interruption.  More > specifically, it starts by setting a goal of (in this example) 50 ms > from now.  It then monitors the input until it reaches the goal > time.  If it detects another button press during this time, then it > resets the goal for (in this example) 50 ms more from the current > time, and continues.  As a result, the program runs this loop as long > as the button is pressed, and does not move on until 50 ms after the > button has been fully released and all bouncing is done. > > This code could go either right before you want to get a response, or > right after you have gotten your response. > > > Pretty cool if Presentation has a "dead-time" setting, maybe yet > another reason to consider it as an alternative to E-Prime. > > > -- David McFarlane, Professional Faultfinder > > At 7/14/2011 07:54 AM Thursday, Paul Groot wrote: > > >Hi Tobias, > > >You're right. Mechanical switches suffer from this debounce effect. > >Especially if the switch becomes older! In most cases this is not an > >issue if you are only interested in the response time of a single > >button press. When repeating presses are allowed, an 'ignore interval' > >of about 50 ms should be enough for even the worst switches. Things > >become more complicated when several buttons are allowed to be > >pressed. An electrical solution using a Schmitt trigger is preferred > >in that case (for example: > >http://www.labbookpages.co.uk/electronics/debounce.html) > > >Unfortunately Eprime has no dead-time setting as Presentation does...;-(( > > >best > >Paul > > >2011/7/14 Tobias : > > > Dear E-Prime community, > > > > I have just received a nice self-made buttonbox with three buttons > > > that can be attached to a parallel port. THus I have very good timing > > > of RTs for my experiments now :) > > > > However, there seems to be a problem with the bouncing of the keys. > > > Single key presses cause several signals in a row. That is, if I have > > > two consecutive slides with a duration of "-1", one key press is > > > enough to terminate both slides. > > > > A collegue of mine said that in the experimental software > > > 'Presentation', a debounce time can be specified so that such double > > > responses are not possible. > > > > Is there any way of doing so in E-Prime? > > > > Best, > > > Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From tobias.fw at gmail.com Fri Jul 22 13:08:53 2011 From: tobias.fw at gmail.com (Tobias) Date: Fri, 22 Jul 2011 06:08:53 -0700 Subject: How can I implement pseudo-random selection from a list? Message-ID: Dear all, again a rather elementary issue stroke me when I was testing a new paradigm. When I have four target types, it often happens that one of them is used 10 times in a row. Let's not discuss how random E-Primes "random" is (I don't really trust it!). But: How can I implement a pseudorandom selection from a list? Let's say I want E-Prime to choose randomly trials from a list, but one of the four target types must not be repeated more than twice in a row. I didn't find anything like that in the options, maybe some code helps. Has anyone of you ever tried to do such a thing? Looking forward to reading your answers! Best, Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Fri Jul 22 13:23:33 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Fri, 22 Jul 2011 09:23:33 -0400 Subject: How can I implement pseudo-random selection from a list? In-Reply-To: <91d674ea-5162-41d4-85cc-a8bd807197e0@n28g2000vbs.googlegro ups.com> Message-ID: Tobias, This has been discussed at length time and time again both in this Group and on the PST Forum (including this very week). Did you try doing a search for this topic on the discussion groups? -- David McFarlane, Professional Faultfinder At 7/22/2011 09:08 AM Friday, you wrote: >Dear all, > >again a rather elementary issue stroke me when I was testing a new >paradigm. When I have four target types, it often happens that one of >them is used 10 times in a row. Let's not discuss how random E-Primes >"random" is (I don't really trust it!). But: How can I implement a >pseudorandom selection from a list? > >Let's say I want E-Prime to choose randomly trials from a list, but >one of the four target types must not be repeated more than twice in a >row. > >I didn't find anything like that in the options, maybe some code >helps. Has anyone of you ever tried to do such a thing? > >Looking forward to reading your answers! > >Best, >Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From tobias.fw at gmail.com Fri Jul 22 13:40:24 2011 From: tobias.fw at gmail.com (Tobias) Date: Fri, 22 Jul 2011 06:40:24 -0700 Subject: How can I implement pseudo-random selection from a list? In-Reply-To: <4e2979d5.ce5e2a0a.7f0c.7aa3SMTPIN_ADDED@gmr-mx.google.com> Message-ID: Yeah, I tried antering "pseudorandom" but there weren't any helpful discussions. And no recent ones, especially. Didn't look at the PST forum On 22 Jul., 15:23, David McFarlane wrote: > Tobias, > > This has been discussed at length time and time again both in this > Group and on the PST Forum (including this very week).  Did you try > doing a search for this topic on the discussion groups? > > -- David McFarlane, Professional Faultfinder > > At 7/22/2011 09:08 AM Friday, you wrote: > > >Dear all, > > >again a rather elementary issue stroke me when I was testing a new > >paradigm. When I have four target types, it often happens that one of > >them is used 10 times in a row. Let's not discuss how random E-Primes > >"random" is (I don't really trust it!). But: How can I implement a > >pseudorandom selection from a list? > > >Let's say I want E-Prime to choose randomly trials from a list, but > >one of the four target types must not be repeated more than twice in a > >row. > > >I didn't find anything like that in the options, maybe some code > >helps. Has anyone of you ever tried to do such a thing? > > >Looking forward to reading your answers! > > >Best, > >Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From tobias.fw at gmail.com Fri Jul 22 13:50:49 2011 From: tobias.fw at gmail.com (Tobias) Date: Fri, 22 Jul 2011 06:50:49 -0700 Subject: How can I implement pseudo-random selection from a list? In-Reply-To: Message-ID: okay, if i enter "pseudo-random", I find it. Let's discuss it there and close this branch. On 22 Jul., 15:40, Tobias wrote: > Yeah, I tried antering "pseudorandom" but there weren't any helpful > discussions. And no recent ones, especially. > > Didn't look at the PST forum > > On 22 Jul., 15:23, David McFarlane wrote: > > > Tobias, > > > This has been discussed at length time and time again both in this > > Group and on the PST Forum (including this very week).  Did you try > > doing a search for this topic on the discussion groups? > > > -- David McFarlane, Professional Faultfinder > > > At 7/22/2011 09:08 AM Friday, you wrote: > > > >Dear all, > > > >again a rather elementary issue stroke me when I was testing a new > > >paradigm. When I have four target types, it often happens that one of > > >them is used 10 times in a row. Let's not discuss how random E-Primes > > >"random" is (I don't really trust it!). But: How can I implement a > > >pseudorandom selection from a list? > > > >Let's say I want E-Prime to choose randomly trials from a list, but > > >one of the four target types must not be repeated more than twice in a > > >row. > > > >I didn't find anything like that in the options, maybe some code > > >helps. Has anyone of you ever tried to do such a thing? > > > >Looking forward to reading your answers! > > > >Best, > > >Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From tobias.fw at gmail.com Fri Jul 22 14:06:19 2011 From: tobias.fw at gmail.com (Tobias) Date: Fri, 22 Jul 2011 07:06:19 -0700 Subject: How to avoid presenting targets consecutively In-Reply-To: <09DAEA8BC192C94EB62C8E71FC35A5D92F803879A9@EXCHANGE3.ad.nottingham.ac.uk> Message-ID: I have a similar problem. In a visual search experiment, I have four target types and it happens often that one of them is used 10 times in a row. Let's not discuss how random E-Primes "random" is (I don't really trust it!). But: How can I implement a pseudorandom selection from a list? Let's say I want E-Prime to choose randomly trials from a list, but one of the four target types must not be repeated more than twice in a row. I see your answers here, but I think we have to tell apart two things here: No repitition of stimuli within a trial (e.g. attentional blink) on one side and no repition from trial to trial (e.g. two target types in visual search) on the other side. Michiel's solution works perfectly for the former case I think. But I don't see any way of implementing that for my case. Micah's solution might be a good idea, but it is not very handy if you want a different random order of trials for each subject. I guess it would be best if there is a way to make this in code. For example, E-Prime could record the recent trial types: target_t1 = target_t2 target_t2 = c.getattrib("targettype") and then, E-Prime could check each new trial for repition: if c.getattrib("targettype")=target_t1 or c.getattrib("targettype")=target_t2 then "draw new trial". Unfortunately there is no command "draw new trials" That would be my way to go. Any hints? On 22 Jul., 11:02, Michiel Spape wrote: > Hi all, > Pseudo- (or actually offline) randomisation, would work depending on the task and duration (if indeed fMRI, I'd go for that - but EEG with hundreds of trials, not so much). Another answer may be found inspired in an old trick for programming an attentional blink (see my post here:http://www.google.co.uk/url?sa=t&source=web&cd=4&ved=0CDoQFjAD&url=ht...) > > Outtake: > ----------- > If the image-sequence is a procedure in a blocklist, make that something like > (start procedure)-->imagedisplay1-->imagedisplay2-->...-->imagedisplay9 > Let the blocklist have 9 attributes: "imagefile1", "imagefile2",.., "imagefile9", and two nested lists: distracters and targets, set them both to randomise. Give them both an attribute, respectively "distracter" and "target". Fill these attributes with all the targets and distracters you like. Let these lists randomise. > Set the filename properties of the 9 imagedisplays to [imagefile1], [imagefile2], .., [imagefile9]. > Set the attributes of imagefile1 to 9 (i.e. in the blocklist) to > [distracter:1] > [distracter:2] > [distracter:3] > [distracter:4] > [distracter:5] > [target:1] > [distracter:6] > [distracter:7] > [distracter:8] > > For a trial sequence in which the 6th display is the different (i.e. target, odd) picture. Obviously, you need two more lines, for the other 7th or 8th image to be the target. > ---------------- > > Given that you want something like distractor/distractor/distractor/target/distractor... etc, it may well be best to programme your experiment such that rather than having a "target" trial, you have a number of slides (or whatnots) after another in a single trial. You can then make your list so that sequences are randomised between trials, rather than trials themselves. So, if I have a list like: > Slide1Word,Slide2Word,Slide3Word,Slide4Word > [Distractor:1],[Target:1],[Distractor:2],Target:2],[Distractor:3] > [Distractor:1],[Target:1],[Distractor:2],[Distractor:3],[Target:2] > [Distractor:1],[Distractor:2],[Target1],[Distractor:3],[Target:2] > ... > And the list randomises between these 3 sequences, 1) there's no way that two targets can come after another, 2) targets/distractors are randomised and 3) orders are randomised to a very safe degree (since it's unlikely that for one participant, for example, all targets will come relatively to the end). > Hope that helps. > Best, > Mich > > Michiel Spapé > Research Fellow > Perception & Action group > University of Nottingham > School of Psychologywww.cognitology.eu > > -----Original Message----- > From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of David McFarlane > Sent: 21 July 2011 22:05 > To: e-prime at googlegroups.com > Subject: Re: How to avoid presenting targets consecutively > > Micah, > > Great answer.  I often get so wrapped up in looking for sophisticated > automated solutions that I overlook the simple ones, and what you > recommend is exactly what we do for fMRI in order to avoid problems > with accidental multicollinearity (which flusters correlation & > deconvolution analyses).  And as it turns out, this answer also > appeared in a discussion athttp://support.pstnet.com/forum/Topic3166-5-1.aspx. > > -- David McFarlane, Professional Faultfinder > > >Just as a general comment, and certainly not the best solution: > > >I generally do my stimulus randomizations outside of e-prime. It's > >much easier to specific a pseudo-random or fully random sequence of > >stimuli outside of e-prime (in excel for example) and to then import > >it into one triallist that is sequentially sampled. This way you can > >randomize the list while keeping a look out for exactly the kinds of > >problem you mention. > > >Hope that helps, > >Micah > > >Mark A wrote: > > > Dear E-Prime group, > > > I am fairly new to E-Prime, but thus far have found online discussions > > > within the group, as well as PST instructions and examples that have > > > allowed me to program everything required, with one exception. The > > > experimental task is simple: A participant listens to a series of > > > words and presses a button whenever a particular word is heard (i.e., > > > the target word, "apple" in the example below). The target word is > > > presented 4 times. > > > > My problem is this: I wish to present a series of stimuli (.wav files) > > > randomly, with the restriction that I do not want "Target" files to be > > > presented consecutively. Rather, I want them to be separated by at > > > least one distractor (or non-target). > > > > To illustrate, this is an excerpt from one of my lists: > > > Weight        Nested  Procedure       Sound           Talker  Target  SoundDur > > > 1                             MAppleTrial     m1apple.wav     m1 > >            yes             422 > > > 1                             MAppleTrial     f4apple.wav     f4 > >            yes             546 > > > 1                             MAppleTrial     m1apple.wav     m1 > >            yes             422 > > > 1                             MAppleTrial     f4apple.wav     f4 > >            yes             546 > > > 1                             MAppleTrial     m2bear.wav      m2 > >            no              332 > > > 1                             MAppleTrial     f3bin.wav       f3 > >            no              375 > > > 1                             MAppleTrial     m3cat.wav > >    m3              no              383 > > > 1                             MAppleTrial     f2chalk.wav     f2 > >            no              586 > > > ..... and so forth (there are 4 targets and 23 distractors). > > > > Currently, I have the list set to "Random", however, this does not > > > guarantee that the Target files (top 4 rows) will not occur > > > consecutively. I think that the solution will involve a conditional > > > statement (perhaps using In line) comparing whether the previous file > > > presented was a target, but I am unsure how to implement this. > > > > An additional consideration is what to do if there are only 2 cycles > > > left, and the two files left are both target files. If this is very > > > hard to avoid, I am willing to live with this, as it is unlikely to > > > occur very often. Any tips or links to helpful discussions on similar > > > topics will be very much appreciated. > > -- > You received this message because you are subscribed to the Google Groups "E-Prime" group. > To post to this group, send email to e-prime at googlegroups.com. > To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. > For more options, visit this group athttp://groups.google.com/group/e-prime?hl=en. > > This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it.   Please do not use, copy or disclose the information contained in this message or in any attachment.  Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. > > This message has been checked for viruses but the contents of an attachment > may still contain software viruses which could damage your computer system: > you are advised to perform your own checks. Email communications with the > University of Nottingham may be monitored as permitted by UK legislation. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From markbfm at gmail.com Fri Jul 22 14:51:05 2011 From: markbfm at gmail.com (Mark A) Date: Fri, 22 Jul 2011 07:51:05 -0700 Subject: How to avoid presenting targets consecutively In-Reply-To: Message-ID: Thanks for all of your replies. I appreciate the time that you took to provide me with such thoughtful answers. I will post back with the solution that I decide upon. > Micah's solution > might be a good idea, but it is not very handy if you want a different > random order of trials for each subject. Tobias, I think that Micah was implying that you would create a new randomisation for each participant. I might end up doing this as it seems to be the most cost-effective in terms of my time. Thank you all again. On Jul 22, 9:06 am, Tobias wrote: > I have a similar problem. In a visual search experiment, I have four > target types and it happens often that one of them is used 10 times in > a row. Let's not discuss how random E-Primes "random" is (I don't > really trust it!). > > But: How can I implement a pseudorandom selection from a list? Let's > say I want E-Prime to choose randomly trials from a list, but one of > the four target types must not be repeated more than twice in a row. > > I see your answers here, but I think we have to tell apart two things > here: No repitition of stimuli within a trial (e.g. attentional blink) > on one side and no repition from trial to trial (e.g. two target types > in visual search) on the other side. > > Michiel's solution works perfectly for the former case I think. But I > don't see any way of implementing that for my case. Micah's solution > might be a good idea, but it is not very handy if you want a different > random order of trials for each subject. > > I guess it would be best if there is a way to make this in code. For > example, E-Prime could record the recent trial types: > > target_t1 = target_t2 > target_t2 = c.getattrib("targettype") > > and then, E-Prime could check each new trial for repition: > > if c.getattrib("targettype")=target_t1 or > c.getattrib("targettype")=target_t2 then "draw new trial". > > Unfortunately there is no command "draw new trials" > > That would be my way to go. Any hints? > > On 22 Jul., 11:02, Michiel Spape > wrote: > > > > > > > > > Hi all, > > Pseudo- (or actually offline) randomisation, would work depending on the task and duration (if indeed fMRI, I'd go for that - but EEG with hundreds of trials, not so much). Another answer may be found inspired in an old trick for programming an attentional blink (see my post here:http://www.google.co.uk/url?sa=t&source=web&cd=4&ved=0CDoQFjAD&url=ht...) > > > Outtake: > > ----------- > > If the image-sequence is a procedure in a blocklist, make that something like > > (start procedure)-->imagedisplay1-->imagedisplay2-->...-->imagedisplay9 > > Let the blocklist have 9 attributes: "imagefile1", "imagefile2",.., "imagefile9", and two nested lists: distracters and targets, set them both to randomise. Give them both an attribute, respectively "distracter" and "target". Fill these attributes with all the targets and distracters you like. Let these lists randomise. > > Set the filename properties of the 9 imagedisplays to [imagefile1], [imagefile2], .., [imagefile9]. > > Set the attributes of imagefile1 to 9 (i.e. in the blocklist) to > > [distracter:1] > > [distracter:2] > > [distracter:3] > > [distracter:4] > > [distracter:5] > > [target:1] > > [distracter:6] > > [distracter:7] > > [distracter:8] > > > For a trial sequence in which the 6th display is the different (i.e. target, odd) picture. Obviously, you need two more lines, for the other 7th or 8th image to be the target. > > ---------------- > > > Given that you want something like distractor/distractor/distractor/target/distractor... etc, it may well be best to programme your experiment such that rather than having a "target" trial, you have a number of slides (or whatnots) after another in a single trial. You can then make your list so that sequences are randomised between trials, rather than trials themselves. So, if I have a list like: > > Slide1Word,Slide2Word,Slide3Word,Slide4Word > > [Distractor:1],[Target:1],[Distractor:2],Target:2],[Distractor:3] > > [Distractor:1],[Target:1],[Distractor:2],[Distractor:3],[Target:2] > > [Distractor:1],[Distractor:2],[Target1],[Distractor:3],[Target:2] > > ... > > And the list randomises between these 3 sequences, 1) there's no way that two targets can come after another, 2) targets/distractors are randomised and 3) orders are randomised to a very safe degree (since it's unlikely that for one participant, for example, all targets will come relatively to the end). > > Hope that helps. > > Best, > > Mich > > > Michiel Spapé > > Research Fellow > > Perception & Action group > > University of Nottingham > > School of Psychologywww.cognitology.eu > > > -----Original Message----- > > From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of David McFarlane > > Sent: 21 July 2011 22:05 > > To: e-prime at googlegroups.com > > Subject: Re: How to avoid presenting targets consecutively > > > Micah, > > > Great answer.  I often get so wrapped up in looking for sophisticated > > automated solutions that I overlook the simple ones, and what you > > recommend is exactly what we do for fMRI in order to avoid problems > > with accidental multicollinearity (which flusters correlation & > > deconvolution analyses).  And as it turns out, this answer also > > appeared in a discussion athttp://support.pstnet.com/forum/Topic3166-5-1.aspx. > > > -- David McFarlane, Professional Faultfinder > > > >Just as a general comment, and certainly not the best solution: > > > >I generally do my stimulus randomizations outside of e-prime. It's > > >much easier to specific a pseudo-random or fully random sequence of > > >stimuli outside of e-prime (in excel for example) and to then import > > >it into one triallist that is sequentially sampled. This way you can > > >randomize the list while keeping a look out for exactly the kinds of > > >problem you mention. > > > >Hope that helps, > > >Micah > > > >Mark A wrote: > > > > Dear E-Prime group, > > > > I am fairly new to E-Prime, but thus far have found online discussions > > > > within the group, as well as PST instructions and examples that have > > > > allowed me to program everything required, with one exception. The > > > > experimental task is simple: A participant listens to a series of > > > > words and presses a button whenever a particular word is heard (i.e., > > > > the target word, "apple" in the example below). The target word is > > > > presented 4 times. > > > > > My problem is this: I wish to present a series of stimuli (.wav files) > > > > randomly, with the restriction that I do not want "Target" files to be > > > > presented consecutively. Rather, I want them to be separated by at > > > > least one distractor (or non-target). > > > > > To illustrate, this is an excerpt from one of my lists: > > > > Weight        Nested  Procedure       Sound           Talker  Target  SoundDur > > > > 1                             MAppleTrial     m1apple.wav     m1 > > >            yes             422 > > > > 1                             MAppleTrial     f4apple.wav     f4 > > >            yes             546 > > > > 1                             MAppleTrial     m1apple.wav     m1 > > >            yes             422 > > > > 1                             MAppleTrial     f4apple.wav     f4 > > >            yes             546 > > > > 1                             MAppleTrial     m2bear.wav      m2 > > >            no              332 > > > > 1                             MAppleTrial     f3bin.wav       f3 > > >            no              375 > > > > 1                             MAppleTrial     m3cat.wav > > >    m3              no              383 > > > > 1                             MAppleTrial     f2chalk.wav     f2 > > >            no              586 > > > > ..... and so forth (there are 4 targets and 23 distractors). > > > > > Currently, I have the list set to "Random", however, this does not > > > > guarantee that the Target files (top 4 rows) will not occur > > > > consecutively. I think that the solution will involve a conditional > > > > statement (perhaps using In line) comparing whether the previous file > > > > presented was a target, but I am unsure how to implement this. > > > > > An additional consideration is what to do if there are only 2 cycles > > > > left, and the two files left are both target files. If this is very > > > > hard to avoid, I am willing to live with this, as it is unlikely to > > > > occur very often. Any tips or links to helpful discussions on similar > > > > topics will be very much appreciated. > > > -- > > You received this message because you are subscribed to the Google Groups "E-Prime" group. > > To post to this group, send email to e-prime at googlegroups.com. > > To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. > > For more options, visit this group athttp://groups.google.com/group/e-prime?hl=en. > > > This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it.   Please do not use, copy or disclose the information contained in this message or in any attachment.  Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. > > > This message has been checked for viruses but the contents of an attachment > > may still contain software viruses which could damage your computer system: > > you are advised to perform your own checks. Email communications with the > > University of Nottingham may be monitored as permitted by UK legislation. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From Michiel.Spape at nottingham.ac.uk Fri Jul 22 15:37:22 2011 From: Michiel.Spape at nottingham.ac.uk (Michiel Spape) Date: Fri, 22 Jul 2011 16:37:22 +0100 Subject: How to avoid presenting targets consecutively In-Reply-To: Message-ID: Hi Tobias, I don't think David specifically meant my example when he said an answer has been offered time and again. What you are looking for tends to be called conditional randomisation, which is usually done in such a way as to either ----- 1. Figure out all the legal repetition types 2. Build trial list 3. Run trial list. ----- 1. Generate one trial sequence (dist-dist-targ-dist-targ) etc, 2. If 1) is illegal, goto 1. ... but many more ways are possible. Making a list shouldn't be too hard, and indeed, if you have that, List.Run works if you really must "draw a trial". Best, Mich Michiel Spapé Research Fellow Perception & Action group University of Nottingham School of Psychology www.cognitology.eu -----Original Message----- From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of Tobias Sent: 22 July 2011 15:06 To: E-Prime Subject: Re: How to avoid presenting targets consecutively I have a similar problem. In a visual search experiment, I have four target types and it happens often that one of them is used 10 times in a row. Let's not discuss how random E-Primes "random" is (I don't really trust it!). But: How can I implement a pseudorandom selection from a list? Let's say I want E-Prime to choose randomly trials from a list, but one of the four target types must not be repeated more than twice in a row. I see your answers here, but I think we have to tell apart two things here: No repitition of stimuli within a trial (e.g. attentional blink) on one side and no repition from trial to trial (e.g. two target types in visual search) on the other side. Michiel's solution works perfectly for the former case I think. But I don't see any way of implementing that for my case. Micah's solution might be a good idea, but it is not very handy if you want a different random order of trials for each subject. I guess it would be best if there is a way to make this in code. For example, E-Prime could record the recent trial types: target_t1 = target_t2 target_t2 = c.getattrib("targettype") and then, E-Prime could check each new trial for repition: if c.getattrib("targettype")=target_t1 or c.getattrib("targettype")=target_t2 then "draw new trial". Unfortunately there is no command "draw new trials" That would be my way to go. Any hints? On 22 Jul., 11:02, Michiel Spape wrote: > Hi all, > Pseudo- (or actually offline) randomisation, would work depending on the task and duration (if indeed fMRI, I'd go for that - but EEG with hundreds of trials, not so much). Another answer may be found inspired in an old trick for programming an attentional blink (see my post here:http://www.google.co.uk/url?sa=t&source=web&cd=4&ved=0CDoQFjAD&url=ht...) > > Outtake: > ----------- > If the image-sequence is a procedure in a blocklist, make that something like > (start procedure)-->imagedisplay1-->imagedisplay2-->...-->imagedisplay9 > Let the blocklist have 9 attributes: "imagefile1", "imagefile2",.., "imagefile9", and two nested lists: distracters and targets, set them both to randomise. Give them both an attribute, respectively "distracter" and "target". Fill these attributes with all the targets and distracters you like. Let these lists randomise. > Set the filename properties of the 9 imagedisplays to [imagefile1], [imagefile2], .., [imagefile9]. > Set the attributes of imagefile1 to 9 (i.e. in the blocklist) to > [distracter:1] > [distracter:2] > [distracter:3] > [distracter:4] > [distracter:5] > [target:1] > [distracter:6] > [distracter:7] > [distracter:8] > > For a trial sequence in which the 6th display is the different (i.e. target, odd) picture. Obviously, you need two more lines, for the other 7th or 8th image to be the target. > ---------------- > > Given that you want something like distractor/distractor/distractor/target/distractor... etc, it may well be best to programme your experiment such that rather than having a "target" trial, you have a number of slides (or whatnots) after another in a single trial. You can then make your list so that sequences are randomised between trials, rather than trials themselves. So, if I have a list like: > Slide1Word,Slide2Word,Slide3Word,Slide4Word > [Distractor:1],[Target:1],[Distractor:2],Target:2],[Distractor:3] > [Distractor:1],[Target:1],[Distractor:2],[Distractor:3],[Target:2] > [Distractor:1],[Distractor:2],[Target1],[Distractor:3],[Target:2] > ... > And the list randomises between these 3 sequences, 1) there's no way that two targets can come after another, 2) targets/distractors are randomised and 3) orders are randomised to a very safe degree (since it's unlikely that for one participant, for example, all targets will come relatively to the end). > Hope that helps. > Best, > Mich > > Michiel Spapé > Research Fellow > Perception & Action group > University of Nottingham > School of Psychologywww.cognitology.eu > > -----Original Message----- > From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of David McFarlane > Sent: 21 July 2011 22:05 > To: e-prime at googlegroups.com > Subject: Re: How to avoid presenting targets consecutively > > Micah, > > Great answer.  I often get so wrapped up in looking for sophisticated > automated solutions that I overlook the simple ones, and what you > recommend is exactly what we do for fMRI in order to avoid problems > with accidental multicollinearity (which flusters correlation & > deconvolution analyses).  And as it turns out, this answer also > appeared in a discussion athttp://support.pstnet.com/forum/Topic3166-5-1.aspx. > > -- David McFarlane, Professional Faultfinder > > >Just as a general comment, and certainly not the best solution: > > >I generally do my stimulus randomizations outside of e-prime. It's > >much easier to specific a pseudo-random or fully random sequence of > >stimuli outside of e-prime (in excel for example) and to then import > >it into one triallist that is sequentially sampled. This way you can > >randomize the list while keeping a look out for exactly the kinds of > >problem you mention. > > >Hope that helps, > >Micah > > >Mark A wrote: > > > Dear E-Prime group, > > > I am fairly new to E-Prime, but thus far have found online discussions > > > within the group, as well as PST instructions and examples that have > > > allowed me to program everything required, with one exception. The > > > experimental task is simple: A participant listens to a series of > > > words and presses a button whenever a particular word is heard (i.e., > > > the target word, "apple" in the example below). The target word is > > > presented 4 times. > > > > My problem is this: I wish to present a series of stimuli (.wav files) > > > randomly, with the restriction that I do not want "Target" files to be > > > presented consecutively. Rather, I want them to be separated by at > > > least one distractor (or non-target). > > > > To illustrate, this is an excerpt from one of my lists: > > > Weight        Nested  Procedure       Sound           Talker  Target  SoundDur > > > 1                             MAppleTrial     m1apple.wav     m1 > >            yes             422 > > > 1                             MAppleTrial     f4apple.wav     f4 > >            yes             546 > > > 1                             MAppleTrial     m1apple.wav     m1 > >            yes             422 > > > 1                             MAppleTrial     f4apple.wav     f4 > >            yes             546 > > > 1                             MAppleTrial     m2bear.wav      m2 > >            no              332 > > > 1                             MAppleTrial     f3bin.wav       f3 > >            no              375 > > > 1                             MAppleTrial     m3cat.wav > >    m3              no              383 > > > 1                             MAppleTrial     f2chalk.wav     f2 > >            no              586 > > > ..... and so forth (there are 4 targets and 23 distractors). > > > > Currently, I have the list set to "Random", however, this does not > > > guarantee that the Target files (top 4 rows) will not occur > > > consecutively. I think that the solution will involve a conditional > > > statement (perhaps using In line) comparing whether the previous file > > > presented was a target, but I am unsure how to implement this. > > > > An additional consideration is what to do if there are only 2 cycles > > > left, and the two files left are both target files. If this is very > > > hard to avoid, I am willing to live with this, as it is unlikely to > > > occur very often. Any tips or links to helpful discussions on similar > > > topics will be very much appreciated. > > -- > You received this message because you are subscribed to the Google Groups "E-Prime" group. > To post to this group, send email to e-prime at googlegroups.com. > To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. > For more options, visit this group athttp://groups.google.com/group/e-prime?hl=en. > > This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it.   Please do not use, copy or disclose the information contained in this message or in any attachment.  Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. > > This message has been checked for viruses but the contents of an attachment > may still contain software viruses which could damage your computer system: > you are advised to perform your own checks. Email communications with the > University of Nottingham may be monitored as permitted by UK legislation. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Fri Jul 22 15:48:10 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Fri, 22 Jul 2011 11:48:10 -0400 Subject: How can I implement pseudo-random selection from a list? In-Reply-To: <3041d123-7b93-438c-95bc-e33eb4dc1452@f35g2000vbr.googlegro ups.com> Message-ID: Tobias, If you widen your search to simply "random", you might find even more useful discussion. -- David McFarlane, Professional Faultfinder At 7/22/2011 09:50 AM Friday, you wrote: >okay, if i enter "pseudo-random", I find it. Let's discuss it there >and close this branch. > >On 22 Jul., 15:40, Tobias wrote: > > Yeah, I tried antering "pseudorandom" but there weren't any helpful > > discussions. And no recent ones, especially. > > > > Didn't look at the PST forum > > > > On 22 Jul., 15:23, David McFarlane wrote: > > > > > Tobias, > > > > > This has been discussed at length time and time again both in this > > > Group and on the PST Forum (including this very week). Did you try > > > doing a search for this topic on the discussion groups? > > > > > -- David McFarlane, Professional Faultfinder > > > > > At 7/22/2011 09:08 AM Friday, you wrote: > > > > > >Dear all, > > > > > >again a rather elementary issue stroke me when I was testing a new > > > >paradigm. When I have four target types, it often happens that one of > > > >them is used 10 times in a row. Let's not discuss how random E-Primes > > > >"random" is (I don't really trust it!). But: How can I implement a > > > >pseudorandom selection from a list? > > > > > >Let's say I want E-Prime to choose randomly trials from a list, but > > > >one of the four target types must not be repeated more than twice in a > > > >row. > > > > > >I didn't find anything like that in the options, maybe some code > > > >helps. Has anyone of you ever tried to do such a thing? > > > > > >Looking forward to reading your answers! > > > > > >Best, > > > >Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Fri Jul 22 15:58:09 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Fri, 22 Jul 2011 11:58:09 -0400 Subject: How to avoid presenting targets consecutively In-Reply-To: Message-ID: Tobias, At 7/22/2011 10:06 AM Friday, you wrote: >Unfortunately there is no command "draw new trials" > >That would be my way to go. Any hints? The closest such commands would be List.GetNextAttrib and List.PeekAttrib (see those topics in the E-Basic Help facility). But I don't think those will solve your problem, at least they did not provide a solution for me when I had to do some particulary fussy randomization with constraints (aka conditional randomisation). (And before you ask, we worked around it first by simply discarding trials during analysis that failed to meet the randomization criteria, and later by doing the "make one suitable random order and use that for everyone" trick. It's trying to do all this "on-the-fly" that gets us tied into knots.) -- David McFarlane, Professional Faultfinder. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From tobias.fw at gmail.com Fri Jul 22 16:14:20 2011 From: tobias.fw at gmail.com (Tobias) Date: Fri, 22 Jul 2011 09:14:20 -0700 Subject: How to avoid presenting targets consecutively In-Reply-To: <09DAEA8BC192C94EB62C8E71FC35A5D92F80387A4F@EXCHANGE3.ad.nottingham.ac.uk> Message-ID: HI Michiel, I am afraid I don't quite understand these two options. What do you mean by "all the legal repetition types"? I have 416 trial types, I can't just have a look for all legal repetitions. Furthermore, I don't know how to generate a trial sequence. Is there a command for that? Anyway, thanks for your help and time! Tobias On 22 Jul., 17:37, Michiel Spape wrote: > Hi Tobias, > I don't think David specifically meant my example when he said an answer has been offered time and again. What you are looking for tends to be called conditional randomisation, which is usually done in such a way as to either > ----- > 1. Figure out all the legal repetition types > 2. Build trial list > 3. Run trial list. > ----- > 1. Generate one trial sequence (dist-dist-targ-dist-targ) etc, > 2. If 1) is illegal, goto 1. > ... but many more ways are possible. > > Making a list shouldn't be too hard, and indeed, if you have that, List.Run works if you really must "draw a trial". > Best, > Mich > > Michiel Spapé > Research Fellow > Perception & Action group > University of Nottingham > School of Psychologywww.cognitology.eu > > -----Original Message----- > From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of Tobias > Sent: 22 July 2011 15:06 > To: E-Prime > Subject: Re: How to avoid presenting targets consecutively > > I have a similar problem. In a visual search experiment, I have four > target types and it happens often that one of them is used 10 times in > a row. Let's not discuss how random E-Primes "random" is (I don't > really trust it!). > > But: How can I implement a pseudorandom selection from a list? Let's > say I want E-Prime to choose randomly trials from a list, but one of > the four target types must not be repeated more than twice in a row. > > I see your answers here, but I think we have to tell apart two things > here: No repitition of stimuli within a trial (e.g. attentional blink) > on one side and no repition from trial to trial (e.g. two target types > in visual search) on the other side. > > Michiel's solution works perfectly for the former case I think. But I > don't see any way of implementing that for my case. Micah's solution > might be a good idea, but it is not very handy if you want a different > random order of trials for each subject. > > I guess it would be best if there is a way to make this in code. For > example, E-Prime could record the recent trial types: > > target_t1 = target_t2 > target_t2 = c.getattrib("targettype") > > and then, E-Prime could check each new trial for repition: > > if c.getattrib("targettype")=target_t1 or > c.getattrib("targettype")=target_t2 then "draw new trial". > > Unfortunately there is no command "draw new trials" > > That would be my way to go. Any hints? > > On 22 Jul., 11:02, Michiel Spape > wrote: > > Hi all, > > Pseudo- (or actually offline) randomisation, would work depending on the task and duration (if indeed fMRI, I'd go for that - but EEG with hundreds of trials, not so much). Another answer may be found inspired in an old trick for programming an attentional blink (see my post here:http://www.google.co.uk/url?sa=t&source=web&cd=4&ved=0CDoQFjAD&url=ht...) > > > Outtake: > > ----------- > > If the image-sequence is a procedure in a blocklist, make that something like > > (start procedure)-->imagedisplay1-->imagedisplay2-->...-->imagedisplay9 > > Let the blocklist have 9 attributes: "imagefile1", "imagefile2",.., "imagefile9", and two nested lists: distracters and targets, set them both to randomise. Give them both an attribute, respectively "distracter" and "target". Fill these attributes with all the targets and distracters you like. Let these lists randomise. > > Set the filename properties of the 9 imagedisplays to [imagefile1], [imagefile2], .., [imagefile9]. > > Set the attributes of imagefile1 to 9 (i.e. in the blocklist) to > > [distracter:1] > > [distracter:2] > > [distracter:3] > > [distracter:4] > > [distracter:5] > > [target:1] > > [distracter:6] > > [distracter:7] > > [distracter:8] > > > For a trial sequence in which the 6th display is the different (i.e. target, odd) picture. Obviously, you need two more lines, for the other 7th or 8th image to be the target. > > ---------------- > > > Given that you want something like distractor/distractor/distractor/target/distractor... etc, it may well be best to programme your experiment such that rather than having a "target" trial, you have a number of slides (or whatnots) after another in a single trial. You can then make your list so that sequences are randomised between trials, rather than trials themselves. So, if I have a list like: > > Slide1Word,Slide2Word,Slide3Word,Slide4Word > > [Distractor:1],[Target:1],[Distractor:2],Target:2],[Distractor:3] > > [Distractor:1],[Target:1],[Distractor:2],[Distractor:3],[Target:2] > > [Distractor:1],[Distractor:2],[Target1],[Distractor:3],[Target:2] > > ... > > And the list randomises between these 3 sequences, 1) there's no way that two targets can come after another, 2) targets/distractors are randomised and 3) orders are randomised to a very safe degree (since it's unlikely that for one participant, for example, all targets will come relatively to the end). > > Hope that helps. > > Best, > > Mich > > > Michiel Spapé > > Research Fellow > > Perception & Action group > > University of Nottingham > > School of Psychologywww.cognitology.eu > > > -----Original Message----- > > From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of David McFarlane > > Sent: 21 July 2011 22:05 > > To: e-prime at googlegroups.com > > Subject: Re: How to avoid presenting targets consecutively > > > Micah, > > > Great answer.  I often get so wrapped up in looking for sophisticated > > automated solutions that I overlook the simple ones, and what you > > recommend is exactly what we do for fMRI in order to avoid problems > > with accidental multicollinearity (which flusters correlation & > > deconvolution analyses).  And as it turns out, this answer also > > appeared in a discussion athttp://support.pstnet.com/forum/Topic3166-5-1.aspx. > > > -- David McFarlane, Professional Faultfinder > > > >Just as a general comment, and certainly not the best solution: > > > >I generally do my stimulus randomizations outside of e-prime. It's > > >much easier to specific a pseudo-random or fully random sequence of > > >stimuli outside of e-prime (in excel for example) and to then import > > >it into one triallist that is sequentially sampled. This way you can > > >randomize the list while keeping a look out for exactly the kinds of > > >problem you mention. > > > >Hope that helps, > > >Micah > > > >Mark A wrote: > > > > Dear E-Prime group, > > > > I am fairly new to E-Prime, but thus far have found online discussions > > > > within the group, as well as PST instructions and examples that have > > > > allowed me to program everything required, with one exception. The > > > > experimental task is simple: A participant listens to a series of > > > > words and presses a button whenever a particular word is heard (i.e., > > > > the target word, "apple" in the example below). The target word is > > > > presented 4 times. > > > > > My problem is this: I wish to present a series of stimuli (.wav files) > > > > randomly, with the restriction that I do not want "Target" files to be > > > > presented consecutively. Rather, I want them to be separated by at > > > > least one distractor (or non-target). > > > > > To illustrate, this is an excerpt from one of my lists: > > > > Weight        Nested  Procedure       Sound           Talker  Target  SoundDur > > > > 1                             MAppleTrial     m1apple.wav     m1 > > >            yes             422 > > > > 1                             MAppleTrial     f4apple.wav     f4 > > >            yes             546 > > > > 1                             MAppleTrial     m1apple.wav     m1 > > >            yes             422 > > > > 1                             MAppleTrial     f4apple.wav     f4 > > >            yes             546 > > > > 1                             MAppleTrial     m2bear.wav      m2 > > >            no              332 > > > > 1                             MAppleTrial     f3bin.wav       f3 > > >            no              375 > > > > 1                             MAppleTrial     m3cat.wav > > >    m3              no              383 > > > > 1                             MAppleTrial     f2chalk.wav     f2 > > >            no              586 > > > > ..... and so forth (there are 4 targets and 23 distractors). > > > > > Currently, I have the list set to "Random", however, this does not > > > > guarantee that the Target files (top 4 rows) will not occur > > > > consecutively. I think that the solution will involve a conditional > > > > statement (perhaps using In line) comparing whether the previous file > > > > presented was a target, but I am unsure how to implement this. > > > > > An additional consideration is what to do if there are only 2 cycles > > > > left, and the two files left are both target files. If this is very > > > > hard to avoid, I am willing to live with this, as it is unlikely to > > > > occur very often. Any tips or links to helpful discussions on similar > > > > topics will be very much appreciated. > > > -- > > You received this message because you are subscribed to the Google Groups "E-Prime" group. > > To post to this group, send email to e-prime at googlegroups.com. > > To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. > > For more options, visit this group athttp://groups.google.com/group/e-prime?hl=en. > > > This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it.   Please do not use, copy or disclose the information contained in this message or in any attachment.  Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. > > > This message has been checked for viruses but the contents of an attachment > > may still contain software viruses which could damage your computer system: > > you are advised to perform your own checks. Email communications with the > > University of Nottingham may be monitored as > > ... > > Erfahren Sie mehr » -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Fri Jul 22 16:27:06 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Fri, 22 Jul 2011 12:27:06 -0400 Subject: How to avoid presenting targets consecutively In-Reply-To: <1c2daa35-e8a2-46aa-9727-3e9d7908a1f9@cq10g2000vbb.googlegr oups.com> Message-ID: Tobias, PMJI... At 7/22/2011 12:14 PM Friday, you wrote: >Furthermore, I don't know how to generate a trial sequence. Is there >a command for that? Many of us use something as basic as an Excel worksheet, or maybe a script written in Perl or whatever. Basically, I think Michiel just meant to build a trial list *outside* of E-Prime. From there you could either manually look at the generated trial list and manually make adjustments until it meets your criteria, or use some Excel forumulas or macros or a Perl script or whatever to do that for you. No, probably not trivial, but there you go. Folks like us have struggled with this for decades, just browse through the scientific literature. -- David McFarlane And remember, if the ground-breaking research we wish to do were not so hard, then someone else would have already done it. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From hester.duffy at gmail.com Fri Jul 22 16:30:41 2011 From: hester.duffy at gmail.com (Hester Duffy) Date: Fri, 22 Jul 2011 17:30:41 +0100 Subject: How to avoid presenting targets consecutively In-Reply-To: <4e29a4db.224dec0a.7fbb.ffffde57SMTPIN_ADDED@gmr-mx.google.com> Message-ID: On Fri, Jul 22, 2011 at 5:27 PM, David McFarlane wrote: > At 7/22/2011 12:14 PM Friday, you wrote: > >> Furthermore, I don't know how to generate a trial sequence. Is there a >> command for that? >> > > Many of us use something as basic as an Excel worksheet, or maybe a script > written in Perl or whatever. Basically, I think Michiel just meant to build > a trial list *outside* of E-Prime. > > From there you could either manually look at the generated trial list and > manually make adjustments until it meets your criteria, or use some Excel > forumulas or macros or a Perl script or whatever to do that for you. No, > probably not trivial, but there you go. Folks like us have struggled with > this for decades, just browse through the scientific literature. > There's a free piece of software called Mix which does this sort of thing; you can download it from http://www.mrc-cbu.cam.ac.uk/people/maarten.van-casteren/mixandmatch.html. H -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Michiel.Spape at nottingham.ac.uk Mon Jul 25 09:45:56 2011 From: Michiel.Spape at nottingham.ac.uk (Michiel Spape) Date: Mon, 25 Jul 2011 10:45:56 +0100 Subject: How to avoid presenting targets consecutively In-Reply-To: <1c2daa35-e8a2-46aa-9727-3e9d7908a1f9@cq10g2000vbb.googlegroups.com> Message-ID: Hi Tobias, 416 trial types, as in, none of these may be repeated? I was going to copy-paste a bit of code to show you that yes, you can "just have a look", but it took me longer to explain exactly how to fit in this with your earlier question than I thought was worthwhile (given that I had only minutes). It's Monday, however, so I'll give it a go. In this experiment, subjects saw a line of 5 numbers, each in the range 1-3. After memorising a sequence, they were asked to tap each number, with a number indicating a finger (1->index, 2->middle, 3->ring). Crucially, we only wanted sequences to make use of ALL three fingers (sequence 12121 therefore not being OK), and we wanted two conditions: simple having 2 transitions between fingers (e.g. 11123, with transitions here from 1 to 2, and from 2 to 3) and complex having 4 transitions (e.g. 13231). So, there you have it, how to generate two lists from a total number of 3x3x3x3x3 (=243) trial types, if you don't want to do the (pretty simple) thing like going through it in excel? --------------- dim sequences(3*3*3*3*3) as long dim nfingers(3*3*3*3*3) as integer dim ntransitions(3*3*3*3*3) as integer dim seqcount as integer dim count1 as integer dim count2 as integer dim count3 as integer dim transitions as integer dim seq(5) as integer dim r1 as integer dim r2 as integer dim r3 as integer dim r4 as integer dim r5 as integer dim to5 as integer for r1 = 1 to 3 for r2 = 1 to 3 for r3 = 1 to 3 for r4 = 1 to 3 for r5 = 1 to 3 debug.print seqcount & r1 & r2 & r3 & r4 & r5 sequences(seqcount) = clng(r1 * 10000) + clng(r2 * 1000 + r3 * 100 + r4 * 10 + r5) seq(1) = r1 seq(2) = r2 seq(3) = r3 seq(4) = r4 seq(5) = r5 count1 = 0 count2 = 0 count3 = 0 transitions = 0 for to5 = 1 to 5 if seq(to5) = 1 then count1 = 1 if seq(to5) = 2 then count2 = 1 if seq(to5) = 3 then count3 = 1 if to5 > 1 and seq(to5) <> seq(to5-1) then transitions = transitions + 1 next to5 nfingers(seqcount) = count1 + count2 + count3 ntransitions(seqcount) = transitions seqcount = seqcount + 1 next r5 next r4 next r3 next r2 next r1 'from here we know all trial types (also including the other ones). Now we split them up according to conditions. Each list is named after number of fingers (Fx) and transitions (Tx). for transitions = 0 to seqcount if nfingers(transitions) = 1 then F1T0.AddLevel F1T0.Size + 1 F1T0.SetWeight cstr(F1T0.Size), "1" F1T0.SetAttrib cstr(F1T0.Size), "Sequence", cstr(sequences(transitions)) end if if nfingers(transitions) = 2 AND ntransitions(transitions) = 1 then F2T1.AddLevel F2T1.Size + 1 F2T1.SetWeight cstr(F2T1.Size), "1" F2T1.SetAttrib cstr(F2T1.Size), "Sequence", cstr(sequences(transitions)) end if if nfingers(transitions) = 2 AND ntransitions(transitions) = 2 then F2T2.AddLevel F2T2.Size + 1 F2T2.SetWeight cstr(F2T2.Size), "1" F2T2.SetAttrib cstr(F2T2.Size), "Sequence", cstr(sequences(transitions)) end if if nfingers(transitions) = 2 AND ntransitions(transitions) = 3 then F2T3.AddLevel F2T3.Size + 1 F2T3.SetWeight cstr(F2T3.Size), "1" F2T3.SetAttrib cstr(F2T3.Size), "Sequence", cstr(sequences(transitions)) end if if nfingers(transitions) = 2 AND ntransitions(transitions) = 4 then F2T4.AddLevel F2T4.Size + 1 F2T4.SetWeight cstr(F2T4.Size), "1" F2T4.SetAttrib cstr(F2T4.Size), "Sequence", cstr(sequences(transitions)) end if if nfingers(transitions) = 3 AND ntransitions(transitions) = 2 then F3T2.AddLevel F3T2.Size + 1 F3T2.SetWeight cstr(F3T2.Size), "1" F3T2.SetAttrib cstr(F3T2.Size), "Sequence", cstr(sequences(transitions)) end if if nfingers(transitions) = 3 AND ntransitions(transitions) = 3 then F3T3.AddLevel F3T3.Size + 1 F3T3.SetWeight cstr(F3T3.Size), "1" F3T3.SetAttrib cstr(F3T3.Size), "Sequence", cstr(sequences(transitions)) end if if nfingers(transitions) = 3 AND ntransitions(transitions) = 4 then if (cstr(sequences(transitions)) <> "12321") AND (cstr(sequences(transitions)) <> "32123") then F3T4.AddLevel F3T4.Size + 1 F3T4.SetWeight cstr(F3T4.Size), "1" F3T4.SetAttrib cstr(F3T4.Size), "Sequence", cstr(sequences(transitions)) end if end if next transitions F1T0.Reset F2T1.Reset F2T2.Reset F2T3.Reset F2T4.Reset F3T2.Reset F3T3.Reset F3T4.Reset ------------- And voila, 8 lists are generated, which can be inserted as nested lists anywhere you like. Anyway, even if you don't decide to use such tricks, at least it's a pretty nice example of building custom lists. As a side note on experimental psychology. I know enough people who want to completely do away with repetitions in experiments, and know the reasoning behind it. Here's a few considerations from the opposite perspective: - if the number of stimuli is large enough (say, 416 trial types), the chance of re-occurrences is really small, especially since we generally draw samples without replacement. Thus, there's only one trial for your list of 416 trial types in which a re-occurrence is possible, namely the first sample. If you have to do an awful lot of programming just to control for that, you are wasting your time (unless you think you might learn something). - Reoccurrences are completely normal in life, as such. Controlling for it necessarily induces non-randomness which may create expectations. I find it usually more helpful to control for it afterwards, statistically. - Reoccurrences are interesting and may provide insight into your experimental paradigm which you would otherwise not be able to gain. Much of the field of cognitive control, for instance, would not have been there if somebody had not looked into what happens if conflicting trials are repeated. That is not to say one might not have perfectly valid reasons for doing conditional randomisation (not the same as pseudo-randomisation; pseudorandom merely means the numbers are gained by deterministic processes, but they may well possess the quality of statistical randomness). As a note of caution however, it can be good not to be too anal about it. Best, Mich Michiel Spapé Research Fellow Perception & Action group University of Nottingham School of Psychology www.cognitology.eu -----Original Message----- From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of Tobias Sent: 22 July 2011 17:14 To: E-Prime Subject: Re: How to avoid presenting targets consecutively HI Michiel, I am afraid I don't quite understand these two options. What do you mean by "all the legal repetition types"? I have 416 trial types, I can't just have a look for all legal repetitions. Furthermore, I don't know how to generate a trial sequence. Is there a command for that? Anyway, thanks for your help and time! Tobias On 22 Jul., 17:37, Michiel Spape wrote: > Hi Tobias, > I don't think David specifically meant my example when he said an answer has been offered time and again. What you are looking for tends to be called conditional randomisation, which is usually done in such a way as to either > ----- > 1. Figure out all the legal repetition types > 2. Build trial list > 3. Run trial list. > ----- > 1. Generate one trial sequence (dist-dist-targ-dist-targ) etc, > 2. If 1) is illegal, goto 1. > ... but many more ways are possible. > > Making a list shouldn't be too hard, and indeed, if you have that, List.Run works if you really must "draw a trial". > Best, > Mich > > Michiel Spapé > Research Fellow > Perception & Action group > University of Nottingham > School of Psychologywww.cognitology.eu > > -----Original Message----- > From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of Tobias > Sent: 22 July 2011 15:06 > To: E-Prime > Subject: Re: How to avoid presenting targets consecutively > > I have a similar problem. In a visual search experiment, I have four > target types and it happens often that one of them is used 10 times in > a row. Let's not discuss how random E-Primes "random" is (I don't > really trust it!). > > But: How can I implement a pseudorandom selection from a list? Let's > say I want E-Prime to choose randomly trials from a list, but one of > the four target types must not be repeated more than twice in a row. > > I see your answers here, but I think we have to tell apart two things > here: No repitition of stimuli within a trial (e.g. attentional blink) > on one side and no repition from trial to trial (e.g. two target types > in visual search) on the other side. > > Michiel's solution works perfectly for the former case I think. But I > don't see any way of implementing that for my case. Micah's solution > might be a good idea, but it is not very handy if you want a different > random order of trials for each subject. > > I guess it would be best if there is a way to make this in code. For > example, E-Prime could record the recent trial types: > > target_t1 = target_t2 > target_t2 = c.getattrib("targettype") > > and then, E-Prime could check each new trial for repition: > > if c.getattrib("targettype")=target_t1 or > c.getattrib("targettype")=target_t2 then "draw new trial". > > Unfortunately there is no command "draw new trials" > > That would be my way to go. Any hints? > > On 22 Jul., 11:02, Michiel Spape > wrote: > > Hi all, > > Pseudo- (or actually offline) randomisation, would work depending on the task and duration (if indeed fMRI, I'd go for that - but EEG with hundreds of trials, not so much). Another answer may be found inspired in an old trick for programming an attentional blink (see my post here:http://www.google.co.uk/url?sa=t&source=web&cd=4&ved=0CDoQFjAD&url=ht...) > > > Outtake: > > ----------- > > If the image-sequence is a procedure in a blocklist, make that something like > > (start procedure)-->imagedisplay1-->imagedisplay2-->...-->imagedisplay9 > > Let the blocklist have 9 attributes: "imagefile1", "imagefile2",.., "imagefile9", and two nested lists: distracters and targets, set them both to randomise. Give them both an attribute, respectively "distracter" and "target". Fill these attributes with all the targets and distracters you like. Let these lists randomise. > > Set the filename properties of the 9 imagedisplays to [imagefile1], [imagefile2], .., [imagefile9]. > > Set the attributes of imagefile1 to 9 (i.e. in the blocklist) to > > [distracter:1] > > [distracter:2] > > [distracter:3] > > [distracter:4] > > [distracter:5] > > [target:1] > > [distracter:6] > > [distracter:7] > > [distracter:8] > > > For a trial sequence in which the 6th display is the different (i.e. target, odd) picture. Obviously, you need two more lines, for the other 7th or 8th image to be the target. > > ---------------- > > > Given that you want something like distractor/distractor/distractor/target/distractor... etc, it may well be best to programme your experiment such that rather than having a "target" trial, you have a number of slides (or whatnots) after another in a single trial. You can then make your list so that sequences are randomised between trials, rather than trials themselves. So, if I have a list like: > > Slide1Word,Slide2Word,Slide3Word,Slide4Word > > [Distractor:1],[Target:1],[Distractor:2],Target:2],[Distractor:3] > > [Distractor:1],[Target:1],[Distractor:2],[Distractor:3],[Target:2] > > [Distractor:1],[Distractor:2],[Target1],[Distractor:3],[Target:2] > > ... > > And the list randomises between these 3 sequences, 1) there's no way that two targets can come after another, 2) targets/distractors are randomised and 3) orders are randomised to a very safe degree (since it's unlikely that for one participant, for example, all targets will come relatively to the end). > > Hope that helps. > > Best, > > Mich > > > Michiel Spapé > > Research Fellow > > Perception & Action group > > University of Nottingham > > School of Psychologywww.cognitology.eu > > > -----Original Message----- > > From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of David McFarlane > > Sent: 21 July 2011 22:05 > > To: e-prime at googlegroups.com > > Subject: Re: How to avoid presenting targets consecutively > > > Micah, > > > Great answer. I often get so wrapped up in looking for sophisticated > > automated solutions that I overlook the simple ones, and what you > > recommend is exactly what we do for fMRI in order to avoid problems > > with accidental multicollinearity (which flusters correlation & > > deconvolution analyses). And as it turns out, this answer also > > appeared in a discussion athttp://support.pstnet.com/forum/Topic3166-5-1.aspx. > > > -- David McFarlane, Professional Faultfinder > > > >Just as a general comment, and certainly not the best solution: > > > >I generally do my stimulus randomizations outside of e-prime. It's > > >much easier to specific a pseudo-random or fully random sequence of > > >stimuli outside of e-prime (in excel for example) and to then import > > >it into one triallist that is sequentially sampled. This way you can > > >randomize the list while keeping a look out for exactly the kinds of > > >problem you mention. > > > >Hope that helps, > > >Micah > > > >Mark A wrote: > > > > Dear E-Prime group, > > > > I am fairly new to E-Prime, but thus far have found online discussions > > > > within the group, as well as PST instructions and examples that have > > > > allowed me to program everything required, with one exception. The > > > > experimental task is simple: A participant listens to a series of > > > > words and presses a button whenever a particular word is heard (i.e., > > > > the target word, "apple" in the example below). The target word is > > > > presented 4 times. > > > > > My problem is this: I wish to present a series of stimuli (.wav files) > > > > randomly, with the restriction that I do not want "Target" files to be > > > > presented consecutively. Rather, I want them to be separated by at > > > > least one distractor (or non-target). > > > > > To illustrate, this is an excerpt from one of my lists: > > > > Weight Nested Procedure Sound Talker Target SoundDur > > > > 1 MAppleTrial m1apple.wav m1 > > > yes 422 > > > > 1 MAppleTrial f4apple.wav f4 > > > yes 546 > > > > 1 MAppleTrial m1apple.wav m1 > > > yes 422 > > > > 1 MAppleTrial f4apple.wav f4 > > > yes 546 > > > > 1 MAppleTrial m2bear.wav m2 > > > no 332 > > > > 1 MAppleTrial f3bin.wav f3 > > > no 375 > > > > 1 MAppleTrial m3cat.wav > > > m3 no 383 > > > > 1 MAppleTrial f2chalk.wav f2 > > > no 586 > > > > ..... and so forth (there are 4 targets and 23 distractors). > > > > > Currently, I have the list set to "Random", however, this does not > > > > guarantee that the Target files (top 4 rows) will not occur > > > > consecutively. I think that the solution will involve a conditional > > > > statement (perhaps using In line) comparing whether the previous file > > > > presented was a target, but I am unsure how to implement this. > > > > > An additional consideration is what to do if there are only 2 cycles > > > > left, and the two files left are both target files. If this is very > > > > hard to avoid, I am willing to live with this, as it is unlikely to > > > > occur very often. Any tips or links to helpful discussions on similar > > > > topics will be very much appreciated. > > > -- > > You received this message because you are subscribed to the Google Groups "E-Prime" group. > > To post to this group, send email to e-prime at googlegroups.com. > > To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. > > For more options, visit this group athttp://groups.google.com/group/e-prime?hl=en. > > > This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. > > > This message has been checked for viruses but the contents of an attachment > > may still contain software viruses which could damage your computer system: > > you are advised to perform your own checks. Email communications with the > > University of Nottingham may be monitored as > > ... > > Erfahren Sie mehr » -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From rp677 at york.ac.uk Mon Jul 25 16:31:01 2011 From: rp677 at york.ac.uk (Becky Prince) Date: Mon, 25 Jul 2011 09:31:01 -0700 Subject: threading SoundOut/Wait and TextDisplay objects Message-ID: Dear Forum, Can anyone tell me how to set up multiple threads in E-Prime? I need separate threads for running SoundOut/Wait objects and a TextDisplay object. I'm creating a task which presents a continous loop of the following: -SoundOut1 -Wait1 -SoundOut2 -Wait2 The subject adjusts the timing of Wait1 and Wait2 using key responses, and the loop (trial) ends when the subject presses Enter. I'm using InLine scripts after each sound/wait object to check for any response and adjust the next wait timing accordingly. The problem is that I'm also presenting a TextDisplay with background/ default text, and I want to change this text display (to provide visual feedback) for 200 ms after a response, then have theTextDisplay return to the default text. I can change the TextDisplay after any response, but if I tell E-Prime to wait 200ms, then change the text again, it introduces a 200ms delay in my contionous audio/wait loop. The timing delay problem is resolved if I just set the TextDisplay object to "clear after = No", but then the response feedback display text is held on screen until the next response, which is problematic. Any thoughts and suggestions are much appreciated! Becky p.s. Apologies if this has been addressed in E-Prime support/forums already - I've searched for related topics but couldn't find a solution. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Mon Jul 25 17:44:47 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Mon, 25 Jul 2011 13:44:47 -0400 Subject: threading SoundOut/Wait and TextDisplay objects In-Reply-To: Message-ID: Becky, Stock reminder: 1) I do not work for PST. 2) PST's trained staff takes any and all questions at http://support.pstnet.com/e%2Dprime/support/login.asp , and they strive to respond to all requests in 24-48 hours -- this is pretty much their substitute for proper documentation, so make full use of it. 3) If you do get an answer from PST Web Support, please extend the courtesy of posting their reply back here for the sake of others. That said, here is my take... Offhand, I do not think that E-Prime natively supports multiple "threads" such as you would like for this task, but I hope somebody else chimes in and tells me that I am wrong. Again offhand, I think you could accomplish your end by implementing your own "event loop" directly in E-Basic code. Do a search on that term to see where I have mentioned this before, although I don't think I have ever gone into much detail. Wikipedia might have a better discussion of the topic in general. In your case your event loop would handle both timeout for your TextDisplay, and responses. -- David McFarlane, Professional Faultfinder >Can anyone tell me how to set up multiple threads in E-Prime? I need >separate threads for running SoundOut/Wait objects and a TextDisplay >object. I'm creating a task which presents a continous loop of the >following: > >-SoundOut1 >-Wait1 >-SoundOut2 >-Wait2 > >The subject adjusts the timing of Wait1 and Wait2 using key responses, >and the loop (trial) ends when the subject presses Enter. I'm using >InLine scripts after each sound/wait object to check for any response >and adjust the next wait timing accordingly. > >The problem is that I'm also presenting a TextDisplay with background/ >default text, and I want to change this text display (to provide >visual feedback) for 200 ms after a response, then have theTextDisplay >return to the default text. I can change the TextDisplay after any >response, but if I tell E-Prime to wait 200ms, then change the text >again, it introduces a 200ms delay in my contionous audio/wait loop. >The timing delay problem is resolved if I just set the TextDisplay >object to "clear after = No", but then the response feedback display >text is held on screen until the next response, which is >problematic. > >Any thoughts and suggestions are much appreciated! > >Becky > >p.s. Apologies if this has been addressed in E-Prime support/forums >already - I've searched for related topics but couldn't find a >solution. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Mon Jul 25 18:52:02 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Mon, 25 Jul 2011 14:52:02 -0400 Subject: Making movie clips for E-Prime? In-Reply-To: <4E1D84D2.1020801@ucl.ac.uk> Message-ID: Just passing on some further information that I have gleaned from other discussions: 1) MPEG-1 seems to be sort of a "lowest common denominator" [FN1] codec, and so might serve as the "safest" codec if we merely want to get a movie to work in E-Prime at all. But other codecs may provide higher performance. 2) For higher performance, we may find the best results with an .avi file that uses DIVX video and MP3 for the audio. As for codec libraries, both the true DIVX brand and ffdshow for divx should work fine. Sorry I do not have finer details on this, I am not really versed in video/audio codec lore. Much appreciated if someone could fill in the details, or provide a link to a suitable discussion elsewhere. -- David McFarlane, Professional Faultfinder [FN1] Should read, "greatest common divisor", see Wikipedia. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From pfc.groot at gmail.com Tue Jul 26 20:51:10 2011 From: pfc.groot at gmail.com (Paul Groot) Date: Tue, 26 Jul 2011 22:51:10 +0200 Subject: threading SoundOut/Wait and TextDisplay objects In-Reply-To: <4e2dab92.c9d12a0a.3c28.fffffc35SMTPIN_ADDED@gmr-mx.google.com> Message-ID: Hi Becky, I also don't think E-Basic has build-in support for running separate threads. The only way I could achieve this was by creating a separate DLL in C++ and call it from inline script. (I needed it for controlling infusions pumps, which were used for fluid delivery during an fMRI experiment). However, code in a separate DLL cannot make use of E-Prime functions, so that really limits its use. I think David already suggested the easiest workaround: just create your own event loop and handle all events (responses, timeouts) within this loop. I think you already figured out how to manage sound objects and responses. Drawing text or images on the display is also not very difficult. You could invoke 'low level' functions by using the Canvas object, or you could (re)draw existing E-Objects by invoking the Draw method. Catching the respones of the keyboard will probably the trickiest part... cheers Paul 2011/7/25 David McFarlane : > Becky, > > Stock reminder:  1) I do not work for PST.  2) PST's trained staff takes any > and all questions at http://support.pstnet.com/e%2Dprime/support/login.asp , > and they strive to respond to all requests in 24-48 hours -- this is pretty > much their substitute for proper documentation, so make full use of it.  3) > If you do get an answer from PST Web Support, please extend the courtesy of > posting their reply back here for the sake of others. > > That said, here is my take... > > Offhand, I do not think that E-Prime natively supports multiple "threads" > such as you would like for this task, but I hope somebody else chimes in and > tells me that I am wrong. > > Again offhand, I think you could accomplish your end by implementing your > own "event loop" directly in E-Basic code.  Do a search on that term to see > where I have mentioned this before, although I don't think I have ever gone > into much detail.  Wikipedia might have a better discussion of the topic in > general.  In your case your event loop would handle both timeout for your > TextDisplay, and responses. > > -- David McFarlane, Professional Faultfinder > > >> Can anyone tell me how to set up multiple threads in E-Prime?  I need >> separate threads for running SoundOut/Wait objects and a TextDisplay >> object.  I'm creating a task which presents a continous loop of the >> following: >> >> -SoundOut1 >> -Wait1 >> -SoundOut2 >> -Wait2 >> >> The subject adjusts the timing of Wait1 and Wait2 using key responses, >> and the loop (trial) ends when the subject presses Enter.  I'm using >> InLine scripts after each sound/wait object to check for any response >> and adjust the next wait timing accordingly. >> >> The problem is that I'm also presenting a TextDisplay with background/ >> default text, and I want to change this text display (to provide >> visual feedback) for 200 ms after a response, then have theTextDisplay >> return to the default text.  I can change the TextDisplay after any >> response, but if I tell E-Prime to wait 200ms, then change the text >> again, it introduces a 200ms delay in my contionous audio/wait loop. >> The timing delay problem is resolved if I just set the TextDisplay >> object to "clear after = No", but then the response feedback display >> text is held on screen until the next response, which is >> problematic. >> >> Any thoughts and suggestions are much appreciated! >> >> Becky >> >> p.s. Apologies if this has been addressed in E-Prime support/forums >> already - I've searched for related topics but couldn't find a >> solution. > > -- > You received this message because you are subscribed to the Google Groups > "E-Prime" group. > To post to this group, send email to e-prime at googlegroups.com. > To unsubscribe from this group, send email to > e-prime+unsubscribe at googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/e-prime?hl=en. > > -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From philippegoldin at gmail.com Wed Jul 27 02:10:27 2011 From: philippegoldin at gmail.com (philippe) Date: Tue, 26 Jul 2011 19:10:27 -0700 Subject: random pairing of cue word and audio file on a single slide Message-ID: I would like to randomly pair two objects (a cue word and audio file) on the same slide. The slide is a single trial lasting 13.5s I want one of three cues (react, reframe, observe) to appear with equality probability (33%) on the slide (and remain on the slide for 13.5s) along with one of 9 audio files (also presented for 13.5s). the final result would be 9 trials. 3 with react, 3 with reframe and 3 with observe cue words presented randomly 9 unique audio files presented once each randomly If a single List has 9 rows and one column for cue word and another column for audio file, and is set for random selection, will Eprime randomly pair all the cue words with audio files?? Or will random selection refer to randomly picking 1 of the 9 rows that always pairs the same cue word and audio file??? Any help will be greatly appreciated. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From Erika_Nyhus at brown.edu Wed Jul 27 18:42:38 2011 From: Erika_Nyhus at brown.edu (Erika Nyhus) Date: Wed, 27 Jul 2011 14:42:38 -0400 Subject: How to fade from slide1 to slide2 (inline?) Message-ID: I am trying to program an experiment in E Prime and was wondering if you had any tips/examples to help me out. What I am trying to do is have subjects indicate their confidence in their response by the length of time they press the response button. While they are pressing the button we would like to present a visual cue (e.g. a growing bar or changing color) indicating the length of the button press. This visual cue should stop changing as soon as they release the button and then should remain stable until the end of the trial period. Attached is a mini-experiment in which I have gotten the color of the stimuli to change (adapted from the example given here) and then remain stable until the end of the trial period. But I have three remaining issues that I would appreciate help on. First, the stimuli should only start changing colors when the response button is pressed. So I need to have the stimuli appear, as soon as the button is pressed it changes color, and then when it is released it remains that color for the remainder of the trial. Second, I need the total trial time to be 2500 ms including stimulus appearance, change in color as the button is pressed, and as the stimulus remains stable until the end of the trial period. The code I have added in Inline3 (c.setAttrib "Dur", 2500-(ResponseTime-Slide1Time) does not appear to work properly as it sometimes results in very high values (e.g. Dur=5000 ms) or negative values (e.g. Dur=-500 ms). Third, I need to log the time when the response button was pressed and when it was released to get a measure of how long the button was pressed. -- Erika Nyhus, Ph.D. Cognitive, Linguistic, and Psychological Sciences Brown University 229 Waterman St. Providence, RI 02912-1821 -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: TestImage.es2 Type: application/octet-stream Size: 30540 bytes Desc: not available URL: From baltimore.ben at gmail.com Wed Jul 27 19:30:34 2011 From: baltimore.ben at gmail.com (ben robinson) Date: Wed, 27 Jul 2011 15:30:34 -0400 Subject: Multiple choice quiz graying out incorrect answers until correct chosen In-Reply-To: Message-ID: did you ever figure this out? my suggestion would be something to have a single slide object display the question and each of four possible answers as five separate slidetext objects within that slide. enable mouse responding, and terminate the slide after a response. use HitTest to determine which answer was clicked. if the correct answer was clicked, jump to a label at the end of the trial. if an incorrect response was clicked, the next slide object in the trial procedure would redisplay everything from the original slide object but with the just-selected incorrect answer presented in gray font. and repeat. ben On Mon, Jul 18, 2011 at 11:50 AM, David Nicholson < david.averill.nicholson at gmail.com> wrote: > Hello, > > I'm creating an experiment where the participant first chooses a > difficulty level and is directed to one of three tests. I already > have this part created and working correctly. It is not the most > nicely structured program as the best way I found to accomplish this > is to use unreferenced e-objects, but it works. That is not my > current problem or what I am focusing on at the moment. But I'm open > to suggestions if a better method is known. > > What i'm currently trying to do is create a slide with a question and > four multiple choice answers. The subject will choose an answer until > the correct answer is chosen. I will be using a ranking system of > points to score them. (4pts for first try, 3 for second, etc.) I > will also require a certain percentage correct or it will kick them > out and have to restart, or just jump back to the start. > > What I cannot figure out is how to keep the same question and answers > displayed and gray out the incorrect answer(s). Then move forward to > the next question when the correct answer is picked. I've been > thinking of a few ideas but I am still unsure what the best way to > structure and write this. > > Thanks in advance for all your help! > David Nicholson > > -- > You received this message because you are subscribed to the Google Groups > "E-Prime" group. > To post to this group, send email to e-prime at googlegroups.com. > To unsubscribe from this group, send email to > e-prime+unsubscribe at googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/e-prime?hl=en. > > -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. -------------- next part -------------- An HTML attachment was scrubbed... URL: From baltimore.ben at gmail.com Wed Jul 27 19:47:32 2011 From: baltimore.ben at gmail.com (ben robinson) Date: Wed, 27 Jul 2011 15:47:32 -0400 Subject: InLine response time data logging In-Reply-To: Message-ID: in that case you would simply do "If strHit = 'Image1' Then DisplayScreen.RT = Clock.Read()" On Tue, Jul 12, 2011 at 5:36 PM, Anthony wrote: > Essentially, I want to record RT's after the "If strHit = 'Image1'" > conditions. > > On Jul 12, 2:34 pm, Anthony wrote: > > The problem that I encounter when I try to use automatic data logging > > is that it logs the first response, regardless of where it is on the > > screen. I only want to log the response time that it took for the > > subject to click within the boundaries of the box on the screen.My > > code is below, if this helps: > > > > 'This code was taken fromhttp:// > groups.google.com/group/e-prime/browse_thread/thread/6411f6b4b... > > 'and adapted for use by Anthony ******* > > > > 'Designate "theState" as the Default Slide State, which is the > > 'current, ActiveState on the Slide object "Stimulus" > > Dim theState as SlideState > > Set theState = DisplayScreen.States("Default") > > Dim next_mX as Long, next_mY as Long > > Dim strHit As String > > Dim theMouseResponseData As MouseResponseData > > Do > > 'Was there a response? > > If DisplayScreen.InputMasks.Responses.Count > 0 Then > > 'Get the mouse response > > Set theMouseResponseData = > > CMouseResponseData(DisplayScreen.InputMasks.Responses(1)) > > 'Determine string name of SlideImage or > > SlideText object at > > 'mouse click coordinates. Assign that value to > > strHit > > strHit = > > theState.HitTest(theMouseResponseData.CursorX, > > theMouseResponseData.CursorY) > > 'Compare string name where mouse click > > occurred to CorrectAnswer > > 'attribute on each trial, and dispense a treat > > if they are equal (i.e., the target was clicked) > > 'NOTE: This comparison is case sensitive > > If strHit = "Image1" Then > > writeport &H378,1 > > WritePort &H378,2 > > End If > > End If > > Do Until (strHit = "Image1") > > 'Capture & process further mouse clicks: > > If (Mouse.Buttons And ebMouseButton1) Then > > Mouse.GetCursorPos next_mX, next_mY > > strHit = theState.HitTest( next_mX, > > next_mY ) > > End If > > If strHit = "Image1" Then > > writeport &H378,1 > > WritePort &H378,2 > > End If > > > > 'Loops until the button is clicked > > Loop > > Loop Until (strHit = "Image1") > > > > On Jul 12, 12:47 pm, David McFarlane wrote: > > > > > > > > > > > > > > > > > Anthony, > > > > > Stock reminder: 1) I do not work for PST. 2) PST's trained staff > > > takes any and all questions athttp:// > support.pstnet.com/e%2Dprime/support/login.asp, and they > > > strive to respond to all requests in 24-48 hours -- this is pretty > > > much their substitute for proper documentation, so make full use of > > > it. 3) If you do get an answer from PST Web Support, please extend > > > the courtesy of posting their reply back here for the sake of others. > > > > > That said, here is my take... > > > > > Not sure that I fully understand the issue, but if you have an input > > > mask launched from a stimulus object called, say, StimSlide, then you > > > may log responses at any time using inline code such as > > > > > c.SetAttrib "StimSlide.Resp", StimSlide.Resp > > > c.SetAttrib "StimSlide.RT", StimSlide.RT > > > > > You can see this for yourself just by looking at the logging code > > > automatically generated by E-Studio whenever you enable logging. > > > > > For that matter, just because you do not want the Slide to advance on > > > a mouse click does not mean that you cannot use automatice data > > > logging on it. Try enabling data logging on your stimulus Slide, and > > > see if that does it for you. > > > > > -- David McFarlane, Professional Faultfinder > > > > > >I am currently having issues logging the response time from a slide. > > > >The program setup is such that the slide does not advance until an > > > >InLine conditional has been met (the subject clicks on a box). The > > > >slide advances fine; however, the response time data is not logged > > > >because I have setup the slide properties such that it does not > > > >advance on any click (because I only want clicks in the box to > > > >advance the slide). My question is: how can I log response times > > > >from an InLine code under certain conditional circumstances? > > > > > >Thank you, > > > >Anthony > > -- > You received this message because you are subscribed to the Google Groups > "E-Prime" group. > To post to this group, send email to e-prime at googlegroups.com. > To unsubscribe from this group, send email to > e-prime+unsubscribe at googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/e-prime?hl=en. > > -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. -------------- next part -------------- An HTML attachment was scrubbed... URL: From baltimore.ben at gmail.com Wed Jul 27 20:08:34 2011 From: baltimore.ben at gmail.com (ben robinson) Date: Wed, 27 Jul 2011 16:08:34 -0400 Subject: How to avoid presenting targets consecutively In-Reply-To: <83a39d45-3cc3-4924-879b-9cfc4cd6b855@e35g2000yqc.googlegroups.com> Message-ID: maybe you've already figured out your solution maybe not. here's what i'd do. i would have a List1 with two procedures: Target and NonTarget. set List1 to random. * the Target procedure would have a List2 with two rows and one added column, WavFile. WavFile would be filled in with "[Wav]" to pull from a column by that name in a nested list. on one row you would nest the list TargetWavs (unless there were only ever a single target wav, in which case you wouldn't need to fool with a nested list), and on the other row you would nest the list NonTargetWavs. fill NonTargetWavs with all the nontarget.wav filenames under a column named Wav. * the NonTarget procedure would have a List3 with one added column, WavFile. again, if there's only a single nontarget.wav (apple.wav) you might just enter that by hand in the column, WavFile. otherwise, nest your NonTargetWavs list. adjust the weighting in List1 or in List3 to determine how many nontargets are presented between each target presentation. does that make sense? On Fri, Jul 15, 2011 at 10:18 PM, Mark A wrote: > Dear E-Prime group, > I am fairly new to E-Prime, but thus far have found online discussions > within the group, as well as PST instructions and examples that have > allowed me to program everything required, with one exception. The > experimental task is simple: A participant listens to a series of > words and presses a button whenever a particular word is heard (i.e., > the target word, "apple" in the example below). The target word is > presented 4 times. > > My problem is this: I wish to present a series of stimuli (.wav files) > randomly, with the restriction that I do not want "Target" files to be > presented consecutively. Rather, I want them to be separated by at > least one distractor (or non-target). > > To illustrate, this is an excerpt from one of my lists: > > Weight Nested Procedure Sound Talker Target SoundDur > 1 MAppleTrial m1apple.wav m1 > yes 422 > 1 MAppleTrial f4apple.wav f4 > yes 546 > 1 MAppleTrial m1apple.wav m1 > yes 422 > 1 MAppleTrial f4apple.wav f4 > yes 546 > 1 MAppleTrial m2bear.wav m2 > no 332 > 1 MAppleTrial f3bin.wav f3 > no 375 > 1 MAppleTrial m3cat.wav m3 > no 383 > 1 MAppleTrial f2chalk.wav f2 > no 586 > ..... and so forth (there are 4 targets and 23 distractors). > > Currently, I have the list set to "Random", however, this does not > guarantee that the Target files (top 4 rows) will not occur > consecutively. I think that the solution will involve a conditional > statement (perhaps using In line) comparing whether the previous file > presented was a target, but I am unsure how to implement this. > > An additional consideration is what to do if there are only 2 cycles > left, and the two files left are both target files. If this is very > hard to avoid, I am willing to live with this, as it is unlikely to > occur very often. Any tips or links to helpful discussions on similar > topics will be very much appreciated. > > -- > You received this message because you are subscribed to the Google Groups > "E-Prime" group. > To post to this group, send email to e-prime at googlegroups.com. > To unsubscribe from this group, send email to > e-prime+unsubscribe at googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/e-prime?hl=en. > > -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. -------------- next part -------------- An HTML attachment was scrubbed... URL: From baltimore.ben at gmail.com Wed Jul 27 20:17:39 2011 From: baltimore.ben at gmail.com (ben robinson) Date: Wed, 27 Jul 2011 16:17:39 -0400 Subject: How to avoid presenting targets consecutively In-Reply-To: Message-ID: here's how i'd avoid repeating the same target type 10 times in a row, without doing any If...Then stuff: i'd have a list with four rows, one for each of your target types. this list would be set to random. the weighting for all the rows would be '1'. that last part is critical. each time you call a target from this list you'd get one of the four, after the fourth call the list would reset. the 5th call to that newly reset list might return a repeat from your previous target, but only that single repeat. the 6th call to your target list would necessarily pull one of the 3 remaining target types in the list. etc. if you need to sample those 4 target types many times, you just change the number of times you pull from that list, but keep the weight of each of your 4 target types to '1' and you'll never get more than a single repeat. does that make sense? On Fri, Jul 22, 2011 at 10:06 AM, Tobias wrote: > I have a similar problem. In a visual search experiment, I have four > target types and it happens often that one of them is used 10 times in > a row. Let's not discuss how random E-Primes "random" is (I don't > really trust it!). > > But: How can I implement a pseudorandom selection from a list? Let's > say I want E-Prime to choose randomly trials from a list, but one of > the four target types must not be repeated more than twice in a row. > > I see your answers here, but I think we have to tell apart two things > here: No repitition of stimuli within a trial (e.g. attentional blink) > on one side and no repition from trial to trial (e.g. two target types > in visual search) on the other side. > > Michiel's solution works perfectly for the former case I think. But I > don't see any way of implementing that for my case. Micah's solution > might be a good idea, but it is not very handy if you want a different > random order of trials for each subject. > > I guess it would be best if there is a way to make this in code. For > example, E-Prime could record the recent trial types: > > target_t1 = target_t2 > target_t2 = c.getattrib("targettype") > > and then, E-Prime could check each new trial for repition: > > if c.getattrib("targettype")=target_t1 or > c.getattrib("targettype")=target_t2 then "draw new trial". > > Unfortunately there is no command "draw new trials" > > That would be my way to go. Any hints? > > On 22 Jul., 11:02, Michiel Spape > wrote: > > Hi all, > > Pseudo- (or actually offline) randomisation, would work depending on the > task and duration (if indeed fMRI, I'd go for that - but EEG with hundreds > of trials, not so much). Another answer may be found inspired in an old > trick for programming an attentional blink (see my post here: > http://www.google.co.uk/url?sa=t&source=web&cd=4&ved=0CDoQFjAD&url=ht...) > > > > Outtake: > > ----------- > > If the image-sequence is a procedure in a blocklist, make that something > like > > (start procedure)-->imagedisplay1-->imagedisplay2-->...-->imagedisplay9 > > Let the blocklist have 9 attributes: "imagefile1", "imagefile2",.., > "imagefile9", and two nested lists: distracters and targets, set them both > to randomise. Give them both an attribute, respectively "distracter" and > "target". Fill these attributes with all the targets and distracters you > like. Let these lists randomise. > > Set the filename properties of the 9 imagedisplays to [imagefile1], > [imagefile2], .., [imagefile9]. > > Set the attributes of imagefile1 to 9 (i.e. in the blocklist) to > > [distracter:1] > > [distracter:2] > > [distracter:3] > > [distracter:4] > > [distracter:5] > > [target:1] > > [distracter:6] > > [distracter:7] > > [distracter:8] > > > > For a trial sequence in which the 6th display is the different (i.e. > target, odd) picture. Obviously, you need two more lines, for the other 7th > or 8th image to be the target. > > ---------------- > > > > Given that you want something like > distractor/distractor/distractor/target/distractor... etc, it may well be > best to programme your experiment such that rather than having a "target" > trial, you have a number of slides (or whatnots) after another in a single > trial. You can then make your list so that sequences are randomised between > trials, rather than trials themselves. So, if I have a list like: > > Slide1Word,Slide2Word,Slide3Word,Slide4Word > > [Distractor:1],[Target:1],[Distractor:2],Target:2],[Distractor:3] > > [Distractor:1],[Target:1],[Distractor:2],[Distractor:3],[Target:2] > > [Distractor:1],[Distractor:2],[Target1],[Distractor:3],[Target:2] > > ... > > And the list randomises between these 3 sequences, 1) there's no way that > two targets can come after another, 2) targets/distractors are randomised > and 3) orders are randomised to a very safe degree (since it's unlikely that > for one participant, for example, all targets will come relatively to the > end). > > Hope that helps. > > Best, > > Mich > > > > Michiel Spapé > > Research Fellow > > Perception & Action group > > University of Nottingham > > School of Psychologywww.cognitology.eu > > > > -----Original Message----- > > From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On > Behalf Of David McFarlane > > Sent: 21 July 2011 22:05 > > To: e-prime at googlegroups.com > > Subject: Re: How to avoid presenting targets consecutively > > > > Micah, > > > > Great answer. I often get so wrapped up in looking for sophisticated > > automated solutions that I overlook the simple ones, and what you > > recommend is exactly what we do for fMRI in order to avoid problems > > with accidental multicollinearity (which flusters correlation & > > deconvolution analyses). And as it turns out, this answer also > > appeared in a discussion athttp:// > support.pstnet.com/forum/Topic3166-5-1.aspx. > > > > -- David McFarlane, Professional Faultfinder > > > > >Just as a general comment, and certainly not the best solution: > > > > >I generally do my stimulus randomizations outside of e-prime. It's > > >much easier to specific a pseudo-random or fully random sequence of > > >stimuli outside of e-prime (in excel for example) and to then import > > >it into one triallist that is sequentially sampled. This way you can > > >randomize the list while keeping a look out for exactly the kinds of > > >problem you mention. > > > > >Hope that helps, > > >Micah > > > > >Mark A wrote: > > > > Dear E-Prime group, > > > > I am fairly new to E-Prime, but thus far have found online > discussions > > > > within the group, as well as PST instructions and examples that have > > > > allowed me to program everything required, with one exception. The > > > > experimental task is simple: A participant listens to a series of > > > > words and presses a button whenever a particular word is heard (i.e., > > > > the target word, "apple" in the example below). The target word is > > > > presented 4 times. > > > > > > My problem is this: I wish to present a series of stimuli (.wav > files) > > > > randomly, with the restriction that I do not want "Target" files to > be > > > > presented consecutively. Rather, I want them to be separated by at > > > > least one distractor (or non-target). > > > > > > To illustrate, this is an excerpt from one of my lists: > > > > > Weight Nested Procedure Sound Talker Target > SoundDur > > > > > 1 MAppleTrial m1apple.wav m1 > > > yes 422 > > > > > 1 MAppleTrial f4apple.wav f4 > > > yes 546 > > > > > 1 MAppleTrial m1apple.wav m1 > > > yes 422 > > > > > 1 MAppleTrial f4apple.wav f4 > > > yes 546 > > > > > 1 MAppleTrial m2bear.wav m2 > > > no 332 > > > > > 1 MAppleTrial f3bin.wav f3 > > > no 375 > > > > > 1 MAppleTrial m3cat.wav > > > m3 no 383 > > > > > 1 MAppleTrial f2chalk.wav f2 > > > no 586 > > > > ..... and so forth (there are 4 targets and 23 distractors). > > > > > > Currently, I have the list set to "Random", however, this does not > > > > guarantee that the Target files (top 4 rows) will not occur > > > > consecutively. I think that the solution will involve a conditional > > > > statement (perhaps using In line) comparing whether the previous file > > > > presented was a target, but I am unsure how to implement this. > > > > > > An additional consideration is what to do if there are only 2 cycles > > > > left, and the two files left are both target files. If this is very > > > > hard to avoid, I am willing to live with this, as it is unlikely to > > > > occur very often. Any tips or links to helpful discussions on similar > > > > topics will be very much appreciated. > > > > -- > > You received this message because you are subscribed to the Google Groups > "E-Prime" group. > > To post to this group, send email to e-prime at googlegroups.com. > > To unsubscribe from this group, send email to > e-prime+unsubscribe at googlegroups.com. > > For more options, visit this group athttp:// > groups.google.com/group/e-prime?hl=en. > > > > This message and any attachment are intended solely for the addressee and > may contain confidential information. If you have received this message in > error, please send it back to me, and immediately delete it. Please do not > use, copy or disclose the information contained in this message or in any > attachment. Any views or opinions expressed by the author of this email do > not necessarily reflect the views of the University of Nottingham. > > > > This message has been checked for viruses but the contents of an > attachment > > may still contain software viruses which could damage your computer > system: > > you are advised to perform your own checks. Email communications with the > > University of Nottingham may be monitored as permitted by UK legislation. > > -- > You received this message because you are subscribed to the Google Groups > "E-Prime" group. > To post to this group, send email to e-prime at googlegroups.com. > To unsubscribe from this group, send email to > e-prime+unsubscribe at googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/e-prime?hl=en. > > -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. -------------- next part -------------- An HTML attachment was scrubbed... URL: From baltimore.ben at gmail.com Wed Jul 27 20:25:24 2011 From: baltimore.ben at gmail.com (ben robinson) Date: Wed, 27 Jul 2011 16:25:24 -0400 Subject: random pairing of cue word and audio file on a single slide In-Reply-To: <797bc047-f4dd-46c9-912b-587501adead0@v11g2000prn.googlegroups.com> Message-ID: random selection will randomly select one of the 9 rows, with the words and sounds already paired, if i've understood how you set up your list. instead, try this. List1 has three rows, each row has a weight of 3. each row runs the same procedure, TrialProc. there is a nested list on all three rows called WavFiles. there is an added column called CueWord. on row1 CueWord has "react", row2 has "reframe", row3 "observe". there is another added column called AudioFile. under AudioFile, every row has [Wav]. your nested list, WavFiles, add a column called Wav. you'll need 9 rows in WavFiles, and in each row under the column Wav type the name of one of your 9 audio files. set both List1 and WavFiles to random. this way, List1 will run through 9 times. 3 times it will present each of your words. each of the 9 times it runs it will call a different one of your 9 audio files from the nested list, WavFiles. hope that helps. On Tue, Jul 26, 2011 at 10:10 PM, philippe wrote: > I would like to randomly pair two objects (a cue word and audio file) > on the same slide. > > The slide is a single trial lasting 13.5s > > I want one of three cues (react, reframe, observe) to appear with > equality probability (33%) on the slide (and remain on the slide for > 13.5s) along with one of 9 audio files (also presented for 13.5s). > > the final result would be 9 trials. > > 3 with react, 3 with reframe and 3 with observe cue words presented > randomly > > 9 unique audio files presented once each randomly > > If a single List has 9 rows and one column for cue word and another > column for audio file, and is set for random selection, will Eprime > randomly pair all the cue words with audio files?? Or will random > selection refer to randomly picking 1 of the 9 rows that always pairs > the same cue word and audio file??? > > Any help will be greatly appreciated. > > -- > You received this message because you are subscribed to the Google Groups > "E-Prime" group. > To post to this group, send email to e-prime at googlegroups.com. > To unsubscribe from this group, send email to > e-prime+unsubscribe at googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/e-prime?hl=en. > > -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.averill.nicholson at gmail.com Thu Jul 28 00:40:56 2011 From: david.averill.nicholson at gmail.com (David Nicholson) Date: Wed, 27 Jul 2011 17:40:56 -0700 Subject: Multiple choice quiz graying out incorrect answers until correct chosen In-Reply-To: Message-ID: Hey Ben, Thanks for your response. I eventually got it and opted for having the participant choose a,b,c,d then press enter. This way there was not an accidental choice and they could think about it before they answer. I did it a very similar way as you described. I did end up using a single slide with four separate text boxes for a,b,c,d and one for the question of course. I then compared their answer using instr and if the accuracy was 0, i used if then statements to grey out the incorrect and just go to the beginning of the slide. This would repeat until correct. I then cleared the slide of incorrect and picked another question by random. I implemented a counter to keep score of correct and deductions, then terminated the question list once a minimum score was reached. My next step it to export this score along with subject number and session to use in the next test as a base score. I'm pretty sure I have a good idea how to write that up. I'm also looking into a way to take the data from multiple sources and automate it giving an overall score comparison. I know e- kick no longer works but I just need to devote more time to get the coding right for this. I was also thinking I may have to end up using a CSV but I would rather not as that seems like it would take too much time. If you have any ideas feel free to make suggestions. Thanks, David On Jul 27, 3:30 pm, ben robinson wrote: > did you ever figure this out? > my suggestion would be something to have a single slide object display the > question and each of four possible answers as five separate slidetext > objects within that slide.  enable mouse responding, and terminate the slide > after a response.  use HitTest to determine which answer was clicked.  if > the correct answer was clicked, jump to a label at the end of the trial.  if > an incorrect response was clicked, the next slide object in the trial > procedure would redisplay everything from the original slide object but with > the just-selected incorrect answer presented in gray font.  and repeat. > > ben > > On Mon, Jul 18, 2011 at 11:50 AM, David Nicholson < > > > > > > > > david.averill.nichol... at gmail.com> wrote: > > Hello, > > > I'm creating an experiment where the participant first chooses a > > difficulty level and is directed to one of three tests.  I already > > have this part created and working correctly.  It is not the most > > nicely structured program as the best way I found to accomplish this > > is to use unreferenced e-objects, but it works.  That is not my > > current problem or what I am focusing on at the moment.  But I'm open > > to suggestions if a better method is known. > > > What i'm currently trying to do is create a slide with a question and > > four multiple choice answers.  The subject will choose an answer until > > the correct answer is chosen.  I will be using a ranking system of > > points to score them.  (4pts for first try, 3 for second, etc.)  I > > will also require a certain percentage correct or it will kick them > > out and have to restart, or just jump back to the start. > > > What I cannot figure out is how to keep the same question and answers > > displayed and gray out the incorrect answer(s).  Then move forward to > > the next question when the correct answer is picked.  I've been > > thinking of a few ideas but I am still unsure what the best way to > > structure and write this. > > > Thanks in advance for all your help! > > David Nicholson > > > -- > > You received this message because you are subscribed to the Google Groups > > "E-Prime" group. > > To post to this group, send email to e-prime at googlegroups.com. > > To unsubscribe from this group, send email to > > e-prime+unsubscribe at googlegroups.com. > > For more options, visit this group at > >http://groups.google.com/group/e-prime?hl=en. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From baltimore.ben at gmail.com Thu Jul 28 14:39:51 2011 From: baltimore.ben at gmail.com (ben robinson) Date: Thu, 28 Jul 2011 10:39:51 -0400 Subject: Multiple choice quiz graying out incorrect answers until correct chosen In-Reply-To: Message-ID: i don't fully understand what you are asking, but one simple method for using information from one experiment in another that i've used myself is to have your first experiment create a text file and write, say, your accuracy score into the text file. save the text file with the subject number in the filename, use the same subject number in your next experiment, and have that next experiment look for a text file with the appropriate filename. open the text file, read the accuracy, and viola, you have the information from a previous experiment available to you in your next experiment. ben On Wed, Jul 27, 2011 at 8:40 PM, David Nicholson < david.averill.nicholson at gmail.com> wrote: > Hey Ben, > > Thanks for your response. I eventually got it and opted for having > the participant choose a,b,c,d then press enter. This way there was > not an accidental choice and they could think about it before they > answer. I did it a very similar way as you described. I did end up > using a single slide with four separate text boxes for a,b,c,d and one > for the question of course. I then compared their answer using instr > and if the accuracy was 0, i used if then statements to grey out the > incorrect and just go to the beginning of the slide. This would > repeat until correct. I then cleared the slide of incorrect and > picked another question by random. I implemented a counter to keep > score of correct and deductions, then terminated the question list > once a minimum score was reached. My next step it to export this > score along with subject number and session to use in the next test as > a base score. I'm pretty sure I have a good idea how to write that > up. I'm also looking into a way to take the data from multiple > sources and automate it giving an overall score comparison. I know e- > kick no longer works but I just need to devote more time to get the > coding right for this. I was also thinking I may have to end up using > a CSV but I would rather not as that seems like it would take too much > time. If you have any ideas feel free to make suggestions. > > Thanks, > David > > On Jul 27, 3:30 pm, ben robinson wrote: > > did you ever figure this out? > > my suggestion would be something to have a single slide object display > the > > question and each of four possible answers as five separate slidetext > > objects within that slide. enable mouse responding, and terminate the > slide > > after a response. use HitTest to determine which answer was clicked. if > > the correct answer was clicked, jump to a label at the end of the trial. > if > > an incorrect response was clicked, the next slide object in the trial > > procedure would redisplay everything from the original slide object but > with > > the just-selected incorrect answer presented in gray font. and repeat. > > > > ben > > > > On Mon, Jul 18, 2011 at 11:50 AM, David Nicholson < > > > > > > > > > > > > > > > > david.averill.nichol... at gmail.com> wrote: > > > Hello, > > > > > I'm creating an experiment where the participant first chooses a > > > difficulty level and is directed to one of three tests. I already > > > have this part created and working correctly. It is not the most > > > nicely structured program as the best way I found to accomplish this > > > is to use unreferenced e-objects, but it works. That is not my > > > current problem or what I am focusing on at the moment. But I'm open > > > to suggestions if a better method is known. > > > > > What i'm currently trying to do is create a slide with a question and > > > four multiple choice answers. The subject will choose an answer until > > > the correct answer is chosen. I will be using a ranking system of > > > points to score them. (4pts for first try, 3 for second, etc.) I > > > will also require a certain percentage correct or it will kick them > > > out and have to restart, or just jump back to the start. > > > > > What I cannot figure out is how to keep the same question and answers > > > displayed and gray out the incorrect answer(s). Then move forward to > > > the next question when the correct answer is picked. I've been > > > thinking of a few ideas but I am still unsure what the best way to > > > structure and write this. > > > > > Thanks in advance for all your help! > > > David Nicholson > > > > > -- > > > You received this message because you are subscribed to the Google > Groups > > > "E-Prime" group. > > > To post to this group, send email to e-prime at googlegroups.com. > > > To unsubscribe from this group, send email to > > > e-prime+unsubscribe at googlegroups.com. > > > For more options, visit this group at > > >http://groups.google.com/group/e-prime?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "E-Prime" group. > To post to this group, send email to e-prime at googlegroups.com. > To unsubscribe from this group, send email to > e-prime+unsubscribe at googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/e-prime?hl=en. > > -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ahafri at gmail.com Thu Jul 28 15:13:50 2011 From: ahafri at gmail.com (Alon Hafri) Date: Thu, 28 Jul 2011 08:13:50 -0700 Subject: How to fade from slide1 to slide2 (inline?) In-Reply-To: Message-ID: Hi Erika, I did not have a chance to look at your attached script so excuse me if I mention something you've already done, but I think I can offer a few quick tips, and maybe others can offer follow-ups or different approaches as well. I would make the Slide duration 0 and then use an Inline to control the key presses and release, the changing color effect, and the trial duration. Another thing to note is that in E-Prime registering key releases is achieved with a minus sign, so for example {SPACE} is a press and {-SPACE} is a release (likewise {1} is a press and {-1} is a release). You have to set the CollectionMode property of the InputMask to accept both presses and releases, which you can achieve I believe either in the Input Mask properties window (maybe advanced settings) or in code (Keyboard.CollectionMode = ebPressesAndReleases). First put an InLine (SetTrialStartTime) at the very beginning of the trial like this. This gets the experiment time from the start of the trial: '----------------------------------------------------------------------------- Dim lngTrialStart As Long lngTrialStart = Clock.Read '----------------------------------------------------------------------------- Then a label "Repeat" after the stimulus slide and before the next InLine, and another label "SkipInLine" after the next inline: Then the following InLine (WaitForKeypresses): '----------------------------------------------------------------------------- If Clock.Read - lngTrialStart >= 2500 Then GoTo SkipInLine Dim nResps As Long nResps = Keyboard.Responses.Count 'waits for the initial keypress If nResps > 0 Then 'loops until either a response is made or the trial time runs out: nResps = Keyboard.Responses.Count Do Until Keyboard.Responses(nResps) = "{SPACE}" If Clock.Read - lngTrialStart >= 2500 Then GoTo SkipInLine Sleep 1 Loop 'logs the keypress time: c.SetAttrib "Keypress", Clock.Read 'loops the color changing code until either the release or the trial time time runs out Do Until Keyboard.Responses(Keyboard.Responses.Count) = "{-SPACE}" If Clock.Read - lngTrialStart >= 2500 Then GoTo SkipInLine 'insert color changing code here Loop Else Sleep 1 GoTo Repeat End If 'logs the key release time: c.SetAttrib "Keyrelease", Clock.Read '----------------------------------------------------------------------------- Then after the label "SkipInLine" you can have a simple InLine (WaitForTrialEnd) that waits untilt 2500 ms has passed from the start of the trial until the trial end: '----------------------------------------------------------------------------- Do Until Clock.Read - lngTrialStart >= 2500 Sleep 1 Loop '----------------------------------------------------------------------------- So the trial structure would be something like: SetTrialStartTime (InLine) Stimulus Slide Repeat label WaitForKeypresses InLine SkipInLine label WaitForTrialEnd (InLine) That should do it. You said you have the color changing code, yes? Good luck! If anyone else has a different way, please share! Alon On Jul 27, 2:42 pm, Erika Nyhus wrote: > I am trying to program an experiment in E Prime and was wondering if you had > any tips/examples to help me out. > > What I am trying to do is have subjects indicate their confidence in their > response by the length of time they press the response button.  While they > are pressing the button we would like to present a visual cue (e.g. a > growing bar or changing color) indicating the length of the button press. > This visual cue should stop changing as soon as they release the button and > then should remain stable until the end of the trial period. > > Attached is a mini-experiment in which I have gotten the color of the > stimuli to change (adapted from the example given here) and then remain > stable until the end of the trial period.  But I have three remaining issues > that I would appreciate help on.  First, the stimuli should only start > changing colors when the response button is pressed.  So I need to have the > stimuli appear, as soon as the button is pressed it changes color, and then > when it is released it remains that color for the remainder of the trial. > Second, I need the total trial time to be 2500 ms including stimulus > appearance, change in color as the button is pressed, and as the stimulus > remains stable until the end of the trial period.  The code I have added in > Inline3 (c.setAttrib "Dur", 2500-(ResponseTime-Slide1Time) does not appear > to work properly as it sometimes results in very high values (e.g. Dur=5000 > ms) or negative values (e.g. Dur=-500 ms).  Third, I need to log the time > when the response button was pressed and when it was released to get a > measure of how long the button was pressed. > > -- > Erika Nyhus, Ph.D. > Cognitive, Linguistic, and Psychological Sciences > Brown University > 229 Waterman St. > Providence, RI 02912-1821 > >  TestImage.es2 > 40KViewDownload -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Thu Jul 28 15:28:36 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Thu, 28 Jul 2011 11:28:36 -0400 Subject: Multiple choice quiz graying out incorrect answers until correct chosen In-Reply-To: Message-ID: David, At 7/27/2011 08:40 PM Wednesday, you wrote: >I'm also looking into a way to take the data from multiple sources >and automate it giving an overall score comparison. I know e-kick >no longer works but I just need to devote more time to get the >coding right for this. I think that some people have gotten AutoIt (http://www.autoitscript.com/site/autoit ) to help with this sort of thing. If you search about the Group or the Forum you should find some earlier discussions about this. -- David McFarlane, Professional Faultfinder -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From erika.nyhus at gmail.com Thu Jul 28 16:05:06 2011 From: erika.nyhus at gmail.com (enyhus) Date: Thu, 28 Jul 2011 09:05:06 -0700 Subject: How to fade from slide1 to slide2 (inline?) In-Reply-To: <1090b649-3605-4d5c-b7c5-f69c8be887a4@fq4g2000vbb.googlegroups.com> Message-ID: Thank you so much for your help! I think this code should work for what I want to do, but I am getting the following error when I run it. Responses is not a property of the object For line: nResps = Keyboard.Responses.Count I do have the following color changing code that I plan to add once this is working: 'create all the variables you'll need: dim r as integer dim g as integer dim b as integer dim vr as string dim vb as string dim vg as string dim stepcounter as integer dim Slide1Time as integer dim ResponseTime as integer 'assign value 255 to the red green and blue channels, rgb 255,255,255 is white r=255 b=255 g=255 'map the integer values of r, g, and b onto the string variables vr, vb and vg vr$= r vb$= b vg$= g 'use the string rgb variables to modify the backgroundcolor of the textobject CSlideText(Slide1.States(Slide1.ActiveState).Objects("Text1")).forecolor=CColor (""& vr$ &","& vg$ &","& vb$ &"") 'First the values of green and blue will be decreased by 5 points, we started at 255,255,255 and this way after 50 repeats we will end at 255,0,0, which is pure red r = r g = g - 5 b = b - 5 'Map the integer values of rgb onto the string variables of rgb vr$= r vb$= b vg$= g 'Assign the new value to forecolor CSlideText(Slide1.States(Slide1.ActiveState).Objects("Text1")).forecolor=CColor (""& vr$ &","& vg$ &","& vb$ &"") Erika On Jul 28, 11:13 am, Alon Hafri wrote: > Hi Erika, > > I did not have a chance to look at your attached script so excuse me > if I mention something you've already done, but I think I can offer a > few quick tips, and maybe others can offer follow-ups or different > approaches as well. > > I would make the Slide duration 0 and then use an Inline to control > the key presses and release, the changing color effect, and the trial > duration. Another thing to note is that in E-Prime registering key > releases is achieved with a minus sign, so for example {SPACE} is a > press and {-SPACE} is a release (likewise {1} is a press and {-1} is a > release). You have to set the CollectionMode property of the InputMask > to accept both presses and releases, which you can achieve I believe > either in the Input Mask properties window (maybe advanced settings) > or in code (Keyboard.CollectionMode = ebPressesAndReleases). > > First put an InLine (SetTrialStartTime) at the very beginning of the > trial like this. This gets the experiment time from the start of the > trial: > '----------------------------------------------------------------------------- > Dim lngTrialStart As Long > lngTrialStart = Clock.Read > '----------------------------------------------------------------------------- > > Then a label "Repeat" after the stimulus slide and before the next > InLine, and another label "SkipInLine" after the next inline: > > Then the following InLine (WaitForKeypresses): > '----------------------------------------------------------------------------- > If Clock.Read - lngTrialStart >= 2500 Then GoTo SkipInLine > > Dim nResps As Long > > nResps = Keyboard.Responses.Count > > 'waits for the initial keypress > If nResps > 0 Then > >    'loops until either a response is made or the trial time runs out: >    nResps = Keyboard.Responses.Count >    Do Until Keyboard.Responses(nResps) = "{SPACE}" >       If Clock.Read - lngTrialStart >= 2500 Then GoTo SkipInLine >       Sleep 1 >    Loop > >    'logs the keypress time: >    c.SetAttrib "Keypress", Clock.Read > >    'loops the color changing code until either the release or the > trial time time runs out >    Do Until Keyboard.Responses(Keyboard.Responses.Count) = "{-SPACE}" >       If Clock.Read - lngTrialStart >= 2500 Then GoTo SkipInLine >       'insert color changing code here >    Loop > Else >    Sleep 1 >    GoTo Repeat > End If > > 'logs the key release time: > c.SetAttrib "Keyrelease", Clock.Read > '----------------------------------------------------------------------------- > > Then after the label "SkipInLine" you can have a simple InLine > (WaitForTrialEnd) that waits untilt 2500 ms has passed from the start > of the trial until the trial end: > '----------------------------------------------------------------------------- > Do Until Clock.Read - lngTrialStart >= 2500 >    Sleep 1 > Loop > '----------------------------------------------------------------------------- > > So the trial structure would be something like: > SetTrialStartTime (InLine) > Stimulus Slide > Repeat label > WaitForKeypresses InLine > SkipInLine label > WaitForTrialEnd (InLine) > > That should do it. You said you have the color changing code, yes? > Good luck! If anyone else has a different way, please share! > > Alon > > On Jul 27, 2:42 pm, Erika Nyhus wrote: > > > I am trying to program an experiment in E Prime and was wondering if you had > > any tips/examples to help me out. > > > What I am trying to do is have subjects indicate their confidence in their > > response by the length of time they press the response button.  While they > > are pressing the button we would like to present a visual cue (e.g. a > > growing bar or changing color) indicating the length of the button press. > > This visual cue should stop changing as soon as they release the button and > > then should remain stable until the end of the trial period. > > > Attached is a mini-experiment in which I have gotten the color of the > > stimuli to change (adapted from the example given here) and then remain > > stable until the end of the trial period.  But I have three remaining issues > > that I would appreciate help on.  First, the stimuli should only start > > changing colors when the response button is pressed.  So I need to have the > > stimuli appear, as soon as the button is pressed it changes color, and then > > when it is released it remains that color for the remainder of the trial. > > Second, I need the total trial time to be 2500 ms including stimulus > > appearance, change in color as the button is pressed, and as the stimulus > > remains stable until the end of the trial period.  The code I have added in > > Inline3 (c.setAttrib "Dur", 2500-(ResponseTime-Slide1Time) does not appear > > to work properly as it sometimes results in very high values (e.g. Dur=5000 > > ms) or negative values (e.g. Dur=-500 ms).  Third, I need to log the time > > when the response button was pressed and when it was released to get a > > measure of how long the button was pressed. > > > -- > > Erika Nyhus, Ph.D. > > Cognitive, Linguistic, and Psychological Sciences > > Brown University > > 229 Waterman St. > > Providence, RI 02912-1821 > > >  TestImage.es2 > > 40KViewDownload -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Thu Jul 28 16:51:11 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Thu, 28 Jul 2011 12:51:11 -0400 Subject: How to fade from slide1 to slide2 (inline?) In-Reply-To: <3b704610-4b32-420e-a279-15e45932e50c@f20g2000yqm.googlegro ups.com> Message-ID: Erika, At 7/28/2011 12:05 PM Thursday, you wrote: >Thank you so much for your help! I think this code should work for >what I want to do, but I am getting the following error when I run it. > >Responses is not a property of the object >For line: nResps = Keyboard.Responses.Count Yeah, the Keyboard object does not have a Responses property. Responses would be a property of an input mask, so you would have to do something more like nResps = Slide1.InputMasks(1).Responses.Count The "Multiple Responses" example from the PST web site might help you with this. BTW, if you really do want to access Keyboard activity directly without going through an input mask, you could use its History property. For more information, see the appropriate topics in the E-Basic Help facility (that's the closest we get to technical documentation for E-Prime). Or, post a request to PST Web Support, they seem to be pretty generous with helping folks out with this sort of thing (in lieu of providing full documentation). -- David McFarlane, Professional Faultfinder >I do have the following color changing code that I plan to add once >this is working: > >'create all the variables you'll need: >dim r as integer >dim g as integer >dim b as integer >dim vr as string >dim vb as string >dim vg as string >dim stepcounter as integer >dim Slide1Time as integer >dim ResponseTime as integer > >'assign value 255 to the red green and blue channels, rgb 255,255,255 >is white >r=255 >b=255 >g=255 > >'map the integer values of r, g, and b onto the string variables vr, >vb and vg >vr$= r >vb$= b >vg$= g > >'use the string rgb variables to modify the backgroundcolor of the >textobject >CSlideText(Slide1.States(Slide1.ActiveState).Objects("Text1")).forecolor=CColor >(""& vr$ &","& vg$ &","& vb$ &"") > >'First the values of green and blue will be decreased by 5 points, we >started at 255,255,255 and this way after 50 repeats we will end at >255,0,0, which is pure red >r = r >g = g - 5 >b = b - 5 > >'Map the integer values of rgb onto the string variables of rgb >vr$= r >vb$= b >vg$= g > >'Assign the new value to forecolor >CSlideText(Slide1.States(Slide1.ActiveState).Objects("Text1")).forecolor=CColor >(""& vr$ &","& vg$ &","& vb$ &"") > >Erika > >On Jul 28, 11:13 am, Alon Hafri wrote: > > Hi Erika, > > > > I did not have a chance to look at your attached script so excuse me > > if I mention something you've already done, but I think I can offer a > > few quick tips, and maybe others can offer follow-ups or different > > approaches as well. > > > > I would make the Slide duration 0 and then use an Inline to control > > the key presses and release, the changing color effect, and the trial > > duration. Another thing to note is that in E-Prime registering key > > releases is achieved with a minus sign, so for example {SPACE} is a > > press and {-SPACE} is a release (likewise {1} is a press and {-1} is a > > release). You have to set the CollectionMode property of the InputMask > > to accept both presses and releases, which you can achieve I believe > > either in the Input Mask properties window (maybe advanced settings) > > or in code (Keyboard.CollectionMode = ebPressesAndReleases). > > > > First put an InLine (SetTrialStartTime) at the very beginning of the > > trial like this. This gets the experiment time from the start of the > > trial: > > > '----------------------------------------------------------------------------- > > Dim lngTrialStart As Long > > lngTrialStart = Clock.Read > > > '----------------------------------------------------------------------------- > > > > Then a label "Repeat" after the stimulus slide and before the next > > InLine, and another label "SkipInLine" after the next inline: > > > > Then the following InLine (WaitForKeypresses): > > > '----------------------------------------------------------------------------- > > If Clock.Read - lngTrialStart >= 2500 Then GoTo SkipInLine > > > > Dim nResps As Long > > > > nResps = Keyboard.Responses.Count > > > > 'waits for the initial keypress > > If nResps > 0 Then > > > > 'loops until either a response is made or the trial time runs out: > > nResps = Keyboard.Responses.Count > > Do Until Keyboard.Responses(nResps) = "{SPACE}" > > If Clock.Read - lngTrialStart >= 2500 Then GoTo SkipInLine > > Sleep 1 > > Loop > > > > 'logs the keypress time: > > c.SetAttrib "Keypress", Clock.Read > > > > 'loops the color changing code until either the release or the > > trial time time runs out > > Do Until Keyboard.Responses(Keyboard.Responses.Count) = "{-SPACE}" > > If Clock.Read - lngTrialStart >= 2500 Then GoTo SkipInLine > > 'insert color changing code here > > Loop > > Else > > Sleep 1 > > GoTo Repeat > > End If > > > > 'logs the key release time: > > c.SetAttrib "Keyrelease", Clock.Read > > > '----------------------------------------------------------------------------- > > > > Then after the label "SkipInLine" you can have a simple InLine > > (WaitForTrialEnd) that waits untilt 2500 ms has passed from the start > > of the trial until the trial end: > > > '----------------------------------------------------------------------------- > > Do Until Clock.Read - lngTrialStart >= 2500 > > Sleep 1 > > Loop > > > '----------------------------------------------------------------------------- > > > > So the trial structure would be something like: > > SetTrialStartTime (InLine) > > Stimulus Slide > > Repeat label > > WaitForKeypresses InLine > > SkipInLine label > > WaitForTrialEnd (InLine) > > > > That should do it. You said you have the color changing code, yes? > > Good luck! If anyone else has a different way, please share! > > > > Alon > > > > On Jul 27, 2:42 pm, Erika Nyhus wrote: > > > > > I am trying to program an experiment in E Prime and was > wondering if you had > > > any tips/examples to help me out. > > > > > What I am trying to do is have subjects indicate their > confidence in their > > > response by the length of time they press the response > button. While they > > > are pressing the button we would like to present a visual cue (e.g. a > > > growing bar or changing color) indicating the length of the button press. > > > This visual cue should stop changing as soon as they release > the button and > > > then should remain stable until the end of the trial period. > > > > > Attached is a mini-experiment in which I have gotten the color of the > > > stimuli to change (adapted from the example given here) and then remain > > > stable until the end of the trial period. But I have three > remaining issues > > > that I would appreciate help on. First, the stimuli should only start > > > changing colors when the response button is pressed. So I need > to have the > > > stimuli appear, as soon as the button is pressed it changes > color, and then > > > when it is released it remains that color for the remainder of the trial. > > > Second, I need the total trial time to be 2500 ms including stimulus > > > appearance, change in color as the button is pressed, and as the stimulus > > > remains stable until the end of the trial period. The code I > have added in > > > Inline3 (c.setAttrib "Dur", 2500-(ResponseTime-Slide1Time) does > not appear > > > to work properly as it sometimes results in very high values > (e.g. Dur=5000 > > > ms) or negative values (e.g. Dur=-500 ms). Third, I need to log the time > > > when the response button was pressed and when it was released to get a > > > measure of how long the button was pressed. > > > > > -- > > > Erika Nyhus, Ph.D. > > > Cognitive, Linguistic, and Psychological Sciences > > > Brown University > > > 229 Waterman St. > > > Providence, RI 02912-1821 > > > > > TestImage.es2 > > > 40KViewDownload -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Thu Jul 28 16:58:59 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Thu, 28 Jul 2011 12:58:59 -0400 Subject: How to fade from slide1 to slide2 (inline?) In-Reply-To: <4e3193ad.ce5e2a0a.7ac4.2d5bSMTPIN_ADDED@gmr-mx.google.com> Message-ID: At 7/28/2011 12:51 PM Thursday, David McFarlane wrote: >Responses would be a property of an input mask... Let me amplify that slightly for the sake of fuller clarity: Responses would be a property of an input mask, and input masks in turn are properties of stimulus objects (e.g, TextDisplay, ImageDisplay, SoundOut, Slide, Wait) ... -- David McFarlane, Professional Faultfinder -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From erika.nyhus at gmail.com Thu Jul 28 17:55:41 2011 From: erika.nyhus at gmail.com (enyhus) Date: Thu, 28 Jul 2011 10:55:41 -0700 Subject: How to fade from slide1 to slide2 (inline?) In-Reply-To: <4e319554.cf3c2b0a.0ad2.2df5SMTPIN_ADDED@gmr-mx.google.com> Message-ID: Thank you so much for your help! I have changed all the code to use Slide1.InputMasks(1).Responses.Count, but I am getting the following error when I run it. Operator type mismatch For line: Do Until Slide1.InputMasks(1).Responses(nResps) = "{SPACE}" Here is the full code that I am trying to get to work: If Clock.Read - lngTrialStart >= 2500 Then GoTo SkipInLine Dim nResps As Long nResps = Slide1.InputMasks(1).Responses.Count 'waits for the initial keypress If nResps > 0 Then 'loops until either a response is made or the trial time runs out: nResps = Slide1.InputMasks(1).Responses.Count Do Until Slide1.InputMasks(1).Responses(nResps) = "{SPACE}" If Clock.Read - lngTrialStart >= 2500 Then GoTo SkipInLine Sleep 1 Loop 'logs the keypress time: c.SetAttrib "Keypress", Clock.Read 'loops the color changing code until either the release or the trial time time runs out Do Until Slide1.InputMasks(1).Responses(Slide1.InputMasks(1).Responses.Count) = "{-SPACE}" If Clock.Read - lngTrialStart >= 2500 Then GoTo SkipInLine 'insert color changing code here Loop Else Sleep 1 GoTo Repeat End If 'logs the key release time: c.SetAttrib "Keyrelease", Clock.Read Erika On Jul 28, 12:58 pm, David McFarlane wrote: > At 7/28/2011 12:51 PM Thursday, David McFarlane wrote: > > >Responses would be a property of an input mask... > > Let me amplify that slightly for the sake of fuller clarity: > > Responses would be a property of an input mask, and input masks in > turn are properties of stimulus objects (e.g, TextDisplay, > ImageDisplay, SoundOut, Slide, Wait) ... > > -- David McFarlane, Professional Faultfinder -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Thu Jul 28 18:17:58 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Thu, 28 Jul 2011 14:17:58 -0400 Subject: How to fade from slide1 to slide2 (inline?) In-Reply-To: <854faa4b-eda2-4626-9671-2adb8e7445c9@y8g2000vba.googlegrou ps.com> Message-ID: Erika, At 7/28/2011 01:55 PM Thursday, you wrote: >I have changed all the code to use >Slide1.InputMasks(1).Responses.Count, but I am getting the following >error when I run it. > >Operator type mismatch >For line: Do Until Slide1.InputMasks(1).Responses(nResps) = "{SPACE}" Um, Slide1.InputMasks(1).Responses gets you to the ResponseDataCollection object associated with Slide1.InputMasks(1), and Slide1.InputMasks(1).Responses(nResps) only gets you to a particular ResponseData object, not any of its component properties. You have to drill down a little further to specific ResponseData properties, e.g., Do Until Slide1.InputMasks(1).Responses(nResps).RESP = "{SPACE}" Please, please read through all the relevant topics in the E-Basic Help facility. This would also all become clear if you would take a course on VBA, or give yourself some training using a book like "VBA for Dummies". It is a huge mistake to try to get an intricate program to work without understanding *how* it works -- even if it *appears* to work to you, chances are it does not really do what you think it does, and you will unwittingly publish invalid results. -- David McFarlane, Professional Faultfinder -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From david.averill.nicholson at gmail.com Thu Jul 28 19:36:52 2011 From: david.averill.nicholson at gmail.com (David Nicholson) Date: Thu, 28 Jul 2011 12:36:52 -0700 Subject: Multiple choice quiz graying out incorrect answers until correct chosen In-Reply-To: <4e31802a.c1602a0a.1685.27dfSMTPIN_ADDED@gmr-mx.google.com> Message-ID: The way you described is the way i'm leaning toward now Ben. I'll look into autoit, it may be more efficient in the long run. I'll keep you guys posted. Thanks for all you help!!! David On Jul 28, 11:28 am, David McFarlane wrote: > David, > > At 7/27/2011 08:40 PM Wednesday, you wrote: > > >I'm also looking into a way to take the data from multiple sources > >and automate it giving an overall score comparison.  I know e-kick > >no longer works but I just need to devote more time to get the > >coding right for this. > > I think that some people have gotten AutoIt > (http://www.autoitscript.com/site/autoit) to help with this sort of > thing.  If you search about the Group or the Forum you should find > some earlier discussions about this. > > -- David McFarlane, Professional Faultfinder -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From rp677 at york.ac.uk Sun Jul 31 00:30:33 2011 From: rp677 at york.ac.uk (Becky Prince) Date: Sat, 30 Jul 2011 17:30:33 -0700 Subject: threading SoundOut/Wait and TextDisplay objects In-Reply-To: Message-ID: Many thanks Paul and David for the replies! I'll see if I can manage the display timeouts within the SoundOut/Wait loop as you've both suggested. If I find some genius/elegant solution to this problem then I'll be sure to post it here. Best, Becky On Jul 26, 9:51 pm, Paul Groot wrote: > Hi Becky, > > I also don't think E-Basic has build-in support for running separate > threads. The only way I could achieve this was by creating a separate > DLL in C++ and call it from inline script. (I needed it for > controlling infusions pumps, which were used for fluid delivery during > an fMRI experiment). However, code in a separate DLL cannot make use > of E-Prime functions, so that really limits its use.  I think David > already suggested the easiest workaround: just create your own event > loop and handle all events (responses, timeouts) within this loop. I > think you already figured out how to manage sound objects and > responses. Drawing text or images on the display is also not very > difficult. You could invoke 'low level' functions by using the Canvas > object, or you could (re)draw existing E-Objects by invoking the Draw > method. Catching the respones of the keyboard will probably the > trickiest part... > > cheers > Paul > > 2011/7/25 David McFarlane : > > > Becky, > > > Stock reminder:  1) I do not work for PST.  2) PST's trained staff takes any > > and all questions athttp://support.pstnet.com/e%2Dprime/support/login.asp, > > and they strive to respond to all requests in 24-48 hours -- this is pretty > > much their substitute for proper documentation, so make full use of it.  3) > > If you do get an answer from PST Web Support, please extend the courtesy of > > posting their reply back here for the sake of others. > > > That said, here is my take... > > > Offhand, I do not think that E-Prime natively supports multiple "threads" > > such as you would like for this task, but I hope somebody else chimes in and > > tells me that I am wrong. > > > Again offhand, I think you could accomplish your end by implementing your > > own "event loop" directly in E-Basic code.  Do a search on that term to see > > where I have mentioned this before, although I don't think I have ever gone > > into much detail.  Wikipedia might have a better discussion of the topic in > > general.  In your case your event loop would handle both timeout for your > > TextDisplay, and responses. > > > -- David McFarlane, Professional Faultfinder > > >> Can anyone tell me how to set up multiple threads in E-Prime?  I need > >> separate threads for running SoundOut/Wait objects and a TextDisplay > >> object.  I'm creating a task which presents a continous loop of the > >> following: > > >> -SoundOut1 > >> -Wait1 > >> -SoundOut2 > >> -Wait2 > > >> The subject adjusts the timing of Wait1 and Wait2 using key responses, > >> and the loop (trial) ends when the subject presses Enter.  I'm using > >> InLine scripts after each sound/wait object to check for any response > >> and adjust the next wait timing accordingly. > > >> The problem is that I'm also presenting a TextDisplay with background/ > >> default text, and I want to change this text display (to provide > >> visual feedback) for 200 ms after a response, then have theTextDisplay > >> return to the default text.  I can change the TextDisplay after any > >> response, but if I tell E-Prime to wait 200ms, then change the text > >> again, it introduces a 200ms delay in my contionous audio/wait loop. > >> The timing delay problem is resolved if I just set the TextDisplay > >> object to "clear after = No", but then the response feedback display > >> text is held on screen until the next response, which is > >> problematic. > > >> Any thoughts and suggestions are much appreciated! > > >> Becky > > >> p.s. Apologies if this has been addressed in E-Prime support/forums > >> already - I've searched for related topics but couldn't find a > >> solution. > > > -- > > You received this message because you are subscribed to the Google Groups > > "E-Prime" group. > > To post to this group, send email to e-prime at googlegroups.com. > > To unsubscribe from this group, send email to > > e-prime+unsubscribe at googlegroups.com. > > For more options, visit this group at > >http://groups.google.com/group/e-prime?hl=en. > > -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From tobias.fw at gmail.com Fri Jul 1 09:54:43 2011 From: tobias.fw at gmail.com (Tobias) Date: Fri, 1 Jul 2011 02:54:43 -0700 Subject: Refresh rate TFT Message-ID: HI together, as CRTs are hard to get nowadays, we equipped our labs with tft screens. I wrote short and simple experiment to test the timing. basically, there are 4 display elements, alternating black and white background with nothing on it. As the refresh rate is 60 Hertz, I first set the duration to 50 ms (which is about 3 refresh circles). Prerelease is set on 20 ms. These are the results (duration, duration error, onset delay [according to logged data in results file]) slide 1: 50, 0, 5 slide 2: 50, 0, 0 slide 3: 50, 0, 0 slide 4: 50, 0, 0 These are the results for a duration of 40 ms slide 1: 40, 0, 6 slide 2: 40, 0, 10 slide 3: 40, 0, 10 slide 4: 40, 0, 10 The first onset delay might be due to waiting for the next refresh circle to start. If the duration value matches the screen refresh rate, there seems to be no delay. If it doesn't (in this case, 40 ms), there is a delay that adds up to the next value that matches (50 ms). However, it is not clear to me how the duration arror can be 0 if refresh rate and duration value do not match. The screen should not be able to display something for 40 ms. Any ideas? Any hints for using TFTs or testing the timing of such screens? Thanks a lot! Cheers, Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From Michiel.Spape at nottingham.ac.uk Fri Jul 1 10:29:36 2011 From: Michiel.Spape at nottingham.ac.uk (Michiel Spape) Date: Fri, 1 Jul 2011 11:29:36 +0100 Subject: eye tracking reading study In-Reply-To: Message-ID: Hi Alon, Of course, what you say is true, and the 'word-centre' thing doesn't work for such. My main thing, however, with a rectangular 'hit-test' was the issue of distance, calculated between word (as defined by a rectangular sized shape) and gaze-position. That is, imagine you have a word of 100x20 pixels, and you want to know whether your eye-gaze position, located 20 pixels to the left of your word, is roughly 'hitting' the word (given noise, and so on). You might, with the hit-test manoeuvre, put a larger shape (a buffer, as you say), of 140x60 (to the left and right, top and bottom, adjusted with 20 pixels) on top of your word and voila, your eye-gaze position is correctly classified as "hitting" the word. Yet, imagine, your eye-gaze position is not merely 20 pixels to the left of the word, but actually 20 pixels to the left of the word AND 20 pixels down. Is it hitting your word? - Yes, says your hit-test object (being rectangular, and your eye-gaze position should fall in the lower-left corner of this shape). - No, if you calculate the smallest distance between the word (of 100x20 pixels) and the gaze position, since the minimum (Euclidean) distance is actually sqrt(20^2 + 20^2), or 28.28 pixels. Which is more than 20 pixels. Thus, the hit-test - in its original form (because obviously you could calculate the distance to correct for such errors) - is overly tolerant of diagonally displaced gaze positions. You can see from my code examples, I do too much (and often bad) code. I've since tried to tone down, but it is as hard as giving up smoking! Best, Mich Michiel Spap? Research Fellow Perception & Action group University of Nottingham School of Psychology www.cognitology.eu -----Original Message----- From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of Alon Hafri Sent: 30 June 2011 22:08 To: E-Prime Subject: Re: eye tracking reading study Hi Mich, Thanks for the reply and the scripts! It looks quite complex so it will take me a while to get through it all, but I did look over some of the InLine and took a practice run. I am afraid I still don't quite see the advantage of calculating the hits and misses using the word center and distance versus hittest and AOIs as defined by the text or image rectangle. I'm not sure how the word center/distance method would work since for example the distance from the center of the word "deli" will be different from the center of the word "delicious" horizontally but not vertically. Is the calculation routine for using the word center/distance something more complex than the distance formula? With rectangular AOIs and hittest, you could size the AOI with enough buffer space around the text that it will catch looks near to the word. Perhaps I'm missing something? Thanks for the code detailing displaying the eyegaze in real time, that is very useful! I also didn't know much about Slides but I like your idea for using them to implement different conditions with minimal code. Best, Alon On Jun 29, 12:49?pm, Michiel Spape wrote: > Hi Alon & List, > Turns out I later decided to do no online eye-tracking at all, but in an old version, I still have the following bit of code: > --------- > Set theGazeData = CTobiiEyeTrackerResponseData( TobiiEyeTracker.History(TobiiEyeTracker.History.Count) ?) > If Not theGazeData Is Nothing Then > ? ? ? ? CurEye.x = theGazeData.CursorX > ? ? ? ? CurEye.y = theGazeData.CursorY > ? ? ? ? if c.GetAttrib("ShowEye") = "Yes" then donow = TekenCirkel (CurEye.X, CurEye.Y, c.GetAttrib ("BallSize")/2, "green") > ? ? ? ? Set theGazeData = Nothing > End If > ---------- > > Which, if you have been through the Tobii code, you might notice is roughly based on the capture AOI code of an example of theirs. If you, or anyone else, goes through my code (I don't know whether the list now accepts attachments or not), notice how *AWFUL* my own code tends to be :). Embarrassing! > > Anyway, it does the trick. In 1g, attached, it takes the last bit of (i.e. TobiiEyeTracker.History(TobiiEyeTracker.History.Count)), which contains CursorX and CursorY. If you want to drive a participant absolutely mad, do what I do above and show a little dot at the position of the (captured) fixation-position. It's always a bit off, so you will follow it and thus drive it away - a bit like having a speckle of dust in your eye. Re: attached files, notice 1g is the older version, 1i is the later one; and they probably only work if you have the Tobii installed, and have a similar system as ours. > > As to your questions: > > "Is there an advantage of using solution two (fix.position) over > solution one? Using the fix.position, you would still end up doing the > calculations as in the first solution. Also, I didn't know you could > call the fixation position within an InLine, that's helpful -- is it > just "fix.position"? If you have that script, I would greatly > appreciate it." > > Sadly, it's a bit more difficult than Fix.Position - as above. But it can be done. The advantage, for instance, is that you could calculate the centre of words and figure out the distance between word-centre and gaze-position, which should be more accurate than using square AOIs. It's also plain cool, because it allows you to debug like my version above, using a dot on the screen :) It is, all in all, pretty good to figure out once, even if you later decide to abandon it. > > " Are you saying to have the words displayed successively, so say, the > first two words of the sentence on one state, then the next two on the > second state, etc.? How would the states advance? (I've never used > more than the default state, so forgive my ignorance). Do you have an > example of this?" > > No, I meant, if you have 3 conditions (for 1,2 or 3 words), then show one state depending on the condition. Or am I missing something and you want to use successive presentation of words? > Anyway, I gather that a lot of people plainly do not see that slides can have states, in fact, I never did anything with them either until some point. It can, however, provide a lot of clarity, as it can keep your experiment relatively free from code. So, make three states with names OneWord, TwoWords, ThreeWords (this can be changed in the properties panel, for instance - not very clearly visible). In the slide's (i.e. not in the state's) property, set ActiveState to "[HowManyWords]" and in the list, have an attribute of HowManyWords, with again, the three names of states. > > Hope that helps! > Best, > Mich > > Michiel Spap? > Research Fellow > Perception & Action group > University of Nottingham > School of Psychologywww.cognitology.eu > > -----Original Message----- > From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of Alon Hafri > Sent: 29 June 2011 15:47 > To: E-Prime > Subject: Re: eye tracking reading study > > Hi Mich, > > Thanks for your solutions! I'll respond to yours in order, below your > text: > > On Jun 29, 5:10?am, Michiel Spape > wrote: > > Hi, > > Here's my take: > > - given that E-Prime uses, I think, a font with constant letter symbol size (I forgot the official name, but the point is that an I takes as much space as a W - as in the font you're probably reading this), it is not that difficult to line them up, as you say. Say, one letter is 12 pixels (you can test that by trial and error), then the word WORDS is 60 pixels. If I want to have two AOIs for the words TWO WORDS, then, as per your second possible way to do this, I'd just show that as one slideText on the slide and make two AOIs. Given that our screen is 640x480 by default (or whatever you have), the we print the TWO WORDS as one slideText in the centre. TWO WORDS is 60 + 48 (TWO plus space makes 4x12=48 pixels) = 108 pixels and should therefore be positioned LEFT at 266 to RIGHT at 374* (LEFT: 320 (screen width centre) - 54 (i.e. 108 / 2) = 266 and RIGHT: 320 + 54 = 374). Thus, your left AIO, if you align it left, can be placed at 266, and should be 36 pixels (since the space shouldn't be included). The AIO right should be aligned right, and can be placed at 374. > > Depending on your knowledge of E-Prime (and you'd need some to get Tobii to work properly in E-Prime), that shouldn't be too hard to programme, but let me know if you need help. > > This would definitely work (the font is called Courier New). But I do > see your point below about wanting the AOIs to be a bit larger so > things are accurately detected, and it may be hard to do that with a > lot of words on screen. > > > - You could also do away with all the AOIs as programmed by the Tobii team and just look at the fixation position on the fly - that is, just take the fix.position, calculate distance to each word and figure out which is the likely candidate. I have some script for that, if you're interested. > > Is there an advantage of using solution two (fix.position) over > solution one? Using the fix.position, you would still end up doing the > calculations as in the first solution. Also, I didn't know you could > call the fixation position within an InLine, that's helpful -- is it > just "fix.position"? If you have that script, I would greatly > appreciate it. > > > - Alternatively, have you thought about just NOT lining up the words? That is, if you have a slide with 3 states, state 1 with one word, 2 with two words, 3 with three words, and put words on slide 2, for instance, at 35% and 65%, then this will be a LOT easier. I can see the point that it doesn't look right, but I think there's plenty that can be said for this experimentally: > > 1. you probably want to control for word length anyway > > 2. you probably want to control for saccade length anyway > > 3. Accurate as Tobii *can* be, I've often found I wanted my AOIs quite a bit larger so that things are accurately detected. > > Are you saying to have the words displayed successively, so say, the > first two words of the sentence on one state, then the next two on the > second state, etc.? How would the states advance? (I've never used > more than the default state, so forgive my ignorance). Do you have an > example of this? > > > - Finally, I've later come to realise it is a lot easier to just don't do much with Tobii in E-Prime and analyse the "gazedata" separately (in matlab). That is, it's pretty easy to find out later on what word people were fixating (at least, roughly), given that you at least save their positions on the screen. > > Yes this I've done before (even for E-Prime experiments, when the AOIs > were adjusted after running subjects) -- could work well. Again thanks > for your help. > > > Best, > > Mich > > > * obviously, this would make the region one pixel too large, but I'm not compensating for that to simplify matters. > > > Michiel Spap? > > Research Fellow > > Perception & Action group > > University of Nottingham > > School of Psychologywww.cognitology.eu > > > -----Original Message----- > > From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of Alon Hafri > > Sent: 28 June 2011 21:47 > > To: E-Prime > > Subject: eye tracking reading study > > > Hi, wondering if someone in the group can help me out. > > > I am creating an E-Prime experiment using the E-Prime Extensions for > > Tobii. For each trial, the participant will read a sentence, and I > > would like to record reading times for each window of size 1 to 3 > > words. > > > I have experience with using list attributes to set Slide Image > > position (and therefore AOI position) at runtime, as well as with > > using transparent Slide Images overtop of larger images to act as > > AOIs, but I've never done a reading study before. Since the words will > > vary in length for each trial, but will need to be evenly spaced (and > > on multiple lines conceivably), it would be great if position for > > every window would not have to be specified but could be determined by > > a script. > > > I can think of a few solutions, but perhaps someone has an easier one? > > 1) create a Slide Text object for each word (or window), and so they > > could act as their own AOIs. > > Drawbacks: You would have to specify locations for each one, and it > > could be tricky lining them up appropriately so words are evenly > > spaced. > > > 2) Have one Slide Text object for the whole sentence and have > > transparent AOIs overtop as the AOIs. > > Drawbacks: You would still have to specify locations for each, but the > > text would be in one object so would appear normal. > > > 3) Suggestions? > > > Thanks! > > Alon > > > -- > > You received this message because you are subscribed to the Google Groups "E-Prime" group. > > To post to this group, send email to e-prime at googlegroups.com. > > To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. > > For more options, visit this group athttp://groups.google.com/group/e-prime?hl=en. > > > This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. ? Please do not use, copy or disclose the information contained in this message or in any attachment. ?Any views or opinions expressed by the author of this email do not > > ... > > read more ? > > ?Collision 1i.es > 328KViewDownload > > ?Collision 1g.es > 315KViewDownload -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From lml1934 at gmail.com Fri Jul 1 12:53:32 2011 From: lml1934 at gmail.com (Lisa Levinson) Date: Fri, 1 Jul 2011 05:53:32 -0700 Subject: eye tracking reading study In-Reply-To: Message-ID: Not sure about this but for the EEG experiments I have helped with that explore reading they seem to use the list function to generate sentences. The words appear one at a time but it's the only way you can flag (for segmentation) the aspect of the sentence being investigated. Might be totally different for eye-tracking but that's how I have seen the reading experiments are organized for EEG. On Jun 28, 4:46?pm, Alon Hafri wrote: > Hi, wondering if someone in the group can help me out. > > I am creating an E-Prime experiment using the E-Prime Extensions for > Tobii. For each trial, the participant will read a sentence, and I > would like to record reading times for each window of size 1 to 3 > words. > > I have experience with using list attributes to set Slide Image > position (and therefore AOI position) at runtime, as well as with > using transparent Slide Images overtop of larger images to act as > AOIs, but I've never done a reading study before. Since the words will > vary in length for each trial, but will need to be evenly spaced (and > on multiple lines conceivably), it would be great if position for > every window would not have to be specified but could be determined by > a script. > > I can think of a few solutions, but perhaps someone has an easier one? > 1) create a Slide Text object for each word (or window), and so they > could act as their own AOIs. > Drawbacks: You would have to specify locations for each one, and it > could be tricky lining them up appropriately so words are evenly > spaced. > > 2) Have one Slide Text object for the whole sentence and have > transparent AOIs overtop as the AOIs. > Drawbacks: You would still have to specify locations for each, but the > text would be in one object so would appear normal. > > 3) Suggestions? > > Thanks! > Alon -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Fri Jul 1 14:10:57 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Fri, 1 Jul 2011 10:10:57 -0400 Subject: Refresh rate TFT In-Reply-To: <9963135e-c6d5-4bd9-b19c-023aa0970326@m10g2000yqd.googlegro ups.com> Message-ID: Tobias, Stock reminder: 1) I do not work for PST. 2) PST's trained staff takes any and all questions at http://support.pstnet.com/e%2Dprime/support/login.asp , and they strive to respond to all requests in 24-48 hours -- this is pretty much their substitute for proper documentation, so make full use of it. 3) If you do get an answer from PST Web Support, please extend the courtesy of posting their reply back here for the sake of others. That said, here is my take... Nice test, and excellent question. The problem arises because E-Prime uses two entirely different and incompatible definitions of "actual" duration: (1) Actual duration = (OnsetTime of next visual object) - (OnsetTime of this visual object) (2) Actual duration = (OffsetTime of this visual object) - (OnsetTime of this visual object) So, if DurationError = (Duration (i.e., specified Duration)) - ("actual" duration), then you have to know which definition of "actual" duration is used. Because a visual object typically remains visible until the onset of the next visual object, most of us think of "actual" duration in terms of definition (1), and so would expect that definition to be used for calculating DurationError. But if you think of that from a programming point of view, you will see the problem with that: E-Prime cannot know the OnsetTime of the next object until, well, that object appears, and by that time it is too late to use the value in logging anything regarding the previous object. So, E-Prime uses definition (2) for "actual" duration (see the RteRunnableInputObject.DurationError topic in the E-Basic Help facility), and your results follow. (Don't take my word for this, log all the appropriate values and see for yourself that it does the calculation as I describe.) IOW, at a (specified) Duration of 40 ms, the object OnsetTime occurs late (by 10 ms), but OffsetTime still occurs 40 ms later, thus DurationError = Duration - (OffsetTime - OnsetTime) = 40 ms, as measured (hmm, did you use Event or Cumulative timing mode? your results do not look quite right for Event timing mode); but since the next object again appears 10 ms late, the "actual" duration of each object (according to definition (1)) remains 50 ms. Follow? Perhaps they could have chosen better terminology, although offhand I have nothing better to suggest myself . One more note about measuring performance of LCD/TFT vs CRT. It may casually seem that images appear and disappear from the display with high performance, however, several years ago when we measured LCD performance with a photodetector and oscilloscope we found that it took a *long* time for "off" pixels to return to baseline (some hundreds of ms, as I recall). That may not matter for your studies, but it mattered to us at the time. We have not done that measurement again, so don't know how modern LCDs perform; instead, we have just stockpiled our own stash of CRTs to provide for our future studies. Regards, -- David McFarlane, Professional Faultfinder At 7/1/2011 05:54 AM Friday, you wrote: >HI together, > >as CRTs are hard to get nowadays, we equipped our labs with tft >screens. I wrote short and simple experiment to test the timing. >basically, there are 4 display elements, alternating black and white >background with nothing on it. As the refresh rate is 60 Hertz, I >first set the duration to 50 ms (which is about 3 refresh circles). >Prerelease is set on 20 ms. > >These are the results (duration, duration error, onset delay >[according to logged data in results file]) > >slide 1: 50, 0, 5 >slide 2: 50, 0, 0 >slide 3: 50, 0, 0 >slide 4: 50, 0, 0 > >These are the results for a duration of 40 ms > >slide 1: 40, 0, 6 >slide 2: 40, 0, 10 >slide 3: 40, 0, 10 >slide 4: 40, 0, 10 > >The first onset delay might be due to waiting for the next refresh >circle to start. If the duration value matches the screen refresh >rate, there seems to be no delay. If it doesn't (in this case, 40 ms), >there is a delay that adds up to the next value that matches (50 ms). >However, it is not clear to me how the duration arror can be 0 if >refresh rate and duration value do not match. The screen should not be >able to display something for 40 ms. > >Any ideas? Any hints for using TFTs or testing the timing of such >screens? > >Thanks a lot! Cheers, Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From evelina at illinois.edu Fri Jul 1 14:29:29 2011 From: evelina at illinois.edu (Evelina Tapia) Date: Fri, 1 Jul 2011 07:29:29 -0700 Subject: Pre-loading images and nested lists In-Reply-To: <03ffefa7-260e-4d9a-9a8e-7d9d9008924a@16g2000yqy.googlegroups.com> Message-ID: OK, I figured out what the problem was and in case anyone runs into the same issue, here's the solution and a couple of pointers: The InLine has to call the attribute in the main trial list, not the nested image list. For example, if the main list has column Target (that pulls images from a Nested list containing column BeachImage), the code should read: strTargetFile = c.GetAttrib("Target") Also, make sure that the image is loaded onto the slide image component that you, as a user, have called something. Here, the slide image component onto which the image is loaded is called "theTarget" LoadSlideImageFile Targetzero.States(Targetzero.ActiveState), "theTarget", strTargetFile Finally, if you want to pre-load several images for the same trial, the InLine should have an If...Then... loop. For example, "if trial condition X, then load image from nestedX to target1, load image from nestedY to target2, load image from nestedZ to target3; elseif trial conditionXX, then load image....." Good luck! Evelina On Jun 27, 1:13?pm, Evelina Tapia wrote: > Hello, > > I found InLine script for preloading images without using Canvas > scripting (written by Brandon Cernicky -- thank you! and available onhttp://godzilla.kennedykrieger.org/sw/eprime/samples/) but I am having > trouble implementing the InLine with nested lists. > > So, I have a List of 40 trials within which I have a couple nested > lists that contain about 100 images each. I want to randomly pull > images from those lists during the trial procedure. The InLine for > preloading is placed right at the beginning of the procedure but when > it should read the image file names, it reads direction to the nested > list (e.g. Target column says [BeachImage])and crashes. How could this > be solved? > > The relevant part of the InLine reads as follows: > > 'Variable used to store filenames > Dim strTargetFile as String > > 'Retrieve the filename from the Context > strTargetFile = c.GetAttrib("BeachImage") ? ? 'this is column name in > one of the nested lists > > 'Call the helper routine to load the image > 'into the SlideImage component > > LoadSlideImageFile Targetzero.States(Targetzero.ActiveState), > "theTarget", strTargetFile > > THANK YOU!!!! > > Evelina -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From Michiel.Spape at nottingham.ac.uk Fri Jul 1 15:08:10 2011 From: Michiel.Spape at nottingham.ac.uk (Michiel Spape) Date: Fri, 1 Jul 2011 16:08:10 +0100 Subject: Refresh rate TFT In-Reply-To: <4e0dd5e9.cf3c2b0a.75a2.ffffd479SMTPIN_ADDED@gmr-mx.google.com> Message-ID: Hi David & List, Stockpiling CRTs worked for us quite well as well, but the screens are getting quite old. As a results, it might be nice if we can ascertain where exactly the problem is and what we can practically do about it (given the instance where a CRT is unavailable). 1. As far as I know, the problem you describe used to be worse than it is these days; the sort of blurry effect one had when moving a mouse-pointer, for instance, seems to be pretty much gone. What to look for with LCD screens to get 'high performance'? 2. Am I correct in the understanding that it is not the problem that LCD pixels get bright fast, but, rather that they turn dark again slower? If so, it would, all in all, be a rare thing that one could not design an experiment around it. For instance, if I have a subliminal white prime with a duration of 16 ms, it won't turn dark after 16 ms. However, it won't turn dark on your retina either, and for this reason we usually mask stuff (say, a white pattern mask). Yet, if that would be impossible, would using inverse colours (a black prime), or some other colour scheme help? Anyway, these should be some simple questions for anyone with a bit more knowledge of hardware than I have - which is rather little (I like programming, but am incredibly clumsy, which never helped). Nevertheless, I think that it would be useful to have them answered on the list, as it does seem that CRT monitors, whether we like it or not, might go the way of the videotape. Best, Mich Michiel Spap? Research Fellow Perception & Action group University of Nottingham School of Psychology www.cognitology.eu ---------------- //snip One more note about measuring performance of LCD/TFT vs CRT. It may casually seem that images appear and disappear from the display with high performance, however, several years ago when we measured LCD performance with a photodetector and oscilloscope we found that it took a *long* time for "off" pixels to return to baseline (some hundreds of ms, as I recall). That may not matter for your studies, but it mattered to us at the time. We have not done that measurement again, so don't know how modern LCDs perform; instead, we have just stockpiled our own stash of CRTs to provide for our future studies. Regards, -- David McFarlane, Professional Faultfinder At 7/1/2011 05:54 AM Friday, you wrote: >HI together, > >as CRTs are hard to get nowadays, we equipped our labs with tft >screens. I wrote short and simple experiment to test the timing. >basically, there are 4 display elements, alternating black and white >background with nothing on it. As the refresh rate is 60 Hertz, I >first set the duration to 50 ms (which is about 3 refresh circles). >Prerelease is set on 20 ms. > >These are the results (duration, duration error, onset delay >[according to logged data in results file]) > >slide 1: 50, 0, 5 >slide 2: 50, 0, 0 >slide 3: 50, 0, 0 >slide 4: 50, 0, 0 > >These are the results for a duration of 40 ms > >slide 1: 40, 0, 6 >slide 2: 40, 0, 10 >slide 3: 40, 0, 10 >slide 4: 40, 0, 10 > >The first onset delay might be due to waiting for the next refresh >circle to start. If the duration value matches the screen refresh >rate, there seems to be no delay. If it doesn't (in this case, 40 ms), >there is a delay that adds up to the next value that matches (50 ms). >However, it is not clear to me how the duration arror can be 0 if >refresh rate and duration value do not match. The screen should not be >able to display something for 40 ms. > >Any ideas? Any hints for using TFTs or testing the timing of such >screens? > >Thanks a lot! Cheers, Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Fri Jul 1 20:11:20 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Fri, 1 Jul 2011 16:11:20 -0400 Subject: base timing of a trial on total time taken in previous trials--mismatch error? In-Reply-To: <4e0cea24.94592a0a.12e6.ffffafecSMTPIN_ADDED@gmr-mx.google. com> Message-ID: The original poster figured out a solution using an array, as posted on the PST Forum (http://www.pstnet.com/forum/Topic5419-7-1.aspx ). Since I already figured out an alternative solution without using an array, I am posting it here just to show that I could do it. First, I will restate the specifications: (1) A block of trials will last for either some specified time (e.g., 10 min) or for 12 trials, whichever comes first. (2) The stimulus on each trial will last for either some specified time (2 min), or for the remainder of the block duration, or until the subject responds, whichever comes first. Unpacking this, in effect it means that all trials except the final one last for the usual trial duration or until a response (whichever comes first), and the final trial lasts for the remainder of the block duration or until a response (whichever comes first). I already know some functions for working directly with the clock times of events, so for this problem I find it handier to think in terms of the clock times for when the blocks and trials will end, instead of the remaining block duration. So here is my solution (following good programming practices, such as using constants in place of "magic numbers"). I would first define a global variable on the User tab of the Script window. This will hold the clock time of when the block must end. (I like to use a "g_" prefix to remind me that it's a global and not a local variable): Dim g_BlockTargetOffsetTime as Long Then I would set up a structure with some InLines something like the following: BlockInitCode TrialList TrialProc TrialInitCode TrialStimSlide TrialStimSlide is the stimulus, with Duration set to [TrialDur]. BlockInitCode is an InLine object that simply stores the target offset time of the block for use later (it assumes that the first event in TrialProc is our stimulus, and uses the much overlooked GetNextTargetOnsetTime method, see that topic in the E-Basic Help facility): Const BlockDur as Long = 10 * 60 * 1000 g_BlockTargetOffsetTime = GetNextTargetOnsetTime + BlockDur And TrialInitCode is another InLine object that sets the TrialDur attribute according to specifications (1) and (2) above: Const TrialDur as Long = 2 * 60 * 1000 If ((GetNextTargetOnsetTime + TrialDur) <= g_BlockTargetOffsetTime) Then ' all but the final trial c.SetAttrib "TrialDur", TrialDur Else ' final trial c.SetAttrib "TrialDur", _ (g_BlockTargetOffsetTime - GetNextTargetOnsetTime) End If And if you don't mind using one of the less common coding conveniences of E-Basic/VBA, then you could shorten that to Const TrialDur as Long = 2 * 60 * 1000 c.SetAttrib "TrialDur", _ Iif( ((GetNextTargetOnsetTime + TrialDur) <= g_BlockTargetOffsetTime ), _ TrialDur, (g_BlockTargetOffsetTime - GetNextTargetOnsetTime) ) Pros to this solution: - It does not use any array, nor require the attending complications of computing array indexes. - It does not require any "If c.GetAttrib("Trial") > 1" test on each trial -- seems wasteful to run such a test on each trial when we know ahead of time that it will succeed on all trials except the first. Usually we can find a better way. - It works directly in terms of the target offset time for the block, which gets computed only once. It is thus more accurate with time (without care, accumulated computations of block time remaining might not take into account delays in actual stimulus duration, etc.). Criticisms of this solution: - Some users would find it more natural to work in terms of the remaining block duration instead of the target block offset time (but, without much trouble, this solution could be adapted to compute and use remaining block duration instead). - It uses the GetNextTargetOnsetTime method -- a very powerful concept in E-Prime, but kept well hidden in the documentation (I stumbled upon it myself only while searching the Forum for other things). - Instead of having all the code compactly gathered into one InLine (plus a bit of global User code), it is spread across two InLines (plus a bit of global User code). This may make it slightly harder for some to follow (I think Michiel Spap? has made well-put comments on this sort of tradeoff either on the Group or in his E-Primer). - You already have a perfectly good working solution that makes sense to you, so I'm a little late to the game, aren't I? -- David McFarlane, Professional Faultfinder At 6/30/2011 05:26 PM Thursday, David McFarlane wrote: >This got addressed on the PST Forum >(http://www.pstnet.com/forum/Topic5419-7-1.aspx >), but you did well to post here as well -- >generally I respond only here on the E-Prime >Group, and now I can post a few more details and >provide code with proper indentation. > >First, as you might find explained in Chapter 4 >of the User's Guide that came with E-Prime, and >have instead discovered the hard way, attributes >propogate only downward through logging levels, >they do not persist as you pop back up to higher >levels, and as a result they do not persist as >you pop up a level and then back down to the >same level, as happens at the end of a Procedure >run by a List. IOW, despite some appearance, >"attributes" are *not* "variables", and they >will not fulfill the role of >variables. Variables and attributes each have their own roles. > >So, as explained on the Forum, in short you need >to use a global variable. As explained in >Chapter 4 of the User's Guide, you do that in >the User tab of the Script view. Define a variable such as TRemaining, e.g., > >Dim TRemaining as Long > >Then use that global variable to keep track of >the value from trial to trial, as in ... well, >when I tried to write out the code it didn't >seem quite right, and I have to run off and >catch a bus now. Maybe you or someone else can >now sort this out based on the clues given so far. > >-- David McFarlane, Professional Faultfinder > >At 6/30/2011 02:18 PM Thursday, you wrote: >>I am programming an experiment where the total time a person can take >>is 10 minutes (600000 ms) (to do 12 trials), with a maximum of 2 >>minutes per trial (the trial terminates and starts the next trial >>after 2 minutes). I have set the program to terminate the list if the >>total time is over 10 minutes, however there is a problem--say a >>person has taken 9:45 do to 7 trials, so they have 15 seconds left. >>BUT...on trial 8, the duration is still set to max 2 min--so a person >>can theoretically have a total of 11:45, not 10:00 before it >>terminates. So I need to have the program know that if more than 8 >>minutes (480000) has been used, the duration of the trial should be >>600000-however much time has been used so far. >> >>I have tried to fix this by putting an attribute in the list object >>called "trial" which is just the number of the trial, and another >>attribute called "trialtime", which will be the duration of the slide >>object (where the stimulus/trial is presented). in the slide object >>properties, I have set timelimit to be the attribute "trialtime". >>Lastly, after each trial, the attribute "timertrial" is calculated, >>which essentially calculates the length of time taken for that trial >>and adds it to the previous time taken, so that this attribute is >>constantly updated to reflect the total time taken. All of this seems >>to work fine, and running through the program shows that "timertrial" >>is indeed calculating correctly and is recording in the edata file. >>the problem occurs, however, when I put all this together, and try to >>change the duration of the next trial based on the "timertrial" >>attribute. Here is my code: >> >>Using the inline statement below, I have set the first trial duration >>is 120 seconds, and every other trial after that the duration is >>calculated based on total time taken so far >> >>If c.GetAttrib ("trial") = 1 then c.SetAttrib "trialtime", 120000 >>If c.GetAttrib ("trial") > 1 then >>If c.getAttrib ("timertrial") >= 480000 then c.setAttrib "trialtime", >>600000 - c.getAttrib ("timertrial") >>If c.getAttrib ("timertrial") < 480000 then c.SetAttrib "trialtime", >>120000 >>End If >> >>The problem is, the program cannot find the attribute "timertrial"--it >>calculates fine at the end of each trial, but when I start a new trial >>(within the same list), it does not have a value yet for timertrial, >>since that is calculated at the END of the trial. How do I get it to >>pull the value of "timertrial" from the previous trial and use it as >>an attribute in the NEXT trial? I am sure this is simple, but I can't >>seem to get anywhere. >> >>Also, Note: I have tried using this code instead: >>If c.GetAttrib ("Trial") > 1 then >>if LetterSetList.GetPrevAttrib ("timertrial") >= 480000 then >>c.setAttrib "trialtime", 600000 - LetterSetList.GetPrevAttrib >>("timertrial") >>if LetterSetList.GetPrevAttrib ("timertrial") < 480000 then >>c.setAttrib "trialtime", 120000 >>End If >> >>And I keep getting type mismatch errors, which should be easy to >>resolve, but this one keep stumping me. Again, I'm sure this is >>something simple, but for some reason I can't get it. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From janet.trammell at gmail.com Fri Jul 1 21:00:24 2011 From: janet.trammell at gmail.com (Janet Trammell) Date: Fri, 1 Jul 2011 14:00:24 -0700 Subject: base timing of a trial on total time taken in previous trials--mismatch error? In-Reply-To: <4e0e29ed.c1602a0a.505f.ffffe433SMTPIN_ADDED@gmr-mx.google.com> Message-ID: I do now have a perfectly good working solution that makes sense, but the solution you just posted looks a whole lot "cleaner". I think this will be really useful if I ever need to do this again, and it looks like it can be adapted to similar situations. Many thanks for your help! Janet On Jul 1, 4:11?pm, David McFarlane wrote: > The original poster figured out a solution using > an array, as posted on the PST Forum > (http://www.pstnet.com/forum/Topic5419-7-1.aspx > ). ?Since I already figured out an alternative > solution without using an array, I am posting it > here just to show that I could do it. > > First, I will restate the specifications: > > (1) A block of trials will last for either some > specified time (e.g., 10 min) or for 12 trials, whichever comes first. > > (2) The stimulus on each trial will last for > either some specified time (2 min), or for the > remainder of the block duration, or until the > subject responds, whichever comes > first. ?Unpacking this, in effect it means that > all trials except the final one last for the > usual trial duration or until a response > (whichever comes first), and the final trial > lasts for the remainder of the block duration or > until a response (whichever comes first). > > I already know some functions for working > directly with the clock times of events, so for > this problem I find it handier to think in terms > of the clock times for when the blocks and trials > will end, instead of the remaining block > duration. ?So here is my solution (following good > programming practices, such as using constants in place of "magic numbers"). > > I would first define a global variable on the > User tab of the Script window. ?This will hold > the clock time of when the block must end. ?(I > like to use a "g_" prefix to remind me that it's > a global and not a local variable): > > ? ? ?Dim ?g_BlockTargetOffsetTime as Long > > Then I would set up a structure with some InLines something like the following: > > BlockInitCode > TrialList > ? ? ?TrialProc > ? ? ? ? ?TrialInitCode > ? ? ? ? ?TrialStimSlide > > TrialStimSlide is the stimulus, with Duration set to [TrialDur]. > > BlockInitCode is an InLine object that simply > stores the target offset time of the block for > use later (it assumes that the first event in > TrialProc is our stimulus, and uses the much > overlooked GetNextTargetOnsetTime method, see > that topic in the E-Basic Help facility): > > ? ? ?Const ?BlockDur as Long = 10 * 60 * 1000 > ? ? ?g_BlockTargetOffsetTime = GetNextTargetOnsetTime + BlockDur > > And TrialInitCode is another InLine object that > sets the TrialDur attribute according to specifications (1) and (2) above: > > ? ? ?Const ?TrialDur as Long = 2 * 60 * 1000 > ? ? ?If ((GetNextTargetOnsetTime + TrialDur) <= > g_BlockTargetOffsetTime) Then ?' all but the final trial > ? ? ? ? ?c.SetAttrib "TrialDur", TrialDur > ? ? ?Else ?' final trial > ? ? ? ? ?c.SetAttrib "TrialDur", _ > ? ? ? ? ? ? ?(g_BlockTargetOffsetTime - GetNextTargetOnsetTime) > ? ? ?End If > > And if you don't mind using one of the less > common coding conveniences of E-Basic/VBA, then you could shorten that to > > ? ? ?Const ?TrialDur as Long = 2 * 60 * 1000 > ? ? ?c.SetAttrib "TrialDur", _ > ? ? ? ? ?Iif( ((GetNextTargetOnsetTime + > TrialDur) <= g_BlockTargetOffsetTime ), _ > ? ? ? ? ?TrialDur, (g_BlockTargetOffsetTime - GetNextTargetOnsetTime) ) > > Pros to this solution: > - It does not use any array, nor require the > attending complications of computing array indexes. > > - It does not require any "If > c.GetAttrib("Trial") > 1" test on each trial -- > seems wasteful to run such a test on each trial > when we know ahead of time that it will succeed > on all trials except the first. ?Usually we can find a better way. > > - It works directly in terms of the target offset > time for the block, which gets computed only > once. ?It is thus more accurate with time > (without care, accumulated computations of block > time remaining might not take into account delays > in actual stimulus duration, etc.). > > Criticisms of this solution: > - Some users would find it more natural to work > in terms of the remaining block duration instead > of the target block offset time (but, without > much trouble, this solution could be adapted to > compute and use remaining block duration instead). > > - It uses the GetNextTargetOnsetTime method -- a > very powerful concept in E-Prime, but kept well > hidden in the documentation (I stumbled upon it > myself only while searching the Forum for other things). > > - Instead of having all the code compactly > gathered into one InLine (plus a bit of global > User code), it is spread across two InLines (plus > a bit of global User code). ?This may make it > slightly harder for some to follow (I think > Michiel Spap? has made well-put comments on this > sort of tradeoff either on the Group or in his E-Primer). > > - You already have a perfectly good working > solution that makes sense to you, so I'm a little late to the game, aren't I? > > -- David McFarlane, Professional Faultfinder > > At 6/30/2011 05:26 PM Thursday, David McFarlane wrote: > > > > > > > > >This got addressed on the PST Forum > >(http://www.pstnet.com/forum/Topic5419-7-1.aspx > >), but you did well to post here as well -- > >generally I respond only here on the E-Prime > >Group, and now I can post a few more details and > >provide code with proper indentation. > > >First, as you might find explained in Chapter 4 > >of the User's Guide that came with E-Prime, and > >have instead discovered the hard way, attributes > >propogate only downward through logging levels, > >they do not persist as you pop back up to higher > >levels, and as a result they do not persist as > >you pop up a level and then back down to the > >same level, as happens at the end of a Procedure > >run by a List. ?IOW, despite some appearance, > >"attributes" are *not* "variables", and they > >will not fulfill the role of > >variables. ?Variables and attributes each have their own roles. > > >So, as explained on the Forum, in short you need > >to use a global variable. ?As explained in > >Chapter 4 of the User's Guide, you do that in > >the User tab of the Script view. ?Define a variable such as TRemaining, e.g., > > >Dim TRemaining as Long > > >Then use that global variable to keep track of > >the value from trial to trial, as in ... ?well, > >when I tried to write out the code it didn't > >seem quite right, and I have to run off and > >catch a bus now. ?Maybe you or someone else can > >now sort this out based on the clues given so far. > > >-- David McFarlane, Professional Faultfinder > > >At 6/30/2011 02:18 PM Thursday, you wrote: > >>I am programming an experiment where the total time a person can take > >>is 10 minutes (600000 ms) (to do 12 trials), with a maximum of 2 > >>minutes per trial (the trial terminates and starts the next trial > >>after 2 minutes). I have set the program to terminate the list if the > >>total time is over 10 minutes, however there is a problem--say a > >>person has taken 9:45 do to 7 trials, so they have 15 seconds left. > >>BUT...on trial 8, the duration is still set to max 2 min--so a person > >>can theoretically have a total of 11:45, not 10:00 before it > >>terminates. So I need to have the program know that if more than 8 > >>minutes (480000) has been used, the duration of the trial should be > >>600000-however much time has been used so far. > > >>I have tried to fix this by putting an attribute in the list object > >>called "trial" which is just the number of the trial, and another > >>attribute called "trialtime", which will be the duration of the slide > >>object (where the stimulus/trial is presented). in the slide object > >>properties, I have set timelimit to be the attribute "trialtime". > >>Lastly, after each trial, the attribute "timertrial" is calculated, > >>which essentially calculates the length of time taken for that trial > >>and adds it to the previous time taken, so that this attribute is > >>constantly updated to reflect the total time taken. All of this seems > >>to work fine, and running through the program shows that "timertrial" > >>is indeed calculating correctly and is recording in the edata file. > >>the problem occurs, however, when I put all this together, and try to > >>change the duration of the next trial based on the "timertrial" > >>attribute. Here is my code: > > >>Using the inline statement below, I have set the first trial duration > >>is 120 seconds, and every other trial after that the duration is > >>calculated based on total time taken so far > > >>If c.GetAttrib ("trial") = 1 then c.SetAttrib "trialtime", 120000 > >>If c.GetAttrib ("trial") > 1 then > >>If c.getAttrib ("timertrial") >= 480000 then c.setAttrib "trialtime", > >>600000 - c.getAttrib ("timertrial") > >>If c.getAttrib ("timertrial") < 480000 then c.SetAttrib "trialtime", > >>120000 > >>End If > > >>The problem is, the program cannot find the attribute "timertrial"--it > >>calculates fine at the end of each trial, but when I start a new trial > >>(within the same list), it does not have a value yet for timertrial, > >>since that is calculated at the END of the trial. How do I get it to > >>pull the value of "timertrial" from the previous trial and use it as > >>an attribute in the NEXT trial? I am sure this is simple, but I can't > >>seem to get anywhere. > > >>Also, Note: I have tried using this code instead: > >>If c.GetAttrib ("Trial") > 1 then > >>if LetterSetList.GetPrevAttrib ("timertrial") >= 480000 then > >>c.setAttrib "trialtime", 600000 - LetterSetList.GetPrevAttrib > >>("timertrial") > >>if LetterSetList.GetPrevAttrib ("timertrial") < 480000 then > >>c.setAttrib "trialtime", 120000 > >>End If > > >>And I keep getting type mismatch errors, which should be easy to > >>resolve, but this one keep stumping me. ?Again, I'm sure this is > >>something simple, but for some reason I can't get it. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From tobias.fw at gmail.com Mon Jul 4 10:42:35 2011 From: tobias.fw at gmail.com (Tobias) Date: Mon, 4 Jul 2011 03:42:35 -0700 Subject: Refresh rate TFT In-Reply-To: <4e0dd5e9.cf3c2b0a.75a2.ffffd479SMTPIN_ADDED@gmr-mx.google.com> Message-ID: Thanks David for the detailed reply. If I understand you correctly, you assume that, entering a duration value of 40 ms, you will always have an actual duration of 50 ms (using the refresh rate of 60 Hz), right? Still, anoher question is, how long it physically takes for the pixels to cease glowing even after, let's say a black screen, sets on. This should be measured with external light sensitive hardware I guess... Best, Tobias On 1 Jul., 16:10, David McFarlane wrote: > Tobias, > > Stock reminder: ?1) I do not work for PST. ?2) PST's trained staff > takes any and all questions athttp://support.pstnet.com/e%2Dprime/support/login.asp, and they > strive to respond to all requests in 24-48 hours -- this is pretty > much their substitute for proper documentation, so make full use of > it. ?3) If you do get an answer from PST Web Support, please extend > the courtesy of posting their reply back here for the sake of others. > > That said, here is my take... > > Nice test, and excellent question. ?The problem arises because > E-Prime uses two entirely different and incompatible definitions of > "actual" duration: > > (1) Actual duration = (OnsetTime of next visual object) - (OnsetTime > of this visual object) > (2) Actual duration = (OffsetTime of this visual object) - (OnsetTime > of this visual object) > > So, if DurationError = (Duration (i.e., specified Duration)) - > ("actual" duration), then you have to know which definition of > "actual" duration is used. > > Because a visual object typically remains visible until the onset of > the next visual object, most of us think of "actual" duration in > terms of definition (1), and so would expect that definition to be > used for calculating DurationError. ?But if you think of that from a > programming point of view, you will see the problem with > that: ?E-Prime cannot know the OnsetTime of the next object until, > well, that object appears, and by that time it is too late to use the > value in logging anything regarding the previous object. > > So, E-Prime uses definition (2) for "actual" duration (see the > RteRunnableInputObject.DurationError topic in the E-Basic Help > facility), and your results follow. ?(Don't take my word for this, > log all the appropriate values and see for yourself that it does the > calculation as I describe.) ?IOW, at a (specified) Duration of 40 ms, > the object OnsetTime occurs late (by 10 ms), but OffsetTime still > occurs 40 ms later, thus DurationError = Duration - (OffsetTime - > OnsetTime) = 40 ms, as measured (hmm, did you use Event or Cumulative > timing mode? ?your results do not look quite right for Event timing > mode); but since the next object again appears 10 ms late, the > "actual" duration of each object (according to definition (1)) > remains 50 ms. ?Follow? > > Perhaps they could have chosen better terminology, although offhand I > have nothing better to suggest myself . > > One more note about measuring performance of LCD/TFT vs CRT. ?It may > casually seem that images appear and disappear from the display with > high performance, however, several years ago when we measured LCD > performance with a photodetector and oscilloscope we found that it > took a *long* time for "off" pixels to return to baseline (some > hundreds of ms, as I recall). ?That may not matter for your studies, > but it mattered to us at the time. ?We have not done that measurement > again, so don't know how modern LCDs perform; instead, we have just > stockpiled our own stash of CRTs to provide for our future studies. > > Regards, > -- David McFarlane, Professional Faultfinder > > At 7/1/2011 05:54 AM Friday, you wrote: > > > > > > > > >HI together, > > >as CRTs are hard to get nowadays, we equipped our labs with tft > >screens. I wrote short and simple experiment to test the timing. > >basically, there are 4 display elements, alternating black and white > >background with nothing on it. As the refresh rate is 60 Hertz, I > >first set the duration to 50 ms (which is about 3 refresh circles). > >Prerelease is set on 20 ms. > > >These are the results (duration, duration error, onset delay > >[according to logged data in results file]) > > >slide 1: 50, 0, 5 > >slide 2: 50, 0, 0 > >slide 3: 50, 0, 0 > >slide 4: 50, 0, 0 > > >These are the results for a duration of 40 ms > > >slide 1: 40, 0, 6 > >slide 2: 40, 0, 10 > >slide 3: 40, 0, 10 > >slide 4: 40, 0, 10 > > >The first onset delay might be due to waiting for the next refresh > >circle to start. If the duration value matches the screen refresh > >rate, there seems to be no delay. If it doesn't (in this case, 40 ms), > >there is a delay that adds up to the next value that matches (50 ms). > >However, it is not clear to me how the duration arror can be 0 if > >refresh rate and duration value do not match. The screen should not be > >able to display something for 40 ms. > > >Any ideas? Any hints for using TFTs or testing the timing of such > >screens? > > >Thanks a lot! Cheers, Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From tobias.fw at gmail.com Mon Jul 4 10:48:06 2011 From: tobias.fw at gmail.com (Tobias) Date: Mon, 4 Jul 2011 03:48:06 -0700 Subject: Refresh rate TFT In-Reply-To: <09DAEA8BC192C94EB62C8E71FC35A5D92F7ACB5E4F@EXCHANGE3.ad.nottingham.ac.uk> Message-ID: I totally agree with you that CRTs will not endure forever, at some point in the future all stocks are gone and everyone will have to cope with using TFT or LCD or whatever... unless there is some clever company producing custom-made CRTs for experimental psychologists ;-) There are so many people nowadays in visual science that use very short presentation times that I would expect some expertise in this connection. However, it's hard to find any data... some database with LCD/ TFT screens would be nice. Researchers all over the world could measure the pixel latency and all sorts of other parameters and one could compare screens regarding these factors... On 1 Jul., 17:08, Michiel Spape wrote: > Hi David & List, > Stockpiling CRTs worked for us quite well as well, but the screens are getting quite old. As a results, it might be nice if we can ascertain where exactly the problem is and what we can practically do about it (given the instance where a CRT is unavailable). > 1. As far as I know, the problem you describe used to be worse than it is these days; the sort of blurry effect one had when moving a mouse-pointer, for instance, seems to be pretty much gone. What to look for with LCD screens to get 'high performance'? > 2. Am I correct in the understanding that it is not the problem that LCD pixels get bright fast, but, rather that they turn dark again slower? If so, it would, all in all, be a rare thing that one could not design an experiment around it. For instance, if I have a subliminal white prime with a duration of 16 ms, it won't turn dark after 16 ms. However, it won't turn dark on your retina either, and for this reason we usually mask stuff (say, a white pattern mask). Yet, if that would be impossible, would using inverse colours (a black prime), or some other colour scheme help? > Anyway, these should be some simple questions for anyone with a bit more knowledge of hardware than I have - which is rather little (I like programming, but am incredibly clumsy, which never helped). Nevertheless, I think that it would be useful to have them answered on the list, as it does seem that CRT monitors, whether we like it or not, might go the way of the videotape. > Best, > Mich > > Michiel Spap? > Research Fellow > Perception & Action group > University of Nottingham > School of Psychologywww.cognitology.eu > > ---------------- > //snip > One more note about measuring performance of LCD/TFT vs CRT. ?It may > casually seem that images appear and disappear from the display with > high performance, however, several years ago when we measured LCD > performance with a photodetector and oscilloscope we found that it > took a *long* time for "off" pixels to return to baseline (some > hundreds of ms, as I recall). ?That may not matter for your studies, > but it mattered to us at the time. ?We have not done that measurement > again, so don't know how modern LCDs perform; instead, we have just > stockpiled our own stash of CRTs to provide for our future studies. > > Regards, > -- David McFarlane, Professional Faultfinder > > At 7/1/2011 05:54 AM Friday, you wrote: > > > > > > > > > > >HI together, > > >as CRTs are hard to get nowadays, we equipped our labs with tft > >screens. I wrote short and simple experiment to test the timing. > >basically, there are 4 display elements, alternating black and white > >background with nothing on it. As the refresh rate is 60 Hertz, I > >first set the duration to 50 ms (which is about 3 refresh circles). > >Prerelease is set on 20 ms. > > >These are the results (duration, duration error, onset delay > >[according to logged data in results file]) > > >slide 1: 50, 0, 5 > >slide 2: 50, 0, 0 > >slide 3: 50, 0, 0 > >slide 4: 50, 0, 0 > > >These are the results for a duration of 40 ms > > >slide 1: 40, 0, 6 > >slide 2: 40, 0, 10 > >slide 3: 40, 0, 10 > >slide 4: 40, 0, 10 > > >The first onset delay might be due to waiting for the next refresh > >circle to start. If the duration value matches the screen refresh > >rate, there seems to be no delay. If it doesn't (in this case, 40 ms), > >there is a delay that adds up to the next value that matches (50 ms). > >However, it is not clear to me how the duration arror can be 0 if > >refresh rate and duration value do not match. The screen should not be > >able to display something for 40 ms. > > >Any ideas? Any hints for using TFTs or testing the timing of such > >screens? > > >Thanks a lot! Cheers, Tobias > > -- > You received this message because you are subscribed to the Google Groups "E-Prime" group. > To post to this group, send email to e-prime at googlegroups.com. > To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. > For more options, visit this group athttp://groups.google.com/group/e-prime?hl=en. > > This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. ? Please do not use, copy or disclose the information contained in this message or in any attachment. ?Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. > > This message has been checked for viruses but the contents of an attachment > may still contain software viruses which could damage your computer system: > you are advised to perform your own checks. Email communications with the > University of Nottingham may be monitored as permitted by UK legislation. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From ahafri at gmail.com Tue Jul 5 16:11:06 2011 From: ahafri at gmail.com (Alon Hafri) Date: Tue, 5 Jul 2011 09:11:06 -0700 Subject: eye tracking reading study In-Reply-To: Message-ID: Thanks Lisa and Mich! Mich, yesterday I actually implemented the distance-to-image-center calculation for a non-reading study to determine which of several images on screen a participant clicked on, and it worked very well, so thanks for that suggestion. It is true that a hit-test on an AOI rectangle with a buffer on all sides is overly tolerant of diagonally displaced gaze positions. You could correct it (as you said) with the following: -When the hit-test coords lie within the AOI rectangle, it is coded as a hit -When the closest point to the hit-test coords is any side of the AOI rectangle, the hit-test coordinates must be within 20 pixels horizontally or vertically from the AOI rectangle -When the closest point to the hit-test coords is the corner, measure the distance between the hit-test and the corner sqrt(x^2 + y^2), which must be <=20 pixels I'll have a crack at designing the reading study now, and take everyone's suggestions into account. Alon On Jul 1, 8:53?am, Lisa Levinson wrote: > Not sure about this but for the EEG experiments I have helped with > that explore reading they seem to use the list function to generate > sentences. The words appear one at a time but it's the only way you > can flag (for segmentation) the aspect of the sentence being > investigated. Might be totally different for eye-tracking but that's > how I have seen the reading experiments are organized for EEG. > > On Jun 28, 4:46?pm, Alon Hafri wrote: > > > Hi, wondering if someone in the group can help me out. > > > I am creating an E-Prime experiment using the E-Prime Extensions for > > Tobii. For each trial, the participant will read a sentence, and I > > would like to record reading times for each window of size 1 to 3 > > words. > > > I have experience with using list attributes to set Slide Image > > position (and therefore AOI position) at runtime, as well as with > > using transparent Slide Images overtop of larger images to act as > > AOIs, but I've never done a reading study before. Since the words will > > vary in length for each trial, but will need to be evenly spaced (and > > on multiple lines conceivably), it would be great if position for > > every window would not have to be specified but could be determined by > > a script. > > > I can think of a few solutions, but perhaps someone has an easier one? > > 1) create a Slide Text object for each word (or window), and so they > > could act as their own AOIs. > > Drawbacks: You would have to specify locations for each one, and it > > could be tricky lining them up appropriately so words are evenly > > spaced. > > > 2) Have one Slide Text object for the whole sentence and have > > transparent AOIs overtop as the AOIs. > > Drawbacks: You would still have to specify locations for each, but the > > text would be in one object so would appear normal. > > > 3) Suggestions? > > > Thanks! > > Alon -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Tue Jul 5 19:27:00 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Tue, 5 Jul 2011 15:27:00 -0400 Subject: Refresh rate TFT In-Reply-To: Message-ID: At 7/4/2011 06:42 AM Monday, you wrote: >Thanks David for the detailed reply. If I understand you correctly, >you assume that, entering a duration value of 40 ms, you will always >have an actual duration of 50 ms (using the refresh rate of 60 Hz), >right? As far as I understand, yes. Of course, it would be best to further verify this with a photodector and oscilloscope. >Still, anoher question is, how long it physically takes for the pixels >to cease glowing even after, let's say a black screen, sets on. This >should be measured with external light sensitive hardware I guess... Exactly. Checking the "Response time" article at Wikipedia, I see that LCD response times are defined as the time for a pixel to go from black, to white, and back to black. With response times defined as such, and LCD manufacturers claiming response times under 10 ms, we should be in good shape. But I would not trust those numbers unless I measured it for myself, as I still wonder whether these claims actually include the white-to-black time. Furthermore, some manufacturers use "repsonse time" to refer to a gray-to-gray-to-gray transition, which is a another whole matter. As I said earlier, when we measured this ourselves several years ago, white-to-black took a *long* time. As I recall, it was actually a biphasic decay, with a rapid early phase (say, down to 10% of baseline after 10-20 ms), with a long slow tail (over 100 ms to get closer to baseline). As always, as scientists, we cannot take the word of equipment manufacturers (or even other scientists), it is incumbent upon us to measure our own equipment in our own labs. Regards, -- David McFarlane, Professional Faultfinder "You got to test that lab equipment, You got to test it for yourself, No one else can test it for you, You got to test it for yourself." (Apologies to the Fairfield Four) >Best, >Tobias > > >On 1 Jul., 16:10, David McFarlane wrote: > > Tobias, > > > > Stock reminder: 1) I do not work for PST. 2) PST's trained staff > > takes any and all questions > athttp://support.pstnet.com/e%2Dprime/support/login.asp, and they > > strive to respond to all requests in 24-48 hours -- this is pretty > > much their substitute for proper documentation, so make full use of > > it. 3) If you do get an answer from PST Web Support, please extend > > the courtesy of posting their reply back here for the sake of others. > > > > That said, here is my take... > > > > Nice test, and excellent question. The problem arises because > > E-Prime uses two entirely different and incompatible definitions of > > "actual" duration: > > > > (1) Actual duration = (OnsetTime of next visual object) - (OnsetTime > > of this visual object) > > (2) Actual duration = (OffsetTime of this visual object) - (OnsetTime > > of this visual object) > > > > So, if DurationError = (Duration (i.e., specified Duration)) - > > ("actual" duration), then you have to know which definition of > > "actual" duration is used. > > > > Because a visual object typically remains visible until the onset of > > the next visual object, most of us think of "actual" duration in > > terms of definition (1), and so would expect that definition to be > > used for calculating DurationError. But if you think of that from a > > programming point of view, you will see the problem with > > that: E-Prime cannot know the OnsetTime of the next object until, > > well, that object appears, and by that time it is too late to use the > > value in logging anything regarding the previous object. > > > > So, E-Prime uses definition (2) for "actual" duration (see the > > RteRunnableInputObject.DurationError topic in the E-Basic Help > > facility), and your results follow. (Don't take my word for this, > > log all the appropriate values and see for yourself that it does the > > calculation as I describe.) IOW, at a (specified) Duration of 40 ms, > > the object OnsetTime occurs late (by 10 ms), but OffsetTime still > > occurs 40 ms later, thus DurationError = Duration - (OffsetTime - > > OnsetTime) = 40 ms, as measured (hmm, did you use Event or Cumulative > > timing mode? your results do not look quite right for Event timing > > mode); but since the next object again appears 10 ms late, the > > "actual" duration of each object (according to definition (1)) > > remains 50 ms. Follow? > > > > Perhaps they could have chosen better terminology, although offhand I > > have nothing better to suggest myself . > > > > One more note about measuring performance of LCD/TFT vs CRT. It may > > casually seem that images appear and disappear from the display with > > high performance, however, several years ago when we measured LCD > > performance with a photodetector and oscilloscope we found that it > > took a *long* time for "off" pixels to return to baseline (some > > hundreds of ms, as I recall). That may not matter for your studies, > > but it mattered to us at the time. We have not done that measurement > > again, so don't know how modern LCDs perform; instead, we have just > > stockpiled our own stash of CRTs to provide for our future studies. > > > > Regards, > > -- David McFarlane, Professional Faultfinder > > > > At 7/1/2011 05:54 AM Friday, you wrote: > > > > > > > > > > > > > > > > >HI together, > > > > >as CRTs are hard to get nowadays, we equipped our labs with tft > > >screens. I wrote short and simple experiment to test the timing. > > >basically, there are 4 display elements, alternating black and white > > >background with nothing on it. As the refresh rate is 60 Hertz, I > > >first set the duration to 50 ms (which is about 3 refresh circles). > > >Prerelease is set on 20 ms. > > > > >These are the results (duration, duration error, onset delay > > >[according to logged data in results file]) > > > > >slide 1: 50, 0, 5 > > >slide 2: 50, 0, 0 > > >slide 3: 50, 0, 0 > > >slide 4: 50, 0, 0 > > > > >These are the results for a duration of 40 ms > > > > >slide 1: 40, 0, 6 > > >slide 2: 40, 0, 10 > > >slide 3: 40, 0, 10 > > >slide 4: 40, 0, 10 > > > > >The first onset delay might be due to waiting for the next refresh > > >circle to start. If the duration value matches the screen refresh > > >rate, there seems to be no delay. If it doesn't (in this case, 40 ms), > > >there is a delay that adds up to the next value that matches (50 ms). > > >However, it is not clear to me how the duration arror can be 0 if > > >refresh rate and duration value do not match. The screen should not be > > >able to display something for 40 ms. > > > > >Any ideas? Any hints for using TFTs or testing the timing of such > > >screens? > > > > >Thanks a lot! Cheers, Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From pati.confidence at gmail.com Wed Jul 6 05:17:10 2011 From: pati.confidence at gmail.com (pati-confidence) Date: Tue, 5 Jul 2011 22:17:10 -0700 Subject: Several flickering tasks run simultaneously Message-ID: I want to build a BCI system, which presents four targets on LCD screen, with flickering frequencies of 12Hz, 10Hz, 8.6Hz and 7.5Hz. respectively. And the four targets are flickering simultaneously. Can E-prime achieve the goal? Any tips will be appreciate. Thank you. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From ucfmicah at gmail.com Wed Jul 6 08:21:31 2011 From: ucfmicah at gmail.com (Micah) Date: Wed, 6 Jul 2011 01:21:31 -0700 Subject: OSPAN-task In-Reply-To: <4dee2fc1.cf3c2b0a.47ff.609eSMTPIN_ADDED@gmr-mx.google.com> Message-ID: The snark is strong in this answer, but I think google has foiled you. The top hit is now this post. Hence creating a totally unhelpful infinite loop. ;) BW, Micah On Jun 7, 4:03?pm, David McFarlane wrote: > http://www.lmgtfy.com/?q=e-prime+ospan > > -- David McFarlane, Professional Faultfinder > > > > > > > > >Hi alltogether, > > >I am wondering if anyone has a script sample for the OSPAN-task or if > >someone can help me with the program. > >My problem is the simplest possible programming of the rising number > >of calculations and the corresponding rise in the number of stimuli to > >memorize. > > >Thanks for any help!! > > >Alexander -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From Michiel.Spape at nottingham.ac.uk Wed Jul 6 08:43:42 2011 From: Michiel.Spape at nottingham.ac.uk (Michiel Spape) Date: Wed, 6 Jul 2011 09:43:42 +0100 Subject: Several flickering tasks run simultaneously In-Reply-To: Message-ID: Hi, Well, yes, it can (given the right monitor), though you would obviously be looking at ways to code your frequencies in duration of stimulus + duration between stimuli (e.g. 10 Hz = one stimulus every 100 ms, therefore, an image taking 17 ms, and an ISI of 83, would give the effect). If, however, it is a psychophysical (or vision science) experiment, I'd suggest something like Psychopy, or Matlab, instead of E-Prime however, the latter being much more catered towards intricate psychological designs than vision science as such. Best, Mich Michiel Spap? Research Fellow Perception & Action group University of Nottingham School of Psychology www.cognitology.eu -----Original Message----- From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of pati-confidence Sent: 06 July 2011 06:17 To: E-Prime Subject: Several flickering tasks run simultaneously I want to build a BCI system, which presents four targets on LCD screen, with flickering frequencies of 12Hz, 10Hz, 8.6Hz and 7.5Hz. respectively. And the four targets are flickering simultaneously. Can E-prime achieve the goal? Any tips will be appreciate. Thank you. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From Michiel.Spape at nottingham.ac.uk Wed Jul 6 09:12:17 2011 From: Michiel.Spape at nottingham.ac.uk (Michiel Spape) Date: Wed, 6 Jul 2011 10:12:17 +0100 Subject: Several flickering tasks run simultaneously In-Reply-To: Message-ID: Oh, wait, simultaneous tasks, you say? I think there are a few ways of handling this... How about you make one slide with your four targets. These are four text "sub objects". Each target has a colour: white (as in, off, since the background is white), or black. See first how you can make them black or white (it's the background colour thing). Then, set each to [Target1Colour], [Target2Colour], [Target3Colour] and [Target4Colour] instead. The slide has a duration of slightly below your maximum refresh rate (i.e. 15 ms if your monitor runs at 60 Hz), and onset sync is on. Make a list, sequential selection, 1 procedure, and set Exit after to 1 sec (i.e., it repeats for one second). Drag the slide you just made to the one procedure. Add 4 procedures to the list: Target1Colour, Target2Colour, Target3Colour, Target4Colour. Think of the list as one second, and add levels accordingly: if your monitor runs at 60 Hz, there should be at least 60 levels. Find out, at each level, which of the targets is black. For instance, your second target, flickering at 10 Hz, should be black at the first level (time = 0 ms), 7th level (time = 100 ms), 13th level (time = 200 ms) and so on, but white at level 2-6, and so on. Well, voila, there you go, it should now flicker. Of course, nothing is randomised, but it should work, and I think you might be able to take it from there. Also, no code yet. Best, Michiel Michiel Spap? Research Fellow Perception & Action group University of Nottingham School of Psychology www.cognitology.eu -----Original Message----- From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of pati-confidence Sent: 06 July 2011 06:17 To: E-Prime Subject: Several flickering tasks run simultaneously I want to build a BCI system, which presents four targets on LCD screen, with flickering frequencies of 12Hz, 10Hz, 8.6Hz and 7.5Hz. respectively. And the four targets are flickering simultaneously. Can E-prime achieve the goal? Any tips will be appreciate. Thank you. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From linda.toscani at gmail.com Wed Jul 6 14:43:58 2011 From: linda.toscani at gmail.com (Linda T) Date: Wed, 6 Jul 2011 07:43:58 -0700 Subject: recording response Message-ID: Hi! I have a problem with E-prime. I have an image display (my stimulus) and the subject can respond when they see this slide but it is really fast (500ms) then after this image display I used a wait. The problem is that the subjects can respond when there is the stimulus and also when there is the wait. If the subjects respond when there is the stimulus e-prime show equally the wait. I would like to say to the program that if the subjects respond when there is the stimulus it doesn't employ the wait. Because now the program record two responses if the subject respond twice. I hope I was clear. Linda -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From liwenna at gmail.com Thu Jul 7 10:32:39 2011 From: liwenna at gmail.com (liwenna) Date: Thu, 7 Jul 2011 03:32:39 -0700 Subject: recording response In-Reply-To: Message-ID: Hi Linda, This probably isn't the most elegant solution but it will work... inbetween your slide and your wait place an inline with a text like: If SLIDENAME.InputMasks.Responses.Count > 0 then goto skipwaitlabel after the wait place a label that you call skipwaitlabel. Now if a response is given during the slide then the program will "jump" to the location of the skipwaitlabel, thereby skipping the wait. Best, liw On 6 jul, 10:43, Linda T wrote: > Hi! > > I have a problem with E-prime. > I have an image display (my stimulus) and the subject can respond when > they see this slide but it is really fast (500ms) then after this > image display I used a wait. The problem is that the subjects can > respond when there is the stimulus and also when there is the wait. If > the subjects respond when there is the stimulus e-prime show equally > the wait. I would like to say to the program that if the subjects > respond when there is the stimulus it doesn't employ the wait. Because > now the program record two responses if the subject respond twice. > > I hope I was clear. > > Linda -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From liwenna at gmail.com Thu Jul 7 10:43:38 2011 From: liwenna at gmail.com (liwenna) Date: Thu, 7 Jul 2011 03:43:38 -0700 Subject: recording response In-Reply-To: Message-ID: actually... a feature I never use (learned about it only later :p) enables you to do this without code. In the slide itself you can specify that when a response is given it should go to a jumplabel. In the slide properties there is this box reading something like 'if response is given then', default setting is 'terminate' can also set it to 'goto jumplabel'. best liw On 7 jul, 12:32, liwenna wrote: > Hi Linda, > > This probably isn't the most elegant solution but it will work... > inbetween your slide and your wait place an inline with a text like: > > If SLIDENAME.InputMasks.Responses.Count > 0 then goto skipwaitlabel > > after the wait place a label that you call skipwaitlabel. Now if a > response is given during the slide then the program will "jump" to the > location of the skipwaitlabel, thereby skipping the wait. > > Best, > > liw > > On 6 jul, 10:43, Linda T wrote: > > > Hi! > > > I have a problem with E-prime. > > I have an image display (my stimulus) and the subject can respond when > > they see this slide but it is really fast (500ms) then after this > > image display I used a wait. The problem is that the subjects can > > respond when there is the stimulus and also when there is the wait. If > > the subjects respond when there is the stimulus e-prime show equally > > the wait. I would like to say to the program that if the subjects > > respond when there is the stimulus it doesn't employ the wait. Because > > now the program record two responses if the subject respond twice. > > > I hope I was clear. > > > Linda -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From linda.toscani at gmail.com Thu Jul 7 12:43:39 2011 From: linda.toscani at gmail.com (Linda T) Date: Thu, 7 Jul 2011 05:43:39 -0700 Subject: recording response In-Reply-To: <1002d72d-887d-4cad-81af-c8af124e75f7@e18g2000vbx.googlegroups.com> Message-ID: Thanks! I used the inline. In the other case I didn't understand in which way I can indicate the jumplabel. Do I have to use a number or a name to indicate the level that I want to go? best Linda On Jul 7, 12:43?pm, liwenna wrote: > actually... a feature I never use (learned about it only later :p) > enables you to do this without code. In the slide itself you can > specify that when a response is given it should go to a jumplabel. In > the slide properties there is this box reading something like 'if > response is given then', default setting is 'terminate' can also set > it to 'goto jumplabel'. > > best > > liw > > On 7 jul, 12:32, liwenna wrote: > > > > > > > > > Hi Linda, > > > This probably isn't the most elegant solution but it will work... > > inbetween your slide and your wait place an inline with a text like: > > > If SLIDENAME.InputMasks.Responses.Count > 0 then goto skipwaitlabel > > > after the wait place a label that you call skipwaitlabel. Now if a > > response is given during the slide then the program will "jump" to the > > location of the skipwaitlabel, thereby skipping the wait. > > > Best, > > > liw > > > On 6 jul, 10:43, Linda T wrote: > > > > Hi! > > > > I have a problem with E-prime. > > > I have an image display (my stimulus) and the subject can respond when > > > they see this slide but it is really fast (500ms) then after this > > > image display I used a wait. The problem is that the subjects can > > > respond when there is the stimulus and also when there is the wait. If > > > the subjects respond when there is the stimulus e-prime show equally > > > the wait. I would like to say to the program that if the subjects > > > respond when there is the stimulus it doesn't employ the wait. Because > > > now the program record two responses if the subject respond twice. > > > > I hope I was clear. > > > > Linda -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Thu Jul 7 16:20:14 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Thu, 7 Jul 2011 12:20:14 -0400 Subject: recording response In-Reply-To: Message-ID: Linda, Hmm. I wonder what task you want to perform, because offhand this design seems very clumsy -- You present an ImageDisplay for 500 ms, then follow that with a Wait object, but since a Wait object does not replace the previous visual display, this means that the subject will continue to see the ImageDisplay during the Wait. Why would you do such a thing? Then you go and collect a response to the Wait, which you do not want. Why did you add an input mask to the Wait object in the first place? If you just remove any input mask from the Wait object, then you will not get two responses, which seems to be what you are asking about. I must be missing something. -- David McFarlane, Professional Faultfinder At 7/6/2011 10:43 AM Wednesday, you wrote: >I have a problem with E-prime. >I have an image display (my stimulus) and the subject can respond when >they see this slide but it is really fast (500ms) then after this >image display I used a wait. The problem is that the subjects can >respond when there is the stimulus and also when there is the wait. If >the subjects respond when there is the stimulus e-prime show equally >the wait. I would like to say to the program that if the subjects >respond when there is the stimulus it doesn't employ the wait. Because >now the program record two responses if the subject respond twice. > >I hope I was clear. > >Linda -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From tobias.fw at gmail.com Thu Jul 7 17:20:14 2011 From: tobias.fw at gmail.com (Tobias) Date: Thu, 7 Jul 2011 10:20:14 -0700 Subject: refresh rate USB Message-ID: Hi together, I plan an experiment in which Reaction Times for two conditions will be compared and not too much of a difference is expected. Let's say 15 ms. I am wondering if an USB keyboard is the appropriate choice for such an experiment. I've heard that USB usually has a refresh rate of 120 Hz, meaning that responses are checked every 8 ms. That's a lot of noise added to the real reaction times. On the other hand, EEG data and other stuff CAN be transferred much faster than 120 Hz via USB cable. THe question is, whether Windows (or E-Prime) can handle this. What is your experience here? Thanks a lot and so long, Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From tobias.fw at gmail.com Thu Jul 7 17:23:45 2011 From: tobias.fw at gmail.com (Tobias) Date: Thu, 7 Jul 2011 10:23:45 -0700 Subject: Slide duration defined by variable, not attribute Message-ID: Hi, I would like to define the duration of an object (slide in this case) in E-Prime with a variable. As far as I know, instead of specifying the duration directly by a number, you can also use square brackets and enter, let's say [durationA]. This refers to the attribute in the current list named "durationA". However, using attributes is much more complicated and not really straight forward. Is there a way of using variables instead? Thanks a lot in advance! Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Thu Jul 7 17:56:09 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Thu, 7 Jul 2011 13:56:09 -0400 Subject: Slide duration defined by variable, not attribute In-Reply-To: Message-ID: Tobias, First, I disagree with your premise about attribute references being "more complicated and not really straight forward" than variables. It is just as simple and straightforward to use attribute references in code as it is to use variables in code, and in most cases attribute references offer distince advantages. I started out using variables just as you describe (and so will get around to actually answering your question :)), but once I understood attribute references better I switched to using those whenever I can, for the following reasons: - Using a variable for, say, Duration, leaves *no* clue in the program design that that value will vary -- to the contrary, the object's Duration will show as a constant, so programmers just have to "know" that this value will vary in some code somewhere. By contrast, an attribute reference in the object serves notice that that value varies, and thus is much "friendlier" to programmers. - Using a variable does *not* log the varying value, so after the experiment you have no record of what really happened. Using an attribute reference fixes this at no extra cost. Yes, you could throw in a c.SetAttrib "DurationA", durationA just to log the, but once you go to that length you might as well just use the attribute in your object, no? So except for extreme cases, if I need to vary a property value from code instead of a List, I always do something like c.SetAttrib "DurationA", durationA and then use [DurationA] for the Duration property of my stimulus object. But let's suppose that you really have a valid purpose for this (or wish to simply ignore my sage advice). Here's how you do that. Suppose you want to set the Duration property of a stimlus object called StimText to a variable called durationA. In code, you simply do StimText.Duration = durationA That's it! Absurdly simple. You can do this for a whole host of object properties, just look at the E-Basic Help page for any desired object. For that matter, work through Chapter 4 of the User's Guide that came with E-Prime, and take a course in Introduction to Computer Programming. Regards, -- David McFarlane, Professional Faultfinder At 7/7/2011 01:23 PM Thursday, you wrote: >Hi, > >I would like to define the duration of an object (slide in this case) >in E-Prime with a variable. As far as I know, instead of specifying >the duration directly by a number, you can also use square brackets >and enter, let's say [durationA]. This refers to the attribute in the >current list named "durationA". However, using attributes is much more >complicated and not really straight forward. Is there a way of using >variables instead? > >Thanks a lot in advance! >Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Thu Jul 7 18:17:11 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Thu, 7 Jul 2011 14:17:11 -0400 Subject: refresh rate USB In-Reply-To: <04d38ccd-8bcb-4308-b704-3a4066fd025d@b21g2000yqc.googlegro ups.com> Message-ID: Tobias, Sorry, I do not have citations handy, I will leave that as an academic exercise for you. But I believe this question, and a related one, has been covered over the years in publications such as "Behavior Research Methods", as well as in a white paper that I believe came from PST (and may appear in the E-Prime User Guide). First, the rate-limiting issue seems to *not* be the transfer rate of USB, but rather the characteristics of the keyboard hardware. Even if USB transfers at 120 Hz or higher, that does *not* mean that the device (in this case the keyboard) itself collects & sends data at that rate. With keyboards especially, this seems to be a bad assumption. First, individual keyboards are all over the map with regard to response latencies and variance, so even if you measure one you have no idea how that applies to others, even others of the same manufacturer and model! With that warning, it seems that keyboards often have variable latencies in the ballpark of 0 - 15 ms. This means that if you get an individual RT of, say 300 ms, you don't know if it was really 300 ms, or 285 ms, or somewhere in between. So if you really need to know *individual* RTs down to the ms, then you need to use something other than a keyboard (e.g., SRBox; buttons on computer mice have been shown to have long but low-variance latencies, which could help, but mouse movement may interfere with this -- once again, search the literature, or better do your own tests). But most studies either do not need that much precision, or do not need to know *individual* RTs. In particular, the behaviors that we wish to measure often have variance that far exceeds the variance in our sloppy input devices. And this was the thesis of the white paper that I referred to at the beginning. The authors did some computations to show that, in almost every case, simply adding a few more trials or subjects to measure an average RT brings the variance down as good as we could get by going to great lengths to use a more precise input device. So we should just quit fretting about this in most cases, and save that worrry for the few times that it really applies. I will be interested to hear others weigh in. -- David McFarlane, Professional Faultfinder "You got to test that device performance, You got to test it for yourself, No one else can test it for you, You got to test it for yourself." (Apologies to the Fairfield Four) >I plan an experiment in which Reaction Times for two conditions will >be compared and not too much of a difference is expected. Let's say 15 >ms. I am wondering if an USB keyboard is the appropriate choice for >such an experiment. I've heard that USB usually has a refresh rate of >120 Hz, meaning that responses are checked every 8 ms. That's a lot of >noise added to the real reaction times. > >On the other hand, EEG data and other stuff CAN be transferred much >faster than 120 Hz via USB cable. THe question is, whether Windows (or >E-Prime) can handle this. > >What is your experience here? > >Thanks a lot and so long, >Tobias > >-- >You received this message because you are subscribed to the Google >Groups "E-Prime" group. >To post to this group, send email to e-prime at googlegroups.com. >To unsubscribe from this group, send email to >e-prime+unsubscribe at googlegroups.com. >For more options, visit this group at >http://groups.google.com/group/e-prime?hl=en. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Thu Jul 7 19:03:55 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Thu, 7 Jul 2011 15:03:55 -0400 Subject: Several flickering tasks run simultaneously In-Reply-To: <09DAEA8BC192C94EB62C8E71FC35A5D92F7F21FE49@EXCHANGE3.ad.no ttingham.ac.uk> Message-ID: Mich beat me to the punch, and with the answer that I would have given at first. And Mich adds a crucial concern that I would have overlooked, namely that your chosen flicker times only work if they are each commensurate with your display refresh rate, which they probably are not (your chosen flicker frequencies translate to periods of 83.3, 100, 116.3, and 113.3 ms, respectively, and you would have to find a common divisor to all of those in the range of roughly 8.3 to 16, good luck!). But I can't resist weighing in further... Setting aside your incommensurate flicker rates, can E-Prime do this? Well (as Mich already said), yes, in principle; but in practice, for this particular task you might be far better off using something like Presentation, or MATLAB with the Psychophysics Toolkit (my own first choice for your task). You would like a toolset that includes pre-made objects that can flicker themselves at specified rates, and then set those running. AFAIK, EP has no such facility, but maybe Presentation or MATLAB or Psychopy do, and then Bob's your uncle! Next, you could try Mich's fine suggestion, but once again I fear that incommensurability will raise its ugly head. Now you not only need a common divisor, but you need a List that contains the pattern of on-off images for each time point until the entire temporal pattern repeats, and that will not happen until you reach the least-common-multiple of the individual period times, and in your case that will be greater than, say, 83.3 * 113.3 = 9.5 s, and perhaps as great as 83.3 * 100 * 116.3 * 113.3 = 30.7 h. Yikes! Of course, if you are not wedded to these period times, then you might adust them to more workable values (there's a nice academic exercise for you). But I said E-Prime could do this, and here's how. It would require some intricate code, the same way that you could do it in any full-featured programming language, such as C or C++ or even JavaScript, and I have done things like this myself in C. You would need to contruct your own "event loop" (do a search of the Group or the Forum on that phrase to see where I have discussed this before). In short, you create an array that holds the upcoming transition time for each object (in this case, your four flickering targets). Each time through the loop it just checks each of these times against the current clock time, and when any one reaches its next transition time then the loop updates that target and adjuts its transition time for the next one. Your loop just does that for the duration of the display. Here is some pseudo-code for that (using my own odd mixture of C-like and other notation): while( presentation_ongoing ) for( i = 1 to nTargets ) if( Clock.Read >= target[i].tNext ) target[i].toggle target[i].tNext = target[i].tNext + target[i].tPeriod Of course, you also have to initialize .tPeriod and .tNext for each target, and I left out the mechanics of how to implement anything like a .toggle method to redraw a target between its two states, but I leave those as exercises. -- David McFarlane, Professional Faultfinder (P.s. For those who know more C-like notation, the pseudo-code above could be more nicely written as while( presentation_ongoing ) for( i = 1 to nTargets ) if( Clock.Read >= target[i].tNext ) target[i].toggle target[i].tNext += target[i].tPeriod Isnt' that nice?) At 7/6/2011 05:12 AM Wednesday, Michiel Spape wrote: >Oh, wait, simultaneous tasks, you say? >I think there are a few ways of handling this... >How about you make one slide with your four >targets. These are four text "sub objects". Each >target has a colour: white (as in, off, since >the background is white), or black. See first >how you can make them black or white (it's the >background colour thing). Then, set each to >[Target1Colour], [Target2Colour], >[Target3Colour] and [Target4Colour] instead. The >slide has a duration of slightly below your >maximum refresh rate (i.e. 15 ms if your monitor >runs at 60 Hz), and onset sync is on. >Make a list, sequential selection, 1 procedure, >and set Exit after to 1 sec (i.e., it repeats >for one second). Drag the slide you just made to the one procedure. >Add 4 procedures to the list: Target1Colour, >Target2Colour, Target3Colour, Target4Colour. >Think of the list as one second, and add levels >accordingly: if your monitor runs at 60 Hz, >there should be at least 60 levels. Find out, at >each level, which of the targets is black. For >instance, your second target, flickering at 10 >Hz, should be black at the first level (time = 0 >ms), 7th level (time = 100 ms), 13th level (time >= 200 ms) and so on, but white at level 2-6, and so on. > >Well, voila, there you go, it should now >flicker. Of course, nothing is randomised, but >it should work, and I think you might be able to >take it from there. Also, no code yet. >Best, >Michiel > >Michiel Spap? >Research Fellow >Perception & Action group >University of Nottingham >School of Psychology >www.cognitology.eu > > >-----Original Message----- >From: e-prime at googlegroups.com >[mailto:e-prime at googlegroups.com] On Behalf Of pati-confidence >Sent: 06 July 2011 06:17 >To: E-Prime >Subject: Several flickering tasks run simultaneously > >I want to build a BCI system, which presents four targets on LCD >screen, with flickering frequencies of 12Hz, 10Hz, 8.6Hz and 7.5Hz. >respectively. > >And the four targets are flickering simultaneously. > >Can E-prime achieve the goal? > >Any tips will be appreciate. Thank you. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Thu Jul 7 19:08:39 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Thu, 7 Jul 2011 15:08:39 -0400 Subject: Several flickering tasks run simultaneously In-Reply-To: <4e160346.94592a0a.12e6.15f3SMTPIN_ADDED@gmr-mx.google.com> Message-ID: Ah, checked my own E-Prime FAQ, and here is the link of where I have addressed this kind of question before: http://groups.google.com/group/e-prime/browse_thread/thread/fda0b9bbe3a149c3 -- David McFarlane, Professional Faultfinder (Now next time someone asks this, I will try to direct them to the thread from today :)) At 7/7/2011 03:03 PM Thursday, David McFarlane wrote: >Mich beat me to the punch, and with the answer >that I would have given at first. And Mich adds >a crucial concern that I would have overlooked, >namely that your chosen flicker times only work >if they are each commensurate with your display >refresh rate, which they probably are not (your >chosen flicker frequencies translate to periods >of 83.3, 100, 116.3, and 113.3 ms, respectively, >and you would have to find a common divisor to >all of those in the range of roughly 8.3 to 16, >good luck!). But I can't resist weighing in further... > >Setting aside your incommensurate flicker rates, >can E-Prime do this? Well (as Mich already >said), yes, in principle; but in practice, for >this particular task you might be far better off >using something like Presentation, or MATLAB >with the Psychophysics Toolkit (my own first >choice for your task). You would like a toolset >that includes pre-made objects that can flicker >themselves at specified rates, and then set >those running. AFAIK, EP has no such facility, >but maybe Presentation or MATLAB or Psychopy do, and then Bob's your uncle! > >Next, you could try Mich's fine suggestion, but >once again I fear that incommensurability will >raise its ugly head. Now you not only need a >common divisor, but you need a List that >contains the pattern of on-off images for each >time point until the entire temporal pattern >repeats, and that will not happen until you >reach the least-common-multiple of the >individual period times, and in your case that >will be greater than, say, 83.3 * 113.3 = 9.5 s, >and perhaps as great as 83.3 * 100 * 116.3 * >113.3 = 30.7 h. Yikes! Of course, if you are >not wedded to these period times, then you might >adust them to more workable values (there's a nice academic exercise for you). > >But I said E-Prime could do this, and here's >how. It would require some intricate code, the >same way that you could do it in any >full-featured programming language, such as C or >C++ or even JavaScript, and I have done things >like this myself in C. You would need to >contruct your own "event loop" (do a search of >the Group or the Forum on that phrase to see >where I have discussed this before). In short, >you create an array that holds the upcoming >transition time for each object (in this case, >your four flickering targets). Each time >through the loop it just checks each of these >times against the current clock time, and when >any one reaches its next transition time then >the loop updates that target and adjuts its >transition time for the next one. Your loop >just does that for the duration of the >display. Here is some pseudo-code for that >(using my own odd mixture of C-like and other notation): > >while( presentation_ongoing ) > for( i = 1 to nTargets ) > if( Clock.Read >= target[i].tNext ) > target[i].toggle > target[i].tNext = target[i].tNext + target[i].tPeriod > >Of course, you also have to initialize .tPeriod >and .tNext for each target, and I left out the >mechanics of how to implement anything like a >.toggle method to redraw a target between its >two states, but I leave those as exercises. > >-- David McFarlane, Professional Faultfinder > > >(P.s. For those who know more C-like notation, >the pseudo-code above could be more nicely written as > >while( presentation_ongoing ) > for( i = 1 to nTargets ) > if( Clock.Read >= target[i].tNext ) > target[i].toggle > target[i].tNext += target[i].tPeriod > >Isnt' that nice?) > > >At 7/6/2011 05:12 AM Wednesday, Michiel Spape wrote: >>Oh, wait, simultaneous tasks, you say? >>I think there are a few ways of handling this... >>How about you make one slide with your four >>targets. These are four text "sub objects". >>Each target has a colour: white (as in, off, >>since the background is white), or black. See >>first how you can make them black or white >>(it's the background colour thing). Then, set >>each to [Target1Colour], [Target2Colour], >>[Target3Colour] and [Target4Colour] instead. >>The slide has a duration of slightly below your >>maximum refresh rate (i.e. 15 ms if your >>monitor runs at 60 Hz), and onset sync is on. >>Make a list, sequential selection, 1 procedure, >>and set Exit after to 1 sec (i.e., it repeats >>for one second). Drag the slide you just made to the one procedure. >>Add 4 procedures to the list: Target1Colour, >>Target2Colour, Target3Colour, Target4Colour. >>Think of the list as one second, and add levels >>accordingly: if your monitor runs at 60 Hz, >>there should be at least 60 levels. Find out, >>at each level, which of the targets is black. >>For instance, your second target, flickering at >>10 Hz, should be black at the first level (time >>= 0 ms), 7th level (time = 100 ms), 13th level >>(time = 200 ms) and so on, but white at level 2-6, and so on. >> >>Well, voila, there you go, it should now >>flicker. Of course, nothing is randomised, but >>it should work, and I think you might be able >>to take it from there. Also, no code yet. >>Best, >>Michiel >> >>Michiel Spap? >>Research Fellow >>Perception & Action group >>University of Nottingham >>School of Psychology >>www.cognitology.eu >> >> >>-----Original Message----- >>From: e-prime at googlegroups.com >>[mailto:e-prime at googlegroups.com] On Behalf Of pati-confidence >>Sent: 06 July 2011 06:17 >>To: E-Prime >>Subject: Several flickering tasks run simultaneously >> >>I want to build a BCI system, which presents four targets on LCD >>screen, with flickering frequencies of 12Hz, 10Hz, 8.6Hz and 7.5Hz. >>respectively. >> >>And the four targets are flickering simultaneously. >> >>Can E-prime achieve the goal? >> >>Any tips will be appreciate. Thank you. > >-- >You received this message because you are >subscribed to the Google Groups "E-Prime" group. >To post to this group, send email to e-prime at googlegroups.com. >To unsubscribe from this group, send email to >e-prime+unsubscribe at googlegroups.com. >For more options, visit this group at >http://groups.google.com/group/e-prime?hl=en. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From pquain at une.edu.au Thu Jul 7 21:35:32 2011 From: pquain at une.edu.au (Peter Quain) Date: Fri, 8 Jul 2011 07:35:32 +1000 Subject: refresh rate USB In-Reply-To: <04d38ccd-8bcb-4308-b704-3a4066fd025d@b21g2000yqc.googlegro ups.com> Message-ID: I think USB polling rate and USB data transfer rate are 2 different things At 03:20 AM 8/07/2011, you wrote: >Hi together, > >I plan an experiment in which Reaction Times for two conditions will >be compared and not too much of a difference is expected. Let's say 15 >ms. I am wondering if an USB keyboard is the appropriate choice for >such an experiment. I've heard that USB usually has a refresh rate of >120 Hz, meaning that responses are checked every 8 ms. That's a lot of >noise added to the real reaction times. > >On the other hand, EEG data and other stuff CAN be transferred much >faster than 120 Hz via USB cable. THe question is, whether Windows (or >E-Prime) can handle this. > >What is your experience here? > >Thanks a lot and so long, >Tobias > >-- >You received this message because you are subscribed to the Google >Groups "E-Prime" group. >To post to this group, send email to e-prime at googlegroups.com. >To unsubscribe from this group, send email to >e-prime+unsubscribe at googlegroups.com. >For more options, visit this group at >http://groups.google.com/group/e-prime?hl=en. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From pati.confidence at gmail.com Fri Jul 8 00:11:27 2011 From: pati.confidence at gmail.com (pati-confidence) Date: Fri, 8 Jul 2011 08:11:27 +0800 Subject: Several flickering tasks run simultaneously In-Reply-To: <4e16043e.83842b0a.705c.003fSMTPIN_ADDED@gmr-mx.google.com> Message-ID: Thank you for your so detailed and valuable relies. I have implemented the required task by the use of the Slide, with four targets flickering in 10Hz, 11Hz, 12Hz and 15Hz respectively, which is much easier than flickering in 7.5Hz, 8.6Hz, 10Hz, 12Hz. And I will attempt your method later. Thank you very much! guobing Wu On Fri, Jul 8, 2011 at 3:08 AM, David McFarlane wrote: > Ah, checked my own E-Prime FAQ, and here is the link of where I have > addressed this kind of question before: http://groups.google.com/** > group/e-prime/browse_thread/**thread/fda0b9bbe3a149c3 > > -- David McFarlane, Professional Faultfinder > (Now next time someone asks this, I will try to direct them to the thread > from today :)) > > > > At 7/7/2011 03:03 PM Thursday, David McFarlane wrote: > >> Mich beat me to the punch, and with the answer that I would have given at >> first. And Mich adds a crucial concern that I would have overlooked, namely >> that your chosen flicker times only work if they are each commensurate with >> your display refresh rate, which they probably are not (your chosen flicker >> frequencies translate to periods of 83.3, 100, 116.3, and 113.3 ms, >> respectively, and you would have to find a common divisor to all of those in >> the range of roughly 8.3 to 16, good luck!). But I can't resist weighing in >> further... >> >> Setting aside your incommensurate flicker rates, can E-Prime do this? >> Well (as Mich already said), yes, in principle; but in practice, for this >> particular task you might be far better off using something like >> Presentation, or MATLAB with the Psychophysics Toolkit (my own first choice >> for your task). You would like a toolset that includes pre-made objects >> that can flicker themselves at specified rates, and then set those running. >> AFAIK, EP has no such facility, but maybe Presentation or MATLAB or >> Psychopy do, and then Bob's your uncle! >> >> Next, you could try Mich's fine suggestion, but once again I fear that >> incommensurability will raise its ugly head. Now you not only need a common >> divisor, but you need a List that contains the pattern of on-off images for >> each time point until the entire temporal pattern repeats, and that will not >> happen until you reach the least-common-multiple of the individual period >> times, and in your case that will be greater than, say, 83.3 * 113.3 = 9.5 >> s, and perhaps as great as 83.3 * 100 * 116.3 * 113.3 = 30.7 h. Yikes! Of >> course, if you are not wedded to these period times, then you might adust >> them to more workable values (there's a nice academic exercise for you). >> >> But I said E-Prime could do this, and here's how. It would require some >> intricate code, the same way that you could do it in any full-featured >> programming language, such as C or C++ or even JavaScript, and I have done >> things like this myself in C. You would need to contruct your own "event >> loop" (do a search of the Group or the Forum on that phrase to see where I >> have discussed this before). In short, you create an array that holds the >> upcoming transition time for each object (in this case, your four flickering >> targets). Each time through the loop it just checks each of these times >> against the current clock time, and when any one reaches its next transition >> time then the loop updates that target and adjuts its transition time for >> the next one. Your loop just does that for the duration of the display. >> Here is some pseudo-code for that (using my own odd mixture of C-like and >> other notation): >> >> while( presentation_ongoing ) >> for( i = 1 to nTargets ) >> if( Clock.Read >= target[i].tNext ) >> target[i].toggle >> target[i].tNext = target[i].tNext + target[i].tPeriod >> >> Of course, you also have to initialize .tPeriod and .tNext for each >> target, and I left out the mechanics of how to implement anything like a >> .toggle method to redraw a target between its two states, but I leave those >> as exercises. >> >> -- David McFarlane, Professional Faultfinder >> >> >> (P.s. For those who know more C-like notation, the pseudo-code above >> could be more nicely written as >> >> while( presentation_ongoing ) >> for( i = 1 to nTargets ) >> if( Clock.Read >= target[i].tNext ) >> target[i].toggle >> target[i].tNext += target[i].tPeriod >> >> Isnt' that nice?) >> >> >> At 7/6/2011 05:12 AM Wednesday, Michiel Spape wrote: >> >>> Oh, wait, simultaneous tasks, you say? >>> I think there are a few ways of handling this... >>> How about you make one slide with your four targets. These are four text >>> "sub objects". Each target has a colour: white (as in, off, since the >>> background is white), or black. See first how you can make them black or >>> white (it's the background colour thing). Then, set each to [Target1Colour], >>> [Target2Colour], [Target3Colour] and [Target4Colour] instead. The slide has >>> a duration of slightly below your maximum refresh rate (i.e. 15 ms if your >>> monitor runs at 60 Hz), and onset sync is on. >>> Make a list, sequential selection, 1 procedure, and set Exit after to 1 >>> sec (i.e., it repeats for one second). Drag the slide you just made to the >>> one procedure. >>> Add 4 procedures to the list: Target1Colour, Target2Colour, >>> Target3Colour, Target4Colour. Think of the list as one second, and add >>> levels accordingly: if your monitor runs at 60 Hz, there should be at least >>> 60 levels. Find out, at each level, which of the targets is black. For >>> instance, your second target, flickering at 10 Hz, should be black at the >>> first level (time = 0 ms), 7th level (time = 100 ms), 13th level (time = 200 >>> ms) and so on, but white at level 2-6, and so on. >>> >>> Well, voila, there you go, it should now flicker. Of course, nothing is >>> randomised, but it should work, and I think you might be able to take it >>> from there. Also, no code yet. >>> Best, >>> Michiel >>> >>> Michiel Spap? >>> Research Fellow >>> Perception & Action group >>> University of Nottingham >>> School of Psychology >>> www.cognitology.eu >>> >>> >>> -----Original Message----- >>> From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.**com] >>> On Behalf Of pati-confidence >>> Sent: 06 July 2011 06:17 >>> To: E-Prime >>> Subject: Several flickering tasks run simultaneously >>> >>> I want to build a BCI system, which presents four targets on LCD >>> screen, with flickering frequencies of 12Hz, 10Hz, 8.6Hz and 7.5Hz. >>> respectively. >>> >>> And the four targets are flickering simultaneously. >>> >>> Can E-prime achieve the goal? >>> >>> Any tips will be appreciate. Thank you. >>> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "E-Prime" group. >> To post to this group, send email to e-prime at googlegroups.com. >> To unsubscribe from this group, send email to e-prime+unsubscribe@** >> googlegroups.com . >> For more options, visit this group at http://groups.google.com/** >> group/e-prime?hl=en . >> > > -- > You received this message because you are subscribed to the Google Groups > "E-Prime" group. > To post to this group, send email to e-prime at googlegroups.com. > To unsubscribe from this group, send email to e-prime+unsubscribe@** > googlegroups.com . > For more options, visit this group at http://groups.google.com/** > group/e-prime?hl=en . > > -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcfarla9 at msu.edu Fri Jul 8 03:43:31 2011 From: mcfarla9 at msu.edu (dkmcf) Date: Thu, 7 Jul 2011 20:43:31 -0700 Subject: Several flickering tasks run simultaneously In-Reply-To: Message-ID: Glad you got it to work so easily! And your report of success made me realize the error of my excessive computations -- of course you did not need to continue the List out to the least-common-multiple of your period times, you only needed to cover the few seconds of the stimulus, which, after adjusting the period times a bit, is quite manageable. Kudos to you & Mich together. -- David McFarlane, Professional Faultfinder On Jul 7, 8:11?pm, pati-confidence wrote: > Thank you for your so detailed and valuable relies. > I have implemented the required task by the use of the Slide, with four > targets flickering in 10Hz, 11Hz, 12Hz and 15Hz respectively, which is much > easier than flickering in 7.5Hz, 8.6Hz, 10Hz, 12Hz. > And I will attempt your method later. > Thank you very much! > > guobing Wu > > > > > > > > On Fri, Jul 8, 2011 at 3:08 AM, David McFarlane wrote: > > Ah, checked my own E-Prime FAQ, and here is the link of where I have > > addressed this kind of question before:http://groups.google.com/** > > group/e-prime/browse_thread/**thread/fda0b9bbe3a149c3 > > > -- David McFarlane, Professional Faultfinder > > (Now next time someone asks this, I will try to direct them to the thread > > from today :)) > > > At 7/7/2011 03:03 PM Thursday, David McFarlane wrote: > > >> Mich beat me to the punch, and with the answer that I would have given at > >> first. ?And Mich adds a crucial concern that I would have overlooked, namely > >> that your chosen flicker times only work if they are each commensurate with > >> your display refresh rate, which they probably are not (your chosen flicker > >> frequencies translate to periods of 83.3, 100, 116.3, and 113.3 ms, > >> respectively, and you would have to find a common divisor to all of those in > >> the range of roughly 8.3 to 16, good luck!). ?But I can't resist weighing in > >> further... > > >> Setting aside your incommensurate flicker rates, can E-Prime do this? > >> ?Well (as Mich already said), yes, in principle; but in practice, for this > >> particular task you might be far better off using something like > >> Presentation, or MATLAB with the Psychophysics Toolkit (my own first choice > >> for your task). ?You would like a toolset that includes pre-made objects > >> that can flicker themselves at specified rates, and then set those running. > >> ?AFAIK, EP has no such facility, but maybe Presentation or MATLAB or > >> Psychopy do, and then Bob's your uncle! > > >> Next, you could try Mich's fine suggestion, but once again I fear that > >> incommensurability will raise its ugly head. ?Now you not only need a common > >> divisor, but you need a List that contains the pattern of on-off images for > >> each time point until the entire temporal pattern repeats, and that will not > >> happen until you reach the least-common-multiple of the individual period > >> times, and in your case that will be greater than, say, 83.3 * 113.3 = 9.5 > >> s, and perhaps as great as 83.3 * 100 * 116.3 * 113.3 = 30.7 h. ?Yikes! ?Of > >> course, if you are not wedded to these period times, then you might adust > >> them to more workable values (there's a nice academic exercise for you). > > >> But I said E-Prime could do this, and here's how. ?It would require some > >> intricate code, the same way that you could do it in any full-featured > >> programming language, such as C or C++ or even JavaScript, and I have done > >> things like this myself in C. ?You would need to contruct your own "event > >> loop" (do a search of the Group or the Forum on that phrase to see where I > >> have discussed this before). ?In short, you create an array that holds the > >> upcoming transition time for each object (in this case, your four flickering > >> targets). ?Each time through the loop it just checks each of these times > >> against the current clock time, and when any one reaches its next transition > >> time then the loop updates that target and adjuts its transition time for > >> the next one. ?Your loop just does that for the duration of the display. > >> ?Here is some pseudo-code for that (using my own odd mixture of C-like and > >> other notation): > > >> while( presentation_ongoing ) > >> ? ?for( i = 1 to nTargets ) > >> ? ? ? ?if( Clock.Read >= target[i].tNext ) > >> ? ? ? ? ? ?target[i].toggle > >> ? ? ? ? ? ?target[i].tNext = target[i].tNext + target[i].tPeriod > > >> Of course, you also have to initialize .tPeriod and .tNext for each > >> target, and I left out the mechanics of how to implement anything like a > >> .toggle method to redraw a target between its two states, but I leave those > >> as exercises. > > >> -- David McFarlane, Professional Faultfinder > > >> (P.s. ?For those who know more C-like notation, the pseudo-code above > >> could be more nicely written as > > >> while( presentation_ongoing ) > >> ? ?for( i = 1 to nTargets ) > >> ? ? ? ?if( Clock.Read >= target[i].tNext ) > >> ? ? ? ? ? ?target[i].toggle > >> ? ? ? ? ? ?target[i].tNext += target[i].tPeriod > > >> Isnt' that nice?) > > >> At 7/6/2011 05:12 AM Wednesday, Michiel Spape wrote: > > >>> Oh, wait, simultaneous tasks, you say? > >>> I think there are a few ways of handling this... > >>> How about you make one slide with your four targets. These are four text > >>> "sub objects". Each target has a colour: white (as in, off, since the > >>> background is white), or black. See first how you can make them black or > >>> white (it's the background colour thing). Then, set each to [Target1Colour], > >>> [Target2Colour], [Target3Colour] and [Target4Colour] instead. The slide has > >>> a duration of slightly below your maximum refresh rate (i.e. 15 ms if your > >>> monitor runs at 60 Hz), and onset sync is on. > >>> Make a list, sequential selection, 1 procedure, and set Exit after to 1 > >>> sec (i.e., it repeats for one second). Drag the slide you just made to the > >>> one procedure. > >>> Add 4 procedures to the list: Target1Colour, Target2Colour, > >>> Target3Colour, Target4Colour. Think of the list as one second, and add > >>> levels accordingly: if your monitor runs at 60 Hz, there should be at least > >>> 60 levels. Find out, at each level, which of the targets is black. For > >>> instance, your second target, flickering at 10 Hz, should be black at the > >>> first level (time = 0 ms), 7th level (time = 100 ms), 13th level (time = 200 > >>> ms) and so on, but white at level 2-6, and so on. > > >>> Well, voila, there you go, it should now flicker. Of course, nothing is > >>> randomised, but it should work, and I think you might be able to take it > >>> from there. Also, no code yet. > >>> Best, > >>> Michiel > > >>> Michiel Spap? > >>> Research Fellow > >>> Perception & Action group > >>> University of Nottingham > >>> School of Psychology > >>>www.cognitology.eu > > >>> -----Original Message----- > >>> From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.**com] > >>> On Behalf Of pati-confidence > >>> Sent: 06 July 2011 06:17 > >>> To: E-Prime > >>> Subject: Several flickering tasks run simultaneously > > >>> I want to build a BCI system, which presents four targets on LCD > >>> screen, with flickering frequencies of 12Hz, 10Hz, 8.6Hz and 7.5Hz. > >>> respectively. > > >>> And the four targets are flickering simultaneously. > > >>> Can E-prime achieve the goal? > > >>> Any tips will be appreciate. ?Thank you. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From Michiel.Spape at nottingham.ac.uk Fri Jul 8 09:04:38 2011 From: Michiel.Spape at nottingham.ac.uk (Michiel Spape) Date: Fri, 8 Jul 2011 10:04:38 +0100 Subject: refresh rate USB In-Reply-To: <201107072135.p67LZbDp030945@mail14.tpg.com.au> Message-ID: Hi, Whilst that is true, he might just have meant the EEG (and so on) sampling rate. Obviously, indeed, "windows" can handle sub-millisecond accuracy just fine (provided, provided, provided), but the type of port (USB/PS2/Parallel/etc) and device make much more of a difference. If I remember correctly, PST had something to say on the matter, long ago, and advised always to use USB keyboards at least (rather than PS/2 keyboards). Have a look here: http://www.pstnet.com/eprimedevice.cfm ... I did, just now, and it turns out you might well be right in a way. Have a look at timing characteristics and read through the article. Personally, I have a pragmatic attitude towards these things. It may well be, for instance, that the PST SRBOX has superb timing characteristics, but have you ever tried pressing their buttons? I know, for a psychologist - mind and timing is everything - it is hard to remember, but those buttons take quite a bit of force to press. Imagine, for one, that it *must* take longer to press these buttons (they seem like soviet pieces of tech to me - i tend to like the look, but...), as opposed to say, a touchpad (which hardly needs any press), and that motor noise may well influence your experiments. For instance, if I do a finger-tapping test (press the space bar as often as you can within 10 seconds), I get average values of about 55 - pretty much exactly the norm from clinical literature. Now, I do the same with a mac keyboard (those white ones with buttons of about 3 mm above the rest of the keyboard, really light press required) - and suddenly i get values ranging from 65 to a massive 80. I say this difference (181 ms/press vs ~138 ms/press) is pretty massive (more than my average effect). So, my attitude is then: get good equipment, but don't stare yourself blind on the numbers. Best, Mich ________________________________________ From: e-prime at googlegroups.com [e-prime at googlegroups.com] On Behalf Of Peter Quain [pquain at une.edu.au] Sent: 07 July 2011 22:35 To: e-prime at googlegroups.com Subject: Re: refresh rate USB I think USB polling rate and USB data transfer rate are 2 different things At 03:20 AM 8/07/2011, you wrote: >Hi together, > >I plan an experiment in which Reaction Times for two conditions will >be compared and not too much of a difference is expected. Let's say 15 >ms. I am wondering if an USB keyboard is the appropriate choice for >such an experiment. I've heard that USB usually has a refresh rate of >120 Hz, meaning that responses are checked every 8 ms. That's a lot of >noise added to the real reaction times. > >On the other hand, EEG data and other stuff CAN be transferred much >faster than 120 Hz via USB cable. THe question is, whether Windows (or >E-Prime) can handle this. > >What is your experience here? > >Thanks a lot and so long, >Tobias > >-- >You received this message because you are subscribed to the Google >Groups "E-Prime" group. >To post to this group, send email to e-prime at googlegroups.com. >To unsubscribe from this group, send email to >e-prime+unsubscribe at googlegroups.com. >For more options, visit this group at >http://groups.google.com/group/e-prime?hl=en. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From tobias.fw at gmail.com Fri Jul 8 11:14:42 2011 From: tobias.fw at gmail.com (Tobias) Date: Fri, 8 Jul 2011 04:14:42 -0700 Subject: refresh rate USB In-Reply-To: <09DAEA8BC192C94EB62C8E71FC35A5D92F7F42200B@EXCHANGE3.ad.nottingham.ac.uk> Message-ID: Hi, In fact, we do have a SRBox and I so far refused to take it because the buttons are so hard to press. For this particular experiment I think, however, it might still be okay, because I don't want to compare beteween subjects, but between conditions. So the wispy girl might have longer reaction times than the weightlifter, but the differences between conditions should be visible for fast and slow responders. With the SRBox we actually have other problems too (I'll open another thread concerning this as this seems to be a hardware problem). ANother thing is, I just learned that a parallel port would have best timing characteristics. Serial ports are still quite slow. Maybe we will just use single buttons sending a signal via individual pins to the parallel port. I have never used it but there seems to be a way of using parallel ports in E-Prime (if you look at "devices"). Thanks a lot for your input! BEst, TObias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From tobias.fw at gmail.com Fri Jul 8 11:23:24 2011 From: tobias.fw at gmail.com (Tobias) Date: Fri, 8 Jul 2011 04:23:24 -0700 Subject: Slide duration defined by variable, not attribute In-Reply-To: <4e15f33a.c9d12a0a.0132.108bSMTPIN_ADDED@gmr-mx.google.com> Message-ID: Thanks for your sage advice. I think I just found it annoying to always use "c.setattrib" etc., never really knowing by heart the exact syntax. Also, I sometimes had error mesagges because the variable types didn't match etc. I'll think about it, but for the moment: THis snip of code you were writing, at what point in the procedure should I include it? I was actually aware that "StimText.Duration = durationA" should work, but if I put at a point before the object, the value entered in the object will overwrite it. And after the object, it's already too late :-p Best, Tobias On 7 Jul., 19:56, David McFarlane wrote: > Tobias, > > First, I disagree with your premise about attribute references being > "more complicated and not really straight forward" than > variables. ?It is just as simple and straightforward to use attribute > references in code as it is to use variables in code, and in most > cases attribute references offer distince advantages. ?I started out > using variables just as you describe (and so will get around to > actually answering your question :)), but once I understood attribute > references better I switched to using those whenever I can, for the > following reasons: > > - Using a variable for, say, Duration, leaves *no* clue in the > program design that that value will vary -- to the contrary, the > object's Duration will show as a constant, so programmers just have > to "know" that this value will vary in some code somewhere. ?By > contrast, an attribute reference in the object serves notice that > that value varies, and thus is much "friendlier" to programmers. > > - Using a variable does *not* log the varying value, so after the > experiment you have no record of what really happened. ?Using an > attribute reference fixes this at no extra cost. ?Yes, you could > throw in a c.SetAttrib "DurationA", durationA just to log the, but > once you go to that length you might as well just use the attribute > in your object, no? > > So except for extreme cases, if I need to vary a property value from > code instead of a List, I always do something like > > c.SetAttrib "DurationA", durationA > > and then use [DurationA] for the Duration property of my stimulus object. > > But let's suppose that you really have a valid purpose for this (or > wish to simply ignore my sage advice). ?Here's how you do > that. ?Suppose you want to set the Duration property of a stimlus > object called StimText to a variable called durationA. ?In code, you simply do > > StimText.Duration = durationA > > That's it! ?Absurdly simple. ?You can do this for a whole host of > object properties, just look at the E-Basic Help page for any desired > object. ?For that matter, work through Chapter 4 of the User's Guide > that came with E-Prime, and take a course in Introduction to Computer > Programming. > > Regards, > -- David McFarlane, Professional Faultfinder > > At 7/7/2011 01:23 PM Thursday, you wrote: > > > > > > > > >Hi, > > >I would like to define the duration of an object (slide in this case) > >in E-Prime with a variable. As far as I know, instead of specifying > >the duration directly by a number, you can also use square brackets > >and enter, let's say [durationA]. This refers to the attribute in the > >current list named "durationA". However, using attributes is much more > >complicated and not really straight forward. Is there a way of using > >variables instead? > > >Thanks a lot in advance! > >Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From Michiel.Spape at nottingham.ac.uk Fri Jul 8 12:43:53 2011 From: Michiel.Spape at nottingham.ac.uk (Michiel Spape) Date: Fri, 8 Jul 2011 13:43:53 +0100 Subject: refresh rate USB In-Reply-To: <4ac9aea9-ff44-4f3d-90a9-fe7ece48d12a@v12g2000vby.googlegroups.com> Message-ID: Hi, Good that you thought of it. I am, however, not so sure of the weightlifter/wispy person thing. 1. Obviously, I know the idea behind testing within subjects - all my work has been like that (until now, actually). By your own words, however, you seem concerned enough for noise within subjects - the point of the current thread. I wholeheartedly agree, in fact, that you wish the 8 ms error (which should likewise be similar between conditions) to be gone, but have argued that the motor noise will be *much* higher than this tiny bit of variance. Only, after all, if your bodybuilder will *always* take, say, 30 ms to press the button, and the wispy person, say 60 ms, you would not have a problem. This is immensely unlikely. Of course, once you have an effect, I will not say it's because of this or that, but theoretically, it should take more trials for your noise to be cancelled out by your effect. 2. The problem may be worse, though. As I'm sure you know, a lot of stuff is said to happen at a rather late stage of response processing. What if, for instance (although I agree this is unlikely), your subject is able to inhibit/speed up/etc his/her response 20 ms prior to its registration in the SRBOX - halfway between the beginning of a press and the end thereof? What I am saying is that it is conceivable that one condition (depending on where in the decision model you place your effect) might well be more affected by the heavy button than another, thus making mince of even a within-subject design. Whether this is true or not, I think the problem can be easily circumvented by just using a very light button box. Best, Mich Michiel Spap? Research Fellow Perception & Action group University of Nottingham School of Psychology www.cognitology.eu -----Original Message----- From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of Tobias Sent: 08 July 2011 12:15 To: E-Prime Subject: Re: refresh rate USB Hi, In fact, we do have a SRBox and I so far refused to take it because the buttons are so hard to press. For this particular experiment I think, however, it might still be okay, because I don't want to compare beteween subjects, but between conditions. So the wispy girl might have longer reaction times than the weightlifter, but the differences between conditions should be visible for fast and slow responders. With the SRBox we actually have other problems too (I'll open another thread concerning this as this seems to be a hardware problem). ANother thing is, I just learned that a parallel port would have best timing characteristics. Serial ports are still quite slow. Maybe we will just use single buttons sending a signal via individual pins to the parallel port. I have never used it but there seems to be a way of using parallel ports in E-Prime (if you look at "devices"). Thanks a lot for your input! BEst, TObias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Fri Jul 8 14:03:52 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Fri, 8 Jul 2011 10:03:52 -0400 Subject: Slide duration defined by variable, not attribute In-Reply-To: Message-ID: Tobias, Hmm, well, from this distance I cannot tell what you are doing wrong, I just put the code anywhere before the object and it works perfectly for me (I tried just now and made absolutely sure). (I did have to make sure to type in the correct number -- I first mistakenly typed "5" for 5 s, forgetting that I had to enter 5000 for 5000 ms, once I did that it was OK. So do make sure you have entered the correct values.) More importantly, on the object itself I just left the Duration at its default of 1000. The exact value does not matter at all, but you must, *must* use a literal value in the Duration property of the object itself, do *not* use an attribute reference!! If you use an attribute reference for the duration then that attribute value will replace the value from your earlier code -- you could see this for yourself simply by looking at the source code that E-Studio generates, you don't need my help to figure this out. Of course, putting a literal value in for the Duration of the object will deceive users into thinking that the Duration for that object is that literal value, instead of the value that comes from your inline code, which is the point of my first objection below. And if you can get this to work by setting an attribute reference in code, then why bother getting it to work withouth the attribute reference, except as a mere academic exercise (of which I would approve)? -- David McFarlane, Professional Faultfinder At 7/8/2011 07:23 AM Friday, you wrote: >Thanks for your sage advice. I think I just found it annoying to >always use "c.setattrib" etc., never really knowing by heart the exact >syntax. Also, I sometimes had error mesagges because the variable >types didn't match etc. I'll think about it, but for the moment: THis >snip of code you were writing, at what point in the procedure should I >include it? I was actually aware that "StimText.Duration = durationA" >should work, but if I put at a point before the object, the value >entered in the object will overwrite it. And after the object, it's >already too late :-p > >Best, >Tobias > >On 7 Jul., 19:56, David McFarlane wrote: > > Tobias, > > > > First, I disagree with your premise about attribute references being > > "more complicated and not really straight forward" than > > variables. It is just as simple and straightforward to use attribute > > references in code as it is to use variables in code, and in most > > cases attribute references offer distince advantages. I started out > > using variables just as you describe (and so will get around to > > actually answering your question :)), but once I understood attribute > > references better I switched to using those whenever I can, for the > > following reasons: > > > > - Using a variable for, say, Duration, leaves *no* clue in the > > program design that that value will vary -- to the contrary, the > > object's Duration will show as a constant, so programmers just have > > to "know" that this value will vary in some code somewhere. By > > contrast, an attribute reference in the object serves notice that > > that value varies, and thus is much "friendlier" to programmers. > > > > - Using a variable does *not* log the varying value, so after the > > experiment you have no record of what really happened. Using an > > attribute reference fixes this at no extra cost. Yes, you could > > throw in a c.SetAttrib "DurationA", durationA just to log the, but > > once you go to that length you might as well just use the attribute > > in your object, no? > > > > So except for extreme cases, if I need to vary a property value from > > code instead of a List, I always do something like > > > > c.SetAttrib "DurationA", durationA > > > > and then use [DurationA] for the Duration property of my stimulus object. > > > > But let's suppose that you really have a valid purpose for this (or > > wish to simply ignore my sage advice). Here's how you do > > that. Suppose you want to set the Duration property of a stimlus > > object called StimText to a variable called durationA. In code, > you simply do > > > > StimText.Duration = durationA > > > > That's it! Absurdly simple. You can do this for a whole host of > > object properties, just look at the E-Basic Help page for any desired > > object. For that matter, work through Chapter 4 of the User's Guide > > that came with E-Prime, and take a course in Introduction to Computer > > Programming. > > > > Regards, > > -- David McFarlane, Professional Faultfinder > > > > At 7/7/2011 01:23 PM Thursday, you wrote: > > >Hi, > > > > >I would like to define the duration of an object (slide in this case) > > >in E-Prime with a variable. As far as I know, instead of specifying > > >the duration directly by a number, you can also use square brackets > > >and enter, let's say [durationA]. This refers to the attribute in the > > >current list named "durationA". However, using attributes is much more > > >complicated and not really straight forward. Is there a way of using > > >variables instead? > > > > >Thanks a lot in advance! > > >Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Fri Jul 8 14:32:09 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Fri, 8 Jul 2011 10:32:09 -0400 Subject: refresh rate USB In-Reply-To: <4ac9aea9-ff44-4f3d-90a9-fe7ece48d12a@v12g2000vby.googlegro ups.com> Message-ID: Tobias, I checked through my FAQ, and found the following foundational citation: Segalowitz & Graves (1990), Beh Res Meth Instr Comp 22:283-289. It's rather outdated now, but it sets the stage, and if you search for later papers that cite this one then you will learn a lot. At 7/8/2011 07:14 AM Friday, you wrote: >In fact, we do have a SRBox and I so far refused to take it because >the buttons are so hard to press. When we use a SRBox for tapping time tasks, we do *not* use the buttons on the SRBox itself. If you look at the documention for the SRBox, you will find that you can connect any simple button box you like through a connector inside the SRBox. By that means, you can use buttons that suit your tastes, but still use the electronics of the SRBox to get the responses from your buttons into E-Prime, it is really quite trivial. As I have mentioned in several other threads here and/or on the PST Forum, I just grab some parts from Radio Shack, or a local electronics supplier, or an online source (e.g., Newark, or Allied) -- we like to use high-quality easy-push "clicky" pushbuttons -- build a box and an adapter cable, plug it all in through the SRBox, and E-Prime never knows the difference. I don't know why everybody doesn't do this. >ANother thing is, I just learned that a parallel port would have best >timing characteristics. Serial ports are still quite slow. Maybe we >will just use single buttons sending a signal via individual pins to >the parallel port. I have never used it but there seems to be a way of >using parallel ports in E-Prime (if you look at "devices"). Indeed, the parallel port or an ordinary digital I/O expansion card could give you near-instant latencies (microsecond range?). The down side, as you will find by reading the articles on the PST Knowledge Base, or the book "Parallel Port Complete", or threads on the Group or the Forum, using the parallel port does take some finesse. In the old days before Windows XP we could add a digital I/O card to make the programming simpler, but now that requires specialized drivers and libraries simply to execute a single I/O command. That said, if you think through the specifications of the SRBox, you will see that with proper configuration it achieves sub-millisecond latency, with minimal programming finesse. That does not seem so bad to me. Hmm, seems to me that we had much of this discussion in an earlier thread, but I do not have a reference handy. But checking through my FAQ, I found references to a couple of pertinent links: Empirisoft promises a keyboard with sub-millisecond latency, see http://www.empirisoft.com/Hardware.aspx?index=2 . And Ergodex offers a way to build an arbitrary keyboard layout, although its timing characteristics may be no better than an ordinary keyboard, see www.ergodex.com . Aha, using "Ergodex" as a search term on the Group, I found the earlier discussion, here is the link: http://groups.google.com/group/e-prime/browse_thread/thread/d42447cfc9a061af . Among other things, this thread contains more citations to studies on timing performance of various input devices. Have fun! -- David McFarlane, Professional Faultfinder -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From linda.toscani at gmail.com Fri Jul 8 14:40:41 2011 From: linda.toscani at gmail.com (Linda T) Date: Fri, 8 Jul 2011 07:40:41 -0700 Subject: recording response In-Reply-To: <4e15dcc5.94592a0a.12e6.0de7SMTPIN_ADDED@gmr-mx.google.com> Message-ID: In theory in the properties of the ImageDisplay I could indicate the duration time (500ms) and the response time limit. The problem is if I indicate a response time limit longer than the duration time e-prime does not wait the response and go to the next trial after 500ms without recording the response. I employed a Wait to this reason. What is an input mask? I fixed the problem with the liwena's inline. :-) Best Linda On Jul 7, 6:20?pm, David McFarlane wrote: > Linda, > > Hmm. ?I wonder what task you want to perform, because offhand this > design seems very clumsy -- You present an ImageDisplay for 500 ms, > then follow that with a Wait object, but since a Wait object does not > replace the previous visual display, this means that the subject will > continue to see the ImageDisplay during the Wait. ?Why would you do > such a thing? ?Then you go and collect a response to the Wait, which > you do not want. ?Why did you add an input mask to the Wait object in > the first place? ?If you just remove any input mask from the Wait > object, then you will not get two responses, which seems to be what > you are asking about. > > I must be missing something. > > -- David McFarlane, Professional Faultfinder > > At 7/6/2011 10:43 AM Wednesday, you wrote: > > > > > > > > >I have a problem with E-prime. > >I have an image display (my stimulus) and the subject can respond when > >they see this slide but it is really fast (500ms) then after this > >image display I used a wait. The problem is that the subjects can > >respond when there is the stimulus and also when there is the wait. If > >the subjects respond when there is the stimulus e-prime show equally > >the wait. I would like to say to the program that if the subjects > >respond when there is the stimulus it doesn't employ the wait. Because > >now the program record two responses if the subject respond twice. > > >I hope I was clear. > > >Linda -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Fri Jul 8 15:20:53 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Fri, 8 Jul 2011 11:20:53 -0400 Subject: recording response In-Reply-To: <56d30898-4167-4809-bbe2-cab2549d2f59@q1g2000vbj.googlegrou ps.com> Message-ID: Linda, "Input mask" is E-Prime lingo for the facilities that actually collect a response -- it is a core concept of E-Prime, although I do not know anywhere where it is well described or explained. But note, for instance, that when you add a Keyboard as an "input mask" to a stimulus object, that input mask is not strictly a part of the stimulus object, it in fact runs independently from and concurrently with its associated stimulus object. That is how "extended input" (see Appendix C of the User's Guide) works. Anyway, glad you got it to work the way you want, but here is what still baffles me: From what you describe your trial works as follows. You run a Slide object for 500 ms. The subject may respond during that time -- you do not specify what happens if the subject does respond then, do you terminate the Slide or does it complete its 500 ms? Regardless, if the subject responds then you move on to the next trial. If the subject does not respond then (using a Wait object) *the Slide remains on the screen* while the subject gets some extra (unspecified) time to respond. So in effect, the Slide simply remains visible until the subject responds or the end of the Wait period, whichever comes first. Well, if that is all you wanted, you could have simply given the full Duration to your Slide in the first place, and set End Action to Terminate. It just seems to me that you are going through extra trouble in order to do something trivial, and I feel the need to clarify this so that others who later stumble onto this thread do not make the same mistake. So what am I missing? Finally, if you have not already, I will give you the same advice that I give over and over again here -- before you write your first experiment in E-Prime, you *must* work through *all* of the tutorials in the Getting Started Guide and User's Guide that came with E-Prime, otherwise you just do a disservice to yourself and everyone else. (And "all" includes Appendix C of the User's Guide.) As insufficient as those Guides are, some folks at PST worked very hard to produce them for us, so we owe it to them to make use of whatever they did provide us. -- David McFarlane, Professional Faultfinder >In theory in the properties of the ImageDisplay I could indicate the >duration time (500ms) and the response time limit. The problem is if I >indicate a response time limit longer than the duration time e-prime >does not wait the response and go to the next trial after 500ms >without recording the response. I employed a Wait to this reason. > >What is an input mask? > >I fixed the problem with the liwena's inline. :-) > >Best > >Linda > >On Jul 7, 6:20 pm, David McFarlane wrote: > > Linda, > > > > Hmm. I wonder what task you want to perform, because offhand this > > design seems very clumsy -- You present an ImageDisplay for 500 ms, > > then follow that with a Wait object, but since a Wait object does not > > replace the previous visual display, this means that the subject will > > continue to see the ImageDisplay during the Wait. Why would you do > > such a thing? Then you go and collect a response to the Wait, which > > you do not want. Why did you add an input mask to the Wait object in > > the first place? If you just remove any input mask from the Wait > > object, then you will not get two responses, which seems to be what > > you are asking about. > > > > I must be missing something. > > > > -- David McFarlane, Professional Faultfinder > > > > At 7/6/2011 10:43 AM Wednesday, you wrote: > > >I have a problem with E-prime. > > >I have an image display (my stimulus) and the subject can respond when > > >they see this slide but it is really fast (500ms) then after this > > >image display I used a wait. The problem is that the subjects can > > >respond when there is the stimulus and also when there is the wait. If > > >the subjects respond when there is the stimulus e-prime show equally > > >the wait. I would like to say to the program that if the subjects > > >respond when there is the stimulus it doesn't employ the wait. Because > > >now the program record two responses if the subject respond twice. > > > > >I hope I was clear. > > > > >Linda -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From tobias.fw at gmail.com Mon Jul 11 10:03:26 2011 From: tobias.fw at gmail.com (Tobias) Date: Mon, 11 Jul 2011 03:03:26 -0700 Subject: Slide duration defined by variable, not attribute In-Reply-To: <4e170e4b.ce5e2a0a.697d.40c9SMTPIN_ADDED@gmr-mx.google.com> Message-ID: The problem was that I was still referring to an attribute... so thanks for the hint! best, Tobias On 8 Jul., 16:03, David McFarlane wrote: > Tobias, > > Hmm, well, from this distance I cannot tell what you are doing wrong, > I just put the code anywhere before the object and it works perfectly > for me (I tried just now and made absolutely sure). ?(I did have to > make sure to type in the correct number -- I first mistakenly typed > "5" for 5 s, forgetting that I had to enter 5000 for 5000 ms, once I > did that it was OK. ?So do make sure you have entered the correct > values.) ?More importantly, on the object itself I just left the > Duration at its default of 1000. ?The exact value does not matter at > all, but you must, *must* use a literal value in the Duration > property of the object itself, do *not* use an attribute > reference!! ?If you use an attribute reference for the duration then > that attribute value will replace the value from your earlier code -- > you could see this for yourself simply by looking at the source code > that E-Studio generates, you don't need my help to figure this out. > > Of course, putting a literal value in for the Duration of the object > will deceive users into thinking that the Duration for that object is > that literal value, instead of the value that comes from your inline > code, which is the point of my first objection below. ?And if you can > get this to work by setting an attribute reference in code, then why > bother getting it to work withouth the attribute reference, except as > a mere academic exercise (of which I would approve)? > > -- David McFarlane, Professional Faultfinder > > At 7/8/2011 07:23 AM Friday, you wrote: > > > > > > > > >Thanks for your sage advice. I think I just found it annoying to > >always use "c.setattrib" etc., never really knowing by heart the exact > >syntax. Also, I sometimes had error mesagges because the variable > >types didn't match etc. I'll think about it, but for the moment: THis > >snip of code you were writing, at what point in the procedure should I > >include it? I was actually aware that "StimText.Duration = durationA" > >should work, but if I put at a point before the object, the value > >entered in the object will overwrite it. And after the object, it's > >already too late :-p > > >Best, > >Tobias > > >On 7 Jul., 19:56, David McFarlane wrote: > > > Tobias, > > > > First, I disagree with your premise about attribute references being > > > "more complicated and not really straight forward" than > > > variables. ?It is just as simple and straightforward to use attribute > > > references in code as it is to use variables in code, and in most > > > cases attribute references offer distince advantages. ?I started out > > > using variables just as you describe (and so will get around to > > > actually answering your question :)), but once I understood attribute > > > references better I switched to using those whenever I can, for the > > > following reasons: > > > > - Using a variable for, say, Duration, leaves *no* clue in the > > > program design that that value will vary -- to the contrary, the > > > object's Duration will show as a constant, so programmers just have > > > to "know" that this value will vary in some code somewhere. ?By > > > contrast, an attribute reference in the object serves notice that > > > that value varies, and thus is much "friendlier" to programmers. > > > > - Using a variable does *not* log the varying value, so after the > > > experiment you have no record of what really happened. ?Using an > > > attribute reference fixes this at no extra cost. ?Yes, you could > > > throw in a c.SetAttrib "DurationA", durationA just to log the, but > > > once you go to that length you might as well just use the attribute > > > in your object, no? > > > > So except for extreme cases, if I need to vary a property value from > > > code instead of a List, I always do something like > > > > c.SetAttrib "DurationA", durationA > > > > and then use [DurationA] for the Duration property of my stimulus object. > > > > But let's suppose that you really have a valid purpose for this (or > > > wish to simply ignore my sage advice). ?Here's how you do > > > that. ?Suppose you want to set the Duration property of a stimlus > > > object called StimText to a variable called durationA. ?In code, > > you simply do > > > > StimText.Duration = durationA > > > > That's it! ?Absurdly simple. ?You can do this for a whole host of > > > object properties, just look at the E-Basic Help page for any desired > > > object. ?For that matter, work through Chapter 4 of the User's Guide > > > that came with E-Prime, and take a course in Introduction to Computer > > > Programming. > > > > Regards, > > > -- David McFarlane, Professional Faultfinder > > > > At 7/7/2011 01:23 PM Thursday, you wrote: > > > >Hi, > > > > >I would like to define the duration of an object (slide in this case) > > > >in E-Prime with a variable. As far as I know, instead of specifying > > > >the duration directly by a number, you can also use square brackets > > > >and enter, let's say [durationA]. This refers to the attribute in the > > > >current list named "durationA". However, using attributes is much more > > > >complicated and not really straight forward. Is there a way of using > > > >variables instead? > > > > >Thanks a lot in advance! > > > >Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From tobias.fw at gmail.com Mon Jul 11 15:39:36 2011 From: tobias.fw at gmail.com (Tobias) Date: Mon, 11 Jul 2011 08:39:36 -0700 Subject: recording current experimental time Message-ID: Hi together, I programmed an experiment in which a lot of positions and stimuli have to be calculated online. Calculation of slides happens BEFORE they are executed. Interestingly, this can cause a delay of up to 5 sec (not ms!) for some computer, 2 sec for other computers and only 1 sec on a third computer. Importantly, these computers are comparable regarding their hardware, i.e. processor, RAM etc. To test what exactly takes E-Prime so long under some circumstances, Iw ould like to measure the experimental time at several points in time during a single trial. So I can find out which part of the programming should be optimized or if there's even an error I don't recognize. Therefore I would like to have, let's say 10 attributes and assign 10 times the current run time to one of these attributes. Unfortunately I couldn't find the right command for this operation in the manual. Does any of you know how I could do so? Or did sth similar (i.e. this delay) happen to one of you? Best, Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From pquain at une.edu.au Mon Jul 11 15:57:31 2011 From: pquain at une.edu.au (Peter Quain) Date: Tue, 12 Jul 2011 01:57:31 +1000 Subject: recording current experimental time In-Reply-To: <9921cc55-f5e2-47d3-9841-c5daf2d8970c@t7g2000vbv.googlegrou ps.com> Message-ID: in the e-basic help look up: Clock.Read. It is ms since start of the script. You can store value in variables and compute various durations if you want. Example: 'Make some Global Variables (in 'User' Tab) Dim time1, time2, dur1 as Long 'At some later time in your script, grab time since script started time1 = Clock.Read '[.... some more part of your experiment ....] 'Grab time since script started time2 = Clock.Read 'Compute interval, time1 to time2 dur1 = time2 - time1 At 01:39 AM 12/07/2011, you wrote: >Hi together, > >I programmed an experiment in which a lot of positions and stimuli >have to be calculated online. Calculation of slides happens BEFORE >they are executed. Interestingly, this can cause a delay of up to 5 >sec (not ms!) for some computer, 2 sec for other computers and only 1 >sec on a third computer. Importantly, these computers are comparable >regarding their hardware, i.e. processor, RAM etc. > >To test what exactly takes E-Prime so long under some circumstances, >Iw ould like to measure the experimental time at several points in >time during a single trial. So I can find out which part of the >programming should be optimized or if there's even an error I don't >recognize. > >Therefore I would like to have, let's say 10 attributes and assign 10 >times the current run time to one of these attributes. Unfortunately I >couldn't find the right command for this operation in the manual. > >Does any of you know how I could do so? Or did sth similar (i.e. this >delay) happen to one of you? > >Best, >Tobias > >-- >You received this message because you are subscribed to the Google >Groups "E-Prime" group. >To post to this group, send email to e-prime at googlegroups.com. >To unsubscribe from this group, send email to >e-prime+unsubscribe at googlegroups.com. >For more options, visit this group at >http://groups.google.com/group/e-prime?hl=en. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From tobias.fw at gmail.com Mon Jul 11 17:37:02 2011 From: tobias.fw at gmail.com (Tobias) Date: Mon, 11 Jul 2011 10:37:02 -0700 Subject: recording current experimental time In-Reply-To: <201107111557.p6BFvW3t026059@mail16.tpgi.com.au> Message-ID: Thanks Peter! That command and your suggested syntax perfectly worked out. Now I know which part of my code was so time consuming. However, I am not sure if I can reduce the timing and still I don't know why the loading time differs so much between computers. Here is the crucial part of the code: for i = 1 to 101 'matrix positions Set ResponseMask_SlideImage = New SlideImage ResponseMask_SlideImage.Name = "Image" & i InitSlideImageDefaults ResponseMask_SlideImage ResponseMask_SlideImage.X = "104 " + ((i-1) mod 10)*48 ResponseMask_SlideImage.Y = "24" + ((i-1) \ 10)*48 ResponseMask_SlideImage.Width = "40" ResponseMask_SlideImage.Height = "40" ResponseMask.States.Item("Default").Objects.Add ResponseMask_SlideImage, "Image" & i Select Case ResponseMask.ActiveState Case "Default" Set ResponseMask_SlideImage = CSlideImage(ResponseMask.States.Item("Default").Objects(i)) ResponseMask_SlideImage.Filename = "Mask.bmp" if i = 1 then ResponseMask_SlideImage.Filename = "fixation.bmp" ResponseMask_SlideImage.Load Set ResponseMask_SlideImage = Nothing end select next i Especially the "ResponseMask_SlideImage.Load" takes 5-8 ms. As I have a display of 100 elements this adds up to almost a second. However, there are only two types of stimuli, so maybe there is way that the two bitmaps are loaded once each but "built up" on all 100 positions? Any clue why loading time differs so much between computers with comparable hardware? Thanks a lot in advance! Best, Tobias On 11 Jul., 17:57, Peter Quain wrote: > in the e-basic help look up: Clock.Read. It is ms since start of the > script. You can store value in variables and compute various > durations if you want. > > Example: > 'Make some Global Variables (in 'User' Tab) > Dim time1, time2, dur1 as Long > 'At some later time in your script, grab time since script started > time1 = Clock.Read > '[.... some more part of your experiment ....] > 'Grab time since script started > time2 = Clock.Read > 'Compute interval, time1 to time2 > dur1 = time2 - time1 > > At 01:39 AM 12/07/2011, you wrote: > > >Hi together, > > >I programmed an experiment in which a lot of positions and stimuli > >have to be calculated online. Calculation of slides happens BEFORE > >they are executed. Interestingly, this can cause a delay of up to 5 > >sec (not ms!) for some computer, 2 sec for other computers and only 1 > >sec on a third computer. Importantly, these computers are comparable > >regarding their hardware, i.e. processor, RAM etc. > > >To test what exactly takes E-Prime so long under some circumstances, > >Iw ould like to measure the experimental time at several points in > >time during a single trial. So I can find out which part of the > >programming should be optimized or if there's even an error I don't > >recognize. > > >Therefore I would like to have, let's say 10 attributes and assign 10 > >times the current run time to one of these attributes. Unfortunately I > >couldn't find the right command for this operation in the manual. > > >Does any of you know how I could do so? Or did sth similar (i.e. this > >delay) happen to one of you? > > >Best, > >Tobias > > >-- > >You received this message because you are subscribed to the Google > >Groups "E-Prime" group. > >To post to this group, send email to e-prime at googlegroups.com. > >To unsubscribe from this group, send email to > >e-prime+unsubscribe at googlegroups.com. > >For more options, visit this group at > >http://groups.google.com/group/e-prime?hl=en. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Mon Jul 11 17:40:26 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Mon, 11 Jul 2011 13:40:26 -0400 Subject: recording current experimental time In-Reply-To: <201107111557.p6BFvW3t026059@mail16.tpgi.com.au> Message-ID: In addition, you may use Clock.Read to log the current session time as attributes and then inspect it all in the .edat file later, thus, c.SetAttrib "t.1", Clock.Read ' ... c.SetAttrib "t.2", Clock.Read ' ... c.SetAttrib "t.3", Clock.Read ' ... I have done this myself for some troubleshooting, works well. -- David McFarlane, Professional Faultfinder At 7/11/2011 11:57 AM Monday, Peter Quain wrote: >in the e-basic help look up: Clock.Read. It is ms since start of the >script. You can store value in variables and compute various >durations if you want. > >Example: >'Make some Global Variables (in 'User' Tab) >Dim time1, time2, dur1 as Long >'At some later time in your script, grab time since script started >time1 = Clock.Read >'[.... some more part of your experiment ....] >'Grab time since script started >time2 = Clock.Read >'Compute interval, time1 to time2 >dur1 = time2 - time1 > >At 01:39 AM 12/07/2011, you wrote: >>Hi together, >> >>I programmed an experiment in which a lot of positions and stimuli >>have to be calculated online. Calculation of slides happens BEFORE >>they are executed. Interestingly, this can cause a delay of up to 5 >>sec (not ms!) for some computer, 2 sec for other computers and only 1 >>sec on a third computer. Importantly, these computers are comparable >>regarding their hardware, i.e. processor, RAM etc. >> >>To test what exactly takes E-Prime so long under some circumstances, >>Iw ould like to measure the experimental time at several points in >>time during a single trial. So I can find out which part of the >>programming should be optimized or if there's even an error I don't >>recognize. >> >>Therefore I would like to have, let's say 10 attributes and assign 10 >>times the current run time to one of these attributes. Unfortunately I >>couldn't find the right command for this operation in the manual. >> >>Does any of you know how I could do so? Or did sth similar (i.e. this >>delay) happen to one of you? >> >>Best, >>Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From pquain at une.edu.au Mon Jul 11 17:55:32 2011 From: pquain at une.edu.au (Peter Quain) Date: Tue, 12 Jul 2011 03:55:32 +1000 Subject: LCD monitors and Input lag In-Reply-To: Message-ID: The issue of LCD monitors has been raised periodically on this list. Because CRTs have gone way of the dinosaur many labs use LCDs now for experiment presentation, and my guess is that some aren't aware of some possible pitfalls of doing so. My understanding is, basically, LCDs work differently to CRT monitors, and the key issue for display timing accuracy is that LCD monitors have onboard image processing engines that do their own thing with the frames sent to them by graphics card, prior to displaying them, and this processing can take (varied) time, with range that can be perhaps 0 to 70 ms across frames, and average lag which can be in the 30-40 ms range. The variation compounds the problem LCD screens may pose for some types of experimental psychology. This means 1) that you don't have a clue what is going on with display timing unless you test your LCD monitors for input lag (and then it likely will fluctuate across trials anyway) ; and 2) Just because it shows a picture, you can't just treat an LCD monitor as though it is a CRT monitor for purposes of time critical paradigms. Additionally, any concurrent audio would be out of sync because the audio is not routed through the display, and so would experience no delay. Also, without testing the monitor, it may not be possible to trust the "refresh rate" setting at anything other than the native refresh (mostly 60Hz) even though Windows may provide an option for the monitor to run at a higher "refresh" (say 75Hz), which some researchers may choose in their experiment. I have seen results showing that when refresh is set to 75Hz on a 60Hz native refresh LCD, frames are redrawn every ~13ms (instead of ~17ms), however 1 in every 6 frames was skipped (no display). So, in 167ms only 10 frames were displayed, not 12. Looked like the engine was correcting back to native refresh. You test this with high speed camera (same as to test input lag). As far as e-prime goes, this means that you could write a tidy paradigm where timing was tested as perfect on a good PC, and e-prime would log all durations as being so. However, at the display level the timing could be all over the place. Nobody would know, and effectively all the time taken to use e-prime for millisecond precision would be wasted. On monitors that have a big range of input lag, some paradigms would really be impossible to implement accurately.? I'm no expert in this, have just been fishing round on the net. For anyone who might be interested, below are some useful links providing a little digestible background on how LCDs work, how they differ from CRTs, and how to go about testing for input lag. Note that to do this properly you need a CRT monitor as baseline. Don't be tempted to use another LCD, which would include using a laptop screen, and my advice would be to definitely use a PC (with dual head graphics card in clone mode) not a laptop. ---------------------------------------------------------------------- Good old Wikipedia defining input lag: http://en.wikipedia.org/wiki/Input_lag A basic primer on how LCDs / CRTs function, and differences: http://www.bit-tech.net/hardware/2006/03/20/how_crt_and_lcd_monitors_work/ Here is an interesting site describing CRTs and LCDs (from gamer perspective). Navigate through the next few pages forward / backward using buttons down the bottom: http://www.tweakguides.com/Graphics_7.html How to test your monitors for input lag? Here is a brief description, and a little counter program you can download: http://www.flatpanelshd.com/focus.php?subaction=showfull&id=1229335064 Here is another description with some useful info about type of camera that is suitable: http://www.avsforum.com/avs-vb/showthread.php?t=1131464 A neat site who say they have done a lot of testing re: input lag, and provide comparison output for many LCD monitors. Note, lags might be different on your monitor even though it is same model tested. You need to test each individual monitor: http://www.digitalversus.com/duels.php?ty=6&ma1=35&mo1=121&p1=1303&ma2=284&mo2=326&p2=3097&ph=12 ----------------------------------------------------------------------------- Peter -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. -------------- next part -------------- An HTML attachment was scrubbed... URL: From pquain at une.edu.au Mon Jul 11 18:11:52 2011 From: pquain at une.edu.au (Peter Quain) Date: Tue, 12 Jul 2011 04:11:52 +1000 Subject: recording current experimental time In-Reply-To: <0709a6ca-454d-4569-817d-10297b798304@e21g2000vbz.googlegro ups.com> Message-ID: Hi Tobias, That much difference between machines sounds pretty bad, and they can't be too 'comparable' hardware wise. Could be a faulty graphics card / driver on the 5 second machine? Is it a GeForce card, perhaps? They can perform really badly. Maybe it has a bunch of processes running background, chewing up CPU? Anyway, 5 seconds is an age, I'd be wary about using that machine. If you only have 2 stimuli, what are they? (why do they need to be bitmaps) Peter At 03:37 AM 12/07/2011, you wrote: >Thanks Peter! > >That command and your suggested syntax perfectly worked out. Now I >know which part of my code was so time consuming. >However, I am not sure if I can reduce the timing and still I don't >know why the loading time differs so much between computers. > >Here is the crucial part of the code: > > > >for i = 1 to 101 >'matrix positions > Set ResponseMask_SlideImage = New SlideImage > ResponseMask_SlideImage.Name = "Image" & i > InitSlideImageDefaults ResponseMask_SlideImage > ResponseMask_SlideImage.X = "104 " + ((i-1) mod 10)*48 > ResponseMask_SlideImage.Y = "24" + ((i-1) \ 10)*48 > ResponseMask_SlideImage.Width = "40" > ResponseMask_SlideImage.Height = "40" > ResponseMask.States.Item("Default").Objects.Add >ResponseMask_SlideImage, "Image" & i > >Select Case ResponseMask.ActiveState >Case "Default" > > Set ResponseMask_SlideImage = >CSlideImage(ResponseMask.States.Item("Default").Objects(i)) > ResponseMask_SlideImage.Filename = "Mask.bmp" > if i = 1 then ResponseMask_SlideImage.Filename = > "fixation.bmp" > ResponseMask_SlideImage.Load > Set ResponseMask_SlideImage = Nothing > > >end select >next i > > > >Especially the "ResponseMask_SlideImage.Load" takes 5-8 ms. As I have >a display of 100 elements this adds up to almost a second. However, >there are only two types of stimuli, so maybe there is way that the >two bitmaps are loaded once each but "built up" on all 100 positions? > >Any clue why loading time differs so much between computers with >comparable hardware? > >Thanks a lot in advance! >Best, >Tobias > > >On 11 Jul., 17:57, Peter Quain wrote: > > in the e-basic help look up: Clock.Read. It is ms since start of the > > script. You can store value in variables and compute various > > durations if you want. > > > > Example: > > 'Make some Global Variables (in 'User' Tab) > > Dim time1, time2, dur1 as Long > > 'At some later time in your script, grab time since script started > > time1 = Clock.Read > > '[.... some more part of your experiment ....] > > 'Grab time since script started > > time2 = Clock.Read > > 'Compute interval, time1 to time2 > > dur1 = time2 - time1 > > > > At 01:39 AM 12/07/2011, you wrote: > > > > >Hi together, > > > > >I programmed an experiment in which a lot of positions and stimuli > > >have to be calculated online. Calculation of slides happens BEFORE > > >they are executed. Interestingly, this can cause a delay of up to 5 > > >sec (not ms!) for some computer, 2 sec for other computers and only 1 > > >sec on a third computer. Importantly, these computers are comparable > > >regarding their hardware, i.e. processor, RAM etc. > > > > >To test what exactly takes E-Prime so long under some circumstances, > > >Iw ould like to measure the experimental time at several points in > > >time during a single trial. So I can find out which part of the > > >programming should be optimized or if there's even an error I don't > > >recognize. > > > > >Therefore I would like to have, let's say 10 attributes and assign 10 > > >times the current run time to one of these attributes. Unfortunately I > > >couldn't find the right command for this operation in the manual. > > > > >Does any of you know how I could do so? Or did sth similar (i.e. this > > >delay) happen to one of you? > > > > >Best, > > >Tobias > > > > >-- > > >You received this message because you are subscribed to the Google > > >Groups "E-Prime" group. > > >To post to this group, send email to e-prime at googlegroups.com. > > >To unsubscribe from this group, send email to > > >e-prime+unsubscribe at googlegroups.com. > > >For more options, visit this group at > > >http://groups.google.com/group/e-prime?hl=en. > >-- >You received this message because you are subscribed to the Google >Groups "E-Prime" group. >To post to this group, send email to e-prime at googlegroups.com. >To unsubscribe from this group, send email to >e-prime+unsubscribe at googlegroups.com. >For more options, visit this group at >http://groups.google.com/group/e-prime?hl=en. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Mon Jul 11 18:53:01 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Mon, 11 Jul 2011 14:53:01 -0400 Subject: sending trigger to other devices locked on to the time of response In-Reply-To: <4e09fe34.8c7a2a0a.6f8f.184fSMTPIN_ADDED@gmr-mx.google.com> Message-ID: Hmm, another correction to this old thread. As a result of an off-list discussion with Kenneth Campbell (School of Psychology, University of Ottawa, Canada), I see that in my post of 2 Sep 2010 I took some things for granted and left out some needed explanation. So to clarify, that solution assumes two other things: - Set the response Time Limit of the stimlus (e.g., StimText) to match how long you want to allow for a response (i.e., use "extended input" (see Appendix C of the E-Prime User's Guide)). (This is implied in one of the later comments in the code excerpt, but is worth making more explicit.) - If you want to allow the stimulus to complete its Duration after a receiving a response, then set the End Action of its input masks to (none). Also, I now notice that the comment "... StimText will last at least as long its input mask Time Limit" is not quite correct, but at the moment I don't know quite how to accurately express the resulting interactions between Duration, Time Limit, End Action, and response, so I will leave that as an exercise for others. Hope that helps, -- David McFarlane, Professional Faultfinder At 6/28/2011 12:15 PM Tuesday, David McFarlane wrote: >Gosh, looking over this old thread, I see that I overinterpreted the >question and answered one more complex than the question asked. I >addressed the question of how to send an output signal following a >response that did *not* terminate the stimulus (i.e., End Action = >(none), so stimulus finishes its Duration after the response). > >More likely the questioner had a simpler case in mind, i.e., a >self-paced stimulus where the response terminates the stimulus, and >then E-Prime sends an output signal. For that simpler case, please >see discussion at >http://groups.google.com/group/e-prime/browse_thread/thread/ef0e5a8d8b87aa0c . > >-- David McFarlane, Professional Faultfinder > > >At 9/2/2010 03:08 PM Thursday, you wrote: >>Good timing -- It just so happens that I have been working on this >>very issue for a lab here. You have to make the proper settings in >>your stimulus, and use a bit of inline code following the >>stimulus. Here is the fully-commented inline code for my solution: >> >> >>'/---------------------------------------------------------------------- >>' We wish to present a stimulus (in this case, StimText), get a >>' response during that stimlus, and raise a signal as soon as the >>' subject responds. >>' >>' To do that, we need to run this inline code during StimText. We >>' could simply set the Duration of StimText to 0 or so (depending on >>' considerations such as leaving some time between stimulus .OnsetSignal >>' and .OffsetSignal) and then our code would have to also handle >>' further stimulus timing. But with judicious use of Duration and >>' PreRelease, E-Prime will automatically take care of stimulus timing >>' for us. >>' >>' So instead we simply set the Duration of StimText as desired (which >>' as a result automatically determines the target onset time for the >>' next stimulus object), and we set the PreRelease of StimText to a >>' suitably large value (preferably >= Duration, but perhaps less due >>' to other considerations as mentioned earlier). Now this code will >>' start to run soon after the onset of StimText, and handle the >>' reaction to the subject response. >>' >>' Finally, this code simply makes use of .IsPending() to detect the >>' response (see the InputMask.IsPending topic in the online E-Basic >>' Help). Note that as a result StimText will last at least as long >>' its input mask Time Limit, regardless of its Duration (if you just >>' keep Time Limit at the default of "(same as duration)" then this >>' will not pose a problem). >> >>Const LptDataPort as Integer = &H0378 ' adjust this for your system >>Const SignalData as Integer = &HFF ' adjust this for your device >>Const LoopDelay as Long = 2 'ms; set as small as possible for your >> ' system >> >>Do While StimText.InputMasks.IsPending() >> ' Some slower machines (such as my home laptop) need a delay so that >> ' EP can detect & handle input: >> Sleep LoopDelay >>Loop >>WritePort LptDataPort, SignalData >>'\---------------------------------------------------------------------- >> >> >>This is fine as long as you limit the response to coming during the >>stimulus. If you want to present a train of stimuli during the >>response period then you must do a little more. I also have a >>solution for that, but it is rather intricate and too much trouble >>to go into here, so I hope this is good enough for now. >> >>-- David McFarlane, Professional Faultfinder >> >> >>At 9/1/2010 02:38 AM Wednesday, Jaeyong Lee wrote: >>>I was wondering if there is a way to send trigger signals locked on >>>the response time. >>> >>>For instance, >>> >>>Stim.OnsetSignalEnabled = True >>>Stim.OnsetSignalPort = &H378 >>>Stim.OnsetSignalData = 1 >>> >>> >>>WritePort &h378, 0 >>> >>>the above code send triggers at the onset of the object "Stim". >>> >>>However, I am trying to figure out a way to send triggers at the time >>>of response of "Stim". >>> >>>I would greatly appreciate all tips and advices from you. Thanks. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Mon Jul 11 19:36:58 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Mon, 11 Jul 2011 15:36:58 -0400 Subject: Making movie clips for E-Prime? Message-ID: Well fellow E-Prime mavens, now I could use your experience & advice. I first checked in the New Features Guide, and did a cursory search through the PST Knowledge Base, the PST Forum, and the E-Prime Google Group, and did not find this addressed anywhere, so I hope I have done my homework at least as well as I expect others to :). Two related questions: 1) Suppose we want to make some short clips from a larger, existing movie file for use in E-Prime. What software would you recommend for this? 2) Suppose we want to record our own movie clips from scratch for use in E-Prime. What systems would you recommend for that? I might also reframe those questions as, "What did *you* use?" or, "What worked for *you*?" Note that the KB and online discussions have addressed at length how to get *existing* clips to work with E-Prime (installing codec libraries, etc.). I instead want to avoid those problems by preparing our clips in the first place in a way that plays well with E-Prime "out-of-the-box". Any advice? Thanks, -- David McFarlane, Professional Faultfinder -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Mon Jul 11 20:19:38 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Mon, 11 Jul 2011 16:19:38 -0400 Subject: Making movie clips for E-Prime? In-Reply-To: <4e1b50e0.83842b0a.705c.ffffccd5SMTPIN_ADDED@gmr-mx.google. com> Message-ID: Telephoning and Googling around trying to answer my own question #1... First general-purpose answer I got was Windows Movie Maker, which already comes with recent versions of MS Windows. Have any of you found success with that? A more serious source recommends Final Cut Pro (or perhaps the less expensive Final Cut Express). Anyone have any experience with that? It will render in a host of codecs, so it should do a good job of rendering clips for E-Prime. But it is a Mac-only product. So I looked for Windows alternatives to FCP, and came up with Adobe Premiere, or Sony Vegas. Can anybody tell me something about these products? Thanks again, -- David McFarlane, Professional Faultfinder At 7/11/2011 03:36 PM Monday, David McFarlane wrote: >Well fellow E-Prime mavens, now I could use your experience & >advice. I first checked in the New Features Guide, and did a >cursory search through the PST Knowledge Base, the PST Forum, and >the E-Prime Google Group, and did not find this addressed anywhere, >so I hope I have done my homework at least as well as I expect others to :). > >Two related questions: > >1) Suppose we want to make some short clips from a larger, existing >movie file for use in E-Prime. What software would you recommend for this? > >2) Suppose we want to record our own movie clips from scratch for >use in E-Prime. What systems would you recommend for that? > >I might also reframe those questions as, "What did *you* use?" or, >"What worked for *you*?" > >Note that the KB and online discussions have addressed at length how >to get *existing* clips to work with E-Prime (installing codec >libraries, etc.). I instead want to avoid those problems by >preparing our clips in the first place in a way that plays well with >E-Prime "out-of-the-box". Any advice? > >Thanks, >-- David McFarlane, Professional Faultfinder -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From Michiel.Spape at nottingham.ac.uk Tue Jul 12 09:32:56 2011 From: Michiel.Spape at nottingham.ac.uk (Michiel Spape) Date: Tue, 12 Jul 2011 10:32:56 +0100 Subject: Making movie clips for E-Prime? In-Reply-To: <4e1b50e0.83842b0a.705c.ffffccd5SMTPIN_ADDED@gmr-mx.google.com> Message-ID: Hi David, Noticed you answered your own questions mostly, but I'd like to draw your attention to Virtualdubmod (http://virtualdubmod.sourceforge.net/) anyway - if I remember correctly from some time ago when I was dabbling in video stuff, you can do most useful things for lab purposes: re-encode, strip audio, save audio, save bits of film, and save to bmp. Personally, I'm pretty fond of saving films to bmp, so that you don't need e-prime 2 :) As for recording: for simple stuff windows movie maker works fine, more heavy stuff might be better done with commercial packages (depending on your budget). Best, Mich Michiel Spap? Research Fellow Perception & Action group University of Nottingham School of Psychology www.cognitology.eu -----Original Message----- From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of David McFarlane Sent: 11 July 2011 20:37 To: e-prime at googlegroups.com Subject: Making movie clips for E-Prime? Well fellow E-Prime mavens, now I could use your experience & advice. I first checked in the New Features Guide, and did a cursory search through the PST Knowledge Base, the PST Forum, and the E-Prime Google Group, and did not find this addressed anywhere, so I hope I have done my homework at least as well as I expect others to :). Two related questions: 1) Suppose we want to make some short clips from a larger, existing movie file for use in E-Prime. What software would you recommend for this? 2) Suppose we want to record our own movie clips from scratch for use in E-Prime. What systems would you recommend for that? I might also reframe those questions as, "What did *you* use?" or, "What worked for *you*?" Note that the KB and online discussions have addressed at length how to get *existing* clips to work with E-Prime (installing codec libraries, etc.). I instead want to avoid those problems by preparing our clips in the first place in a way that plays well with E-Prime "out-of-the-box". Any advice? Thanks, -- David McFarlane, Professional Faultfinder -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From tobias.fw at gmail.com Tue Jul 12 10:54:07 2011 From: tobias.fw at gmail.com (Tobias) Date: Tue, 12 Jul 2011 03:54:07 -0700 Subject: recording current experimental time In-Reply-To: <201107111811.p6BIBrUr012025@mail5.tpg.com.au> Message-ID: Well, the computers have some differences, the slowest is a Core2 Pentium, the fastest an i5. But we are talking of really small bitmaps of 40x40 pixels, I guess this shouldn't make much of a difference even for a 486er. The two bitmaps are a horizontal and a vertical line. They are distributed on a matrix of 10x10 positions. On 11 Jul., 20:11, Peter Quain wrote: > Hi Tobias, > > That much difference between machines sounds pretty bad, and they > can't be too 'comparable' hardware wise. Could be a faulty graphics > card / driver on the 5 second machine? Is it a GeForce card, perhaps? > They can perform really badly. Maybe it has a bunch of processes > running background, chewing up CPU? Anyway, 5 seconds is an age, I'd > be wary about using that machine. > > If you only have 2 stimuli, what are they? (why do they need to be bitmaps) > > Peter > > At 03:37 AM 12/07/2011, you wrote: > > > > > > > > >Thanks Peter! > > >That command and your suggested syntax perfectly worked out. Now I > >know which part of my code was so time consuming. > >However, I am not sure if I can reduce the timing and still I don't > >know why the loading time differs so much between computers. > > >Here is the crucial part of the code: > > >for i = 1 to 101 > >'matrix positions > > ? ? ? ? ? ? ? ? Set ResponseMask_SlideImage = New SlideImage > > ? ? ? ? ? ? ? ? ResponseMask_SlideImage.Name = "Image" & i > > ? ? ? ? ? ? ? ? InitSlideImageDefaults ResponseMask_SlideImage > > ? ? ? ? ? ? ? ? ResponseMask_SlideImage.X = "104 " + ((i-1) mod 10)*48 > > ? ? ? ? ? ? ? ? ResponseMask_SlideImage.Y = "24" + ((i-1) \ 10)*48 > > ? ? ? ? ? ? ? ? ResponseMask_SlideImage.Width = "40" > > ? ? ? ? ? ? ? ? ResponseMask_SlideImage.Height = "40" > > ? ? ? ? ? ? ? ? ResponseMask.States.Item("Default").Objects.Add > >ResponseMask_SlideImage, "Image" & i > > >Select Case ResponseMask.ActiveState > >Case "Default" > > > ? ? ? ? ? ? ? ? Set ResponseMask_SlideImage = > >CSlideImage(ResponseMask.States.Item("Default").Objects(i)) > > ? ? ? ? ? ? ? ? ResponseMask_SlideImage.Filename = "Mask.bmp" > > ? ? ? ? ? ? ? ? if i = 1 then ResponseMask_SlideImage.Filename = > > "fixation.bmp" > > ? ? ? ? ? ? ? ? ResponseMask_SlideImage.Load > > ? ? ? ? ? ? ? ? Set ResponseMask_SlideImage = Nothing > > >end select > >next i > > >Especially the "ResponseMask_SlideImage.Load" takes 5-8 ms. As I have > >a display of 100 elements this adds up to almost a second. However, > >there are only two types of stimuli, so maybe there is way that the > >two bitmaps are loaded once each but "built up" on all 100 positions? > > >Any clue why loading time differs so much between computers with > >comparable hardware? > > >Thanks a lot in advance! > >Best, > >Tobias > > >On 11 Jul., 17:57, Peter Quain wrote: > > > in the e-basic help look up: Clock.Read. It is ms since start of the > > > script. You can store value in variables and compute various > > > durations if you want. > > > > Example: > > > 'Make some Global Variables (in 'User' Tab) > > > Dim time1, time2, dur1 as Long > > > 'At some later time in your script, grab time since script started > > > time1 = Clock.Read > > > '[.... some more part of your experiment ....] > > > 'Grab time since script started > > > time2 = Clock.Read > > > 'Compute interval, time1 to time2 > > > dur1 = time2 - time1 > > > > At 01:39 AM 12/07/2011, you wrote: > > > > >Hi together, > > > > >I programmed an experiment in which a lot of positions and stimuli > > > >have to be calculated online. Calculation of slides happens BEFORE > > > >they are executed. Interestingly, this can cause a delay of up to 5 > > > >sec (not ms!) for some computer, 2 sec for other computers and only 1 > > > >sec on a third computer. Importantly, these computers are comparable > > > >regarding their hardware, i.e. processor, RAM etc. > > > > >To test what exactly takes E-Prime so long under some circumstances, > > > >Iw ould like to measure the experimental time at several points in > > > >time during a single trial. So I can find out which part of the > > > >programming should be optimized or if there's even an error I don't > > > >recognize. > > > > >Therefore I would like to have, let's say 10 attributes and assign 10 > > > >times the current run time to one of these attributes. Unfortunately I > > > >couldn't find the right command for this operation in the manual. > > > > >Does any of you know how I could do so? Or did sth similar (i.e. this > > > >delay) happen to one of you? > > > > >Best, > > > >Tobias > > > > >-- > > > >You received this message because you are subscribed to the Google > > > >Groups "E-Prime" group. > > > >To post to this group, send email to e-prime at googlegroups.com. > > > >To unsubscribe from this group, send email to > > > >e-prime+unsubscribe at googlegroups.com. > > > >For more options, visit this group at > > > >http://groups.google.com/group/e-prime?hl=en. > > >-- > >You received this message because you are subscribed to the Google > >Groups "E-Prime" group. > >To post to this group, send email to e-prime at googlegroups.com. > >To unsubscribe from this group, send email to > >e-prime+unsubscribe at googlegroups.com. > >For more options, visit this group at > >http://groups.google.com/group/e-prime?hl=en. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From tobias.fw at gmail.com Tue Jul 12 10:57:13 2011 From: tobias.fw at gmail.com (Tobias) Date: Tue, 12 Jul 2011 03:57:13 -0700 Subject: recording current experimental time In-Reply-To: <4e1b358f.83842b0a.705c.ffffc768SMTPIN_ADDED@gmr-mx.google.com> Message-ID: Thanks for the hint - that is more or less what I did. I had it this way: [code] t1 = clock.read [more code] t2 = clock.read c.setttrib "code1.dur", t2 - t1 Do you have an idea how to shorten the time it takes to load the bitmaps? Note that it is actually only two different bitmaps, that have to be loaded each 50 times, though. Best, Tobias On 11 Jul., 19:40, David McFarlane wrote: > In addition, you may use Clock.Read to log the current session time > as attributes and then inspect it all in the .edat file later, thus, > > c.SetAttrib "t.1", Clock.Read > ' ... > c.SetAttrib "t.2", Clock.Read > ' ... > c.SetAttrib "t.3", Clock.Read > ' ... > > I have done this myself for some troubleshooting, works well. > > -- David McFarlane, Professional Faultfinder > > At 7/11/2011 11:57 AM Monday, Peter Quain wrote: > > > > > > > > >in the e-basic help look up: Clock.Read. It is ms since start of the > >script. You can store value in variables and compute various > >durations if you want. > > >Example: > >'Make some Global Variables (in 'User' Tab) > >Dim time1, time2, dur1 as Long > >'At some later time in your script, grab time since script started > >time1 = Clock.Read > >'[.... some more part of your experiment ....] > >'Grab time since script started > >time2 = Clock.Read > >'Compute interval, time1 to time2 > >dur1 = time2 - time1 > > >At 01:39 AM 12/07/2011, you wrote: > >>Hi together, > > >>I programmed an experiment in which a lot of positions and stimuli > >>have to be calculated online. Calculation of slides happens BEFORE > >>they are executed. Interestingly, this can cause a delay of up to 5 > >>sec (not ms!) for some computer, 2 sec for other computers and only 1 > >>sec on a third computer. Importantly, these computers are comparable > >>regarding their hardware, i.e. processor, RAM etc. > > >>To test what exactly takes E-Prime so long under some circumstances, > >>Iw ould like to measure the experimental time at several points in > >>time during a single trial. So I can find out which part of the > >>programming should be optimized or if there's even an error I don't > >>recognize. > > >>Therefore I would like to have, let's say 10 attributes and assign 10 > >>times the current run time to one of these attributes. Unfortunately I > >>couldn't find the right command for this operation in the manual. > > >>Does any of you know how I could do so? Or did sth similar (i.e. this > >>delay) happen to one of you? > > >>Best, > >>Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From Michiel.Spape at nottingham.ac.uk Tue Jul 12 11:05:37 2011 From: Michiel.Spape at nottingham.ac.uk (Michiel Spape) Date: Tue, 12 Jul 2011 12:05:37 +0100 Subject: recording current experimental time In-Reply-To: Message-ID: Hi, I'd sooner see the difference in ram/hdd performance - I've not noticed E-Prime making any marked use of the GPU (and some of its visual performance is pretty abhorrent, if you try canvas stuff). Anyway, two suggestions from a different angle, perhaps they help: - Rather than using bitmaps, why not use text displays? You can always add a little border to a text, and don't display any text at all. Or Ascii, works pretty well as well... Anyway, that saves all bmp loading. - Also, you could use canvas stuff instead of bitmaps, and draw everything to a separate buffered display. That way, all loading can be done at your leisure (although for 100 lines, it won't be *that much*) and only at the vital moment, your buffered display is swapped for the 'real' one. Best, Mich Michiel Spap? Research Fellow Perception & Action group University of Nottingham School of Psychology www.cognitology.eu -----Original Message----- From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of Tobias Sent: 12 July 2011 11:54 To: E-Prime Subject: Re: recording current experimental time Well, the computers have some differences, the slowest is a Core2 Pentium, the fastest an i5. But we are talking of really small bitmaps of 40x40 pixels, I guess this shouldn't make much of a difference even for a 486er. The two bitmaps are a horizontal and a vertical line. They are distributed on a matrix of 10x10 positions. On 11 Jul., 20:11, Peter Quain wrote: > Hi Tobias, > > That much difference between machines sounds pretty bad, and they > can't be too 'comparable' hardware wise. Could be a faulty graphics > card / driver on the 5 second machine? Is it a GeForce card, perhaps? > They can perform really badly. Maybe it has a bunch of processes > running background, chewing up CPU? Anyway, 5 seconds is an age, I'd > be wary about using that machine. > > If you only have 2 stimuli, what are they? (why do they need to be bitmaps) > > Peter > > At 03:37 AM 12/07/2011, you wrote: > > > > > > > > >Thanks Peter! > > >That command and your suggested syntax perfectly worked out. Now I > >know which part of my code was so time consuming. > >However, I am not sure if I can reduce the timing and still I don't > >know why the loading time differs so much between computers. > > >Here is the crucial part of the code: > > >for i = 1 to 101 > >'matrix positions > > ? ? ? ? ? ? ? ? Set ResponseMask_SlideImage = New SlideImage > > ? ? ? ? ? ? ? ? ResponseMask_SlideImage.Name = "Image" & i > > ? ? ? ? ? ? ? ? InitSlideImageDefaults ResponseMask_SlideImage > > ? ? ? ? ? ? ? ? ResponseMask_SlideImage.X = "104 " + ((i-1) mod 10)*48 > > ? ? ? ? ? ? ? ? ResponseMask_SlideImage.Y = "24" + ((i-1) \ 10)*48 > > ? ? ? ? ? ? ? ? ResponseMask_SlideImage.Width = "40" > > ? ? ? ? ? ? ? ? ResponseMask_SlideImage.Height = "40" > > ? ? ? ? ? ? ? ? ResponseMask.States.Item("Default").Objects.Add > >ResponseMask_SlideImage, "Image" & i > > >Select Case ResponseMask.ActiveState > >Case "Default" > > > ? ? ? ? ? ? ? ? Set ResponseMask_SlideImage = > >CSlideImage(ResponseMask.States.Item("Default").Objects(i)) > > ? ? ? ? ? ? ? ? ResponseMask_SlideImage.Filename = "Mask.bmp" > > ? ? ? ? ? ? ? ? if i = 1 then ResponseMask_SlideImage.Filename = > > "fixation.bmp" > > ? ? ? ? ? ? ? ? ResponseMask_SlideImage.Load > > ? ? ? ? ? ? ? ? Set ResponseMask_SlideImage = Nothing > > >end select > >next i > > >Especially the "ResponseMask_SlideImage.Load" takes 5-8 ms. As I have > >a display of 100 elements this adds up to almost a second. However, > >there are only two types of stimuli, so maybe there is way that the > >two bitmaps are loaded once each but "built up" on all 100 positions? > > >Any clue why loading time differs so much between computers with > >comparable hardware? > > >Thanks a lot in advance! > >Best, > >Tobias > > >On 11 Jul., 17:57, Peter Quain wrote: > > > in the e-basic help look up: Clock.Read. It is ms since start of the > > > script. You can store value in variables and compute various > > > durations if you want. > > > > Example: > > > 'Make some Global Variables (in 'User' Tab) > > > Dim time1, time2, dur1 as Long > > > 'At some later time in your script, grab time since script started > > > time1 = Clock.Read > > > '[.... some more part of your experiment ....] > > > 'Grab time since script started > > > time2 = Clock.Read > > > 'Compute interval, time1 to time2 > > > dur1 = time2 - time1 > > > > At 01:39 AM 12/07/2011, you wrote: > > > > >Hi together, > > > > >I programmed an experiment in which a lot of positions and stimuli > > > >have to be calculated online. Calculation of slides happens BEFORE > > > >they are executed. Interestingly, this can cause a delay of up to 5 > > > >sec (not ms!) for some computer, 2 sec for other computers and only 1 > > > >sec on a third computer. Importantly, these computers are comparable > > > >regarding their hardware, i.e. processor, RAM etc. > > > > >To test what exactly takes E-Prime so long under some circumstances, > > > >Iw ould like to measure the experimental time at several points in > > > >time during a single trial. So I can find out which part of the > > > >programming should be optimized or if there's even an error I don't > > > >recognize. > > > > >Therefore I would like to have, let's say 10 attributes and assign 10 > > > >times the current run time to one of these attributes. Unfortunately I > > > >couldn't find the right command for this operation in the manual. > > > > >Does any of you know how I could do so? Or did sth similar (i.e. this > > > >delay) happen to one of you? > > > > >Best, > > > >Tobias > > > > >-- > > > >You received this message because you are subscribed to the Google > > > >Groups "E-Prime" group. > > > >To post to this group, send email to e-prime at googlegroups.com. > > > >To unsubscribe from this group, send email to > > > >e-prime+unsubscribe at googlegroups.com. > > > >For more options, visit this group at > > > >http://groups.google.com/group/e-prime?hl=en. > > >-- > >You received this message because you are subscribed to the Google > >Groups "E-Prime" group. > >To post to this group, send email to e-prime at googlegroups.com. > >To unsubscribe from this group, send email to > >e-prime+unsubscribe at googlegroups.com. > >For more options, visit this group at > >http://groups.google.com/group/e-prime?hl=en. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From tobias.fw at gmail.com Tue Jul 12 15:02:13 2011 From: tobias.fw at gmail.com (Tobias) Date: Tue, 12 Jul 2011 08:02:13 -0700 Subject: Substitute one out of 100 images on a slide Message-ID: Hey there, as you might have read in other posts, I try to save computing time for a current experiment in which 100 bitmaps are loaded for one slide. As two slides are exactly identical apart from one single stimulus among these 100, I thought maybe it is possible to replace one of the 100 stimuli with another one. Thus I could save time but not loading the other 99 images again. This is the way I define the images for one the slides: for i = 1 to 101 'matrix positions Set Mask_SlideImage = New SlideImage Mask_SlideImage.Name = "Image" & i InitSlideImageDefaults Mask_SlideImage Mask_SlideImage.X = "104 " + ((i-1) mod 10)*48 Mask_SlideImage.Y = "24" + ((i-1) \ 10)*48 Mask_SlideImage.Width = "40" Mask_SlideImage.Height = "40" Mask.States.Item("Default").Objects.Add Mask_SlideImage, "Image" & i Select Case Mask.ActiveState Case "Default" Set Mask_SlideImage = CSlideImage(Mask.States.Item("Default").Objects(i)) Mask_SlideImage.Filename = "mask.bmp" if i = 1 then Mask_SlideImage.Filename = "fixation.bmp" Mask_SlideImage.Load Set Mask_SlideImage = Nothing end select next i My idea is that one of the 100 images will be redefined concerning the Filename. I would just have to re-load the SlideImage with a certain number "i" (that refers to a position in the matrix). The problem is: I don't know how to tell the computer WHICH of the images should get a new filename. The command "Mask_SlideImage.Filename = "mask.bmp"" does not refer to a number defining which image of the slide is meant... I hope you have some more clue than me! :) Best, Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Tue Jul 12 15:32:44 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Tue, 12 Jul 2011 11:32:44 -0400 Subject: Substitute one out of 100 images on a slide In-Reply-To: <79dcf92b-21cf-4e05-bfc6-7bf5dbec45d0@c41g2000yqm.googlegro ups.com> Message-ID: Try something like Mask_SlideImage.Filename = "mask" & i & ".bmp" where image file names take the form "mask1.bmp", "mask2.bmp", etc. You get the idea. BTW, why do you have a Select Case... clause in your code excerpt? Since you have only one case, you could eliminate that. Also, why have a For loop from 1 to 101, and then include an If clause for i=1? Why not instead just do i=1 outside the loop, and then loop for i = 2 to 101? Also, this should make no difference, but you could move the Set Mask_SlideImage = New SlideImage and Set Mask_SlideImage = Nothing statements outside of the loop. Regarding an earlier question about the time it takes to Load the same image 100 times, most machines already do automatic disk caching, so once your program has loaded the file the first time then it should just load the image from the memory cache all the other times. We have taken advantage of that behavior ourselves in some programs. So I don't know what takes your computer so long to do this. But I agree with Mich on the other thread that you might get maximum performance by judicious use of the Canvas. -- David McFarlane, Professional Faultfinder >Hey there, > >as you might have read in other posts, I try to save computing time >for a current experiment in which 100 bitmaps are loaded for one >slide. > >As two slides are exactly identical apart from one single stimulus >among these 100, I thought maybe it is possible to replace one of the >100 stimuli with another one. Thus I could save time but not loading >the other 99 images again. > >This is the way I define the images for one the slides: > > >for i = 1 to 101 >'matrix positions > Set Mask_SlideImage = New SlideImage > Mask_SlideImage.Name = "Image" & i > InitSlideImageDefaults Mask_SlideImage > Mask_SlideImage.X = "104 " + ((i-1) mod 10)*48 > Mask_SlideImage.Y = "24" + ((i-1) \ 10)*48 > Mask_SlideImage.Width = "40" > Mask_SlideImage.Height = "40" > Mask.States.Item("Default").Objects.Add > Mask_SlideImage, "Image" & i > >Select Case Mask.ActiveState >Case "Default" > > Set Mask_SlideImage = >CSlideImage(Mask.States.Item("Default").Objects(i)) > Mask_SlideImage.Filename = "mask.bmp" > if i = 1 then Mask_SlideImage.Filename = > "fixation.bmp" > Mask_SlideImage.Load > Set Mask_SlideImage = Nothing > >end select >next i > > > >My idea is that one of the 100 images will be redefined concerning the >Filename. I would just have to re-load the SlideImage with a certain >number "i" (that refers to a position in the matrix). > >The problem is: I don't know how to tell the computer WHICH of the >images should get a new filename. The command >"Mask_SlideImage.Filename = "mask.bmp"" does not refer to a number >defining which image of the slide is meant... > >I hope you have some more clue than me! :) > >Best, >Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From tobias.fw at gmail.com Tue Jul 12 16:28:11 2011 From: tobias.fw at gmail.com (Tobias) Date: Tue, 12 Jul 2011 09:28:11 -0700 Subject: Substitute one out of 100 images on a slide In-Reply-To: <4e1c6921.83842b0a.705c.0016SMTPIN_ADDED@gmr-mx.google.com> Message-ID: On 12 Jul., 17:32, David McFarlane wrote: > Try something like > > Mask_SlideImage.Filename = "mask" & i & ".bmp" > > where image file names take the form "mask1.bmp", "mask2.bmp", > etc. ?You get the idea. Thanks for the answer, but I think I expressed myself a bit unclearly. The if-slope from the above code is an excerpt from an object called "slide1". So far, I additionally had "slide2" with the exact same code except for this fallowing line: if c.getattrib("ProbePos") = (i-1) then ProbeMask_SlideImage.Filename = "probe.bmp" After defining the slides with this code, I have: run.slide1 run.slide2 My idea was that I should use: run.slide1 [some code that changes one of the 100 images of slide1] run.slide2 > BTW, why do you have a Select Case... clause in your code > excerpt? ?Since you have only one case, you could eliminate > that. ?Also, why have a For loop from 1 to 101, and then include an > If clause for i=1? ?Why not instead just do i=1 outside the loop, and > then loop for i = 2 to 101? ?Also, this should make no difference, > but you could move the Set Mask_SlideImage = New SlideImage and Set > Mask_SlideImage = Nothing statements outside of the loop. > > Regarding an earlier question about the time it takes to Load the > same image 100 times, most machines already do automatic disk > caching, so once your program has loaded the file the first time then > it should just load the image from the memory cache all the other > times. ?We have taken advantage of that behavior ourselves in some > programs. ?So I don't know what takes your computer so long to do > this. ?But I agree with Mich on the other thread that you might get > maximum performance by judicious use of the Canvas. You are right, this does not make too much sense. It is an artifact from another experiment when it made sense :-p Nevertheless, this does not seem to be time-consuming. Best, Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Tue Jul 12 16:37:21 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Tue, 12 Jul 2011 12:37:21 -0400 Subject: Substitute one out of 100 images on a slide In-Reply-To: Message-ID: At 7/12/2011 12:28 PM Tuesday, Tobias wrote: > > BTW, why do you have a Select Case... clause in your code > > excerpt? Since you have only one case, you could eliminate > > that. Also, why have a For loop from 1 to 101, and then include an > > If clause for i=1? Why not instead just do i=1 outside the loop, and > > then loop for i = 2 to 101? Also, this should make no difference, > > but you could move the Set Mask_SlideImage = New SlideImage and Set > > Mask_SlideImage = Nothing statements outside of the loop. ... >You are right, this does not make too much sense. It is an artifact >from another experiment when it made sense :-p >Nevertheless, this does not seem to be time-consuming. Except for the time & effort spent when someone tries to read & decipher the code. -- David McFarlane, Professional Faultfinder -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From tobias.fw at gmail.com Tue Jul 12 16:47:08 2011 From: tobias.fw at gmail.com (Tobias) Date: Tue, 12 Jul 2011 09:47:08 -0700 Subject: Substitute one out of 100 images on a slide In-Reply-To: <4e1c7847.c9d12a0a.0132.1854SMTPIN_ADDED@gmr-mx.google.com> Message-ID: Yes, you're right. Sorry for that. Didn't do it on purpose but rather because I was afraid to change sth. :-p On 12 Jul., 18:37, David McFarlane wrote: > At 7/12/2011 12:28 PM Tuesday, Tobias wrote: > > > > BTW, why do you have a Select Case... clause in your code > > > excerpt? ?Since you have only one case, you could eliminate > > > that. ?Also, why have a For loop from 1 to 101, and then include an > > > If clause for i=1? ?Why not instead just do i=1 outside the loop, and > > > then loop for i = 2 to 101? ?Also, this should make no difference, > > > but you could move the Set Mask_SlideImage = New SlideImage and Set > > > Mask_SlideImage = Nothing statements outside of the loop. > ... > >You are right, this does not make too much sense. It is an artifact > >from another experiment when it made sense :-p > >Nevertheless, this does not seem to be time-consuming. > > Except for the time & effort spent when someone tries to read & > decipher the code. > > -- David McFarlane, Professional Faultfinder -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From santistevan64 at gmail.com Tue Jul 12 19:18:24 2011 From: santistevan64 at gmail.com (Anthony) Date: Tue, 12 Jul 2011 12:18:24 -0700 Subject: InLine response time data logging Message-ID: Hello All, I am currently having issues logging the response time from a slide. The program setup is such that the slide does not advance until an InLine conditional has been met (the subject clicks on a box). The slide advances fine; however, the response time data is not logged because I have setup the slide properties such that it does not advance on any click (because I only want clicks in the box to advance the slide). My question is: how can I log response times from an InLine code under certain conditional circumstances? Thank you, Anthony -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To view this discussion on the web visit https://groups.google.com/d/msg/e-prime/-/qtP9EZbi1cgJ. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcfarla9 at msu.edu Tue Jul 12 19:47:39 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Tue, 12 Jul 2011 15:47:39 -0400 Subject: InLine response time data logging In-Reply-To: <23669065.1707.1310498304074.JavaMail.geo-discussion-forums @prmp7> Message-ID: Anthony, Stock reminder: 1) I do not work for PST. 2) PST's trained staff takes any and all questions at http://support.pstnet.com/e%2Dprime/support/login.asp , and they strive to respond to all requests in 24-48 hours -- this is pretty much their substitute for proper documentation, so make full use of it. 3) If you do get an answer from PST Web Support, please extend the courtesy of posting their reply back here for the sake of others. That said, here is my take... Not sure that I fully understand the issue, but if you have an input mask launched from a stimulus object called, say, StimSlide, then you may log responses at any time using inline code such as c.SetAttrib "StimSlide.Resp", StimSlide.Resp c.SetAttrib "StimSlide.RT", StimSlide.RT You can see this for yourself just by looking at the logging code automatically generated by E-Studio whenever you enable logging. For that matter, just because you do not want the Slide to advance on a mouse click does not mean that you cannot use automatice data logging on it. Try enabling data logging on your stimulus Slide, and see if that does it for you. -- David McFarlane, Professional Faultfinder >I am currently having issues logging the response time from a slide. >The program setup is such that the slide does not advance until an >InLine conditional has been met (the subject clicks on a box). The >slide advances fine; however, the response time data is not logged >because I have setup the slide properties such that it does not >advance on any click (because I only want clicks in the box to >advance the slide). My question is: how can I log response times >from an InLine code under certain conditional circumstances? > > >Thank you, >Anthony -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Tue Jul 12 21:05:06 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Tue, 12 Jul 2011 17:05:06 -0400 Subject: Making movie clips for E-Prime? In-Reply-To: <09DAEA8BC192C94EB62C8E71FC35A5D92F80386FA2@EXCHANGE3.ad.no ttingham.ac.uk> Message-ID: Mich, Thanks. As it turns out, VirtualDubMod has been discontinued since about 2006. But if we just shorten that to "VirtualDub", we get to the current product (http://www.virtualdub.org ). And it also turns out that David Vinson recommended the same product at http://groups.google.com/group/e-prime/browse_thread/thread/8a3086f95f315fc5 . It does seem to be an extensive video editing package, could be handy. -- David McFarlane, Professional Faultfinder At 7/12/2011 05:32 AM Tuesday, Michiel Spape wrote: >Hi David, >Noticed you answered your own questions mostly, >but I'd like to draw your attention to >Virtualdubmod >(http://virtualdubmod.sourceforge.net/) anyway - >if I remember correctly from some time ago when >I was dabbling in video stuff, you can do most >useful things for lab purposes: re-encode, strip >audio, save audio, save bits of film, and save >to bmp. Personally, I'm pretty fond of saving >films to bmp, so that you don't need e-prime 2 :) >As for recording: for simple stuff windows movie >maker works fine, more heavy stuff might be >better done with commercial packages (depending on your budget). >Best, >Mich > >Michiel Spap? >Research Fellow >Perception & Action group >University of Nottingham >School of Psychology >www.cognitology.eu -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Tue Jul 12 21:24:37 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Tue, 12 Jul 2011 17:24:37 -0400 Subject: Making movie clips for E-Prime? In-Reply-To: <4e1b5af9.ce5e2a0a.697d.ffffe435SMTPIN_ADDED@gmr-mx.google. com> Message-ID: OK, we got something to work, so here is my report in case anybody else can use this. I would be very interested if others could weigh in with what they have used. First, turns out my user really wanted to extract short clips (~1 min) from commercial movie DVDs. In short, I managed to use AoA DVD Ripper (http://www.aoamedia.com/dvd_ripper.htm ) to visually select a segment to clip from a commercial DVD, set DVD Ripper to encode it as MPEG-1/VCD (*.mpg), and the resulting file played in stock E-Prime with no further fuss. (That will work fine as long as the DVDs that the user wants do not foil us with some futher copy protection, and assuming that our use falls within Fair Use.) More details for those who care... In general, we have two strategies we might apply here -- configure E-Prime to work with movie files as we supply them, or make sure that the movie files we supply are configured to work with stock E-Prime. I prefer the latter strategy, because (1) I figure that the E-Prime developers have optimized E-Prime for a limited range of formats even if we can trick it up to accept other formats, and (2) I would rather not have to reconfigure E-Prime with custom codecs every time we move the experiment to a new machine. So first I used GSpot (http://www.headbands.com/gspot/ ) and MediaInfo (http://mediainfo.sourceforge.net/en )to see what format/codec E-Prime uses for its own examples. They use .mpg files, encoded as MPEG Video (Version 1). So I set that as my goal. I tried two products for ripping the DVD samples. First I tried HandBrake (http://handbrake.fr ), but (1) the interface does not seem to have a good visual way to select arbitrary clips, (2) it was *very* slow (we canceled before it finished), and (3) HandBrake itself insists that it is only a transcoder, *not* a DVD ripper. After Googling around a bit I moved on to AoA DVD Ripper. This provides a good-enough visual interface for selecting arbitrary clips, worked pretty fast, and produced an .avi file that played in Media Player. That file did not play in stock E-Prime, however, but once I reconfigured DVD Ripper to output MPEG-1 all was well. (I also set File Split Mode to Infinite just to avoid splitting files.) Note that by default DVD Ripper outputs .avi at 720x480 resolution, or .mpg at 352x240 resolution, so you might want to fiddle with that further. (It costs US$40 (cheap!) to register DVD Ripper, and I do not know how the paid version differs from the free one, but if you find the program useful then please do the right thing and pay for it.) Now as it turns out, when I installed AoA DVD Ripper it also installed an Xvid codec, so then the .avi file played in E-Prime as well. But the .mpg file continued to play in E-Prime even after I uninstalled the Xvid codec, so I feel safer sticking with .mpg (MPEG-1). For the record, if we did want to fiddle with codecs for E-Prime, in addition to letting AoA DVD Ripper install Xvid, PST recommends the ffdshow (http://www.free-codecs.com/download/ffdshow.htm ) and SUPER (http://www.erightsoft.com/SUPER.html ) codec libraries (see http://support.pstnet.com/forum/Topic635-12-1.aspx and http://www.pstnet.com/forum/Topic2986-5-1.aspx ). Finally, as mentioned earlier in this thread, for more extensive video editing VirtualDub (http://www.virtualdub.org ) might come into play. This outputs only in .avi format, so would require installing codecs for E-Prime, or using A0A DVD Ripper or HandBrake to transcode the output files as needed for use in E-Prime. I still have no idea what system to use in case we ever want to generate video for E-Prime from scratch, but I guess we will cross that bridge when we come to it. -- David McFarlane, Professional Faultfinder At 7/11/2011 04:19 PM Monday, David McFarlane wrote: >Telephoning and Googling around trying to answer my own question #1... > >First general-purpose answer I got was Windows Movie Maker, which >already comes with recent versions of MS Windows. Have any of you >found success with that? > >A more serious source recommends Final Cut Pro (or perhaps the less >expensive Final Cut Express). Anyone have any experience with >that? It will render in a host of codecs, so it should do a good >job of rendering clips for E-Prime. But it is a Mac-only product. > >So I looked for Windows alternatives to FCP, and came up with Adobe >Premiere, or Sony Vegas. Can anybody tell me something about these products? > >Thanks again, >-- David McFarlane, Professional Faultfinder > > >At 7/11/2011 03:36 PM Monday, David McFarlane wrote: >>Well fellow E-Prime mavens, now I could use your experience & >>advice. I first checked in the New Features Guide, and did a >>cursory search through the PST Knowledge Base, the PST Forum, and >>the E-Prime Google Group, and did not find this addressed anywhere, >>so I hope I have done my homework at least as well as I expect others to :). >> >>Two related questions: >> >>1) Suppose we want to make some short clips from a larger, existing >>movie file for use in E-Prime. What software would you recommend for this? >> >>2) Suppose we want to record our own movie clips from scratch for >>use in E-Prime. What systems would you recommend for that? >> >>I might also reframe those questions as, "What did *you* use?" or, >>"What worked for *you*?" >> >>Note that the KB and online discussions have addressed at length >>how to get *existing* clips to work with E-Prime (installing codec >>libraries, etc.). I instead want to avoid those problems by >>preparing our clips in the first place in a way that plays well >>with E-Prime "out-of-the-box". Any advice? >> >>Thanks, >>-- David McFarlane, Professional Faultfinder -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From santistevan64 at gmail.com Tue Jul 12 21:34:21 2011 From: santistevan64 at gmail.com (Anthony) Date: Tue, 12 Jul 2011 14:34:21 -0700 Subject: InLine response time data logging In-Reply-To: <4e1ca4e2.ce5e2a0a.697d.232fSMTPIN_ADDED@gmr-mx.google.com> Message-ID: The problem that I encounter when I try to use automatic data logging is that it logs the first response, regardless of where it is on the screen. I only want to log the response time that it took for the subject to click within the boundaries of the box on the screen.My code is below, if this helps: 'This code was taken from http://groups.google.com/group/e-prime/browse_thread/thread/6411f6b4b8614f19/b794d83bb662dfef?pli=1 'and adapted for use by Anthony ******* 'Designate "theState" as the Default Slide State, which is the 'current, ActiveState on the Slide object "Stimulus" Dim theState as SlideState Set theState = DisplayScreen.States("Default") Dim next_mX as Long, next_mY as Long Dim strHit As String Dim theMouseResponseData As MouseResponseData Do 'Was there a response? If DisplayScreen.InputMasks.Responses.Count > 0 Then 'Get the mouse response Set theMouseResponseData = CMouseResponseData(DisplayScreen.InputMasks.Responses(1)) 'Determine string name of SlideImage or SlideText object at 'mouse click coordinates. Assign that value to strHit strHit = theState.HitTest(theMouseResponseData.CursorX, theMouseResponseData.CursorY) 'Compare string name where mouse click occurred to CorrectAnswer 'attribute on each trial, and dispense a treat if they are equal (i.e., the target was clicked) 'NOTE: This comparison is case sensitive If strHit = "Image1" Then writeport &H378,1 WritePort &H378,2 End If End If Do Until (strHit = "Image1") 'Capture & process further mouse clicks: If (Mouse.Buttons And ebMouseButton1) Then Mouse.GetCursorPos next_mX, next_mY strHit = theState.HitTest( next_mX, next_mY ) End If If strHit = "Image1" Then writeport &H378,1 WritePort &H378,2 End If 'Loops until the button is clicked Loop Loop Until (strHit = "Image1") On Jul 12, 12:47?pm, David McFarlane wrote: > Anthony, > > Stock reminder: ?1) I do not work for PST. ?2) PST's trained staff > takes any and all questions athttp://support.pstnet.com/e%2Dprime/support/login.asp, and they > strive to respond to all requests in 24-48 hours -- this is pretty > much their substitute for proper documentation, so make full use of > it. ?3) If you do get an answer from PST Web Support, please extend > the courtesy of posting their reply back here for the sake of others. > > That said, here is my take... > > Not sure that I fully understand the issue, but if you have an input > mask launched from a stimulus object called, say, StimSlide, then you > may log responses at any time using inline code such as > > c.SetAttrib "StimSlide.Resp", StimSlide.Resp > c.SetAttrib "StimSlide.RT", StimSlide.RT > > You can see this for yourself just by looking at the logging code > automatically generated by E-Studio whenever you enable logging. > > For that matter, just because you do not want the Slide to advance on > a mouse click does not mean that you cannot use automatice data > logging on it. ?Try enabling data logging on your stimulus Slide, and > see if that does it for you. > > -- David McFarlane, Professional Faultfinder > > > > > > > > >I am currently having issues logging the response time from a slide. > >The program setup is such that the slide does not advance until an > >InLine conditional has been met (the subject clicks on a box). The > >slide advances fine; however, the response time data is not logged > >because I have setup the slide properties such that it does not > >advance on any click (because I only want clicks in the box to > >advance the slide). My question is: how can I log response times > >from an InLine code under certain conditional circumstances? > > >Thank you, > >Anthony -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From santistevan64 at gmail.com Tue Jul 12 21:36:46 2011 From: santistevan64 at gmail.com (Anthony) Date: Tue, 12 Jul 2011 14:36:46 -0700 Subject: InLine response time data logging In-Reply-To: <0956be1f-1e82-4e2d-8885-f462a8ed2b00@q29g2000prj.googlegroups.com> Message-ID: Essentially, I want to record RT's after the "If strHit = 'Image1'" conditions. On Jul 12, 2:34?pm, Anthony wrote: > The problem that I encounter when I try to use automatic data logging > is that it logs the first response, regardless of where it is on the > screen. I only want to log the response time that it took for the > subject to click within the boundaries of the box on the screen.My > code is below, if this helps: > > ? ? ? 'This code was taken fromhttp://groups.google.com/group/e-prime/browse_thread/thread/6411f6b4b... > ? ? ? ? ? ?'and adapted for use by Anthony ******* > > ? ? ? ? ? ?'Designate "theState" as the Default Slide State, which is the > ? ? ? ?'current, ActiveState on the Slide object "Stimulus" > ? ? ? ? Dim theState as SlideState > ? ? ? ? Set theState = DisplayScreen.States("Default") > ? ? ? ? Dim next_mX as Long, next_mY as Long > ? ? ? ? Dim strHit As String > ? ? ? ? Dim theMouseResponseData As MouseResponseData > ? ? ? ? Do > ? ? ? ? 'Was there a response? > ? ? ? ? ? ? ? ? If DisplayScreen.InputMasks.Responses.Count > 0 Then > ? ? ? ? ? ? ? ? ? ? ? ? 'Get the mouse response > ? ? ? ? ? ? ? ? ? ? ? ? Set theMouseResponseData = > CMouseResponseData(DisplayScreen.InputMasks.Responses(1)) > ? ? ? ? ? ? ? ? ? ? ? ? 'Determine string name of SlideImage or > SlideText object at > ? ? ? ? ? ? ? ? ? ? ? ? 'mouse click coordinates. Assign that value to > strHit > ? ? ? ? ? ? ? ? ? ? ? ? strHit = > theState.HitTest(theMouseResponseData.CursorX, > theMouseResponseData.CursorY) > ? ? ? ? ? ? ? ? ? ? ? ? 'Compare string name where mouse click > occurred to CorrectAnswer > ? ? ? ? ? ? ? ? ? ? ? ? 'attribute on each trial, and dispense a treat > if they are equal (i.e., the target was clicked) > ? ? ? ? ? ? ? ? ? ? ? ? 'NOTE: This comparison is case sensitive > ? ? ? ? ? ? ? ? ? ? ? ? If strHit = "Image1" Then > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? writeport &H378,1 > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? WritePort &H378,2 > ? ? ? ? ? ? ? ? ? ? ? ? End If > ? ? ? ? ? ? ? ? End If > ? ? ? ? ? ? ? ? Do Until (strHit = "Image1") > ? ? ? ? ? ? ? ? 'Capture & process further mouse clicks: > ? ? ? ? ? ? ? ? ? ? ? ? If (Mouse.Buttons And ebMouseButton1) Then > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Mouse.GetCursorPos next_mX, next_mY > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? strHit = theState.HitTest( next_mX, > next_mY ) > ? ? ? ? ? ? ? ? ? ? ? ? End If > ? ? ? ? ? ? ? ? ? ? ? ? If strHit = "Image1" Then > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? writeport &H378,1 > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? WritePort &H378,2 > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? End If > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'Loops until the button is clicked > ? ? ? ? ? ? ? ? Loop > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Loop Until (strHit = "Image1") > > On Jul 12, 12:47?pm, David McFarlane wrote: > > > > > > > > > Anthony, > > > Stock reminder: ?1) I do not work for PST. ?2) PST's trained staff > > takes any and all questions athttp://support.pstnet.com/e%2Dprime/support/login.asp, and they > > strive to respond to all requests in 24-48 hours -- this is pretty > > much their substitute for proper documentation, so make full use of > > it. ?3) If you do get an answer from PST Web Support, please extend > > the courtesy of posting their reply back here for the sake of others. > > > That said, here is my take... > > > Not sure that I fully understand the issue, but if you have an input > > mask launched from a stimulus object called, say, StimSlide, then you > > may log responses at any time using inline code such as > > > c.SetAttrib "StimSlide.Resp", StimSlide.Resp > > c.SetAttrib "StimSlide.RT", StimSlide.RT > > > You can see this for yourself just by looking at the logging code > > automatically generated by E-Studio whenever you enable logging. > > > For that matter, just because you do not want the Slide to advance on > > a mouse click does not mean that you cannot use automatice data > > logging on it. ?Try enabling data logging on your stimulus Slide, and > > see if that does it for you. > > > -- David McFarlane, Professional Faultfinder > > > >I am currently having issues logging the response time from a slide. > > >The program setup is such that the slide does not advance until an > > >InLine conditional has been met (the subject clicks on a box). The > > >slide advances fine; however, the response time data is not logged > > >because I have setup the slide properties such that it does not > > >advance on any click (because I only want clicks in the box to > > >advance the slide). My question is: how can I log response times > > >from an InLine code under certain conditional circumstances? > > > >Thank you, > > >Anthony -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From tobias.fw at gmail.com Wed Jul 13 10:57:14 2011 From: tobias.fw at gmail.com (Tobias) Date: Wed, 13 Jul 2011 03:57:14 -0700 Subject: Substitute one out of 100 images on a slide In-Reply-To: <88f87b88-ee13-455e-8dce-01cb06411c6f@w24g2000yqw.googlegroups.com> Message-ID: I found out why the timing was so different on different computers! On two of them I copied the folder with the eprime files on the desktop which was - as I discovered recently - not on the local harddrive but on a server. Accordingly, each bitmap had to be transferred from the server to the local computer. So after using different, screens, graphic cards and bitmaps I finally found the you might say rather obvious reason :-p Anyway thanks for your help. May my failure help others to not fail! On 12 Jul., 18:47, Tobias wrote: > Yes, you're right. Sorry for that. Didn't do it on purpose but rather > because I was afraid to change sth. :-p > > On 12 Jul., 18:37, David McFarlane wrote: > > > > > > > > > At 7/12/2011 12:28 PM Tuesday, Tobias wrote: > > > > > BTW, why do you have a Select Case... clause in your code > > > > excerpt? ?Since you have only one case, you could eliminate > > > > that. ?Also, why have a For loop from 1 to 101, and then include an > > > > If clause for i=1? ?Why not instead just do i=1 outside the loop, and > > > > then loop for i = 2 to 101? ?Also, this should make no difference, > > > > but you could move the Set Mask_SlideImage = New SlideImage and Set > > > > Mask_SlideImage = Nothing statements outside of the loop. > > ... > > >You are right, this does not make too much sense. It is an artifact > > >from another experiment when it made sense :-p > > >Nevertheless, this does not seem to be time-consuming. > > > Except for the time & effort spent when someone tries to read & > > decipher the code. > > > -- David McFarlane, Professional Faultfinder -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From d.vinson at ucl.ac.uk Wed Jul 13 11:43:14 2011 From: d.vinson at ucl.ac.uk (David Vinson) Date: Wed, 13 Jul 2011 12:43:14 +0100 Subject: Making movie clips for E-Prime? In-Reply-To: <4e1cbbc4.83842b0a.705c.10cfSMTPIN_ADDED@gmr-mx.google.com> Message-ID: Thanks David for this detailed description! I work with videos a lot and there are all kinds of possible pitfalls, so I thought I'd weigh in on a few of the issues while the topic is fresh in my mind. It's incredibly important to develop dependable and consistent systems of creating stimuli that work for your hardware and software. I very much agree with David's option: that wherever possible it's best to create video files with stock E-Prime in mind, rather than trying to coerce E-Prime into working with whatever video files you have. With the latter you may experience weeks of trouble (and repeated back-and-forth correspondence with E-Prime Support who may or may not be able to replicate your video problems on their hardware!). The Codec Config tool is very useful in dealing with various video formats but it only goes so far - and files that pass the codec config test may still cause crashes when run for real. Our test procedure when developing video experiments is something like this. At each step there's a chance for failure (but less if you follow the same steps as in a previous successful study)! (Our experiments: we are mostly using clips of sign language stimuli 1-2 seconds long, perhaps 150-200 per experiment, possibly repeated a few times in the course of a study). 1 - convert the very first video clip into the desired format/size etc. (we prefer to display videos at their actual size rather than using E-Prime's stretch function), and run Codec Config to see if the clip passes this simple test. 2 - create the simplest possible program that displays that one video using a MovieDisplay. If it works proceed to the next step. 3 - convert some more clips (15-20 should suffice, or just do them all in batch mode). While you (or someone else) proceeds with the editing process, set up a "stress test" experiment that repeatedly displays these clips, one after another, with a reasonable interval between each (otherwise you may start getting build-up of loading lags and thoroughly unpleasant performance) Make sure this experiment logs data (even if it's just non-responses). I might set it to 100 repetitions of a randomized List. Then just set it off - if it crashes along the way (ie, doesn't get to the end and convert the running text log into an edat2 file) this is a sign you may have a harder-to-detect codec issue to sort out. Better that it happens this way than with a real participant. 4 - if you get this far, set up your real experiment and test it completely under "realistic participant" conditions. Keep in mind that the stress test in (3) may succeed but the real experiment may still crash for one reason or another. In addition to making sure your experiment does not crash, if timing is an important consideration (and when is it not?), keep in mind that it takes significant time to load and display video files. There are a number of additional time audit features specific to MovieDisplays - it's very wise to log these and get your timing sorted out before you start running. Timing can be a real mess when you deal with video stimuli and seems to depend a lot on the hardware. For all of this, if you run into real problems, I strongly urge you to open a support request with E-Prime support (even though you may want a solution "today" and the support queue may be 10-12 days). Video problems can be so complicated and idiosyncratic, and there may be known bugs or still-undocumented features that could help you out a great deal. I've had very good responses from support staff over the years, but patience is required especially during the peak periods (eg start of academic terms). Whew, that's enough about my life story with video problems. When it comes to video capture and conversion - our main setup for generating E-Prime video from scratch involves initial processing on Apple hardware (Final Cut Pro) from a range of DV cameras (our studio/video hardware is apple-based), although I still use VirtualDub on some occasions. Our biggest problems have come from videos that have gone through quicktime formats (ugh!) and my advice is always to minimize the number of conversions if you want an E-Prime-friendly video type - and stick to a standard process using the same camera/settings/etc once you get something that works - different cameras have different default settings and it's best to stick with something that works wherever possible. And don't ditch your original video files (even if they're huge) until you know you have a conversion that works. Many researchers will work hard to develop video stimulus materials that display as well as possible in a media player, but this does not always transfer to clean E-prime performance - if you know you are going to use E-Prime with your videos, it's a good idea to get them E-Prime-friendly first (really this is just as important a part of materials development as other experimental controls you include). If your experiment doesn't work there's no point in having nice presentation quality video stimuli. hope this is useful to somebody! -dv On 12/07/2011 22:24, David McFarlane wrote: > OK, we got something to work, so here is my report in case anybody else > can use this. I would be very interested if others could weigh in with > what they have used. > > First, turns out my user really wanted to extract short clips (~1 min) > from commercial movie DVDs. In short, I managed to use AoA DVD Ripper > (http://www.aoamedia.com/dvd_ripper.htm ) to visually select a segment > to clip from a commercial DVD, set DVD Ripper to encode it as MPEG-1/VCD > (*.mpg), and the resulting file played in stock E-Prime with no further > fuss. (That will work fine as long as the DVDs that the user wants do > not foil us with some futher copy protection, and assuming that our use > falls within Fair Use.) > > More details for those who care... > > In general, we have two strategies we might apply here -- configure > E-Prime to work with movie files as we supply them, or make sure that > the movie files we supply are configured to work with stock E-Prime. I > prefer the latter strategy, because (1) I figure that the E-Prime > developers have optimized E-Prime for a limited range of formats even if > we can trick it up to accept other formats, and (2) I would rather not > have to reconfigure E-Prime with custom codecs every time we move the > experiment to a new machine. > > So first I used GSpot (http://www.headbands.com/gspot/ ) and MediaInfo > (http://mediainfo.sourceforge.net/en )to see what format/codec E-Prime > uses for its own examples. They use .mpg files, encoded as MPEG Video > (Version 1). So I set that as my goal. > > I tried two products for ripping the DVD samples. First I tried > HandBrake (http://handbrake.fr ), but (1) the interface does not seem to > have a good visual way to select arbitrary clips, (2) it was *very* slow > (we canceled before it finished), and (3) HandBrake itself insists that > it is only a transcoder, *not* a DVD ripper. > > After Googling around a bit I moved on to AoA DVD Ripper. This provides > a good-enough visual interface for selecting arbitrary clips, worked > pretty fast, and produced an .avi file that played in Media Player. That > file did not play in stock E-Prime, however, but once I reconfigured DVD > Ripper to output MPEG-1 all was well. (I also set File Split Mode to > Infinite just to avoid splitting files.) Note that by default DVD Ripper > outputs .avi at 720x480 resolution, or .mpg at 352x240 resolution, so > you might want to fiddle with that further. (It costs US$40 (cheap!) to > register DVD Ripper, and I do not know how the paid version differs from > the free one, but if you find the program useful then please do the > right thing and pay for it.) > > Now as it turns out, when I installed AoA DVD Ripper it also installed > an Xvid codec, so then the .avi file played in E-Prime as well. But the > .mpg file continued to play in E-Prime even after I uninstalled the Xvid > codec, so I feel safer sticking with .mpg (MPEG-1). > > For the record, if we did want to fiddle with codecs for E-Prime, in > addition to letting AoA DVD Ripper install Xvid, PST recommends the > ffdshow (http://www.free-codecs.com/download/ffdshow.htm ) and SUPER > (http://www.erightsoft.com/SUPER.html ) codec libraries (see > http://support.pstnet.com/forum/Topic635-12-1.aspx and > http://www.pstnet.com/forum/Topic2986-5-1.aspx ). > > Finally, as mentioned earlier in this thread, for more extensive video > editing VirtualDub (http://www.virtualdub.org ) might come into play. > This outputs only in .avi format, so would require installing codecs for > E-Prime, or using A0A DVD Ripper or HandBrake to transcode the output > files as needed for use in E-Prime. > > I still have no idea what system to use in case we ever want to generate > video for E-Prime from scratch, but I guess we will cross that bridge > when we come to it. > > -- David McFarlane, Professional Faultfinder > > > At 7/11/2011 04:19 PM Monday, David McFarlane wrote: >> Telephoning and Googling around trying to answer my own question #1... >> >> First general-purpose answer I got was Windows Movie Maker, which >> already comes with recent versions of MS Windows. Have any of you >> found success with that? >> >> A more serious source recommends Final Cut Pro (or perhaps the less >> expensive Final Cut Express). Anyone have any experience with that? It >> will render in a host of codecs, so it should do a good job of >> rendering clips for E-Prime. But it is a Mac-only product. >> >> So I looked for Windows alternatives to FCP, and came up with Adobe >> Premiere, or Sony Vegas. Can anybody tell me something about these >> products? >> >> Thanks again, >> -- David McFarlane, Professional Faultfinder >> >> >> At 7/11/2011 03:36 PM Monday, David McFarlane wrote: >>> Well fellow E-Prime mavens, now I could use your experience & advice. >>> I first checked in the New Features Guide, and did a cursory search >>> through the PST Knowledge Base, the PST Forum, and the E-Prime Google >>> Group, and did not find this addressed anywhere, so I hope I have >>> done my homework at least as well as I expect others to :). >>> >>> Two related questions: >>> >>> 1) Suppose we want to make some short clips from a larger, existing >>> movie file for use in E-Prime. What software would you recommend for >>> this? >>> >>> 2) Suppose we want to record our own movie clips from scratch for use >>> in E-Prime. What systems would you recommend for that? >>> >>> I might also reframe those questions as, "What did *you* use?" or, >>> "What worked for *you*?" >>> >>> Note that the KB and online discussions have addressed at length how >>> to get *existing* clips to work with E-Prime (installing codec >>> libraries, etc.). I instead want to avoid those problems by preparing >>> our clips in the first place in a way that plays well with E-Prime >>> "out-of-the-box". Any advice? >>> >>> Thanks, >>> -- David McFarlane, Professional Faultfinder > -- David Vinson, Ph.D. Senior Postdoctoral Researcher Cognitive, Perceptual and Brain Sciences Research Department University College London 26 Bedford Way, London WC1H 0AP Tel +44 (0)20 7679 5311 (UCL internal ext. 25311) -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From tobias.fw at gmail.com Thu Jul 14 10:36:34 2011 From: tobias.fw at gmail.com (Tobias) Date: Thu, 14 Jul 2011 03:36:34 -0700 Subject: debounce time Message-ID: Dear E-Prime community, I have just received a nice self-made buttonbox with three buttons that can be attached to a parallel port. THus I have very good timing of RTs for my experiments now :) However, there seems to be a problem with the bouncing of the keys. Single key presses cause several signals in a row. That is, if I have two consecutive slides with a duration of "-1", one key press is enough to terminate both slides. A collegue of mine said that in the experimental software 'Presentation', a debounce time can be specified so that such double responses are not possible. Is there any way of doing so in E-Prime? Best, Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From Michiel.Spape at nottingham.ac.uk Thu Jul 14 11:12:03 2011 From: Michiel.Spape at nottingham.ac.uk (Michiel Spape) Date: Thu, 14 Jul 2011 12:12:03 +0100 Subject: debounce time In-Reply-To: Message-ID: Hi, I think that rather depends on your button box, how it is connected, and so forth. That is, if it were connected as a keyboard, you could change settings (or at least, one used to be able) in the BIOS. It's basically the same if you press a spacebar long enough: you can see a short pause before it starts giving more and more spacebars (until the annoying "sticky keys" window pops up! Arg!). This is what you might call the "debounce" time. Anyway, one way would be to dump a little slide in between your two slides, which has as an allowable key the unpress (-) version of the same thing you have in the first slide. Thus, this slide would be terminated upon unpressing same key - which should do the trick unless your button box sends 1010101 instead of 111111 (i.e. no voltage change). Just a thought, but perhaps it helps. Best, Mich Michiel Spap? Research Fellow Perception & Action group University of Nottingham School of Psychology www.cognitology.eu -----Original Message----- From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of Tobias Sent: 14 July 2011 11:37 To: E-Prime Subject: debounce time Dear E-Prime community, I have just received a nice self-made buttonbox with three buttons that can be attached to a parallel port. THus I have very good timing of RTs for my experiments now :) However, there seems to be a problem with the bouncing of the keys. Single key presses cause several signals in a row. That is, if I have two consecutive slides with a duration of "-1", one key press is enough to terminate both slides. A collegue of mine said that in the experimental software 'Presentation', a debounce time can be specified so that such double responses are not possible. Is there any way of doing so in E-Prime? Best, Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From pfc.groot at gmail.com Thu Jul 14 11:54:36 2011 From: pfc.groot at gmail.com (Paul Groot) Date: Thu, 14 Jul 2011 13:54:36 +0200 Subject: debounce time In-Reply-To: Message-ID: Hi Tobias, You're right. Mechanical switches suffer from this debounce effect. Especially if the switch becomes older! In most cases this is not an issue if you are only interested in the response time of a single button press. When repeating presses are allowed, an 'ignore interval' of about 50 ms should be enough for even the worst switches. Things become more complicated when several buttons are allowed to be pressed. An electrical solution using a Schmitt trigger is preferred in that case (for example: http://www.labbookpages.co.uk/electronics/debounce.html) Unfortunately Eprime has no dead-time setting as Presentation does...;-(( best Paul 2011/7/14 Tobias : > Dear E-Prime community, > > I have just received a nice self-made buttonbox with three buttons > that can be attached to a parallel port. THus I have very good timing > of RTs for my experiments now :) > > However, there seems to be a problem with the bouncing of the keys. > Single key presses cause several signals in a row. That is, if I have > two consecutive slides with a duration of "-1", one key press is > enough to terminate both slides. > > A collegue of mine said that in the experimental software > 'Presentation', a debounce time can be specified so that such double > responses are not possible. > > Is there any way of doing so in E-Prime? > > Best, > Tobias > > -- > You received this message because you are subscribed to the Google Groups "E-Prime" group. > To post to this group, send email to e-prime at googlegroups.com. > To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. > For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. > > -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From tobias.fw at gmail.com Thu Jul 14 12:36:13 2011 From: tobias.fw at gmail.com (Tobias) Date: Thu, 14 Jul 2011 05:36:13 -0700 Subject: debounce time In-Reply-To: Message-ID: > > Unfortunately Eprime has no dead-time setting as Presentation does...;-(( That's too bad. Shouldn't be too much of a hazzle to implement that. Am I the only one here using parallel port buttons? :-p -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From tobias.fw at gmail.com Thu Jul 14 12:42:08 2011 From: tobias.fw at gmail.com (Tobias) Date: Thu, 14 Jul 2011 05:42:08 -0700 Subject: two screens, two refresh rates: timing? Message-ID: Hi, in our lab we have a brand new flat screen that can run at up to 120 Hz (I use it at 100 Hz right now). We also have an additional screen in the neighbor room to check if everything is alright with the stimuli presented, to see the feedback the subjects gets etc. Anyway, this second screen is not able to run at such high refresh rates. I have set the screens as "clone". I am wondering how E-Prime handles this concerning duration error, onset delay, screen sync etc. Any experience with that? Best, Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From Michiel.Spape at nottingham.ac.uk Thu Jul 14 13:36:36 2011 From: Michiel.Spape at nottingham.ac.uk (Michiel Spape) Date: Thu, 14 Jul 2011 14:36:36 +0100 Subject: two screens, two refresh rates: timing? In-Reply-To: <066d7fe6-488f-4997-9c4b-b72818fea7c0@q1g2000vbj.googlegroups.com> Message-ID: Hi, You're shooting topics around, aren't you :) Anyway, this is just to say: my experience is terrible, dreadful and horrible, when using screens in certain modes. Perhaps it is because we're using a switch, but essentially, I can do whatever I like, the screen in my lab won't do anything other than 60 Hz (on a CRT screen, mind you). A number of times, I got it to work better, but fidgeting with the small settings in the video driver menu is a nightmare. If you use E-Prime 2, you might be able to use multiple monitors in a more sane way, 'send this to display1, this to display2', and that ought to work. I imagine, however, that in my own situation (E-Prime 1), there is no such thing as 2 refresh rates; the primary system is the only thing that "exists", as far as E-Prime is concerned. Anyway, very few tips from my side, just a word of caution: whether your E-Prime will say refresh rate is brilliant or not, see it for your own eyes anyway. On a CRT screen in a dark room, using the corners of your eyes, you should be able to see the difference between 60 Hz and 100 Hz. Best, Mich Michiel Spap? Research Fellow Perception & Action group University of Nottingham School of Psychology www.cognitology.eu -----Original Message----- From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of Tobias Sent: 14 July 2011 13:42 To: E-Prime Subject: two screens, two refresh rates: timing? Hi, in our lab we have a brand new flat screen that can run at up to 120 Hz (I use it at 100 Hz right now). We also have an additional screen in the neighbor room to check if everything is alright with the stimuli presented, to see the feedback the subjects gets etc. Anyway, this second screen is not able to run at such high refresh rates. I have set the screens as "clone". I am wondering how E-Prime handles this concerning duration error, onset delay, screen sync etc. Any experience with that? Best, Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From pquain at une.edu.au Thu Jul 14 15:12:22 2011 From: pquain at une.edu.au (Peter Quain) Date: Fri, 15 Jul 2011 01:12:22 +1000 Subject: two screens, two refresh rates: timing? In-Reply-To: <066d7fe6-488f-4997-9c4b-b72818fea7c0@q1g2000vbj.googlegrou ps.com> Message-ID: can you get a signal on both monitors? I thought that in clone mode, the same video frames in the video memory are output to two displays, hence the resolutions and refresh rate must the same. Perhaps you can use two displays of different resolutions/refresh rates in "extended" desktop mode?? But this has nothing to do with e-prime, display constraints are determined by the graphics card / drivers, I think. Or have you got a special graphics card with driver settings for two seperately configured displays? I don't know how e-prime would respond to this? Otherwise, if you are in clone mode and getting a signal on both monitors than my guess is that the graphics drivers are throttling the refresh and resolution of both monitors to the lowest values across the monitors. Just my guess. .At 10:42 PM 14/07/2011, you wrote: >Hi, > >in our lab we have a brand new flat screen that can run at up to 120 >Hz (I use it at 100 Hz right now). We also have an additional screen >in the neighbor room to check if everything is alright with the >stimuli presented, to see the feedback the subjects gets etc. Anyway, >this second screen is not able to run at such high refresh rates. I >have set the screens as "clone". > >I am wondering how E-Prime handles this concerning duration error, >onset delay, screen sync etc. Any experience with that? > >Best, >Tobias > >-- >You received this message because you are subscribed to the Google >Groups "E-Prime" group. >To post to this group, send email to e-prime at googlegroups.com. >To unsubscribe from this group, send email to >e-prime+unsubscribe at googlegroups.com. >For more options, visit this group at >http://groups.google.com/group/e-prime?hl=en. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobias.fw at gmail.com Thu Jul 14 15:26:10 2011 From: tobias.fw at gmail.com (Tobias) Date: Thu, 14 Jul 2011 08:26:10 -0700 Subject: two screens, two refresh rates: timing? In-Reply-To: <09DAEA8BC192C94EB62C8E71FC35A5D92F8038728C@EXCHANGE3.ad.nottingham.ac.uk> Message-ID: I don't have a switch but a graphic card with two outputs. What I can do in my graphic card settings is to select the primary screen. And actually that seems to be the crucial part. The weaker screen (60 Hz, i.e. refresh circle of 16.6 ms) and the better screen (100 Hz, refresh circle of 10 ms) are NOT used as several devices in my E-Prime 2 settings. I presented two slides (black and white) with a to-be duration of 38 ms each. This should round up to 40 ms for the 100 Hz screen and is quite far from anything the 60 Hz screen can do (33.3 ms or 50 ms). If the faster screen is the primary one, I see artificial shapes or borders on the slower screen but presumably perfect black-white switches on the faster screen. If the slower screen is the primary one, it is exactly the other way round. More interestingly, I logged the duration errors and onset delays. Duration error was always 0 which seems to be due to the way E-Prime records the timing, see an earlier post my David. The onset delay, however, was -5 ms if the slower screen was the primary one. This somehow makes sense as two circles are 33.3 ms. As the screen was supposed to show the stimuli for 38 ms, it is an "delay" of -5 ms. If the faster screen was the primary one, the delay was always 2 ms which also makes sense, it just can't stop after 38 ms because a full refresh circle is 40 ms, i.e. 2 ms more. Alltogether, I assume that the refresh rate of the primary screen (as set in Windows) defines for how long a stimulus is actually presented. The secondary screen will show flickering if it's refresh rate does not fit the to-be duration of the stimulus. I hope this is helpful for others who use two screens. Best, Tobias P.S.: The 100 Hz flatscreen we use here is the Samsung Syncmaster 2233BW. On 14 Jul., 15:36, Michiel Spape wrote: > Hi, > You're shooting topics around, aren't you :) Anyway, this is just to say: my experience is terrible, dreadful and horrible, when using screens in certain modes. Perhaps it is because we're using a switch, but essentially, I can do whatever I like, the screen in my lab won't do anything other than 60 Hz (on a CRT screen, mind you). A number of times, I got it to work better, but fidgeting with the small settings in the video driver menu is a nightmare. If you use E-Prime 2, you might be able to use multiple monitors in a more sane way, 'send this to display1, this to display2', and that ought to work. I imagine, however, that in my own situation (E-Prime 1), there is no such thing as 2 refresh rates; the primary system is the only thing that "exists", as far as E-Prime is concerned. > Anyway, very few tips from my side, just a word of caution: whether your E-Prime will say refresh rate is brilliant or not, see it for your own eyes anyway. On a CRT screen in a dark room, using the corners of your eyes, you should be able to see the difference between 60 Hz and 100 Hz. > Best, > Mich > > Michiel Spap? > Research Fellow > Perception & Action group > University of Nottingham > School of Psychologywww.cognitology.eu > > -----Original Message----- > From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of Tobias > Sent: 14 July 2011 13:42 > To: E-Prime > Subject: two screens, two refresh rates: timing? > > Hi, > > in our lab we have a brand new flat screen that can run at up to 120 > Hz (I use it at 100 Hz right now). We also have an additional screen > in the neighbor room to check if everything is alright with the > stimuli presented, to see the feedback the subjects gets etc. Anyway, > this second screen is not able to run at such high refresh rates. I > have set the screens as "clone". > > I am wondering how E-Prime handles this concerning duration error, > onset delay, screen sync etc. Any experience with that? > > Best, > Tobias > > -- > You received this message because you are subscribed to the Google Groups "E-Prime" group. > To post to this group, send email to e-prime at googlegroups.com. > To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. > For more options, visit this group athttp://groups.google.com/group/e-prime?hl=en. > > This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. ? Please do not use, copy or disclose the information contained in this message or in any attachment. ?Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. > > This message has been checked for viruses but the contents of an attachment > may still contain software viruses which could damage your computer system: > you are advised to perform your own checks. Email communications with the > University of Nottingham may be monitored as permitted by UK legislation. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From ahafri at gmail.com Thu Jul 14 15:59:56 2011 From: ahafri at gmail.com (Alon Hafri) Date: Thu, 14 Jul 2011 08:59:56 -0700 Subject: playing SoundIn audio within the same trial Message-ID: Hi all, I just experimented with using the SoundIn object for the first time yesterday in order to play a captured image description within the same trial. I want to note the difficulties I had, how I got it to work, and then some questions about how it could have been done easier, perhaps. My experiment is a production task, where viewers are eyetracked as they describe an image aloud, and their description is recorded via a SlideIn object. For demonstration purposes I give the option of playing back viewer eyegaze concurrently with the audio of their description within the same trial -- which is where I ran into difficulty! By examining the compiled script, I see that the SlideIn audio is stored in a SoundCaptureBuffer object, but this is not saved to a wav file until the end of the procedure, where it is automatically saved by a call to a "SaveToFile" method (e.g. Sound1SoundCaptureBuffer.SaveToFile). So ordinarily the recorded sound is not accessible until the end of trial, which is not what I want. I could not figure out a way to play the SoundCaptureBuffer itself (I tried a call to SoundOut1SoundCaptureBuffer.Play, but that method doesn't exist), so I got around this by calling the SaveToFile method early on in an InLine. I then used a later SoundOut object to play this newly created audio file. The SlideIn object had "@Auto" as the filename, which means it automatically created a unique wav file name to save to, and so I created an attribute "ProductionFilename", saved the SoundCaptureBuffer filename to this attribute, and then the SoundOut object called this attribute as its filename. The biggest difficulty I had was the automatic SaveToFile that occurred at the end of the procedure -- since the file had already been created with my earlier SaveToFile in the InLine, I got an error "Writing captured audio to file failed". I got around this by changing the SoundCaptureBuffer filename after calling SaveToFile, to "temp.wav". For some reason, even though it was overwriting the "temp.wav" file every trial, no error was produced, whereas before when it was trying to write over the newly created file (@Auto, e.g. "Trial1-SoundIn1-1.wav") it failed. So here's the setup I have now that works (simplified, with irrelevant objects removed): SoundIn1 object (duration = 0, stopafter = no, filename = @Auto) --> start capturing sound and immediately advance to test picture TestPicture image object (wait for Spacebar) --> picture to be described InLine: SoundIn1SoundCaptureBuffer.SaveToFile 'save sound file early c.SetAttrib "ProductionFilename", SoundIn1SoundCaptureBuffer.Filename 'set a ProductionFilename attribute so the later SoundOut object can play the saved sound file SoundIn1SoundCaptureBuffer.Filename = "temp.wav" 'for some reason this prevents an error... SoundOut1 object (duration = 0, stopafter = no, filename = [ProductionFilename]) --> plays the recorded sound file and immediately advances to the gaze replay TETGazeReplay (the eyegaze replay package call) --> replays the viewer eyegaze overtop the test picture (while the audio from the SoundOut object is still playing) ... end of procedure: there is an additional SoundIn1SoundCaptureBuffer.SaveToFile call that I imagine is not preventable (you can see it in the compiled Full script) My questions are: 1) Why when I change the sound capture filename to "temp.wav" is the script successful (even though the SaveToFile method is called at the end of the procedure again so is overwriting the temp.wav file), whereas without changing the filename, I get an error? 2) Was there an easier way to do this? 3) Is there documentation on the properties of the SoundIn object available in E-basic? I couldn't find any in the E-Basic help, so had to figure it out by looking at the compiled script. For example, it would be nice to know if there is a way to play the SoundCaptureBuffer before it is saved to file (I tried a SoundIn1SoundCaptureBuffer.Play method but it didn't work). 4) A separate and minor question, but can you specify the filename for the SoundOUT object at runtime (so I don't have to do it by way of an attribute)? I hope everything was clear in the above. Thanks in advance for your help! Alon -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Thu Jul 14 16:41:08 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Thu, 14 Jul 2011 12:41:08 -0400 Subject: playing SoundIn audio within the same trial In-Reply-To: Message-ID: Alon, Wow, thanks for posting this documentation -- I do not yet use SoundIn (although I have to write a lesson on it shortly!), but I might find this useful some time. As to your questions.. First, it seems to me that these belong to PST Web Support (http://support.pstnet.com/e%2Dprime/support/login.asp ), so I hope you post them there as well (and post back here with their response). Anyway, here is my take... >My questions are: >1) Why when I change the sound capture filename to "temp.wav" is the >script successful (even though the SaveToFile method is called at >the end of the procedure again so is overwriting the temp.wav file), >whereas without changing the filename, I get an error? I have no idea, I think we will have to leave this one to PST. >2) Was there an easier way to do this? Again, I have no experience yet with SoundIn. But I would guess that instead of using the @Auto automatic file naming you could generate file names yourself in your code and that might avoid the "write fail" problem. Since you already use inline code to handle playing the captured audio, generating your own file names should add no extra burden. Sometimes all that extra "automation" just gets in the way, I like to turn it all off and supply my own code. >3) Is there documentation on the properties of the SoundIn object >available in E-basic? I couldn't find any in the E-Basic help, Indeed, the E-Basic Help lacks a SoundIn topic, and topics for any new features of EP2. As far as I can tell, the EB Help in EP2 contains exactly the same content as for EP1. No telling when PST will supply us the missing documentation, but if you contact Web Support they will often supply documentation privately on a "need to know" basis. If you get that, then please make that documentation public here. Thanks. > so had to figure it out by looking at the compiled script. Indeed, that is how I have figured out a *lot* of how EP actually works, even with the EB Help on hand (and that learning process works a *lot* better with good-old EP1 than with EP2). And as I have said elsewhere, beware that the EB Help is incomplete, and in some cases misleading or just plain wrong, so you have to test everything out for yourself. >For example, it would be nice to know if there is a way to play the >SoundCaptureBuffer before it is saved to file I suspect there is no such method, and no plan to add one. Again, a question best handled by PST staff. >(I tried a SoundIn1SoundCaptureBuffer.Play method but it didn't work). Nice bit of hacking for you to try the method anyway, sometimes you do uncover undocumented features that way ;). >4) A separate and minor question, but can you specify the filename >for the SoundOUT object at runtime (so I don't have to do it by way >of an attribute)? SoundOut file names are actually handled by an associated SoundBuffer object, using the .Filename property and .Load method. See the SoundBuffer topic in the EB Help, and look at the code that E-Studio generates for any SoundOut object. Regards, -- David McFarlane, Professional Faultfinder -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From ahafri at gmail.com Thu Jul 14 18:44:59 2011 From: ahafri at gmail.com (Alon Hafri) Date: Thu, 14 Jul 2011 11:44:59 -0700 Subject: playing SoundIn audio within the same trial In-Reply-To: <4e1f1c2b.94592a0a.09a9.1bf4SMTPIN_ADDED@gmr-mx.google.com> Message-ID: Hi David, first of all thanks for your quick reply and insights! I will post this to PST support as well and see what they say. In the meantime, I messed with the experiment a bit more and I realized that the problem lies not with calling ".SaveToFile" twice in the same trial (once in my InLine, once unavoidably at the end of the procedure from automatic code inserted into the script by E-Prime). Instead it has something to do with my trying to save a file with the same name as the one I just PLAYED with the SoundOut object earlier in the trial. When I removed the SoundOut object so the captured sound file was no longer played, there were no errors (even when .SaveToFile was called twice, both times with the same filename). So maybe the played file is not closed completely, and so is not accessible to be written over by the .SaveToFile method and produces the "Writing captured audio to file failed" error. Maybe you have some ideas on how to make sure the file is closed completely after it is played? Also, let me clarify things in response to what you wrote: > >2) Was there an easier way to do this? > > Again, I have no experience yet with SoundIn. ?But I would guess that > instead of using the @Auto automatic file naming you could generate > file names yourself in your code and that might avoid the "write > fail" problem. ?Since you already use inline code to handle playing > the captured audio, generating your own file names should add no > extra burden. ?Sometimes all that extra "automation" just gets in the > way, I like to turn it all off and supply my own code. > I didn't try using code to generate the name, but I did look at the code used to automatically generate the file, and it generated a string with the experiment name, subject #, session #, SoundIn object name, and finally a unique index number, and then set the SoundCaptureBuffer.Filename equal to the string, like this: strSoundIn1CaptureName = "" If c.AttribExists("Experiment") = True Then strSoundIn1CaptureName = strSoundIn1CaptureName & c.GetAttrib("Experiment") & "-" If c.AttribExists("Subject") = True Then strSoundIn1CaptureName = strSoundIn1CaptureName & c.GetAttrib("Subject") & "-" If c.AttribExists("Session") = True Then strSoundIn1CaptureName = strSoundIn1CaptureName & c.GetAttrib("Session") & "-" strSoundIn1CaptureName = strSoundIn1CaptureName & SoundIn1.Name & "-" strSoundIn1CaptureName = strSoundIn1CaptureName & CStr(SoundIn1SoundCaptureBuffer.GetNextCaptureIndex) & ".wav" SoundIn1SoundCaptureBuffer.Filename = strSoundIn1CaptureName So I could have done something similar in an InLine before the SoundIn object was executed. But as seen above, the captured filename is actually not the problem, but playing the file and then trying to save over that file is. Also, the .SaveToFile call at the end of the procedure is unavoidable as far as I can tell -- it is automatically generated by E-Prime whenever you have a SoundIn object in your experiment. > SoundOut file names are actually handled by an associated SoundBuffer > object, using the .Filename property and .Load method. ?See the > SoundBuffer topic in the EB Help, and look at the code that E-Studio > generates for any SoundOut object. > Interesting -- I tried doing this through code to avoid having to use an Attribute for this purpose, but couldn't figure out how to actually modify and call methods of a SoundBuffer object without having a SoundOut object already exist. And when I tried modifying the filename in an InLine right before the SoundOut object was executed, it defaulted to the filename as set in the properties window of the object in the E-Studio user interface. Perhaps there is a way to do it without any SoundOut object, or alternatively a way to change the filename in an InLine so it remains changed throughout the trial? Thanks again, Alon -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Thu Jul 14 19:37:41 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Thu, 14 Jul 2011 15:37:41 -0400 Subject: debounce time In-Reply-To: Message-ID: Tobias, Hmm, "I have just received a nice self-made buttonbox..."?? If it is self-made then you could not receive it, because you already have it; if you just received it then it is not self-made. Perhaps you meant "custom-made". But I quibble... Like Paul Groot said, it is best to use hardware-debounced switches, and the circuitry for that is very straightforward, you can also find instructions in the classic text "The Art of Electronics" by Horowitz & Hill. Every lab should have someone who is familiar with that text. Nevertheless I rarely follow that advice myself because, even though the circuitry is trivial, it requires a power source, and that just makes things a tad too inconvenient for me (the parallel port does not include any power source). I like simmple passive circuitry whenever I can get away with it. And in almost every case the task itself presents sufficient delay between responses so that switch bouncing does not present a problem. But I gather you need this for something like a rapid tapping task, where switch bounces become a problem. For our tapping tasks we solve this by running a custom passive-switch box much like yours through an SRBox -- that way we get switches with good mechanical feel combined with the ease of use of the SRBox, and still have sub-millisecond resolution. But as a last resort I will do software debouncing. The cheapest way to do that is just to add a sufficient Sleep after a response, and trust both that no further responses come in during that Sleep and that the switch finishes bouncing during that Sleep. I would rather have something more secure. So here is an example of the sort of code I might use, using a ReadPort (you would have to modify this if you use an input mask, but you can handle that) (I did not test this, just constructed it from memory, so caveat user): Const PortAdd as Integer = &hABCD ' just an example, replace with real port address Const BitMask as Integer = &H01 Const DtDebounce as Long = 50 ' ms Dim tDebounce as Long tDebounce = Clock.Read + DtDebounce Do Until (Clock.Read >= tDebounce) If ((ReadPort(PortAdd) and BitMask) <> 0) Then _ tDebounce = Clock.Read + DtDebounce Loop The example supposes that we are only interested in bit 0 of the input, and that a bit value of 1 indicates button pressed, while a bit value of 0 indicates button released. The code simply considers bouncing to be over as soon as it finds that the button has been released for (in this example) 50 ms without interruption. More specifically, it starts by setting a goal of (in this example) 50 ms from now. It then monitors the input until it reaches the goal time. If it detects another button press during this time, then it resets the goal for (in this example) 50 ms more from the current time, and continues. As a result, the program runs this loop as long as the button is pressed, and does not move on until 50 ms after the button has been fully released and all bouncing is done. This code could go either right before you want to get a response, or right after you have gotten your response. Pretty cool if Presentation has a "dead-time" setting, maybe yet another reason to consider it as an alternative to E-Prime. -- David McFarlane, Professional Faultfinder At 7/14/2011 07:54 AM Thursday, Paul Groot wrote: >Hi Tobias, > >You're right. Mechanical switches suffer from this debounce effect. >Especially if the switch becomes older! In most cases this is not an >issue if you are only interested in the response time of a single >button press. When repeating presses are allowed, an 'ignore interval' >of about 50 ms should be enough for even the worst switches. Things >become more complicated when several buttons are allowed to be >pressed. An electrical solution using a Schmitt trigger is preferred >in that case (for example: >http://www.labbookpages.co.uk/electronics/debounce.html) > >Unfortunately Eprime has no dead-time setting as Presentation does...;-(( > >best >Paul > >2011/7/14 Tobias : > > Dear E-Prime community, > > > > I have just received a nice self-made buttonbox with three buttons > > that can be attached to a parallel port. THus I have very good timing > > of RTs for my experiments now :) > > > > However, there seems to be a problem with the bouncing of the keys. > > Single key presses cause several signals in a row. That is, if I have > > two consecutive slides with a duration of "-1", one key press is > > enough to terminate both slides. > > > > A collegue of mine said that in the experimental software > > 'Presentation', a debounce time can be specified so that such double > > responses are not possible. > > > > Is there any way of doing so in E-Prime? > > > > Best, > > Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From markbfm at gmail.com Sat Jul 16 02:18:39 2011 From: markbfm at gmail.com (Mark A) Date: Fri, 15 Jul 2011 19:18:39 -0700 Subject: How to avoid presenting targets consecutively Message-ID: Dear E-Prime group, I am fairly new to E-Prime, but thus far have found online discussions within the group, as well as PST instructions and examples that have allowed me to program everything required, with one exception. The experimental task is simple: A participant listens to a series of words and presses a button whenever a particular word is heard (i.e., the target word, "apple" in the example below). The target word is presented 4 times. My problem is this: I wish to present a series of stimuli (.wav files) randomly, with the restriction that I do not want "Target" files to be presented consecutively. Rather, I want them to be separated by at least one distractor (or non-target). To illustrate, this is an excerpt from one of my lists: Weight Nested Procedure ? Sound Talker Target SoundDur 1 MAppleTrial m1apple.wav m1 yes 422 1 MAppleTrial f4apple.wav f4 yes 546 1 MAppleTrial m1apple.wav m1 yes 422 1 MAppleTrial f4apple.wav f4 yes 546 1 MAppleTrial m2bear.wav m2 no 332 1 MAppleTrial f3bin.wav ?? f3 no 375 1 MAppleTrial m3cat.wav ? ? ? ??m3 no 383 1 MAppleTrial f2chalk.wav f2 no 586 ..... and so forth (there are 4 targets and 23 distractors). Currently, I have the list set to "Random", however, this does not guarantee that the Target files (top 4 rows) will not occur consecutively. I think that the solution will involve a conditional statement (perhaps using In line) comparing whether the previous file presented was a target, but I am unsure how to implement this. An additional consideration is what to do if there are only 2 cycles left, and the two files left are both target files. If this is very hard to avoid, I am willing to live with this, as it is unlikely to occur very often. Any tips or links to helpful discussions on similar topics will be very much appreciated. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From david.averill.nicholson at gmail.com Mon Jul 18 15:50:06 2011 From: david.averill.nicholson at gmail.com (David Nicholson) Date: Mon, 18 Jul 2011 08:50:06 -0700 Subject: Multiple choice quiz graying out incorrect answers until correct chosen Message-ID: Hello, I'm creating an experiment where the participant first chooses a difficulty level and is directed to one of three tests. I already have this part created and working correctly. It is not the most nicely structured program as the best way I found to accomplish this is to use unreferenced e-objects, but it works. That is not my current problem or what I am focusing on at the moment. But I'm open to suggestions if a better method is known. What i'm currently trying to do is create a slide with a question and four multiple choice answers. The subject will choose an answer until the correct answer is chosen. I will be using a ranking system of points to score them. (4pts for first try, 3 for second, etc.) I will also require a certain percentage correct or it will kick them out and have to restart, or just jump back to the start. What I cannot figure out is how to keep the same question and answers displayed and gray out the incorrect answer(s). Then move forward to the next question when the correct answer is picked. I've been thinking of a few ideas but I am still unsure what the best way to structure and write this. Thanks in advance for all your help! David Nicholson -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From ucfmicah at gmail.com Thu Jul 21 14:45:28 2011 From: ucfmicah at gmail.com (Micah) Date: Thu, 21 Jul 2011 07:45:28 -0700 Subject: Tips needed for tweaking the standard likert scale script Message-ID: Hallo, I've got an fMRI paradigm that is almost finished. I've embedded a customized version of the likert script, and could use a little help with a simple tweak. I'm a moderately skilled e-basic coder, so if you can suggest a general strategy, I can probably implement it. As it is coded now, the likert scale waits for a response before closing. The actual slideobject it draws to has 0 duration, and as far as I can tell, the script simply stops the the slide once a response is given. I'd like to ensure that there is a time limit for the response, so that the total possible time to respond is 6 seconds. I.e. if a participant answers in 2 seconds, there would be 4 seconds of fixation following the answer, before moving on. I much appreciate any tips you can lend. Here is the inline that controls the Likert scale: 'Declare a variable for accessing each SlideText object and changing properties. Dim theSlideText As SlideText Dim strName As String Dim nLastResponseCount As Integer nLastResponseCount = 0 Dim nNextMoveTime As Long Dim strLastResponse As String Dim boolMove As Boolean boolMove = False Dim theKeyboardResponseData As KeyboardResponseData Do While Stimulus.InputMasks.IsPending() 'Was there a response? If Stimulus.InputMasks.Responses.Count > nLastResponseCount Then nLastResponseCount = nLastResponseCount +1 Set theKeyboardResponseData = CKeyboardResponseData(Stimulus.InputMasks.Responses(nLastResponseCount)) If theKeyboardResponseData.RESP = "2" Then 'Subject has already selected the highest rating. If intCurrent < 7 Then 'Increment the current selection. intPrevious = intCurrent intCurrent = intCurrent + 1 'Change border color of previously selected box back to white, change border 'color of currently selected box to red. strName = "Text" & intPrevious Set theSlideText = CSlideText(Stimulus.States.Item("Default").Objects(strName)) theSlideText.BorderColor = CColor("white") strName = "Text" & intCurrent Set theSlideText = CSlideText(Stimulus.States.Item("Default").Objects(strName)) theSlideText.BorderColor = CColor("red") boolMove = False ' nNextMoveTime = Clock.Read + 500 strLastResponse = "2" End If ElseIf theKeyboardResponseData.RESP = "1" Then 'Subject has already selected the lowest rating. If intCurrent > 1 Then 'Decrement the current selection. intPrevious = intCurrent intCurrent = intCurrent - 1 'Change border color of previously selected box back to white, change border 'color of currently selected box to red. strName = "Text" & intPrevious Set theSlideText = CSlideText(Stimulus.States.Item("Default").Objects(strName)) theSlideText.BorderColor = CColor("white") strName = "Text" & intCurrent Set theSlideText = CSlideText(Stimulus.States.Item("Default").Objects(strName)) theSlideText.BorderColor = CColor("red") boolMove = False nNextMoveTime = Clock.Read + 500 strLastResponse = "1" End If ElseIf theKeyboardResponseData.RESP = "{-2}" Or theKeyboardResponseData.RESP = "{-1}" Then If Mid(theKeyboardResponseData.RESP, 3, 1) = strLastResponse Then boolMove = False End If End If ElseIf boolMove = True And (Clock.Read > nNextMoveTime) Then If strLastResponse = "2" Then 'Subject has already selected the highest rating. If intCurrent < 7 Then 'Increment the current selection. intPrevious = intCurrent intCurrent = intCurrent + 1 'Change border color of previously selected box back to white, change border 'color of currently selected box to red. strName = "Text" & intPrevious Set theSlideText = CSlideText(Stimulus.States.Item("Default").Objects(strName)) theSlideText.BorderColor = CColor("white") strName = "Text" & intCurrent Set theSlideText = CSlideText(Stimulus.States.Item("Default").Objects(strName)) theSlideText.BorderColor = CColor("red") End If Else 'Subject has already selected the lowest rating. If intCurrent > 1 Then 'Decrement the current selection. intPrevious = intCurrent intCurrent = intCurrent - 1 'Change border color of previously selected box back to white, change border 'color of currently selected box to red. strName = "Text" & intPrevious Set theSlideText = CSlideText(Stimulus.States.Item("Default").Objects(strName)) theSlideText.BorderColor = CColor("white") strName = "Text" & intCurrent Set theSlideText = CSlideText(Stimulus.States.Item("Default").Objects(strName)) theSlideText.BorderColor = CColor("red") End If End If nNextMoveTime = Clock.Read + 500 End If Stimulus.Draw Loop 'Change the BackColor property of the selected box to red to show the subject 'that the response has been collected. strName = "Text" & intCurrent Set theSlideText = CSlideText(Stimulus.States.Item("Default").Objects(strName)) theSlideText.BackColor = CColor("red") 'Redraw the Slide to show changes. Stimulus.Draw 'Log rating in the data file under the attribute "Rating" c.SetAttrib "Rating", intCurrent Sleep 1000 'Return box to default appearance. theSlideText.BackColor = CColor("green") theSlideText.BorderColor = CColor("white") strName = "Text4" Set theSlideText = CSlideText(Stimulus.States.Item("Default").Objects(strName)) theSlideText.BorderColor = CColor("red") Stimulus.Draw Set theSlideText = Nothing -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Thu Jul 21 15:59:45 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Thu, 21 Jul 2011 11:59:45 -0400 Subject: Tips needed for tweaking the standard likert scale script In-Reply-To: Message-ID: Stock reminder: 1) I do not work for PST. 2) PST's trained staff takes any and all questions at http://support.pstnet.com/e%2Dprime/support/login.asp , and they strive to respond to all requests in 24-48 hours -- this is pretty much their substitute for proper documentation, so make full use of it. 3) If you do get an answer from PST Web Support, please extend the courtesy of posting their reply back here for the sake of others. That said, here is my take... Try replacing Do While Stimulus.InputMasks.IsPending() ... with something like Const StimulusDur as Long = 6000 Dim StimulusTargetOffsetTime as Long StimulusTargetOffsetTime = Clock.Read + StimulusDur Do While (Stimulus.InputMasks.IsPending() and _ (Clock.Read < StimulusTargetOffsetTime) ) ... Alternatively, if you prefer to set stimulus duration in its Property Pages instead of with an InLine constant, then set both Duration and PreRelease to 6000 (in this case), and E-Prime will automatically compute the TargetOffsetTime for you, so the code simplifies to something like Do While (Stimulus.InputMasks.IsPending() and _ (Clock.Read < Stimulus.TargetOffsetTime) ) ... Of course, you will find confusion either way. For the first way, any time you want to change stimulus duration you will have to remember to dive into the code. For the second way, you can change stimulus Duration in the normal way, but then you have to remember to always change PreRelease to the same thing (or, be daring and set PreRelease to some one enormous value, but not so large that TargetOnsetTime + Duration - PreRelease ever becomes negative!). -- David McFarlane, Professional Faultfinder ... six of one and half dozen of the other, you pays your money and takes your choice. >I've got an fMRI paradigm that is almost finished. I've embedded a >customized version of the likert script, and could use a little help >with a simple tweak. I'm a moderately skilled e-basic coder, so if you >can suggest a general strategy, I can probably implement it. As it is >coded now, the likert scale waits for a response before closing. The >actual slideobject it draws to has 0 duration, and as far as I can >tell, the script simply stops the the slide once a response is given. >I'd like to ensure that there is a time limit for the response, so >that the total possible time to respond is 6 seconds. I.e. if a >participant answers in 2 seconds, there would be 4 seconds of fixation >following the answer, before moving on. I much appreciate any tips you >can lend. > >Here is the inline that controls the Likert scale: > >'Declare a variable for accessing each SlideText object and changing >properties. >Dim theSlideText As SlideText > >Dim strName As String >Dim nLastResponseCount As Integer >nLastResponseCount = 0 > >Dim nNextMoveTime As Long > >Dim strLastResponse As String > >Dim boolMove As Boolean >boolMove = False > >Dim theKeyboardResponseData As KeyboardResponseData > > >Do While Stimulus.InputMasks.IsPending() > > 'Was there a response? > If Stimulus.InputMasks.Responses.Count > nLastResponseCount Then > > nLastResponseCount = nLastResponseCount +1 > > Set theKeyboardResponseData = >CKeyboardResponseData(Stimulus.InputMasks.Responses(nLastResponseCount)) > > If theKeyboardResponseData.RESP = "2" Then > > 'Subject has already selected the highest rating. > If intCurrent < 7 Then > > 'Increment the current selection. > intPrevious = intCurrent > intCurrent = intCurrent + 1 > > 'Change border color of previously > selected box back to white, >change border > 'color of currently selected box to red. > strName = "Text" & intPrevious > Set theSlideText = >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > theSlideText.BorderColor = CColor("white") > > strName = "Text" & intCurrent > Set theSlideText = >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > theSlideText.BorderColor = CColor("red") > > boolMove = False > > ' nNextMoveTime = Clock.Read + 500 > strLastResponse = "2" > > End If > > ElseIf theKeyboardResponseData.RESP = "1" Then > > 'Subject has already selected the lowest rating. > If intCurrent > 1 Then > > 'Decrement the current selection. > intPrevious = intCurrent > intCurrent = intCurrent - 1 > > 'Change border color of previously > selected box back to white, >change border > 'color of currently selected box to red. > strName = "Text" & intPrevious > Set theSlideText = >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > theSlideText.BorderColor = CColor("white") > > strName = "Text" & intCurrent > Set theSlideText = >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > theSlideText.BorderColor = CColor("red") > > boolMove = False > > nNextMoveTime = Clock.Read + 500 > strLastResponse = "1" > > End If > > ElseIf theKeyboardResponseData.RESP = "{-2}" Or >theKeyboardResponseData.RESP = "{-1}" Then > > If Mid(theKeyboardResponseData.RESP, 3, 1) > = strLastResponse Then > > boolMove = False > > End If > > End If > > ElseIf boolMove = True And (Clock.Read > nNextMoveTime) Then > > If strLastResponse = "2" Then > > 'Subject has already selected the highest rating. > If intCurrent < 7 Then > > 'Increment the current selection. > intPrevious = intCurrent > intCurrent = intCurrent + 1 > > 'Change border color of previously > selected box back to white, >change border > 'color of currently selected box to red. > strName = "Text" & intPrevious > Set theSlideText = >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > theSlideText.BorderColor = CColor("white") > > strName = "Text" & intCurrent > Set theSlideText = >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > theSlideText.BorderColor = CColor("red") > > End If > > Else > > 'Subject has already selected the lowest rating. > If intCurrent > 1 Then > > 'Decrement the current selection. > intPrevious = intCurrent > intCurrent = intCurrent - 1 > > 'Change border color of previously > selected box back to white, >change border > 'color of currently selected box to red. > strName = "Text" & intPrevious > Set theSlideText = >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > theSlideText.BorderColor = CColor("white") > > strName = "Text" & intCurrent > Set theSlideText = >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > theSlideText.BorderColor = CColor("red") > > End If > > End If > > nNextMoveTime = Clock.Read + 500 > > End If > > Stimulus.Draw > >Loop > >'Change the BackColor property of the selected box to red to show the >subject >'that the response has been collected. >strName = "Text" & intCurrent >Set theSlideText = >CSlideText(Stimulus.States.Item("Default").Objects(strName)) >theSlideText.BackColor = CColor("red") > >'Redraw the Slide to show changes. >Stimulus.Draw > >'Log rating in the data file under the attribute "Rating" >c.SetAttrib "Rating", intCurrent > >Sleep 1000 > >'Return box to default appearance. >theSlideText.BackColor = CColor("green") >theSlideText.BorderColor = CColor("white") > >strName = "Text4" >Set theSlideText = >CSlideText(Stimulus.States.Item("Default").Objects(strName)) >theSlideText.BorderColor = CColor("red") > >Stimulus.Draw > >Set theSlideText = Nothing -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From ucfmicah at gmail.com Thu Jul 21 16:42:29 2011 From: ucfmicah at gmail.com (Micah) Date: Thu, 21 Jul 2011 09:42:29 -0700 Subject: Tips needed for tweaking the standard likert scale script In-Reply-To: <4e284cf8.8c7a2a0a.2b8f.3813SMTPIN_ADDED@gmr-mx.google.com> Message-ID: Thank you Todd! That's an excellent solution. I knew I'd need to somehow do a clock read and feed that into the loop, but I wasn't able to quite get there. Not to tax you, but there are two unresolved issues with this solution- 1. The scale now records wherever the 'slider' is when the time limit ends. I think it's probably much safer to record these as no response, and I'm not sure how to manipulate the loop do so. I need to make some kind of check, so that if it times out, it sets the value to NaN/etc. 2. The scale still ends immediately if a response is made. I've worked out a way to stop that- by adding: dim responsetime as integer ....... (the loop) ...bottom of the inline: responsetime=Stimulus.RT Sleep 6000-response time However, I don't think that is compatible with your solution. BW, Micah On Jul 21, 5:59?pm, David McFarlane wrote: > Stock reminder: ?1) I do not work for PST. ?2) PST's trained staff > takes any and all questions athttp://support.pstnet.com/e%2Dprime/support/login.asp, and they > strive to respond to all requests in 24-48 hours -- this is pretty > much their substitute for proper documentation, so make full use of > it. ?3) If you do get an answer from PST Web Support, please extend > the courtesy of posting their reply back here for the sake of others. > > That said, here is my take... > > Try replacing > > Do While Stimulus.InputMasks.IsPending() > ? ? ... > > with something like > > Const ?StimulusDur as Long = 6000 > Dim ?StimulusTargetOffsetTime as Long > StimulusTargetOffsetTime = Clock.Read + StimulusDur > Do While (Stimulus.InputMasks.IsPending() and _ > ? ? ?(Clock.Read < StimulusTargetOffsetTime) ) > ? ? ?... > > Alternatively, if you prefer to set stimulus duration in its Property > Pages instead of with an InLine constant, then set both Duration and > PreRelease to 6000 (in this case), and E-Prime will automatically > compute the TargetOffsetTime for you, so the code simplifies to something like > > Do While (Stimulus.InputMasks.IsPending() and _ > ? ? ?(Clock.Read < Stimulus.TargetOffsetTime) ) > ? ? ?... > > Of course, you will find confusion either way. ?For the first way, > any time you want to change stimulus duration you will have to > remember to dive into the code. ?For the second way, you can change > stimulus Duration in the normal way, but then you have to remember to > always change PreRelease to the same thing (or, be daring and set > PreRelease to some one enormous value, but not so large that > TargetOnsetTime + Duration - PreRelease ever becomes negative!). > > -- David McFarlane, Professional Faultfinder > ... six of one and half dozen of the other, you pays your money and > takes your choice. > > > > > > > > >I've got an fMRI paradigm that is almost finished. I've embedded a > >customized version of the likert script, and could use a little help > >with a simple tweak. I'm a moderately skilled e-basic coder, so if you > >can suggest a general strategy, I can probably implement it. As it is > >coded now, the likert scale waits for a response before closing. The > >actual slideobject it draws to has 0 duration, and as far as I can > >tell, the script simply stops the the slide once a response is given. > >I'd like to ensure that there is a time limit for the response, so > >that the total possible time to respond is 6 seconds. I.e. ?if a > >participant answers in 2 seconds, there would be 4 seconds of fixation > >following the answer, before moving on. I much appreciate any tips you > >can lend. > > >Here is the inline that controls the Likert scale: > > >'Declare a variable for accessing each SlideText object and changing > >properties. > >Dim theSlideText As SlideText > > >Dim strName As String > >Dim nLastResponseCount As Integer > >nLastResponseCount = 0 > > >Dim nNextMoveTime As Long > > >Dim strLastResponse As String > > >Dim boolMove As Boolean > >boolMove = False > > >Dim theKeyboardResponseData As KeyboardResponseData > > >Do While Stimulus.InputMasks.IsPending() > > > ? ? ? ? 'Was there a response? > > ? ? ? ? If Stimulus.InputMasks.Responses.Count > nLastResponseCount Then > > > ? ? ? ? ? ? ? ? nLastResponseCount = nLastResponseCount +1 > > > ? ? ? ? ? ? ? ? Set theKeyboardResponseData = > >CKeyboardResponseData(Stimulus.InputMasks.Responses(nLastResponseCount)) > > > ? ? ? ? ? ? ? ? If theKeyboardResponseData.RESP = "2" Then > > > ? ? ? ? ? ? ? ? ? ? ? ? 'Subject has already selected the highest rating. > > ? ? ? ? ? ? ? ? ? ? ? ? If intCurrent < 7 Then > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'Increment the current selection. > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? intPrevious = intCurrent > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? intCurrent = intCurrent + 1 > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'Change border color of previously > > selected box back to white, > >change border > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'color of currently selected box to red. > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? strName = "Text" & intPrevious > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Set theSlideText = > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? theSlideText.BorderColor = CColor("white") > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? strName = "Text" & intCurrent > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Set theSlideText = > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? theSlideText.BorderColor = CColor("red") > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? boolMove = False > > > ? ? ? ? ? ? ? ? ? ? ? ? ' ? ? ? nNextMoveTime = Clock.Read + 500 > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? strLastResponse = "2" > > > ? ? ? ? ? ? ? ? ? ? ? ? End If > > > ? ? ? ? ? ? ? ? ElseIf theKeyboardResponseData.RESP = "1" Then > > > ? ? ? ? ? ? ? ? ? ? ? ? 'Subject has already selected the lowest rating. > > ? ? ? ? ? ? ? ? ? ? ? ? If intCurrent > 1 Then > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'Decrement the current selection. > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? intPrevious = intCurrent > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? intCurrent = intCurrent - 1 > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'Change border color of previously > > selected box back to white, > >change border > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'color of currently selected box to red. > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? strName = "Text" & intPrevious > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Set theSlideText = > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? theSlideText.BorderColor = CColor("white") > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? strName = "Text" & intCurrent > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Set theSlideText = > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? theSlideText.BorderColor = CColor("red") > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? boolMove = False > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? nNextMoveTime = Clock.Read + 500 > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? strLastResponse = "1" > > > ? ? ? ? ? ? ? ? ? ? ? ? End If > > > ? ? ? ? ? ? ? ? ElseIf theKeyboardResponseData.RESP = "{-2}" Or > >theKeyboardResponseData.RESP = "{-1}" Then > > > ? ? ? ? ? ? ? ? ? ? ? ? If Mid(theKeyboardResponseData.RESP, 3, 1) > > = strLastResponse Then > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? boolMove = False > > > ? ? ? ? ? ? ? ? ? ? ? ? End If > > > ? ? ? ? ? ? ? ? End If > > > ? ? ? ? ElseIf boolMove = True And (Clock.Read > nNextMoveTime) Then > > > ? ? ? ? ? ? ? ? If strLastResponse = "2" Then > > > ? ? ? ? ? ? ? ? ? ? ? ? 'Subject has already selected the highest rating. > > ? ? ? ? ? ? ? ? ? ? ? ? If intCurrent < 7 Then > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'Increment the current selection. > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? intPrevious = intCurrent > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? intCurrent = intCurrent + 1 > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'Change border color of previously > > selected box back to white, > >change border > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'color of currently selected box to red. > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? strName = "Text" & intPrevious > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Set theSlideText = > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? theSlideText.BorderColor = CColor("white") > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? strName = "Text" & intCurrent > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Set theSlideText = > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? theSlideText.BorderColor = CColor("red") > > > ? ? ? ? ? ? ? ? ? ? ? ? End If > > > ? ? ? ? ? ? ? ? Else > > > ? ? ? ? ? ? ? ? ? ? ? ? 'Subject has already selected the lowest rating. > > ? ? ? ? ? ? ? ? ? ? ? ? If intCurrent > 1 Then > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'Decrement the current selection. > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? intPrevious = intCurrent > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? intCurrent = intCurrent - 1 > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'Change border color of previously > > selected box back to white, > >change border > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'color of currently selected box to red. > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? strName = "Text" & intPrevious > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Set theSlideText = > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? theSlideText.BorderColor = CColor("white") > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? strName = "Text" & intCurrent > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Set theSlideText = > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? theSlideText.BorderColor = CColor("red") > > > ? ? ? ? ? ? ? ? ? ? ? ? End If > > > ? ? ? ? ? ? ? ? End If > > > ? ? ? ? ? ? ? ? nNextMoveTime = Clock.Read + 500 > > > ? ? ? ? End If > > > ? ? ? ? Stimulus.Draw > > >Loop > > >'Change the BackColor property of the selected box to red to show the > >subject > >'that the response has been collected. > >strName = "Text" & intCurrent > >Set theSlideText = > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > >theSlideText.BackColor = CColor("red") > > >'Redraw the Slide to show changes. > >Stimulus.Draw > > >'Log rating in the data file under the attribute "Rating" > >c.SetAttrib "Rating", intCurrent > > >Sleep 1000 > > >'Return box to default appearance. > >theSlideText.BackColor = CColor("green") > >theSlideText.BorderColor = CColor("white") > > >strName = "Text4" > >Set theSlideText = > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > >theSlideText.BorderColor = CColor("red") > > >Stimulus.Draw > > >Set theSlideText = Nothing -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From ucfmicah at gmail.com Thu Jul 21 17:17:23 2011 From: ucfmicah at gmail.com (Micah) Date: Thu, 21 Jul 2011 10:17:23 -0700 Subject: Tips needed for tweaking the standard likert scale script In-Reply-To: <5653cd77-f486-4292-a873-b1107c86e07a@l18g2000yql.googlegroups.com> Message-ID: Actually, I may have a solution to 1: add a check at the end of the inline; if RT=0, then set no-response =1, else =0 kind of thing. that way I can easily determine in my logs which trials are no response, and either exclude them or not. I am still not sure how to fix problem 2 however. On Jul 21, 6:42?pm, Micah wrote: > Thank you Todd! That's an excellent solution. I knew I'd need to > somehow do a clock read and feed that into the loop, but I wasn't able > to quite get there. Not to tax you, but there are two unresolved > issues with this solution- > > 1. The scale now records wherever the 'slider' is when the time limit > ends. I think it's probably much safer to record these as no response, > and I'm not sure how to manipulate the loop do so. I need to make some > kind of check, so that if it times out, it sets the value to NaN/etc. > > 2. The scale still ends immediately if a response is made. I've worked > out a way to stop that- by adding: > > dim responsetime as integer > > ....... (the loop) > > ...bottom of the inline: > > responsetime=Stimulus.RT > > Sleep 6000-response time > > However, I don't think that is compatible with your solution. > > BW, > Micah > > On Jul 21, 5:59?pm, David McFarlane wrote: > > > > > > > > > Stock reminder: ?1) I do not work for PST. ?2) PST's trained staff > > takes any and all questions athttp://support.pstnet.com/e%2Dprime/support/login.asp, and they > > strive to respond to all requests in 24-48 hours -- this is pretty > > much their substitute for proper documentation, so make full use of > > it. ?3) If you do get an answer from PST Web Support, please extend > > the courtesy of posting their reply back here for the sake of others. > > > That said, here is my take... > > > Try replacing > > > Do While Stimulus.InputMasks.IsPending() > > ? ? ... > > > with something like > > > Const ?StimulusDur as Long = 6000 > > Dim ?StimulusTargetOffsetTime as Long > > StimulusTargetOffsetTime = Clock.Read + StimulusDur > > Do While (Stimulus.InputMasks.IsPending() and _ > > ? ? ?(Clock.Read < StimulusTargetOffsetTime) ) > > ? ? ?... > > > Alternatively, if you prefer to set stimulus duration in its Property > > Pages instead of with an InLine constant, then set both Duration and > > PreRelease to 6000 (in this case), and E-Prime will automatically > > compute the TargetOffsetTime for you, so the code simplifies to something like > > > Do While (Stimulus.InputMasks.IsPending() and _ > > ? ? ?(Clock.Read < Stimulus.TargetOffsetTime) ) > > ? ? ?... > > > Of course, you will find confusion either way. ?For the first way, > > any time you want to change stimulus duration you will have to > > remember to dive into the code. ?For the second way, you can change > > stimulus Duration in the normal way, but then you have to remember to > > always change PreRelease to the same thing (or, be daring and set > > PreRelease to some one enormous value, but not so large that > > TargetOnsetTime + Duration - PreRelease ever becomes negative!). > > > -- David McFarlane, Professional Faultfinder > > ... six of one and half dozen of the other, you pays your money and > > takes your choice. > > > >I've got an fMRI paradigm that is almost finished. I've embedded a > > >customized version of the likert script, and could use a little help > > >with a simple tweak. I'm a moderately skilled e-basic coder, so if you > > >can suggest a general strategy, I can probably implement it. As it is > > >coded now, the likert scale waits for a response before closing. The > > >actual slideobject it draws to has 0 duration, and as far as I can > > >tell, the script simply stops the the slide once a response is given. > > >I'd like to ensure that there is a time limit for the response, so > > >that the total possible time to respond is 6 seconds. I.e. ?if a > > >participant answers in 2 seconds, there would be 4 seconds of fixation > > >following the answer, before moving on. I much appreciate any tips you > > >can lend. > > > >Here is the inline that controls the Likert scale: > > > >'Declare a variable for accessing each SlideText object and changing > > >properties. > > >Dim theSlideText As SlideText > > > >Dim strName As String > > >Dim nLastResponseCount As Integer > > >nLastResponseCount = 0 > > > >Dim nNextMoveTime As Long > > > >Dim strLastResponse As String > > > >Dim boolMove As Boolean > > >boolMove = False > > > >Dim theKeyboardResponseData As KeyboardResponseData > > > >Do While Stimulus.InputMasks.IsPending() > > > > ? ? ? ? 'Was there a response? > > > ? ? ? ? If Stimulus.InputMasks.Responses.Count > nLastResponseCount Then > > > > ? ? ? ? ? ? ? ? nLastResponseCount = nLastResponseCount +1 > > > > ? ? ? ? ? ? ? ? Set theKeyboardResponseData = > > >CKeyboardResponseData(Stimulus.InputMasks.Responses(nLastResponseCount)) > > > > ? ? ? ? ? ? ? ? If theKeyboardResponseData.RESP = "2" Then > > > > ? ? ? ? ? ? ? ? ? ? ? ? 'Subject has already selected the highest rating. > > > ? ? ? ? ? ? ? ? ? ? ? ? If intCurrent < 7 Then > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'Increment the current selection. > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? intPrevious = intCurrent > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? intCurrent = intCurrent + 1 > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'Change border color of previously > > > selected box back to white, > > >change border > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'color of currently selected box to red. > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? strName = "Text" & intPrevious > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Set theSlideText = > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? theSlideText.BorderColor = CColor("white") > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? strName = "Text" & intCurrent > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Set theSlideText = > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? theSlideText.BorderColor = CColor("red") > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? boolMove = False > > > > ? ? ? ? ? ? ? ? ? ? ? ? ' ? ? ? nNextMoveTime = Clock.Read + 500 > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? strLastResponse = "2" > > > > ? ? ? ? ? ? ? ? ? ? ? ? End If > > > > ? ? ? ? ? ? ? ? ElseIf theKeyboardResponseData.RESP = "1" Then > > > > ? ? ? ? ? ? ? ? ? ? ? ? 'Subject has already selected the lowest rating. > > > ? ? ? ? ? ? ? ? ? ? ? ? If intCurrent > 1 Then > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'Decrement the current selection. > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? intPrevious = intCurrent > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? intCurrent = intCurrent - 1 > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'Change border color of previously > > > selected box back to white, > > >change border > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'color of currently selected box to red. > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? strName = "Text" & intPrevious > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Set theSlideText = > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? theSlideText.BorderColor = CColor("white") > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? strName = "Text" & intCurrent > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Set theSlideText = > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? theSlideText.BorderColor = CColor("red") > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? boolMove = False > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? nNextMoveTime = Clock.Read + 500 > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? strLastResponse = "1" > > > > ? ? ? ? ? ? ? ? ? ? ? ? End If > > > > ? ? ? ? ? ? ? ? ElseIf theKeyboardResponseData.RESP = "{-2}" Or > > >theKeyboardResponseData.RESP = "{-1}" Then > > > > ? ? ? ? ? ? ? ? ? ? ? ? If Mid(theKeyboardResponseData.RESP, 3, 1) > > > = strLastResponse Then > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? boolMove = False > > > > ? ? ? ? ? ? ? ? ? ? ? ? End If > > > > ? ? ? ? ? ? ? ? End If > > > > ? ? ? ? ElseIf boolMove = True And (Clock.Read > nNextMoveTime) Then > > > > ? ? ? ? ? ? ? ? If strLastResponse = "2" Then > > > > ? ? ? ? ? ? ? ? ? ? ? ? 'Subject has already selected the highest rating. > > > ? ? ? ? ? ? ? ? ? ? ? ? If intCurrent < 7 Then > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'Increment the current selection. > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? intPrevious = intCurrent > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? intCurrent = intCurrent + 1 > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'Change border color of previously > > > selected box back to white, > > >change border > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'color of currently selected box to red. > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? strName = "Text" & intPrevious > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Set theSlideText = > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? theSlideText.BorderColor = CColor("white") > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? strName = "Text" & intCurrent > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Set theSlideText = > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? theSlideText.BorderColor = CColor("red") > > > > ? ? ? ? ? ? ? ? ? ? ? ? End If > > > > ? ? ? ? ? ? ? ? Else > > > > ? ? ? ? ? ? ? ? ? ? ? ? 'Subject has already selected the lowest rating. > > > ? ? ? ? ? ? ? ? ? ? ? ? If intCurrent > 1 Then > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'Decrement the current selection. > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? > > ... > > read more ? -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From ucfmicah at gmail.com Thu Jul 21 17:19:02 2011 From: ucfmicah at gmail.com (Micah) Date: Thu, 21 Jul 2011 10:19:02 -0700 Subject: Tips needed for tweaking the standard likert scale script In-Reply-To: <3ff69606-0efc-4bd6-aba4-cf897a54c4d2@ft10g2000vbb.googlegroups.com> Message-ID: Darn, wish I could edit that post. That will actually only work if the participant presses nothing, not if they never confirm the response (which is controlled by a termination key (3) in the advanced properties page). Not sure how to check if that button is pressed. On Jul 21, 7:17?pm, Micah wrote: > Actually, I may have a solution to 1: add a check at the end of the > inline; if RT=0, then set no-response =1, else =0 kind of thing. that > way I can easily determine in my logs which trials are no response, > and either exclude them or not. I am still not sure how to fix problem > 2 however. > > On Jul 21, 6:42?pm, Micah wrote: > > > > > > > > > Thank you Todd! That's an excellent solution. I knew I'd need to > > somehow do a clock read and feed that into the loop, but I wasn't able > > to quite get there. Not to tax you, but there are two unresolved > > issues with this solution- > > > 1. The scale now records wherever the 'slider' is when the time limit > > ends. I think it's probably much safer to record these as no response, > > and I'm not sure how to manipulate the loop do so. I need to make some > > kind of check, so that if it times out, it sets the value to NaN/etc. > > > 2. The scale still ends immediately if a response is made. I've worked > > out a way to stop that- by adding: > > > dim responsetime as integer > > > ....... (the loop) > > > ...bottom of the inline: > > > responsetime=Stimulus.RT > > > Sleep 6000-response time > > > However, I don't think that is compatible with your solution. > > > BW, > > Micah > > > On Jul 21, 5:59?pm, David McFarlane wrote: > > > > Stock reminder: ?1) I do not work for PST. ?2) PST's trained staff > > > takes any and all questions athttp://support.pstnet.com/e%2Dprime/support/login.asp, and they > > > strive to respond to all requests in 24-48 hours -- this is pretty > > > much their substitute for proper documentation, so make full use of > > > it. ?3) If you do get an answer from PST Web Support, please extend > > > the courtesy of posting their reply back here for the sake of others. > > > > That said, here is my take... > > > > Try replacing > > > > Do While Stimulus.InputMasks.IsPending() > > > ? ? ... > > > > with something like > > > > Const ?StimulusDur as Long = 6000 > > > Dim ?StimulusTargetOffsetTime as Long > > > StimulusTargetOffsetTime = Clock.Read + StimulusDur > > > Do While (Stimulus.InputMasks.IsPending() and _ > > > ? ? ?(Clock.Read < StimulusTargetOffsetTime) ) > > > ? ? ?... > > > > Alternatively, if you prefer to set stimulus duration in its Property > > > Pages instead of with an InLine constant, then set both Duration and > > > PreRelease to 6000 (in this case), and E-Prime will automatically > > > compute the TargetOffsetTime for you, so the code simplifies to something like > > > > Do While (Stimulus.InputMasks.IsPending() and _ > > > ? ? ?(Clock.Read < Stimulus.TargetOffsetTime) ) > > > ? ? ?... > > > > Of course, you will find confusion either way. ?For the first way, > > > any time you want to change stimulus duration you will have to > > > remember to dive into the code. ?For the second way, you can change > > > stimulus Duration in the normal way, but then you have to remember to > > > always change PreRelease to the same thing (or, be daring and set > > > PreRelease to some one enormous value, but not so large that > > > TargetOnsetTime + Duration - PreRelease ever becomes negative!). > > > > -- David McFarlane, Professional Faultfinder > > > ... six of one and half dozen of the other, you pays your money and > > > takes your choice. > > > > >I've got an fMRI paradigm that is almost finished. I've embedded a > > > >customized version of the likert script, and could use a little help > > > >with a simple tweak. I'm a moderately skilled e-basic coder, so if you > > > >can suggest a general strategy, I can probably implement it. As it is > > > >coded now, the likert scale waits for a response before closing. The > > > >actual slideobject it draws to has 0 duration, and as far as I can > > > >tell, the script simply stops the the slide once a response is given. > > > >I'd like to ensure that there is a time limit for the response, so > > > >that the total possible time to respond is 6 seconds. I.e. ?if a > > > >participant answers in 2 seconds, there would be 4 seconds of fixation > > > >following the answer, before moving on. I much appreciate any tips you > > > >can lend. > > > > >Here is the inline that controls the Likert scale: > > > > >'Declare a variable for accessing each SlideText object and changing > > > >properties. > > > >Dim theSlideText As SlideText > > > > >Dim strName As String > > > >Dim nLastResponseCount As Integer > > > >nLastResponseCount = 0 > > > > >Dim nNextMoveTime As Long > > > > >Dim strLastResponse As String > > > > >Dim boolMove As Boolean > > > >boolMove = False > > > > >Dim theKeyboardResponseData As KeyboardResponseData > > > > >Do While Stimulus.InputMasks.IsPending() > > > > > ? ? ? ? 'Was there a response? > > > > ? ? ? ? If Stimulus.InputMasks.Responses.Count > nLastResponseCount Then > > > > > ? ? ? ? ? ? ? ? nLastResponseCount = nLastResponseCount +1 > > > > > ? ? ? ? ? ? ? ? Set theKeyboardResponseData = > > > >CKeyboardResponseData(Stimulus.InputMasks.Responses(nLastResponseCount)) > > > > > ? ? ? ? ? ? ? ? If theKeyboardResponseData.RESP = "2" Then > > > > > ? ? ? ? ? ? ? ? ? ? ? ? 'Subject has already selected the highest rating. > > > > ? ? ? ? ? ? ? ? ? ? ? ? If intCurrent < 7 Then > > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'Increment the current selection. > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? intPrevious = intCurrent > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? intCurrent = intCurrent + 1 > > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'Change border color of previously > > > > selected box back to white, > > > >change border > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'color of currently selected box to red. > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? strName = "Text" & intPrevious > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Set theSlideText = > > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? theSlideText.BorderColor = CColor("white") > > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? strName = "Text" & intCurrent > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Set theSlideText = > > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? theSlideText.BorderColor = CColor("red") > > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? boolMove = False > > > > > ? ? ? ? ? ? ? ? ? ? ? ? ' ? ? ? nNextMoveTime = Clock.Read + 500 > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? strLastResponse = "2" > > > > > ? ? ? ? ? ? ? ? ? ? ? ? End If > > > > > ? ? ? ? ? ? ? ? ElseIf theKeyboardResponseData.RESP = "1" Then > > > > > ? ? ? ? ? ? ? ? ? ? ? ? 'Subject has already selected the lowest rating. > > > > ? ? ? ? ? ? ? ? ? ? ? ? If intCurrent > 1 Then > > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'Decrement the current selection. > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? intPrevious = intCurrent > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? intCurrent = intCurrent - 1 > > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'Change border color of previously > > > > selected box back to white, > > > >change border > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'color of currently selected box to red. > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? strName = "Text" & intPrevious > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Set theSlideText = > > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? theSlideText.BorderColor = CColor("white") > > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? strName = "Text" & intCurrent > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Set theSlideText = > > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? theSlideText.BorderColor = CColor("red") > > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? boolMove = False > > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? nNextMoveTime = Clock.Read + 500 > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? strLastResponse = "1" > > > > > ? ? ? ? ? ? ? ? ? ? ? ? End If > > > > > ? ? ? ? ? ? ? ? ElseIf theKeyboardResponseData.RESP = "{-2}" Or > > > >theKeyboardResponseData.RESP = "{-1}" Then > > > > > ? ? ? ? ? ? ? ? ? ? ? ? If Mid(theKeyboardResponseData.RESP, 3, 1) > > > > = strLastResponse Then > > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? boolMove = False > > > > > ? ? ? ? ? ? ? ? ? ? ? ? End If > > > > > ? ? ? ? ? ? ? ? End If > > > > > ? ? ? ? ElseIf boolMove = True And (Clock.Read > nNextMoveTime) Then > > > > > ? ? ? ? ? ? ? ? If strLastResponse = "2" Then > > > > > ? ? ? ? ? ? ? ? ? ? ? ? 'Subject has already selected the highest rating. > > > > ? ? ? ? ? ? ? ? ? ? ? ? If intCurrent < 7 Then > > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'Increment the current selection. > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? intPrevious = intCurrent > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? intCurrent = intCurrent + 1 > > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'Change border color of previously > > > > selected box back to white, > > > >change border > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'color of currently selected box to red. > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? strName = "Text" & intPrevious > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Set theSlideText = > > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? theSlideText.BorderColor = CColor("white") > > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? > > ... > > read more ? -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Thu Jul 21 17:37:04 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Thu, 21 Jul 2011 13:37:04 -0400 Subject: Tips needed for tweaking the standard likert scale script In-Reply-To: <5653cd77-f486-4292-a873-b1107c86e07a@l18g2000yql.googlegro ups.com> Message-ID: Micah, 1. Indeed, you do need to "make some kind of check, so that if it times out, it sets the value to NaN/etc." I think you can manage that without me. 2. Oops. First, I have to correct something I implied about my second solution (PreRelease >= Duration), namely, the second solution should already solve what you want to do here. The second solution would have been a problem if you *did* want a response to move on to the next stimulus. Even after the offset of a stimulus, the next stimulus will not run until it reaches the NextTargetOnsetTime (see the GetNextTargetOnsetTime and SetNextTargetOnsetTime topics in the E-Basic Help facility). (This, BTW, is how PreRelease works.) Because the second solution automatically sets NextTargetOnsetTime to, say, 6000 ms from the OnsetTime (or TargetOnsetTime, depending on Timing mode) of the scale, even after the scale code loop ends the next stimulus will not run until it reaches that NextTargetOnsetTime. Savvy? Better yet, try this and see if I know what I am talking about :). But back to the first solution. Your modification is what almost anyone would come up with and in many cases is Good Enough, although you may get some slop of a ms or so every once in a while. If you still want something a little tidier, and absolutely precise, then instead of a Sleep, I would simply do one of the following (depending on desired Timing mode) at *any* time either before or after the loop: SetNextTargetOnsetTime Stimulus.OnsetTime + Stimulus.Duration ' use this for Event timing mode - or - SetNextTargetOnsetTime Stimulus.TargetOnsetTime + Stimulus.Duration ' use this for Cumulativetiming mode If you followed the earlier discussion, you will see that this just expictly does in code what E-Prime would have done for you automatically using the second solution. As a result, I much prefer following the second approach myself, leveraging the features built into E-Prime, but that does require deeper understanding of the architecture of E-Prime. Mere mortals must stick with the first approach and write more code. -- David McFarlane, Professional Faultfinder >Thank you Todd [sic -- should be David]! That's an excellent >solution. I knew I'd need to >somehow do a clock read and feed that into the loop, but I wasn't able >to quite get there. Not to tax you, but there are two unresolved >issues with this solution- > >1. The scale now records wherever the 'slider' is when the time limit >ends. I think it's probably much safer to record these as no response, >and I'm not sure how to manipulate the loop do so. I need to make some >kind of check, so that if it times out, it sets the value to NaN/etc. > >2. The scale still ends immediately if a response is made. I've worked >out a way to stop that- by adding: > >dim responsetime as integer > >....... (the loop) > >...bottom of the inline: > >responsetime=Stimulus.RT > >Sleep 6000-response time > >However, I don't think that is compatible with your solution. > >BW, >Micah > >On Jul 21, 5:59 pm, David McFarlane wrote: > > Stock reminder: 1) I do not work for PST. 2) PST's trained staff > > takes any and all questions > athttp://support.pstnet.com/e%2Dprime/support/login.asp, and they > > strive to respond to all requests in 24-48 hours -- this is pretty > > much their substitute for proper documentation, so make full use of > > it. 3) If you do get an answer from PST Web Support, please extend > > the courtesy of posting their reply back here for the sake of others. > > > > That said, here is my take... > > > > Try replacing > > > > Do While Stimulus.InputMasks.IsPending() > > ... > > > > with something like > > > > Const StimulusDur as Long = 6000 > > Dim StimulusTargetOffsetTime as Long > > StimulusTargetOffsetTime = Clock.Read + StimulusDur > > Do While (Stimulus.InputMasks.IsPending() and _ > > (Clock.Read < StimulusTargetOffsetTime) ) > > ... > > > > Alternatively, if you prefer to set stimulus duration in its Property > > Pages instead of with an InLine constant, then set both Duration and > > PreRelease to 6000 (in this case), and E-Prime will automatically > > compute the TargetOffsetTime for you, so the code simplifies to > something like > > > > Do While (Stimulus.InputMasks.IsPending() and _ > > (Clock.Read < Stimulus.TargetOffsetTime) ) > > ... > > > > Of course, you will find confusion either way. For the first way, > > any time you want to change stimulus duration you will have to > > remember to dive into the code. For the second way, you can change > > stimulus Duration in the normal way, but then you have to remember to > > always change PreRelease to the same thing (or, be daring and set > > PreRelease to some one enormous value, but not so large that > > TargetOnsetTime + Duration - PreRelease ever becomes negative!). > > > > -- David McFarlane, Professional Faultfinder > > ... six of one and half dozen of the other, you pays your money and > > takes your choice. > > > > > > > > > > > > > > > > >I've got an fMRI paradigm that is almost finished. I've embedded a > > >customized version of the likert script, and could use a little help > > >with a simple tweak. I'm a moderately skilled e-basic coder, so if you > > >can suggest a general strategy, I can probably implement it. As it is > > >coded now, the likert scale waits for a response before closing. The > > >actual slideobject it draws to has 0 duration, and as far as I can > > >tell, the script simply stops the the slide once a response is given. > > >I'd like to ensure that there is a time limit for the response, so > > >that the total possible time to respond is 6 seconds. I.e. if a > > >participant answers in 2 seconds, there would be 4 seconds of fixation > > >following the answer, before moving on. I much appreciate any tips you > > >can lend. > > > > >Here is the inline that controls the Likert scale: > > > > >'Declare a variable for accessing each SlideText object and changing > > >properties. > > >Dim theSlideText As SlideText > > > > >Dim strName As String > > >Dim nLastResponseCount As Integer > > >nLastResponseCount = 0 > > > > >Dim nNextMoveTime As Long > > > > >Dim strLastResponse As String > > > > >Dim boolMove As Boolean > > >boolMove = False > > > > >Dim theKeyboardResponseData As KeyboardResponseData > > > > >Do While Stimulus.InputMasks.IsPending() > > > > > 'Was there a response? > > > If Stimulus.InputMasks.Responses.Count > nLastResponseCount Then > > > > > nLastResponseCount = nLastResponseCount +1 > > > > > Set theKeyboardResponseData = > > >CKeyboardResponseData(Stimulus.InputMasks.Responses(nLastResponseCount)) > > > > > If theKeyboardResponseData.RESP = "2" Then > > > > > 'Subject has already selected the highest rating. > > > If intCurrent < 7 Then > > > > > 'Increment the current selection. > > > intPrevious = intCurrent > > > intCurrent = intCurrent + 1 > > > > > 'Change border color of previously > > > selected box back to white, > > >change border > > > 'color of currently selected box to red. > > > strName = "Text" & intPrevious > > > Set theSlideText = > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > > theSlideText.BorderColor = > CColor("white") > > > > > strName = "Text" & intCurrent > > > Set theSlideText = > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > > theSlideText.BorderColor = CColor("red") > > > > > boolMove = False > > > > > ' nNextMoveTime = Clock.Read + 500 > > > strLastResponse = "2" > > > > > End If > > > > > ElseIf theKeyboardResponseData.RESP = "1" Then > > > > > 'Subject has already selected the lowest rating. > > > If intCurrent > 1 Then > > > > > 'Decrement the current selection. > > > intPrevious = intCurrent > > > intCurrent = intCurrent - 1 > > > > > 'Change border color of previously > > > selected box back to white, > > >change border > > > 'color of currently selected box to red. > > > strName = "Text" & intPrevious > > > Set theSlideText = > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > > theSlideText.BorderColor = > CColor("white") > > > > > strName = "Text" & intCurrent > > > Set theSlideText = > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > > theSlideText.BorderColor = CColor("red") > > > > > boolMove = False > > > > > nNextMoveTime = Clock.Read + 500 > > > strLastResponse = "1" > > > > > End If > > > > > ElseIf theKeyboardResponseData.RESP = "{-2}" Or > > >theKeyboardResponseData.RESP = "{-1}" Then > > > > > If Mid(theKeyboardResponseData.RESP, 3, 1) > > > = strLastResponse Then > > > > > boolMove = False > > > > > End If > > > > > End If > > > > > ElseIf boolMove = True And (Clock.Read > nNextMoveTime) Then > > > > > If strLastResponse = "2" Then > > > > > 'Subject has already selected the highest rating. > > > If intCurrent < 7 Then > > > > > 'Increment the current selection. > > > intPrevious = intCurrent > > > intCurrent = intCurrent + 1 > > > > > 'Change border color of previously > > > selected box back to white, > > >change border > > > 'color of currently selected box to red. > > > strName = "Text" & intPrevious > > > Set theSlideText = > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > > theSlideText.BorderColor = > CColor("white") > > > > > strName = "Text" & intCurrent > > > Set theSlideText = > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > > theSlideText.BorderColor = CColor("red") > > > > > End If > > > > > Else > > > > > 'Subject has already selected the lowest rating. > > > If intCurrent > 1 Then > > > > > 'Decrement the current selection. > > > intPrevious = intCurrent > > > intCurrent = intCurrent - 1 > > > > > 'Change border color of previously > > > selected box back to white, > > >change border > > > 'color of currently selected box to red. > > > strName = "Text" & intPrevious > > > Set theSlideText = > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > > theSlideText.BorderColor = > CColor("white") > > > > > strName = "Text" & intCurrent > > > Set theSlideText = > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > > theSlideText.BorderColor = CColor("red") > > > > > End If > > > > > End If > > > > > nNextMoveTime = Clock.Read + 500 > > > > > End If > > > > > Stimulus.Draw > > > > >Loop > > > > >'Change the BackColor property of the selected box to red to show the > > >subject > > >'that the response has been collected. > > >strName = "Text" & intCurrent > > >Set theSlideText = > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > >theSlideText.BackColor = CColor("red") > > > > >'Redraw the Slide to show changes. > > >Stimulus.Draw > > > > >'Log rating in the data file under the attribute "Rating" > > >c.SetAttrib "Rating", intCurrent > > > > >Sleep 1000 > > > > >'Return box to default appearance. > > >theSlideText.BackColor = CColor("green") > > >theSlideText.BorderColor = CColor("white") > > > > >strName = "Text4" > > >Set theSlideText = > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > >theSlideText.BorderColor = CColor("red") > > > > >Stimulus.Draw > > > > >Set theSlideText = Nothing -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From ucfmicah at gmail.com Thu Jul 21 18:07:30 2011 From: ucfmicah at gmail.com (Micah) Date: Thu, 21 Jul 2011 11:07:30 -0700 Subject: Tips needed for tweaking the standard likert scale script In-Reply-To: <4e2863c1.83842b0a.4f0a.4e69SMTPIN_ADDED@gmr-mx.google.com> Message-ID: Great advice- there are a few problems however; 1. The second solution actually breaks the slider. It appears if you set the duration in the properties page, this prevents the loop from "animating" the slider properly. It just stays stuck at the default position and then selects that as the rating when the duration runs out. I can't figure this one out, so on to solution 1 2. Inserting that line of code does not seem to do anything. To make sure, I set the duration variable to 10000, and it was terminating instantly after making a selection. I'm thinking that the best option might be to put a textobject immediately after the slideobject (i.e. "Stimulus") that presents the scale, where the duration is set to 6000-stimulus.duration. I'll see if I can do that now. P.S. I can easily log non-responses, but it's trickier to log responses where they move the slider but never confirm. The .resp show sup as (for example) =11223, or =11113 for confirmed responses, but =1112 etc for non-confirmed. Is there a function to search a stored variable for a specific number? I tried setting the "allowed" in the advanced collection options to [allowed], where allowed is a list variable with 3 in each row. This would have been perfect, as if it only logs "3"s then I have my solution. Seems weird they give us this option if it doesn't work (it didn't seem to change the logs at all). BW, Micah On Jul 21, 7:37?pm, David McFarlane wrote: > Micah, > > 1. Indeed, you do need to "make some kind of check, so that if it > times out, it sets the value to NaN/etc." ?I think you can manage > that without me. > > 2. Oops. ?First, I have to correct something I implied about my > second solution (PreRelease >= Duration), namely, the second solution > should already solve what you want to do here. ?The second solution > would have been a problem if you *did* want a response to move on to > the next stimulus. ?Even after the offset of a stimulus, the next > stimulus will not run until it reaches the NextTargetOnsetTime (see > the GetNextTargetOnsetTime and SetNextTargetOnsetTime topics in the > E-Basic Help facility). ?(This, BTW, is how PreRelease > works.) ?Because the second solution automatically sets > NextTargetOnsetTime to, say, 6000 ms from the OnsetTime (or > TargetOnsetTime, depending on Timing mode) of the scale, even after > the scale code loop ends the next stimulus will not run until it > reaches that NextTargetOnsetTime. ?Savvy? ?Better yet, try this and > see if I know what I am talking about :). > > But back to the first solution. ?Your modification is what almost > anyone would come up with and in many cases is Good Enough, although > you may get some slop of a ms or so every once in a while. ?If you > still want something a little tidier, and absolutely precise, then > instead of a Sleep, I would simply do one of the following (depending > on desired Timing mode) at *any* time either before or after the loop: > > SetNextTargetOnsetTime Stimulus.OnsetTime + Stimulus.Duration ?' use > this for Event timing mode > > - or - > > SetNextTargetOnsetTime Stimulus.TargetOnsetTime + > Stimulus.Duration ?' use this for Cumulativetiming mode > > If you followed the earlier discussion, you will see that this just > expictly does in code what E-Prime would have done for you > automatically using the second solution. ?As a result, I much prefer > following the second approach myself, leveraging the features built > into E-Prime, but that does require deeper understanding of the > architecture of E-Prime. ?Mere mortals must stick with the first > approach and write more code. > > -- David McFarlane, Professional Faultfinder > > > > > > > > >Thank you Todd [sic -- should be David]! That's an excellent > >solution. I knew I'd need to > >somehow do a clock read and feed that into the loop, but I wasn't able > >to quite get there. Not to tax you, but there are two unresolved > >issues with this solution- > > >1. The scale now records wherever the 'slider' is when the time limit > >ends. I think it's probably much safer to record these as no response, > >and I'm not sure how to manipulate the loop do so. I need to make some > >kind of check, so that if it times out, it sets the value to NaN/etc. > > >2. The scale still ends immediately if a response is made. I've worked > >out a way to stop that- by adding: > > >dim responsetime as integer > > >....... (the loop) > > >...bottom of the inline: > > >responsetime=Stimulus.RT > > >Sleep 6000-response time > > >However, I don't think that is compatible with your solution. > > >BW, > >Micah > > >On Jul 21, 5:59 pm, David McFarlane wrote: > > > Stock reminder: ?1) I do not work for PST. ?2) PST's trained staff > > > takes any and all questions > > athttp://support.pstnet.com/e%2Dprime/support/login.asp, and they > > > strive to respond to all requests in 24-48 hours -- this is pretty > > > much their substitute for proper documentation, so make full use of > > > it. ?3) If you do get an answer from PST Web Support, please extend > > > the courtesy of posting their reply back here for the sake of others. > > > > That said, here is my take... > > > > Try replacing > > > > Do While Stimulus.InputMasks.IsPending() > > > ? ? ... > > > > with something like > > > > Const ?StimulusDur as Long = 6000 > > > Dim ?StimulusTargetOffsetTime as Long > > > StimulusTargetOffsetTime = Clock.Read + StimulusDur > > > Do While (Stimulus.InputMasks.IsPending() and _ > > > ? ? ?(Clock.Read < StimulusTargetOffsetTime) ) > > > ? ? ?... > > > > Alternatively, if you prefer to set stimulus duration in its Property > > > Pages instead of with an InLine constant, then set both Duration and > > > PreRelease to 6000 (in this case), and E-Prime will automatically > > > compute the TargetOffsetTime for you, so the code simplifies to > > something like > > > > Do While (Stimulus.InputMasks.IsPending() and _ > > > ? ? ?(Clock.Read < Stimulus.TargetOffsetTime) ) > > > ? ? ?... > > > > Of course, you will find confusion either way. ?For the first way, > > > any time you want to change stimulus duration you will have to > > > remember to dive into the code. ?For the second way, you can change > > > stimulus Duration in the normal way, but then you have to remember to > > > always change PreRelease to the same thing (or, be daring and set > > > PreRelease to some one enormous value, but not so large that > > > TargetOnsetTime + Duration - PreRelease ever becomes negative!). > > > > -- David McFarlane, Professional Faultfinder > > > ... six of one and half dozen of the other, you pays your money and > > > takes your choice. > > > > >I've got an fMRI paradigm that is almost finished. I've embedded a > > > >customized version of the likert script, and could use a little help > > > >with a simple tweak. I'm a moderately skilled e-basic coder, so if you > > > >can suggest a general strategy, I can probably implement it. As it is > > > >coded now, the likert scale waits for a response before closing. The > > > >actual slideobject it draws to has 0 duration, and as far as I can > > > >tell, the script simply stops the the slide once a response is given. > > > >I'd like to ensure that there is a time limit for the response, so > > > >that the total possible time to respond is 6 seconds. I.e. ?if a > > > >participant answers in 2 seconds, there would be 4 seconds of fixation > > > >following the answer, before moving on. I much appreciate any tips you > > > >can lend. > > > > >Here is the inline that controls the Likert scale: > > > > >'Declare a variable for accessing each SlideText object and changing > > > >properties. > > > >Dim theSlideText As SlideText > > > > >Dim strName As String > > > >Dim nLastResponseCount As Integer > > > >nLastResponseCount = 0 > > > > >Dim nNextMoveTime As Long > > > > >Dim strLastResponse As String > > > > >Dim boolMove As Boolean > > > >boolMove = False > > > > >Dim theKeyboardResponseData As KeyboardResponseData > > > > >Do While Stimulus.InputMasks.IsPending() > > > > > ? ? ? ? 'Was there a response? > > > > ? ? ? ? If Stimulus.InputMasks.Responses.Count > nLastResponseCount Then > > > > > ? ? ? ? ? ? ? ? nLastResponseCount = nLastResponseCount +1 > > > > > ? ? ? ? ? ? ? ? Set theKeyboardResponseData = > > > >CKeyboardResponseData(Stimulus.InputMasks.Responses(nLastResponseCount)) > > > > > ? ? ? ? ? ? ? ? If theKeyboardResponseData.RESP = "2" Then > > > > > ? ? ? ? ? ? ? ? ? ? ? ? 'Subject has already selected the highest rating. > > > > ? ? ? ? ? ? ? ? ? ? ? ? If intCurrent < 7 Then > > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'Increment the current selection. > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? intPrevious = intCurrent > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? intCurrent = intCurrent + 1 > > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'Change border color of previously > > > > selected box back to white, > > > >change border > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'color of currently selected box to red. > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? strName = "Text" & intPrevious > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Set theSlideText = > > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? theSlideText.BorderColor = > > CColor("white") > > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? strName = "Text" & intCurrent > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Set theSlideText = > > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? theSlideText.BorderColor = CColor("red") > > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? boolMove = False > > > > > ? ? ? ? ? ? ? ? ? ? ? ? ' ? ? ? nNextMoveTime = Clock.Read + 500 > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? strLastResponse = "2" > > > > > ? ? ? ? ? ? ? ? ? ? ? ? End If > > > > > ? ? ? ? ? ? ? ? ElseIf theKeyboardResponseData.RESP = "1" Then > > > > > ? ? ? ? ? ? ? ? ? ? ? ? 'Subject has already selected the lowest rating. > > > > ? ? ? ? ? ? ? ? ? ? ? ? If intCurrent > 1 Then > > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'Decrement the current selection. > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? intPrevious = intCurrent > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? intCurrent = intCurrent - 1 > > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'Change border color of previously > > > > selected box back to white, > > > >change border > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'color of currently selected box to red. > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? strName = "Text" & intPrevious > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Set theSlideText = > > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? theSlideText.BorderColor = > > CColor("white") > > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? strName = "Text" & intCurrent > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Set theSlideText = > > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? theSlideText.BorderColor = CColor("red") > > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? boolMove = False > > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? nNextMoveTime = Clock.Read + 500 > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? strLastResponse = "1" > > > > > ? ? ? ? ? ? ? ? ? ? ? ? End If > > > > > ? ? ? ? ? ? ? ? ElseIf theKeyboardResponseData.RESP = "{-2}" Or > > > >theKeyboardResponseData.RESP = "{-1}" Then > > > > > ? ? ? ? ? ? ? ? ? ? ? ? If Mid(theKeyboardResponseData.RESP, 3, 1) > > > > = strLastResponse Then > > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? boolMove = False > > > > > ? ? ? ? ? ? ? ? ? ? ? ? End If > > > > > ? ? ? ? ? ? ? ? End If > > > > > ? ? ? ? ElseIf boolMove = True And (Clock.Read > nNextMoveTime) Then > > ... > > read more ? -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From ucfmicah at gmail.com Thu Jul 21 18:25:30 2011 From: ucfmicah at gmail.com (Micah) Date: Thu, 21 Jul 2011 11:25:30 -0700 Subject: Tips needed for tweaking the standard likert scale script In-Reply-To: Message-ID: Woohoo! It actually works to add a textdisplay that inherits duration from the scale stimulus. So now it works perfectly; it times out after 6 seconds, which makes the "ISI" 0 duration, or it waits for 6- duration. So the scale can never take longer than 6 seconds, making a nice neat paradigm. I've also got it logging non-responses (in case the participant falls asleep) although have not yet come up with a solution for "confirmed" responses. Is there a wildcard variable in e- basic? If so I could do a check like, if stimulus.RESP = *3* then confirmed =1. Otherwise I may have to write a post-scan matlab script to search for any responses not containing "3", which is a blah solution. Tak, Micah On Jul 21, 8:07?pm, Micah wrote: > Great advice- there are a few problems however; > > 1. The second solution actually breaks the slider. It appears if you > set the duration in the properties page, this prevents the loop from > "animating" the slider properly. It just stays stuck at the default > position and then selects that as the rating when the duration runs > out. I can't figure this one out, so on to solution 1 > > 2. Inserting that line of code does not seem to do anything. To make > sure, I set the duration variable to 10000, and it was terminating > instantly after making a selection. > > I'm thinking that the best option might be to put a textobject > immediately after the slideobject (i.e. "Stimulus") that presents the > scale, where the duration is set to 6000-stimulus.duration. I'll see > if I can do that now. > > P.S. I can easily log non-responses, but it's trickier to log > responses where they move the slider but never confirm. The .resp show > sup as (for example) =11223, or =11113 for confirmed responses, but > =1112 etc for non-confirmed. Is there a function to search a stored > variable for a specific number? I tried setting the "allowed" in the > advanced collection options to [allowed], where allowed is a list > variable with 3 in each row. This would have been perfect, as if it > only logs "3"s then I have my solution. Seems weird they give us this > option if it doesn't work (it didn't seem to change the logs at all). > > BW, > Micah > > On Jul 21, 7:37?pm, David McFarlane wrote: > > > > > > > > > Micah, > > > 1. Indeed, you do need to "make some kind of check, so that if it > > times out, it sets the value to NaN/etc." ?I think you can manage > > that without me. > > > 2. Oops. ?First, I have to correct something I implied about my > > second solution (PreRelease >= Duration), namely, the second solution > > should already solve what you want to do here. ?The second solution > > would have been a problem if you *did* want a response to move on to > > the next stimulus. ?Even after the offset of a stimulus, the next > > stimulus will not run until it reaches the NextTargetOnsetTime (see > > the GetNextTargetOnsetTime and SetNextTargetOnsetTime topics in the > > E-Basic Help facility). ?(This, BTW, is how PreRelease > > works.) ?Because the second solution automatically sets > > NextTargetOnsetTime to, say, 6000 ms from the OnsetTime (or > > TargetOnsetTime, depending on Timing mode) of the scale, even after > > the scale code loop ends the next stimulus will not run until it > > reaches that NextTargetOnsetTime. ?Savvy? ?Better yet, try this and > > see if I know what I am talking about :). > > > But back to the first solution. ?Your modification is what almost > > anyone would come up with and in many cases is Good Enough, although > > you may get some slop of a ms or so every once in a while. ?If you > > still want something a little tidier, and absolutely precise, then > > instead of a Sleep, I would simply do one of the following (depending > > on desired Timing mode) at *any* time either before or after the loop: > > > SetNextTargetOnsetTime Stimulus.OnsetTime + Stimulus.Duration ?' use > > this for Event timing mode > > > - or - > > > SetNextTargetOnsetTime Stimulus.TargetOnsetTime + > > Stimulus.Duration ?' use this for Cumulativetiming mode > > > If you followed the earlier discussion, you will see that this just > > expictly does in code what E-Prime would have done for you > > automatically using the second solution. ?As a result, I much prefer > > following the second approach myself, leveraging the features built > > into E-Prime, but that does require deeper understanding of the > > architecture of E-Prime. ?Mere mortals must stick with the first > > approach and write more code. > > > -- David McFarlane, Professional Faultfinder > > > >Thank you Todd [sic -- should be David]! That's an excellent > > >solution. I knew I'd need to > > >somehow do a clock read and feed that into the loop, but I wasn't able > > >to quite get there. Not to tax you, but there are two unresolved > > >issues with this solution- > > > >1. The scale now records wherever the 'slider' is when the time limit > > >ends. I think it's probably much safer to record these as no response, > > >and I'm not sure how to manipulate the loop do so. I need to make some > > >kind of check, so that if it times out, it sets the value to NaN/etc. > > > >2. The scale still ends immediately if a response is made. I've worked > > >out a way to stop that- by adding: > > > >dim responsetime as integer > > > >....... (the loop) > > > >...bottom of the inline: > > > >responsetime=Stimulus.RT > > > >Sleep 6000-response time > > > >However, I don't think that is compatible with your solution. > > > >BW, > > >Micah > > > >On Jul 21, 5:59 pm, David McFarlane wrote: > > > > Stock reminder: ?1) I do not work for PST. ?2) PST's trained staff > > > > takes any and all questions > > > athttp://support.pstnet.com/e%2Dprime/support/login.asp, and they > > > > strive to respond to all requests in 24-48 hours -- this is pretty > > > > much their substitute for proper documentation, so make full use of > > > > it. ?3) If you do get an answer from PST Web Support, please extend > > > > the courtesy of posting their reply back here for the sake of others. > > > > > That said, here is my take... > > > > > Try replacing > > > > > Do While Stimulus.InputMasks.IsPending() > > > > ? ? ... > > > > > with something like > > > > > Const ?StimulusDur as Long = 6000 > > > > Dim ?StimulusTargetOffsetTime as Long > > > > StimulusTargetOffsetTime = Clock.Read + StimulusDur > > > > Do While (Stimulus.InputMasks.IsPending() and _ > > > > ? ? ?(Clock.Read < StimulusTargetOffsetTime) ) > > > > ? ? ?... > > > > > Alternatively, if you prefer to set stimulus duration in its Property > > > > Pages instead of with an InLine constant, then set both Duration and > > > > PreRelease to 6000 (in this case), and E-Prime will automatically > > > > compute the TargetOffsetTime for you, so the code simplifies to > > > something like > > > > > Do While (Stimulus.InputMasks.IsPending() and _ > > > > ? ? ?(Clock.Read < Stimulus.TargetOffsetTime) ) > > > > ? ? ?... > > > > > Of course, you will find confusion either way. ?For the first way, > > > > any time you want to change stimulus duration you will have to > > > > remember to dive into the code. ?For the second way, you can change > > > > stimulus Duration in the normal way, but then you have to remember to > > > > always change PreRelease to the same thing (or, be daring and set > > > > PreRelease to some one enormous value, but not so large that > > > > TargetOnsetTime + Duration - PreRelease ever becomes negative!). > > > > > -- David McFarlane, Professional Faultfinder > > > > ... six of one and half dozen of the other, you pays your money and > > > > takes your choice. > > > > > >I've got an fMRI paradigm that is almost finished. I've embedded a > > > > >customized version of the likert script, and could use a little help > > > > >with a simple tweak. I'm a moderately skilled e-basic coder, so if you > > > > >can suggest a general strategy, I can probably implement it. As it is > > > > >coded now, the likert scale waits for a response before closing. The > > > > >actual slideobject it draws to has 0 duration, and as far as I can > > > > >tell, the script simply stops the the slide once a response is given. > > > > >I'd like to ensure that there is a time limit for the response, so > > > > >that the total possible time to respond is 6 seconds. I.e. ?if a > > > > >participant answers in 2 seconds, there would be 4 seconds of fixation > > > > >following the answer, before moving on. I much appreciate any tips you > > > > >can lend. > > > > > >Here is the inline that controls the Likert scale: > > > > > >'Declare a variable for accessing each SlideText object and changing > > > > >properties. > > > > >Dim theSlideText As SlideText > > > > > >Dim strName As String > > > > >Dim nLastResponseCount As Integer > > > > >nLastResponseCount = 0 > > > > > >Dim nNextMoveTime As Long > > > > > >Dim strLastResponse As String > > > > > >Dim boolMove As Boolean > > > > >boolMove = False > > > > > >Dim theKeyboardResponseData As KeyboardResponseData > > > > > >Do While Stimulus.InputMasks.IsPending() > > > > > > ? ? ? ? 'Was there a response? > > > > > ? ? ? ? If Stimulus.InputMasks.Responses.Count > nLastResponseCount Then > > > > > > ? ? ? ? ? ? ? ? nLastResponseCount = nLastResponseCount +1 > > > > > > ? ? ? ? ? ? ? ? Set theKeyboardResponseData = > > > > >CKeyboardResponseData(Stimulus.InputMasks.Responses(nLastResponseCount)) > > > > > > ? ? ? ? ? ? ? ? If theKeyboardResponseData.RESP = "2" Then > > > > > > ? ? ? ? ? ? ? ? ? ? ? ? 'Subject has already selected the highest rating. > > > > > ? ? ? ? ? ? ? ? ? ? ? ? If intCurrent < 7 Then > > > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'Increment the current selection. > > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? intPrevious = intCurrent > > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? intCurrent = intCurrent + 1 > > > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'Change border color of previously > > > > > selected box back to white, > > > > >change border > > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'color of currently selected box to red. > > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? strName = "Text" & intPrevious > > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Set theSlideText = > > > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? theSlideText.BorderColor = > > > CColor("white") > > > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? strName = "Text" & intCurrent > > > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Set theSlideText = > > > > >CSlideText(Stimulus.States.Item("Default").Objects(strName)) > > > > > ? ? ? ? ? ? ? ? > > ... > > read more ? -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From ucfmicah at gmail.com Thu Jul 21 18:41:40 2011 From: ucfmicah at gmail.com (Micah) Date: Thu, 21 Jul 2011 11:41:40 -0700 Subject: How to avoid presenting targets consecutively In-Reply-To: <83a39d45-3cc3-4924-879b-9cfc4cd6b855@e35g2000yqc.googlegroups.com> Message-ID: Just as a general comment, and certainly not the best solution: I generally do my stimulus randomizations outside of e-prime. It's much easier to specific a pseudo-random or fully random sequence of stimuli outside of e-prime (in excel for example) and to then import it into one triallist that is sequentially sampled. This way you can randomize the list while keeping a look out for exactly the kinds of problem you mention. Hope that helps, Micah Mark A wrote: > Dear E-Prime group, > I am fairly new to E-Prime, but thus far have found online discussions > within the group, as well as PST instructions and examples that have > allowed me to program everything required, with one exception. The > experimental task is simple: A participant listens to a series of > words and presses a button whenever a particular word is heard (i.e., > the target word, "apple" in the example below). The target word is > presented 4 times. > > My problem is this: I wish to present a series of stimuli (.wav files) > randomly, with the restriction that I do not want "Target" files to be > presented consecutively. Rather, I want them to be separated by at > least one distractor (or non-target). > > To illustrate, this is an excerpt from one of my lists: > > Weight Nested Procedure ? Sound Talker Target SoundDur > 1 MAppleTrial m1apple.wav m1 yes 422 > 1 MAppleTrial f4apple.wav f4 yes 546 > 1 MAppleTrial m1apple.wav m1 yes 422 > 1 MAppleTrial f4apple.wav f4 yes 546 > 1 MAppleTrial m2bear.wav m2 no 332 > 1 MAppleTrial f3bin.wav ?? f3 no 375 > 1 MAppleTrial m3cat.wav ? ? ? ??m3 no 383 > 1 MAppleTrial f2chalk.wav f2 no 586 > ..... and so forth (there are 4 targets and 23 distractors). > > Currently, I have the list set to "Random", however, this does not > guarantee that the Target files (top 4 rows) will not occur > consecutively. I think that the solution will involve a conditional > statement (perhaps using In line) comparing whether the previous file > presented was a target, but I am unsure how to implement this. > > An additional consideration is what to do if there are only 2 cycles > left, and the two files left are both target files. If this is very > hard to avoid, I am willing to live with this, as it is unlikely to > occur very often. Any tips or links to helpful discussions on similar > topics will be very much appreciated. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Thu Jul 21 21:04:58 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Thu, 21 Jul 2011 17:04:58 -0400 Subject: How to avoid presenting targets consecutively In-Reply-To: Message-ID: Micah, Great answer. I often get so wrapped up in looking for sophisticated automated solutions that I overlook the simple ones, and what you recommend is exactly what we do for fMRI in order to avoid problems with accidental multicollinearity (which flusters correlation & deconvolution analyses). And as it turns out, this answer also appeared in a discussion at http://support.pstnet.com/forum/Topic3166-5-1.aspx . -- David McFarlane, Professional Faultfinder >Just as a general comment, and certainly not the best solution: > >I generally do my stimulus randomizations outside of e-prime. It's >much easier to specific a pseudo-random or fully random sequence of >stimuli outside of e-prime (in excel for example) and to then import >it into one triallist that is sequentially sampled. This way you can >randomize the list while keeping a look out for exactly the kinds of >problem you mention. > >Hope that helps, >Micah > >Mark A wrote: > > Dear E-Prime group, > > I am fairly new to E-Prime, but thus far have found online discussions > > within the group, as well as PST instructions and examples that have > > allowed me to program everything required, with one exception. The > > experimental task is simple: A participant listens to a series of > > words and presses a button whenever a particular word is heard (i.e., > > the target word, "apple" in the example below). The target word is > > presented 4 times. > > > > My problem is this: I wish to present a series of stimuli (.wav files) > > randomly, with the restriction that I do not want "Target" files to be > > presented consecutively. Rather, I want them to be separated by at > > least one distractor (or non-target). > > > > To illustrate, this is an excerpt from one of my lists: > > > > > Weight Nested Procedure Sound Talker Target SoundDur > > > 1 MAppleTrial m1apple.wav m1 > yes 422 > > > 1 MAppleTrial f4apple.wav f4 > yes 546 > > > 1 MAppleTrial m1apple.wav m1 > yes 422 > > > 1 MAppleTrial f4apple.wav f4 > yes 546 > > > 1 MAppleTrial m2bear.wav m2 > no 332 > > > 1 MAppleTrial f3bin.wav f3 > no 375 > > > 1 MAppleTrial m3cat.wav > m3 no 383 > > > 1 MAppleTrial f2chalk.wav f2 > no 586 > > ..... and so forth (there are 4 targets and 23 distractors). > > > > Currently, I have the list set to "Random", however, this does not > > guarantee that the Target files (top 4 rows) will not occur > > consecutively. I think that the solution will involve a conditional > > statement (perhaps using In line) comparing whether the previous file > > presented was a target, but I am unsure how to implement this. > > > > An additional consideration is what to do if there are only 2 cycles > > left, and the two files left are both target files. If this is very > > hard to avoid, I am willing to live with this, as it is unlikely to > > occur very often. Any tips or links to helpful discussions on similar > > topics will be very much appreciated. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Thu Jul 21 21:15:16 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Thu, 21 Jul 2011 17:15:16 -0400 Subject: Tips needed for tweaking the standard likert scale script In-Reply-To: Message-ID: Micah, At 7/21/2011 02:07 PM Thursday, you wrote: >Is there a function to search a stored variable for a specific number? Perhaps the Mid$() function will do? See that topic in the E-Basic Help facility (or consult any VBA reference, e.g., my favorites, "VBA for Dummies" or "VBA in a Nutshell"). InStr() might be another thing to try. Then at 7/21/2011 02:25 PM Thursday, you wrote: >Is there a wildcard variable in e-basic? If so I could do a check >like, if stimulus.RESP = *3* then >confirmed =1. That would be nice, but E-Basic/VBA does not work quite that way, although you could build something like that using the Mid$() or InStr() functions. I think wildcards like that are features of scripting languages like Perl or sed, not regular computer languages like VBA/E-Basic or C or JavaScript, etc. I didn't look carefully at the full code that you are working on so I don't know what I missed in my responses, I was just talking off the top of my head based on general principles. Glad you got most everything to work. -- David McFarlane, Professional Faultfinder -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From Michiel.Spape at nottingham.ac.uk Fri Jul 22 09:02:14 2011 From: Michiel.Spape at nottingham.ac.uk (Michiel Spape) Date: Fri, 22 Jul 2011 10:02:14 +0100 Subject: How to avoid presenting targets consecutively In-Reply-To: <4e28947c.c1602a0a.31f4.ffff80fbSMTPIN_ADDED@gmr-mx.google.com> Message-ID: Hi all, Pseudo- (or actually offline) randomisation, would work depending on the task and duration (if indeed fMRI, I'd go for that - but EEG with hundreds of trials, not so much). Another answer may be found inspired in an old trick for programming an attentional blink (see my post here: http://www.google.co.uk/url?sa=t&source=web&cd=4&ved=0CDoQFjAD&url=http%3A%2F%2Fgroups.google.com%2Fgroup%2Fe-prime%2Fbrowse_thread%2Fthread%2Fd2aaae391b3cd922&ei=2zkpTsLAN8iKhQfTl8XpCw&usg=AFQjCNGtIS2XS5p9Eg2UWXGo7L1sCgvN5g ) Outtake: ----------- If the image-sequence is a procedure in a blocklist, make that something like (start procedure)-->imagedisplay1-->imagedisplay2-->...-->imagedisplay9 Let the blocklist have 9 attributes: "imagefile1", "imagefile2",.., "imagefile9", and two nested lists: distracters and targets, set them both to randomise. Give them both an attribute, respectively "distracter" and "target". Fill these attributes with all the targets and distracters you like. Let these lists randomise. Set the filename properties of the 9 imagedisplays to [imagefile1], [imagefile2], .., [imagefile9]. Set the attributes of imagefile1 to 9 (i.e. in the blocklist) to [distracter:1] [distracter:2] [distracter:3] [distracter:4] [distracter:5] [target:1] [distracter:6] [distracter:7] [distracter:8] For a trial sequence in which the 6th display is the different (i.e. target, odd) picture. Obviously, you need two more lines, for the other 7th or 8th image to be the target. ---------------- Given that you want something like distractor/distractor/distractor/target/distractor... etc, it may well be best to programme your experiment such that rather than having a "target" trial, you have a number of slides (or whatnots) after another in a single trial. You can then make your list so that sequences are randomised between trials, rather than trials themselves. So, if I have a list like: Slide1Word,Slide2Word,Slide3Word,Slide4Word [Distractor:1],[Target:1],[Distractor:2],Target:2],[Distractor:3] [Distractor:1],[Target:1],[Distractor:2],[Distractor:3],[Target:2] [Distractor:1],[Distractor:2],[Target1],[Distractor:3],[Target:2] ... And the list randomises between these 3 sequences, 1) there's no way that two targets can come after another, 2) targets/distractors are randomised and 3) orders are randomised to a very safe degree (since it's unlikely that for one participant, for example, all targets will come relatively to the end). Hope that helps. Best, Mich Michiel Spap? Research Fellow Perception & Action group University of Nottingham School of Psychology www.cognitology.eu -----Original Message----- From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of David McFarlane Sent: 21 July 2011 22:05 To: e-prime at googlegroups.com Subject: Re: How to avoid presenting targets consecutively Micah, Great answer. I often get so wrapped up in looking for sophisticated automated solutions that I overlook the simple ones, and what you recommend is exactly what we do for fMRI in order to avoid problems with accidental multicollinearity (which flusters correlation & deconvolution analyses). And as it turns out, this answer also appeared in a discussion at http://support.pstnet.com/forum/Topic3166-5-1.aspx . -- David McFarlane, Professional Faultfinder >Just as a general comment, and certainly not the best solution: > >I generally do my stimulus randomizations outside of e-prime. It's >much easier to specific a pseudo-random or fully random sequence of >stimuli outside of e-prime (in excel for example) and to then import >it into one triallist that is sequentially sampled. This way you can >randomize the list while keeping a look out for exactly the kinds of >problem you mention. > >Hope that helps, >Micah > >Mark A wrote: > > Dear E-Prime group, > > I am fairly new to E-Prime, but thus far have found online discussions > > within the group, as well as PST instructions and examples that have > > allowed me to program everything required, with one exception. The > > experimental task is simple: A participant listens to a series of > > words and presses a button whenever a particular word is heard (i.e., > > the target word, "apple" in the example below). The target word is > > presented 4 times. > > > > My problem is this: I wish to present a series of stimuli (.wav files) > > randomly, with the restriction that I do not want "Target" files to be > > presented consecutively. Rather, I want them to be separated by at > > least one distractor (or non-target). > > > > To illustrate, this is an excerpt from one of my lists: > > > > > Weight Nested Procedure Sound Talker Target SoundDur > > > 1 MAppleTrial m1apple.wav m1 > yes 422 > > > 1 MAppleTrial f4apple.wav f4 > yes 546 > > > 1 MAppleTrial m1apple.wav m1 > yes 422 > > > 1 MAppleTrial f4apple.wav f4 > yes 546 > > > 1 MAppleTrial m2bear.wav m2 > no 332 > > > 1 MAppleTrial f3bin.wav f3 > no 375 > > > 1 MAppleTrial m3cat.wav > m3 no 383 > > > 1 MAppleTrial f2chalk.wav f2 > no 586 > > ..... and so forth (there are 4 targets and 23 distractors). > > > > Currently, I have the list set to "Random", however, this does not > > guarantee that the Target files (top 4 rows) will not occur > > consecutively. I think that the solution will involve a conditional > > statement (perhaps using In line) comparing whether the previous file > > presented was a target, but I am unsure how to implement this. > > > > An additional consideration is what to do if there are only 2 cycles > > left, and the two files left are both target files. If this is very > > hard to avoid, I am willing to live with this, as it is unlikely to > > occur very often. Any tips or links to helpful discussions on similar > > topics will be very much appreciated. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From tobias.fw at gmail.com Fri Jul 22 13:03:44 2011 From: tobias.fw at gmail.com (Tobias) Date: Fri, 22 Jul 2011 06:03:44 -0700 Subject: debounce time In-Reply-To: <4e1f4586.c1602a0a.7810.2410SMTPIN_ADDED@gmr-mx.google.com> Message-ID: Sorry for my bad English, I just literally translated from German where "self-made" (selbstgemacht) doesn't necessarily mean that you yourself made it but also that someone else might have made it himself. As opposed to mass production related stuff. Anyway, your code works. Thanks for that! On 14 Jul., 21:37, David McFarlane wrote: > Tobias, > > > Hmm, "I have just received a nice self-made buttonbox..."?? ?If it is > self-made then you could not receive it, because you already have it; > if you just received it then it is not self-made. ?Perhaps you meant > "custom-made". ?But I quibble... > > > Like Paul Groot said, it is best to use hardware-debounced switches, > and the circuitry for that is very straightforward, you can also find > instructions in the classic text "The Art of Electronics" by Horowitz > & Hill. ?Every lab should have someone who is familiar with that text. > > Nevertheless I rarely follow that advice myself because, even though > the circuitry is trivial, it requires a power source, and that just > makes things a tad too inconvenient for me (the parallel port does > not include any power source). ?I like simmple passive circuitry > whenever I can get away with it. ?And in almost every case the task > itself presents sufficient delay between responses so that switch > bouncing does not present a problem. > > But I gather you need this for something like a rapid tapping task, > where switch bounces become a problem. ?For our tapping tasks we > solve this by running a custom passive-switch box much like yours > through an SRBox -- that way we get switches with good mechanical > feel combined with the ease of use of the SRBox, and still have > sub-millisecond resolution. > > But as a last resort I will do software debouncing. ?The cheapest way > to do that is just to add a sufficient Sleep after a response, and > trust both that no further responses come in during that Sleep and > that the switch finishes bouncing during that Sleep. ?I would rather > have something more secure. ?So here is an example of the sort of > code I might use, using a ReadPort (you would have to modify this if > you use an input mask, but you can handle that) (I did not test this, > just constructed it from memory, so caveat user): > > Const ?PortAdd as Integer = &hABCD ?' just an example, replace with > real port address > Const ?BitMask as Integer = &H01 > Const ?DtDebounce as Long = 50 ?' ms > Dim ?tDebounce as Long > tDebounce = Clock.Read + DtDebounce > Do Until (Clock.Read >= tDebounce) > ? ? ?If ((ReadPort(PortAdd) and BitMask) <> 0) Then _ > ? ? ? ? ?tDebounce = Clock.Read + DtDebounce > Loop > > The example supposes that we are only interested in bit 0 of the > input, and that a bit value of 1 indicates button pressed, while a > bit value of 0 indicates button released. ?The code simply considers > bouncing to be over as soon as it finds that the button has been > released for (in this example) 50 ms without interruption. ?More > specifically, it starts by setting a goal of (in this example) 50 ms > from now. ?It then monitors the input until it reaches the goal > time. ?If it detects another button press during this time, then it > resets the goal for (in this example) 50 ms more from the current > time, and continues. ?As a result, the program runs this loop as long > as the button is pressed, and does not move on until 50 ms after the > button has been fully released and all bouncing is done. > > This code could go either right before you want to get a response, or > right after you have gotten your response. > > > Pretty cool if Presentation has a "dead-time" setting, maybe yet > another reason to consider it as an alternative to E-Prime. > > > -- David McFarlane, Professional Faultfinder > > At 7/14/2011 07:54 AM Thursday, Paul Groot wrote: > > >Hi Tobias, > > >You're right. Mechanical switches suffer from this debounce effect. > >Especially if the switch becomes older! In most cases this is not an > >issue if you are only interested in the response time of a single > >button press. When repeating presses are allowed, an 'ignore interval' > >of about 50 ms should be enough for even the worst switches. Things > >become more complicated when several buttons are allowed to be > >pressed. An electrical solution using a Schmitt trigger is preferred > >in that case (for example: > >http://www.labbookpages.co.uk/electronics/debounce.html) > > >Unfortunately Eprime has no dead-time setting as Presentation does...;-(( > > >best > >Paul > > >2011/7/14 Tobias : > > > Dear E-Prime community, > > > > I have just received a nice self-made buttonbox with three buttons > > > that can be attached to a parallel port. THus I have very good timing > > > of RTs for my experiments now :) > > > > However, there seems to be a problem with the bouncing of the keys. > > > Single key presses cause several signals in a row. That is, if I have > > > two consecutive slides with a duration of "-1", one key press is > > > enough to terminate both slides. > > > > A collegue of mine said that in the experimental software > > > 'Presentation', a debounce time can be specified so that such double > > > responses are not possible. > > > > Is there any way of doing so in E-Prime? > > > > Best, > > > Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From tobias.fw at gmail.com Fri Jul 22 13:08:53 2011 From: tobias.fw at gmail.com (Tobias) Date: Fri, 22 Jul 2011 06:08:53 -0700 Subject: How can I implement pseudo-random selection from a list? Message-ID: Dear all, again a rather elementary issue stroke me when I was testing a new paradigm. When I have four target types, it often happens that one of them is used 10 times in a row. Let's not discuss how random E-Primes "random" is (I don't really trust it!). But: How can I implement a pseudorandom selection from a list? Let's say I want E-Prime to choose randomly trials from a list, but one of the four target types must not be repeated more than twice in a row. I didn't find anything like that in the options, maybe some code helps. Has anyone of you ever tried to do such a thing? Looking forward to reading your answers! Best, Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Fri Jul 22 13:23:33 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Fri, 22 Jul 2011 09:23:33 -0400 Subject: How can I implement pseudo-random selection from a list? In-Reply-To: <91d674ea-5162-41d4-85cc-a8bd807197e0@n28g2000vbs.googlegro ups.com> Message-ID: Tobias, This has been discussed at length time and time again both in this Group and on the PST Forum (including this very week). Did you try doing a search for this topic on the discussion groups? -- David McFarlane, Professional Faultfinder At 7/22/2011 09:08 AM Friday, you wrote: >Dear all, > >again a rather elementary issue stroke me when I was testing a new >paradigm. When I have four target types, it often happens that one of >them is used 10 times in a row. Let's not discuss how random E-Primes >"random" is (I don't really trust it!). But: How can I implement a >pseudorandom selection from a list? > >Let's say I want E-Prime to choose randomly trials from a list, but >one of the four target types must not be repeated more than twice in a >row. > >I didn't find anything like that in the options, maybe some code >helps. Has anyone of you ever tried to do such a thing? > >Looking forward to reading your answers! > >Best, >Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From tobias.fw at gmail.com Fri Jul 22 13:40:24 2011 From: tobias.fw at gmail.com (Tobias) Date: Fri, 22 Jul 2011 06:40:24 -0700 Subject: How can I implement pseudo-random selection from a list? In-Reply-To: <4e2979d5.ce5e2a0a.7f0c.7aa3SMTPIN_ADDED@gmr-mx.google.com> Message-ID: Yeah, I tried antering "pseudorandom" but there weren't any helpful discussions. And no recent ones, especially. Didn't look at the PST forum On 22 Jul., 15:23, David McFarlane wrote: > Tobias, > > This has been discussed at length time and time again both in this > Group and on the PST Forum (including this very week). ?Did you try > doing a search for this topic on the discussion groups? > > -- David McFarlane, Professional Faultfinder > > At 7/22/2011 09:08 AM Friday, you wrote: > > >Dear all, > > >again a rather elementary issue stroke me when I was testing a new > >paradigm. When I have four target types, it often happens that one of > >them is used 10 times in a row. Let's not discuss how random E-Primes > >"random" is (I don't really trust it!). But: How can I implement a > >pseudorandom selection from a list? > > >Let's say I want E-Prime to choose randomly trials from a list, but > >one of the four target types must not be repeated more than twice in a > >row. > > >I didn't find anything like that in the options, maybe some code > >helps. Has anyone of you ever tried to do such a thing? > > >Looking forward to reading your answers! > > >Best, > >Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From tobias.fw at gmail.com Fri Jul 22 13:50:49 2011 From: tobias.fw at gmail.com (Tobias) Date: Fri, 22 Jul 2011 06:50:49 -0700 Subject: How can I implement pseudo-random selection from a list? In-Reply-To: Message-ID: okay, if i enter "pseudo-random", I find it. Let's discuss it there and close this branch. On 22 Jul., 15:40, Tobias wrote: > Yeah, I tried antering "pseudorandom" but there weren't any helpful > discussions. And no recent ones, especially. > > Didn't look at the PST forum > > On 22 Jul., 15:23, David McFarlane wrote: > > > Tobias, > > > This has been discussed at length time and time again both in this > > Group and on the PST Forum (including this very week). ?Did you try > > doing a search for this topic on the discussion groups? > > > -- David McFarlane, Professional Faultfinder > > > At 7/22/2011 09:08 AM Friday, you wrote: > > > >Dear all, > > > >again a rather elementary issue stroke me when I was testing a new > > >paradigm. When I have four target types, it often happens that one of > > >them is used 10 times in a row. Let's not discuss how random E-Primes > > >"random" is (I don't really trust it!). But: How can I implement a > > >pseudorandom selection from a list? > > > >Let's say I want E-Prime to choose randomly trials from a list, but > > >one of the four target types must not be repeated more than twice in a > > >row. > > > >I didn't find anything like that in the options, maybe some code > > >helps. Has anyone of you ever tried to do such a thing? > > > >Looking forward to reading your answers! > > > >Best, > > >Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From tobias.fw at gmail.com Fri Jul 22 14:06:19 2011 From: tobias.fw at gmail.com (Tobias) Date: Fri, 22 Jul 2011 07:06:19 -0700 Subject: How to avoid presenting targets consecutively In-Reply-To: <09DAEA8BC192C94EB62C8E71FC35A5D92F803879A9@EXCHANGE3.ad.nottingham.ac.uk> Message-ID: I have a similar problem. In a visual search experiment, I have four target types and it happens often that one of them is used 10 times in a row. Let's not discuss how random E-Primes "random" is (I don't really trust it!). But: How can I implement a pseudorandom selection from a list? Let's say I want E-Prime to choose randomly trials from a list, but one of the four target types must not be repeated more than twice in a row. I see your answers here, but I think we have to tell apart two things here: No repitition of stimuli within a trial (e.g. attentional blink) on one side and no repition from trial to trial (e.g. two target types in visual search) on the other side. Michiel's solution works perfectly for the former case I think. But I don't see any way of implementing that for my case. Micah's solution might be a good idea, but it is not very handy if you want a different random order of trials for each subject. I guess it would be best if there is a way to make this in code. For example, E-Prime could record the recent trial types: target_t1 = target_t2 target_t2 = c.getattrib("targettype") and then, E-Prime could check each new trial for repition: if c.getattrib("targettype")=target_t1 or c.getattrib("targettype")=target_t2 then "draw new trial". Unfortunately there is no command "draw new trials" That would be my way to go. Any hints? On 22 Jul., 11:02, Michiel Spape wrote: > Hi all, > Pseudo- (or actually offline) randomisation, would work depending on the task and duration (if indeed fMRI, I'd go for that - but EEG with hundreds of trials, not so much). Another answer may be found inspired in an old trick for programming an attentional blink (see my post here:http://www.google.co.uk/url?sa=t&source=web&cd=4&ved=0CDoQFjAD&url=ht...) > > Outtake: > ----------- > If the image-sequence is a procedure in a blocklist, make that something like > (start procedure)-->imagedisplay1-->imagedisplay2-->...-->imagedisplay9 > Let the blocklist have 9 attributes: "imagefile1", "imagefile2",.., "imagefile9", and two nested lists: distracters and targets, set them both to randomise. Give them both an attribute, respectively "distracter" and "target". Fill these attributes with all the targets and distracters you like. Let these lists randomise. > Set the filename properties of the 9 imagedisplays to [imagefile1], [imagefile2], .., [imagefile9]. > Set the attributes of imagefile1 to 9 (i.e. in the blocklist) to > [distracter:1] > [distracter:2] > [distracter:3] > [distracter:4] > [distracter:5] > [target:1] > [distracter:6] > [distracter:7] > [distracter:8] > > For a trial sequence in which the 6th display is the different (i.e. target, odd) picture. Obviously, you need two more lines, for the other 7th or 8th image to be the target. > ---------------- > > Given that you want something like distractor/distractor/distractor/target/distractor... etc, it may well be best to programme your experiment such that rather than having a "target" trial, you have a number of slides (or whatnots) after another in a single trial. You can then make your list so that sequences are randomised between trials, rather than trials themselves. So, if I have a list like: > Slide1Word,Slide2Word,Slide3Word,Slide4Word > [Distractor:1],[Target:1],[Distractor:2],Target:2],[Distractor:3] > [Distractor:1],[Target:1],[Distractor:2],[Distractor:3],[Target:2] > [Distractor:1],[Distractor:2],[Target1],[Distractor:3],[Target:2] > ... > And the list randomises between these 3 sequences, 1) there's no way that two targets can come after another, 2) targets/distractors are randomised and 3) orders are randomised to a very safe degree (since it's unlikely that for one participant, for example, all targets will come relatively to the end). > Hope that helps. > Best, > Mich > > Michiel Spap? > Research Fellow > Perception & Action group > University of Nottingham > School of Psychologywww.cognitology.eu > > -----Original Message----- > From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of David McFarlane > Sent: 21 July 2011 22:05 > To: e-prime at googlegroups.com > Subject: Re: How to avoid presenting targets consecutively > > Micah, > > Great answer. ?I often get so wrapped up in looking for sophisticated > automated solutions that I overlook the simple ones, and what you > recommend is exactly what we do for fMRI in order to avoid problems > with accidental multicollinearity (which flusters correlation & > deconvolution analyses). ?And as it turns out, this answer also > appeared in a discussion athttp://support.pstnet.com/forum/Topic3166-5-1.aspx. > > -- David McFarlane, Professional Faultfinder > > >Just as a general comment, and certainly not the best solution: > > >I generally do my stimulus randomizations outside of e-prime. It's > >much easier to specific a pseudo-random or fully random sequence of > >stimuli outside of e-prime (in excel for example) and to then import > >it into one triallist that is sequentially sampled. This way you can > >randomize the list while keeping a look out for exactly the kinds of > >problem you mention. > > >Hope that helps, > >Micah > > >Mark A wrote: > > > Dear E-Prime group, > > > I am fairly new to E-Prime, but thus far have found online discussions > > > within the group, as well as PST instructions and examples that have > > > allowed me to program everything required, with one exception. The > > > experimental task is simple: A participant listens to a series of > > > words and presses a button whenever a particular word is heard (i.e., > > > the target word, "apple" in the example below). The target word is > > > presented 4 times. > > > > My problem is this: I wish to present a series of stimuli (.wav files) > > > randomly, with the restriction that I do not want "Target" files to be > > > presented consecutively. Rather, I want them to be separated by at > > > least one distractor (or non-target). > > > > To illustrate, this is an excerpt from one of my lists: > > > Weight ? ? ? ?Nested ?Procedure ? ? ? Sound ? ? ? ? ? Talker ?Target ?SoundDur > > > 1 ? ? ? ? ? ? ? ? ? ? ? ? ? ? MAppleTrial ? ? m1apple.wav ? ? m1 > > ? ? ? ? ? ?yes ? ? ? ? ? ? 422 > > > 1 ? ? ? ? ? ? ? ? ? ? ? ? ? ? MAppleTrial ? ? f4apple.wav ? ? f4 > > ? ? ? ? ? ?yes ? ? ? ? ? ? 546 > > > 1 ? ? ? ? ? ? ? ? ? ? ? ? ? ? MAppleTrial ? ? m1apple.wav ? ? m1 > > ? ? ? ? ? ?yes ? ? ? ? ? ? 422 > > > 1 ? ? ? ? ? ? ? ? ? ? ? ? ? ? MAppleTrial ? ? f4apple.wav ? ? f4 > > ? ? ? ? ? ?yes ? ? ? ? ? ? 546 > > > 1 ? ? ? ? ? ? ? ? ? ? ? ? ? ? MAppleTrial ? ? m2bear.wav ? ? ?m2 > > ? ? ? ? ? ?no ? ? ? ? ? ? ?332 > > > 1 ? ? ? ? ? ? ? ? ? ? ? ? ? ? MAppleTrial ? ? f3bin.wav ? ? ? f3 > > ? ? ? ? ? ?no ? ? ? ? ? ? ?375 > > > 1 ? ? ? ? ? ? ? ? ? ? ? ? ? ? MAppleTrial ? ? m3cat.wav > > ? ?m3 ? ? ? ? ? ? ?no ? ? ? ? ? ? ?383 > > > 1 ? ? ? ? ? ? ? ? ? ? ? ? ? ? MAppleTrial ? ? f2chalk.wav ? ? f2 > > ? ? ? ? ? ?no ? ? ? ? ? ? ?586 > > > ..... and so forth (there are 4 targets and 23 distractors). > > > > Currently, I have the list set to "Random", however, this does not > > > guarantee that the Target files (top 4 rows) will not occur > > > consecutively. I think that the solution will involve a conditional > > > statement (perhaps using In line) comparing whether the previous file > > > presented was a target, but I am unsure how to implement this. > > > > An additional consideration is what to do if there are only 2 cycles > > > left, and the two files left are both target files. If this is very > > > hard to avoid, I am willing to live with this, as it is unlikely to > > > occur very often. Any tips or links to helpful discussions on similar > > > topics will be very much appreciated. > > -- > You received this message because you are subscribed to the Google Groups "E-Prime" group. > To post to this group, send email to e-prime at googlegroups.com. > To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. > For more options, visit this group athttp://groups.google.com/group/e-prime?hl=en. > > This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. ? Please do not use, copy or disclose the information contained in this message or in any attachment. ?Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. > > This message has been checked for viruses but the contents of an attachment > may still contain software viruses which could damage your computer system: > you are advised to perform your own checks. Email communications with the > University of Nottingham may be monitored as permitted by UK legislation. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From markbfm at gmail.com Fri Jul 22 14:51:05 2011 From: markbfm at gmail.com (Mark A) Date: Fri, 22 Jul 2011 07:51:05 -0700 Subject: How to avoid presenting targets consecutively In-Reply-To: Message-ID: Thanks for all of your replies. I appreciate the time that you took to provide me with such thoughtful answers. I will post back with the solution that I decide upon. > Micah's solution > might be a good idea, but it is not very handy if you want a different > random order of trials for each subject. Tobias, I think that Micah was implying that you would create a new randomisation for each participant. I might end up doing this as it seems to be the most cost-effective in terms of my time. Thank you all again. On Jul 22, 9:06?am, Tobias wrote: > I have a similar problem. In a visual search experiment, I have four > target types and it happens often that one of them is used 10 times in > a row. Let's not discuss how random E-Primes "random" is (I don't > really trust it!). > > But: How can I implement a pseudorandom selection from a list? Let's > say I want E-Prime to choose randomly trials from a list, but one of > the four target types must not be repeated more than twice in a row. > > I see your answers here, but I think we have to tell apart two things > here: No repitition of stimuli within a trial (e.g. attentional blink) > on one side and no repition from trial to trial (e.g. two target types > in visual search) on the other side. > > Michiel's solution works perfectly for the former case I think. But I > don't see any way of implementing that for my case. Micah's solution > might be a good idea, but it is not very handy if you want a different > random order of trials for each subject. > > I guess it would be best if there is a way to make this in code. For > example, E-Prime could record the recent trial types: > > target_t1 = target_t2 > target_t2 = c.getattrib("targettype") > > and then, E-Prime could check each new trial for repition: > > if c.getattrib("targettype")=target_t1 or > c.getattrib("targettype")=target_t2 then "draw new trial". > > Unfortunately there is no command "draw new trials" > > That would be my way to go. Any hints? > > On 22 Jul., 11:02, Michiel Spape > wrote: > > > > > > > > > Hi all, > > Pseudo- (or actually offline) randomisation, would work depending on the task and duration (if indeed fMRI, I'd go for that - but EEG with hundreds of trials, not so much). Another answer may be found inspired in an old trick for programming an attentional blink (see my post here:http://www.google.co.uk/url?sa=t&source=web&cd=4&ved=0CDoQFjAD&url=ht...) > > > Outtake: > > ----------- > > If the image-sequence is a procedure in a blocklist, make that something like > > (start procedure)-->imagedisplay1-->imagedisplay2-->...-->imagedisplay9 > > Let the blocklist have 9 attributes: "imagefile1", "imagefile2",.., "imagefile9", and two nested lists: distracters and targets, set them both to randomise. Give them both an attribute, respectively "distracter" and "target". Fill these attributes with all the targets and distracters you like. Let these lists randomise. > > Set the filename properties of the 9 imagedisplays to [imagefile1], [imagefile2], .., [imagefile9]. > > Set the attributes of imagefile1 to 9 (i.e. in the blocklist) to > > [distracter:1] > > [distracter:2] > > [distracter:3] > > [distracter:4] > > [distracter:5] > > [target:1] > > [distracter:6] > > [distracter:7] > > [distracter:8] > > > For a trial sequence in which the 6th display is the different (i.e. target, odd) picture. Obviously, you need two more lines, for the other 7th or 8th image to be the target. > > ---------------- > > > Given that you want something like distractor/distractor/distractor/target/distractor... etc, it may well be best to programme your experiment such that rather than having a "target" trial, you have a number of slides (or whatnots) after another in a single trial. You can then make your list so that sequences are randomised between trials, rather than trials themselves. So, if I have a list like: > > Slide1Word,Slide2Word,Slide3Word,Slide4Word > > [Distractor:1],[Target:1],[Distractor:2],Target:2],[Distractor:3] > > [Distractor:1],[Target:1],[Distractor:2],[Distractor:3],[Target:2] > > [Distractor:1],[Distractor:2],[Target1],[Distractor:3],[Target:2] > > ... > > And the list randomises between these 3 sequences, 1) there's no way that two targets can come after another, 2) targets/distractors are randomised and 3) orders are randomised to a very safe degree (since it's unlikely that for one participant, for example, all targets will come relatively to the end). > > Hope that helps. > > Best, > > Mich > > > Michiel Spap? > > Research Fellow > > Perception & Action group > > University of Nottingham > > School of Psychologywww.cognitology.eu > > > -----Original Message----- > > From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of David McFarlane > > Sent: 21 July 2011 22:05 > > To: e-prime at googlegroups.com > > Subject: Re: How to avoid presenting targets consecutively > > > Micah, > > > Great answer. ?I often get so wrapped up in looking for sophisticated > > automated solutions that I overlook the simple ones, and what you > > recommend is exactly what we do for fMRI in order to avoid problems > > with accidental multicollinearity (which flusters correlation & > > deconvolution analyses). ?And as it turns out, this answer also > > appeared in a discussion athttp://support.pstnet.com/forum/Topic3166-5-1.aspx. > > > -- David McFarlane, Professional Faultfinder > > > >Just as a general comment, and certainly not the best solution: > > > >I generally do my stimulus randomizations outside of e-prime. It's > > >much easier to specific a pseudo-random or fully random sequence of > > >stimuli outside of e-prime (in excel for example) and to then import > > >it into one triallist that is sequentially sampled. This way you can > > >randomize the list while keeping a look out for exactly the kinds of > > >problem you mention. > > > >Hope that helps, > > >Micah > > > >Mark A wrote: > > > > Dear E-Prime group, > > > > I am fairly new to E-Prime, but thus far have found online discussions > > > > within the group, as well as PST instructions and examples that have > > > > allowed me to program everything required, with one exception. The > > > > experimental task is simple: A participant listens to a series of > > > > words and presses a button whenever a particular word is heard (i.e., > > > > the target word, "apple" in the example below). The target word is > > > > presented 4 times. > > > > > My problem is this: I wish to present a series of stimuli (.wav files) > > > > randomly, with the restriction that I do not want "Target" files to be > > > > presented consecutively. Rather, I want them to be separated by at > > > > least one distractor (or non-target). > > > > > To illustrate, this is an excerpt from one of my lists: > > > > Weight ? ? ? ?Nested ?Procedure ? ? ? Sound ? ? ? ? ? Talker ?Target ?SoundDur > > > > 1 ? ? ? ? ? ? ? ? ? ? ? ? ? ? MAppleTrial ? ? m1apple.wav ? ? m1 > > > ? ? ? ? ? ?yes ? ? ? ? ? ? 422 > > > > 1 ? ? ? ? ? ? ? ? ? ? ? ? ? ? MAppleTrial ? ? f4apple.wav ? ? f4 > > > ? ? ? ? ? ?yes ? ? ? ? ? ? 546 > > > > 1 ? ? ? ? ? ? ? ? ? ? ? ? ? ? MAppleTrial ? ? m1apple.wav ? ? m1 > > > ? ? ? ? ? ?yes ? ? ? ? ? ? 422 > > > > 1 ? ? ? ? ? ? ? ? ? ? ? ? ? ? MAppleTrial ? ? f4apple.wav ? ? f4 > > > ? ? ? ? ? ?yes ? ? ? ? ? ? 546 > > > > 1 ? ? ? ? ? ? ? ? ? ? ? ? ? ? MAppleTrial ? ? m2bear.wav ? ? ?m2 > > > ? ? ? ? ? ?no ? ? ? ? ? ? ?332 > > > > 1 ? ? ? ? ? ? ? ? ? ? ? ? ? ? MAppleTrial ? ? f3bin.wav ? ? ? f3 > > > ? ? ? ? ? ?no ? ? ? ? ? ? ?375 > > > > 1 ? ? ? ? ? ? ? ? ? ? ? ? ? ? MAppleTrial ? ? m3cat.wav > > > ? ?m3 ? ? ? ? ? ? ?no ? ? ? ? ? ? ?383 > > > > 1 ? ? ? ? ? ? ? ? ? ? ? ? ? ? MAppleTrial ? ? f2chalk.wav ? ? f2 > > > ? ? ? ? ? ?no ? ? ? ? ? ? ?586 > > > > ..... and so forth (there are 4 targets and 23 distractors). > > > > > Currently, I have the list set to "Random", however, this does not > > > > guarantee that the Target files (top 4 rows) will not occur > > > > consecutively. I think that the solution will involve a conditional > > > > statement (perhaps using In line) comparing whether the previous file > > > > presented was a target, but I am unsure how to implement this. > > > > > An additional consideration is what to do if there are only 2 cycles > > > > left, and the two files left are both target files. If this is very > > > > hard to avoid, I am willing to live with this, as it is unlikely to > > > > occur very often. Any tips or links to helpful discussions on similar > > > > topics will be very much appreciated. > > > -- > > You received this message because you are subscribed to the Google Groups "E-Prime" group. > > To post to this group, send email to e-prime at googlegroups.com. > > To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. > > For more options, visit this group athttp://groups.google.com/group/e-prime?hl=en. > > > This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. ? Please do not use, copy or disclose the information contained in this message or in any attachment. ?Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. > > > This message has been checked for viruses but the contents of an attachment > > may still contain software viruses which could damage your computer system: > > you are advised to perform your own checks. Email communications with the > > University of Nottingham may be monitored as permitted by UK legislation. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From Michiel.Spape at nottingham.ac.uk Fri Jul 22 15:37:22 2011 From: Michiel.Spape at nottingham.ac.uk (Michiel Spape) Date: Fri, 22 Jul 2011 16:37:22 +0100 Subject: How to avoid presenting targets consecutively In-Reply-To: Message-ID: Hi Tobias, I don't think David specifically meant my example when he said an answer has been offered time and again. What you are looking for tends to be called conditional randomisation, which is usually done in such a way as to either ----- 1. Figure out all the legal repetition types 2. Build trial list 3. Run trial list. ----- 1. Generate one trial sequence (dist-dist-targ-dist-targ) etc, 2. If 1) is illegal, goto 1. ... but many more ways are possible. Making a list shouldn't be too hard, and indeed, if you have that, List.Run works if you really must "draw a trial". Best, Mich Michiel Spap? Research Fellow Perception & Action group University of Nottingham School of Psychology www.cognitology.eu -----Original Message----- From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of Tobias Sent: 22 July 2011 15:06 To: E-Prime Subject: Re: How to avoid presenting targets consecutively I have a similar problem. In a visual search experiment, I have four target types and it happens often that one of them is used 10 times in a row. Let's not discuss how random E-Primes "random" is (I don't really trust it!). But: How can I implement a pseudorandom selection from a list? Let's say I want E-Prime to choose randomly trials from a list, but one of the four target types must not be repeated more than twice in a row. I see your answers here, but I think we have to tell apart two things here: No repitition of stimuli within a trial (e.g. attentional blink) on one side and no repition from trial to trial (e.g. two target types in visual search) on the other side. Michiel's solution works perfectly for the former case I think. But I don't see any way of implementing that for my case. Micah's solution might be a good idea, but it is not very handy if you want a different random order of trials for each subject. I guess it would be best if there is a way to make this in code. For example, E-Prime could record the recent trial types: target_t1 = target_t2 target_t2 = c.getattrib("targettype") and then, E-Prime could check each new trial for repition: if c.getattrib("targettype")=target_t1 or c.getattrib("targettype")=target_t2 then "draw new trial". Unfortunately there is no command "draw new trials" That would be my way to go. Any hints? On 22 Jul., 11:02, Michiel Spape wrote: > Hi all, > Pseudo- (or actually offline) randomisation, would work depending on the task and duration (if indeed fMRI, I'd go for that - but EEG with hundreds of trials, not so much). Another answer may be found inspired in an old trick for programming an attentional blink (see my post here:http://www.google.co.uk/url?sa=t&source=web&cd=4&ved=0CDoQFjAD&url=ht...) > > Outtake: > ----------- > If the image-sequence is a procedure in a blocklist, make that something like > (start procedure)-->imagedisplay1-->imagedisplay2-->...-->imagedisplay9 > Let the blocklist have 9 attributes: "imagefile1", "imagefile2",.., "imagefile9", and two nested lists: distracters and targets, set them both to randomise. Give them both an attribute, respectively "distracter" and "target". Fill these attributes with all the targets and distracters you like. Let these lists randomise. > Set the filename properties of the 9 imagedisplays to [imagefile1], [imagefile2], .., [imagefile9]. > Set the attributes of imagefile1 to 9 (i.e. in the blocklist) to > [distracter:1] > [distracter:2] > [distracter:3] > [distracter:4] > [distracter:5] > [target:1] > [distracter:6] > [distracter:7] > [distracter:8] > > For a trial sequence in which the 6th display is the different (i.e. target, odd) picture. Obviously, you need two more lines, for the other 7th or 8th image to be the target. > ---------------- > > Given that you want something like distractor/distractor/distractor/target/distractor... etc, it may well be best to programme your experiment such that rather than having a "target" trial, you have a number of slides (or whatnots) after another in a single trial. You can then make your list so that sequences are randomised between trials, rather than trials themselves. So, if I have a list like: > Slide1Word,Slide2Word,Slide3Word,Slide4Word > [Distractor:1],[Target:1],[Distractor:2],Target:2],[Distractor:3] > [Distractor:1],[Target:1],[Distractor:2],[Distractor:3],[Target:2] > [Distractor:1],[Distractor:2],[Target1],[Distractor:3],[Target:2] > ... > And the list randomises between these 3 sequences, 1) there's no way that two targets can come after another, 2) targets/distractors are randomised and 3) orders are randomised to a very safe degree (since it's unlikely that for one participant, for example, all targets will come relatively to the end). > Hope that helps. > Best, > Mich > > Michiel Spap? > Research Fellow > Perception & Action group > University of Nottingham > School of Psychologywww.cognitology.eu > > -----Original Message----- > From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of David McFarlane > Sent: 21 July 2011 22:05 > To: e-prime at googlegroups.com > Subject: Re: How to avoid presenting targets consecutively > > Micah, > > Great answer. ?I often get so wrapped up in looking for sophisticated > automated solutions that I overlook the simple ones, and what you > recommend is exactly what we do for fMRI in order to avoid problems > with accidental multicollinearity (which flusters correlation & > deconvolution analyses). ?And as it turns out, this answer also > appeared in a discussion athttp://support.pstnet.com/forum/Topic3166-5-1.aspx. > > -- David McFarlane, Professional Faultfinder > > >Just as a general comment, and certainly not the best solution: > > >I generally do my stimulus randomizations outside of e-prime. It's > >much easier to specific a pseudo-random or fully random sequence of > >stimuli outside of e-prime (in excel for example) and to then import > >it into one triallist that is sequentially sampled. This way you can > >randomize the list while keeping a look out for exactly the kinds of > >problem you mention. > > >Hope that helps, > >Micah > > >Mark A wrote: > > > Dear E-Prime group, > > > I am fairly new to E-Prime, but thus far have found online discussions > > > within the group, as well as PST instructions and examples that have > > > allowed me to program everything required, with one exception. The > > > experimental task is simple: A participant listens to a series of > > > words and presses a button whenever a particular word is heard (i.e., > > > the target word, "apple" in the example below). The target word is > > > presented 4 times. > > > > My problem is this: I wish to present a series of stimuli (.wav files) > > > randomly, with the restriction that I do not want "Target" files to be > > > presented consecutively. Rather, I want them to be separated by at > > > least one distractor (or non-target). > > > > To illustrate, this is an excerpt from one of my lists: > > > Weight ? ? ? ?Nested ?Procedure ? ? ? Sound ? ? ? ? ? Talker ?Target ?SoundDur > > > 1 ? ? ? ? ? ? ? ? ? ? ? ? ? ? MAppleTrial ? ? m1apple.wav ? ? m1 > > ? ? ? ? ? ?yes ? ? ? ? ? ? 422 > > > 1 ? ? ? ? ? ? ? ? ? ? ? ? ? ? MAppleTrial ? ? f4apple.wav ? ? f4 > > ? ? ? ? ? ?yes ? ? ? ? ? ? 546 > > > 1 ? ? ? ? ? ? ? ? ? ? ? ? ? ? MAppleTrial ? ? m1apple.wav ? ? m1 > > ? ? ? ? ? ?yes ? ? ? ? ? ? 422 > > > 1 ? ? ? ? ? ? ? ? ? ? ? ? ? ? MAppleTrial ? ? f4apple.wav ? ? f4 > > ? ? ? ? ? ?yes ? ? ? ? ? ? 546 > > > 1 ? ? ? ? ? ? ? ? ? ? ? ? ? ? MAppleTrial ? ? m2bear.wav ? ? ?m2 > > ? ? ? ? ? ?no ? ? ? ? ? ? ?332 > > > 1 ? ? ? ? ? ? ? ? ? ? ? ? ? ? MAppleTrial ? ? f3bin.wav ? ? ? f3 > > ? ? ? ? ? ?no ? ? ? ? ? ? ?375 > > > 1 ? ? ? ? ? ? ? ? ? ? ? ? ? ? MAppleTrial ? ? m3cat.wav > > ? ?m3 ? ? ? ? ? ? ?no ? ? ? ? ? ? ?383 > > > 1 ? ? ? ? ? ? ? ? ? ? ? ? ? ? MAppleTrial ? ? f2chalk.wav ? ? f2 > > ? ? ? ? ? ?no ? ? ? ? ? ? ?586 > > > ..... and so forth (there are 4 targets and 23 distractors). > > > > Currently, I have the list set to "Random", however, this does not > > > guarantee that the Target files (top 4 rows) will not occur > > > consecutively. I think that the solution will involve a conditional > > > statement (perhaps using In line) comparing whether the previous file > > > presented was a target, but I am unsure how to implement this. > > > > An additional consideration is what to do if there are only 2 cycles > > > left, and the two files left are both target files. If this is very > > > hard to avoid, I am willing to live with this, as it is unlikely to > > > occur very often. Any tips or links to helpful discussions on similar > > > topics will be very much appreciated. > > -- > You received this message because you are subscribed to the Google Groups "E-Prime" group. > To post to this group, send email to e-prime at googlegroups.com. > To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. > For more options, visit this group athttp://groups.google.com/group/e-prime?hl=en. > > This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. ? Please do not use, copy or disclose the information contained in this message or in any attachment. ?Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. > > This message has been checked for viruses but the contents of an attachment > may still contain software viruses which could damage your computer system: > you are advised to perform your own checks. Email communications with the > University of Nottingham may be monitored as permitted by UK legislation. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Fri Jul 22 15:48:10 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Fri, 22 Jul 2011 11:48:10 -0400 Subject: How can I implement pseudo-random selection from a list? In-Reply-To: <3041d123-7b93-438c-95bc-e33eb4dc1452@f35g2000vbr.googlegro ups.com> Message-ID: Tobias, If you widen your search to simply "random", you might find even more useful discussion. -- David McFarlane, Professional Faultfinder At 7/22/2011 09:50 AM Friday, you wrote: >okay, if i enter "pseudo-random", I find it. Let's discuss it there >and close this branch. > >On 22 Jul., 15:40, Tobias wrote: > > Yeah, I tried antering "pseudorandom" but there weren't any helpful > > discussions. And no recent ones, especially. > > > > Didn't look at the PST forum > > > > On 22 Jul., 15:23, David McFarlane wrote: > > > > > Tobias, > > > > > This has been discussed at length time and time again both in this > > > Group and on the PST Forum (including this very week). Did you try > > > doing a search for this topic on the discussion groups? > > > > > -- David McFarlane, Professional Faultfinder > > > > > At 7/22/2011 09:08 AM Friday, you wrote: > > > > > >Dear all, > > > > > >again a rather elementary issue stroke me when I was testing a new > > > >paradigm. When I have four target types, it often happens that one of > > > >them is used 10 times in a row. Let's not discuss how random E-Primes > > > >"random" is (I don't really trust it!). But: How can I implement a > > > >pseudorandom selection from a list? > > > > > >Let's say I want E-Prime to choose randomly trials from a list, but > > > >one of the four target types must not be repeated more than twice in a > > > >row. > > > > > >I didn't find anything like that in the options, maybe some code > > > >helps. Has anyone of you ever tried to do such a thing? > > > > > >Looking forward to reading your answers! > > > > > >Best, > > > >Tobias -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Fri Jul 22 15:58:09 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Fri, 22 Jul 2011 11:58:09 -0400 Subject: How to avoid presenting targets consecutively In-Reply-To: Message-ID: Tobias, At 7/22/2011 10:06 AM Friday, you wrote: >Unfortunately there is no command "draw new trials" > >That would be my way to go. Any hints? The closest such commands would be List.GetNextAttrib and List.PeekAttrib (see those topics in the E-Basic Help facility). But I don't think those will solve your problem, at least they did not provide a solution for me when I had to do some particulary fussy randomization with constraints (aka conditional randomisation). (And before you ask, we worked around it first by simply discarding trials during analysis that failed to meet the randomization criteria, and later by doing the "make one suitable random order and use that for everyone" trick. It's trying to do all this "on-the-fly" that gets us tied into knots.) -- David McFarlane, Professional Faultfinder. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From tobias.fw at gmail.com Fri Jul 22 16:14:20 2011 From: tobias.fw at gmail.com (Tobias) Date: Fri, 22 Jul 2011 09:14:20 -0700 Subject: How to avoid presenting targets consecutively In-Reply-To: <09DAEA8BC192C94EB62C8E71FC35A5D92F80387A4F@EXCHANGE3.ad.nottingham.ac.uk> Message-ID: HI Michiel, I am afraid I don't quite understand these two options. What do you mean by "all the legal repetition types"? I have 416 trial types, I can't just have a look for all legal repetitions. Furthermore, I don't know how to generate a trial sequence. Is there a command for that? Anyway, thanks for your help and time! Tobias On 22 Jul., 17:37, Michiel Spape wrote: > Hi Tobias, > I don't think David specifically meant my example when he said an answer has been offered time and again. What you are looking for tends to be called conditional randomisation, which is usually done in such a way as to either > ----- > 1. Figure out all the legal repetition types > 2. Build trial list > 3. Run trial list. > ----- > 1. Generate one trial sequence (dist-dist-targ-dist-targ) etc, > 2. If 1) is illegal, goto 1. > ... but many more ways are possible. > > Making a list shouldn't be too hard, and indeed, if you have that, List.Run works if you really must "draw a trial". > Best, > Mich > > Michiel Spap? > Research Fellow > Perception & Action group > University of Nottingham > School of Psychologywww.cognitology.eu > > -----Original Message----- > From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of Tobias > Sent: 22 July 2011 15:06 > To: E-Prime > Subject: Re: How to avoid presenting targets consecutively > > I have a similar problem. In a visual search experiment, I have four > target types and it happens often that one of them is used 10 times in > a row. Let's not discuss how random E-Primes "random" is (I don't > really trust it!). > > But: How can I implement a pseudorandom selection from a list? Let's > say I want E-Prime to choose randomly trials from a list, but one of > the four target types must not be repeated more than twice in a row. > > I see your answers here, but I think we have to tell apart two things > here: No repitition of stimuli within a trial (e.g. attentional blink) > on one side and no repition from trial to trial (e.g. two target types > in visual search) on the other side. > > Michiel's solution works perfectly for the former case I think. But I > don't see any way of implementing that for my case. Micah's solution > might be a good idea, but it is not very handy if you want a different > random order of trials for each subject. > > I guess it would be best if there is a way to make this in code. For > example, E-Prime could record the recent trial types: > > target_t1 = target_t2 > target_t2 = c.getattrib("targettype") > > and then, E-Prime could check each new trial for repition: > > if c.getattrib("targettype")=target_t1 or > c.getattrib("targettype")=target_t2 then "draw new trial". > > Unfortunately there is no command "draw new trials" > > That would be my way to go. Any hints? > > On 22 Jul., 11:02, Michiel Spape > wrote: > > Hi all, > > Pseudo- (or actually offline) randomisation, would work depending on the task and duration (if indeed fMRI, I'd go for that - but EEG with hundreds of trials, not so much). Another answer may be found inspired in an old trick for programming an attentional blink (see my post here:http://www.google.co.uk/url?sa=t&source=web&cd=4&ved=0CDoQFjAD&url=ht...) > > > Outtake: > > ----------- > > If the image-sequence is a procedure in a blocklist, make that something like > > (start procedure)-->imagedisplay1-->imagedisplay2-->...-->imagedisplay9 > > Let the blocklist have 9 attributes: "imagefile1", "imagefile2",.., "imagefile9", and two nested lists: distracters and targets, set them both to randomise. Give them both an attribute, respectively "distracter" and "target". Fill these attributes with all the targets and distracters you like. Let these lists randomise. > > Set the filename properties of the 9 imagedisplays to [imagefile1], [imagefile2], .., [imagefile9]. > > Set the attributes of imagefile1 to 9 (i.e. in the blocklist) to > > [distracter:1] > > [distracter:2] > > [distracter:3] > > [distracter:4] > > [distracter:5] > > [target:1] > > [distracter:6] > > [distracter:7] > > [distracter:8] > > > For a trial sequence in which the 6th display is the different (i.e. target, odd) picture. Obviously, you need two more lines, for the other 7th or 8th image to be the target. > > ---------------- > > > Given that you want something like distractor/distractor/distractor/target/distractor... etc, it may well be best to programme your experiment such that rather than having a "target" trial, you have a number of slides (or whatnots) after another in a single trial. You can then make your list so that sequences are randomised between trials, rather than trials themselves. So, if I have a list like: > > Slide1Word,Slide2Word,Slide3Word,Slide4Word > > [Distractor:1],[Target:1],[Distractor:2],Target:2],[Distractor:3] > > [Distractor:1],[Target:1],[Distractor:2],[Distractor:3],[Target:2] > > [Distractor:1],[Distractor:2],[Target1],[Distractor:3],[Target:2] > > ... > > And the list randomises between these 3 sequences, 1) there's no way that two targets can come after another, 2) targets/distractors are randomised and 3) orders are randomised to a very safe degree (since it's unlikely that for one participant, for example, all targets will come relatively to the end). > > Hope that helps. > > Best, > > Mich > > > Michiel Spap? > > Research Fellow > > Perception & Action group > > University of Nottingham > > School of Psychologywww.cognitology.eu > > > -----Original Message----- > > From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of David McFarlane > > Sent: 21 July 2011 22:05 > > To: e-prime at googlegroups.com > > Subject: Re: How to avoid presenting targets consecutively > > > Micah, > > > Great answer. ?I often get so wrapped up in looking for sophisticated > > automated solutions that I overlook the simple ones, and what you > > recommend is exactly what we do for fMRI in order to avoid problems > > with accidental multicollinearity (which flusters correlation & > > deconvolution analyses). ?And as it turns out, this answer also > > appeared in a discussion athttp://support.pstnet.com/forum/Topic3166-5-1.aspx. > > > -- David McFarlane, Professional Faultfinder > > > >Just as a general comment, and certainly not the best solution: > > > >I generally do my stimulus randomizations outside of e-prime. It's > > >much easier to specific a pseudo-random or fully random sequence of > > >stimuli outside of e-prime (in excel for example) and to then import > > >it into one triallist that is sequentially sampled. This way you can > > >randomize the list while keeping a look out for exactly the kinds of > > >problem you mention. > > > >Hope that helps, > > >Micah > > > >Mark A wrote: > > > > Dear E-Prime group, > > > > I am fairly new to E-Prime, but thus far have found online discussions > > > > within the group, as well as PST instructions and examples that have > > > > allowed me to program everything required, with one exception. The > > > > experimental task is simple: A participant listens to a series of > > > > words and presses a button whenever a particular word is heard (i.e., > > > > the target word, "apple" in the example below). The target word is > > > > presented 4 times. > > > > > My problem is this: I wish to present a series of stimuli (.wav files) > > > > randomly, with the restriction that I do not want "Target" files to be > > > > presented consecutively. Rather, I want them to be separated by at > > > > least one distractor (or non-target). > > > > > To illustrate, this is an excerpt from one of my lists: > > > > Weight ? ? ? ?Nested ?Procedure ? ? ? Sound ? ? ? ? ? Talker ?Target ?SoundDur > > > > 1 ? ? ? ? ? ? ? ? ? ? ? ? ? ? MAppleTrial ? ? m1apple.wav ? ? m1 > > > ? ? ? ? ? ?yes ? ? ? ? ? ? 422 > > > > 1 ? ? ? ? ? ? ? ? ? ? ? ? ? ? MAppleTrial ? ? f4apple.wav ? ? f4 > > > ? ? ? ? ? ?yes ? ? ? ? ? ? 546 > > > > 1 ? ? ? ? ? ? ? ? ? ? ? ? ? ? MAppleTrial ? ? m1apple.wav ? ? m1 > > > ? ? ? ? ? ?yes ? ? ? ? ? ? 422 > > > > 1 ? ? ? ? ? ? ? ? ? ? ? ? ? ? MAppleTrial ? ? f4apple.wav ? ? f4 > > > ? ? ? ? ? ?yes ? ? ? ? ? ? 546 > > > > 1 ? ? ? ? ? ? ? ? ? ? ? ? ? ? MAppleTrial ? ? m2bear.wav ? ? ?m2 > > > ? ? ? ? ? ?no ? ? ? ? ? ? ?332 > > > > 1 ? ? ? ? ? ? ? ? ? ? ? ? ? ? MAppleTrial ? ? f3bin.wav ? ? ? f3 > > > ? ? ? ? ? ?no ? ? ? ? ? ? ?375 > > > > 1 ? ? ? ? ? ? ? ? ? ? ? ? ? ? MAppleTrial ? ? m3cat.wav > > > ? ?m3 ? ? ? ? ? ? ?no ? ? ? ? ? ? ?383 > > > > 1 ? ? ? ? ? ? ? ? ? ? ? ? ? ? MAppleTrial ? ? f2chalk.wav ? ? f2 > > > ? ? ? ? ? ?no ? ? ? ? ? ? ?586 > > > > ..... and so forth (there are 4 targets and 23 distractors). > > > > > Currently, I have the list set to "Random", however, this does not > > > > guarantee that the Target files (top 4 rows) will not occur > > > > consecutively. I think that the solution will involve a conditional > > > > statement (perhaps using In line) comparing whether the previous file > > > > presented was a target, but I am unsure how to implement this. > > > > > An additional consideration is what to do if there are only 2 cycles > > > > left, and the two files left are both target files. If this is very > > > > hard to avoid, I am willing to live with this, as it is unlikely to > > > > occur very often. Any tips or links to helpful discussions on similar > > > > topics will be very much appreciated. > > > -- > > You received this message because you are subscribed to the Google Groups "E-Prime" group. > > To post to this group, send email to e-prime at googlegroups.com. > > To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. > > For more options, visit this group athttp://groups.google.com/group/e-prime?hl=en. > > > This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. ? Please do not use, copy or disclose the information contained in this message or in any attachment. ?Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. > > > This message has been checked for viruses but the contents of an attachment > > may still contain software viruses which could damage your computer system: > > you are advised to perform your own checks. Email communications with the > > University of Nottingham may be monitored as > > ... > > Erfahren Sie mehr ? -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Fri Jul 22 16:27:06 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Fri, 22 Jul 2011 12:27:06 -0400 Subject: How to avoid presenting targets consecutively In-Reply-To: <1c2daa35-e8a2-46aa-9727-3e9d7908a1f9@cq10g2000vbb.googlegr oups.com> Message-ID: Tobias, PMJI... At 7/22/2011 12:14 PM Friday, you wrote: >Furthermore, I don't know how to generate a trial sequence. Is there >a command for that? Many of us use something as basic as an Excel worksheet, or maybe a script written in Perl or whatever. Basically, I think Michiel just meant to build a trial list *outside* of E-Prime. From there you could either manually look at the generated trial list and manually make adjustments until it meets your criteria, or use some Excel forumulas or macros or a Perl script or whatever to do that for you. No, probably not trivial, but there you go. Folks like us have struggled with this for decades, just browse through the scientific literature. -- David McFarlane And remember, if the ground-breaking research we wish to do were not so hard, then someone else would have already done it. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From hester.duffy at gmail.com Fri Jul 22 16:30:41 2011 From: hester.duffy at gmail.com (Hester Duffy) Date: Fri, 22 Jul 2011 17:30:41 +0100 Subject: How to avoid presenting targets consecutively In-Reply-To: <4e29a4db.224dec0a.7fbb.ffffde57SMTPIN_ADDED@gmr-mx.google.com> Message-ID: On Fri, Jul 22, 2011 at 5:27 PM, David McFarlane wrote: > At 7/22/2011 12:14 PM Friday, you wrote: > >> Furthermore, I don't know how to generate a trial sequence. Is there a >> command for that? >> > > Many of us use something as basic as an Excel worksheet, or maybe a script > written in Perl or whatever. Basically, I think Michiel just meant to build > a trial list *outside* of E-Prime. > > From there you could either manually look at the generated trial list and > manually make adjustments until it meets your criteria, or use some Excel > forumulas or macros or a Perl script or whatever to do that for you. No, > probably not trivial, but there you go. Folks like us have struggled with > this for decades, just browse through the scientific literature. > There's a free piece of software called Mix which does this sort of thing; you can download it from http://www.mrc-cbu.cam.ac.uk/people/maarten.van-casteren/mixandmatch.html. H -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Michiel.Spape at nottingham.ac.uk Mon Jul 25 09:45:56 2011 From: Michiel.Spape at nottingham.ac.uk (Michiel Spape) Date: Mon, 25 Jul 2011 10:45:56 +0100 Subject: How to avoid presenting targets consecutively In-Reply-To: <1c2daa35-e8a2-46aa-9727-3e9d7908a1f9@cq10g2000vbb.googlegroups.com> Message-ID: Hi Tobias, 416 trial types, as in, none of these may be repeated? I was going to copy-paste a bit of code to show you that yes, you can "just have a look", but it took me longer to explain exactly how to fit in this with your earlier question than I thought was worthwhile (given that I had only minutes). It's Monday, however, so I'll give it a go. In this experiment, subjects saw a line of 5 numbers, each in the range 1-3. After memorising a sequence, they were asked to tap each number, with a number indicating a finger (1->index, 2->middle, 3->ring). Crucially, we only wanted sequences to make use of ALL three fingers (sequence 12121 therefore not being OK), and we wanted two conditions: simple having 2 transitions between fingers (e.g. 11123, with transitions here from 1 to 2, and from 2 to 3) and complex having 4 transitions (e.g. 13231). So, there you have it, how to generate two lists from a total number of 3x3x3x3x3 (=243) trial types, if you don't want to do the (pretty simple) thing like going through it in excel? --------------- dim sequences(3*3*3*3*3) as long dim nfingers(3*3*3*3*3) as integer dim ntransitions(3*3*3*3*3) as integer dim seqcount as integer dim count1 as integer dim count2 as integer dim count3 as integer dim transitions as integer dim seq(5) as integer dim r1 as integer dim r2 as integer dim r3 as integer dim r4 as integer dim r5 as integer dim to5 as integer for r1 = 1 to 3 for r2 = 1 to 3 for r3 = 1 to 3 for r4 = 1 to 3 for r5 = 1 to 3 debug.print seqcount & r1 & r2 & r3 & r4 & r5 sequences(seqcount) = clng(r1 * 10000) + clng(r2 * 1000 + r3 * 100 + r4 * 10 + r5) seq(1) = r1 seq(2) = r2 seq(3) = r3 seq(4) = r4 seq(5) = r5 count1 = 0 count2 = 0 count3 = 0 transitions = 0 for to5 = 1 to 5 if seq(to5) = 1 then count1 = 1 if seq(to5) = 2 then count2 = 1 if seq(to5) = 3 then count3 = 1 if to5 > 1 and seq(to5) <> seq(to5-1) then transitions = transitions + 1 next to5 nfingers(seqcount) = count1 + count2 + count3 ntransitions(seqcount) = transitions seqcount = seqcount + 1 next r5 next r4 next r3 next r2 next r1 'from here we know all trial types (also including the other ones). Now we split them up according to conditions. Each list is named after number of fingers (Fx) and transitions (Tx). for transitions = 0 to seqcount if nfingers(transitions) = 1 then F1T0.AddLevel F1T0.Size + 1 F1T0.SetWeight cstr(F1T0.Size), "1" F1T0.SetAttrib cstr(F1T0.Size), "Sequence", cstr(sequences(transitions)) end if if nfingers(transitions) = 2 AND ntransitions(transitions) = 1 then F2T1.AddLevel F2T1.Size + 1 F2T1.SetWeight cstr(F2T1.Size), "1" F2T1.SetAttrib cstr(F2T1.Size), "Sequence", cstr(sequences(transitions)) end if if nfingers(transitions) = 2 AND ntransitions(transitions) = 2 then F2T2.AddLevel F2T2.Size + 1 F2T2.SetWeight cstr(F2T2.Size), "1" F2T2.SetAttrib cstr(F2T2.Size), "Sequence", cstr(sequences(transitions)) end if if nfingers(transitions) = 2 AND ntransitions(transitions) = 3 then F2T3.AddLevel F2T3.Size + 1 F2T3.SetWeight cstr(F2T3.Size), "1" F2T3.SetAttrib cstr(F2T3.Size), "Sequence", cstr(sequences(transitions)) end if if nfingers(transitions) = 2 AND ntransitions(transitions) = 4 then F2T4.AddLevel F2T4.Size + 1 F2T4.SetWeight cstr(F2T4.Size), "1" F2T4.SetAttrib cstr(F2T4.Size), "Sequence", cstr(sequences(transitions)) end if if nfingers(transitions) = 3 AND ntransitions(transitions) = 2 then F3T2.AddLevel F3T2.Size + 1 F3T2.SetWeight cstr(F3T2.Size), "1" F3T2.SetAttrib cstr(F3T2.Size), "Sequence", cstr(sequences(transitions)) end if if nfingers(transitions) = 3 AND ntransitions(transitions) = 3 then F3T3.AddLevel F3T3.Size + 1 F3T3.SetWeight cstr(F3T3.Size), "1" F3T3.SetAttrib cstr(F3T3.Size), "Sequence", cstr(sequences(transitions)) end if if nfingers(transitions) = 3 AND ntransitions(transitions) = 4 then if (cstr(sequences(transitions)) <> "12321") AND (cstr(sequences(transitions)) <> "32123") then F3T4.AddLevel F3T4.Size + 1 F3T4.SetWeight cstr(F3T4.Size), "1" F3T4.SetAttrib cstr(F3T4.Size), "Sequence", cstr(sequences(transitions)) end if end if next transitions F1T0.Reset F2T1.Reset F2T2.Reset F2T3.Reset F2T4.Reset F3T2.Reset F3T3.Reset F3T4.Reset ------------- And voila, 8 lists are generated, which can be inserted as nested lists anywhere you like. Anyway, even if you don't decide to use such tricks, at least it's a pretty nice example of building custom lists. As a side note on experimental psychology. I know enough people who want to completely do away with repetitions in experiments, and know the reasoning behind it. Here's a few considerations from the opposite perspective: - if the number of stimuli is large enough (say, 416 trial types), the chance of re-occurrences is really small, especially since we generally draw samples without replacement. Thus, there's only one trial for your list of 416 trial types in which a re-occurrence is possible, namely the first sample. If you have to do an awful lot of programming just to control for that, you are wasting your time (unless you think you might learn something). - Reoccurrences are completely normal in life, as such. Controlling for it necessarily induces non-randomness which may create expectations. I find it usually more helpful to control for it afterwards, statistically. - Reoccurrences are interesting and may provide insight into your experimental paradigm which you would otherwise not be able to gain. Much of the field of cognitive control, for instance, would not have been there if somebody had not looked into what happens if conflicting trials are repeated. That is not to say one might not have perfectly valid reasons for doing conditional randomisation (not the same as pseudo-randomisation; pseudorandom merely means the numbers are gained by deterministic processes, but they may well possess the quality of statistical randomness). As a note of caution however, it can be good not to be too anal about it. Best, Mich Michiel Spap? Research Fellow Perception & Action group University of Nottingham School of Psychology www.cognitology.eu -----Original Message----- From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of Tobias Sent: 22 July 2011 17:14 To: E-Prime Subject: Re: How to avoid presenting targets consecutively HI Michiel, I am afraid I don't quite understand these two options. What do you mean by "all the legal repetition types"? I have 416 trial types, I can't just have a look for all legal repetitions. Furthermore, I don't know how to generate a trial sequence. Is there a command for that? Anyway, thanks for your help and time! Tobias On 22 Jul., 17:37, Michiel Spape wrote: > Hi Tobias, > I don't think David specifically meant my example when he said an answer has been offered time and again. What you are looking for tends to be called conditional randomisation, which is usually done in such a way as to either > ----- > 1. Figure out all the legal repetition types > 2. Build trial list > 3. Run trial list. > ----- > 1. Generate one trial sequence (dist-dist-targ-dist-targ) etc, > 2. If 1) is illegal, goto 1. > ... but many more ways are possible. > > Making a list shouldn't be too hard, and indeed, if you have that, List.Run works if you really must "draw a trial". > Best, > Mich > > Michiel Spap? > Research Fellow > Perception & Action group > University of Nottingham > School of Psychologywww.cognitology.eu > > -----Original Message----- > From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of Tobias > Sent: 22 July 2011 15:06 > To: E-Prime > Subject: Re: How to avoid presenting targets consecutively > > I have a similar problem. In a visual search experiment, I have four > target types and it happens often that one of them is used 10 times in > a row. Let's not discuss how random E-Primes "random" is (I don't > really trust it!). > > But: How can I implement a pseudorandom selection from a list? Let's > say I want E-Prime to choose randomly trials from a list, but one of > the four target types must not be repeated more than twice in a row. > > I see your answers here, but I think we have to tell apart two things > here: No repitition of stimuli within a trial (e.g. attentional blink) > on one side and no repition from trial to trial (e.g. two target types > in visual search) on the other side. > > Michiel's solution works perfectly for the former case I think. But I > don't see any way of implementing that for my case. Micah's solution > might be a good idea, but it is not very handy if you want a different > random order of trials for each subject. > > I guess it would be best if there is a way to make this in code. For > example, E-Prime could record the recent trial types: > > target_t1 = target_t2 > target_t2 = c.getattrib("targettype") > > and then, E-Prime could check each new trial for repition: > > if c.getattrib("targettype")=target_t1 or > c.getattrib("targettype")=target_t2 then "draw new trial". > > Unfortunately there is no command "draw new trials" > > That would be my way to go. Any hints? > > On 22 Jul., 11:02, Michiel Spape > wrote: > > Hi all, > > Pseudo- (or actually offline) randomisation, would work depending on the task and duration (if indeed fMRI, I'd go for that - but EEG with hundreds of trials, not so much). Another answer may be found inspired in an old trick for programming an attentional blink (see my post here:http://www.google.co.uk/url?sa=t&source=web&cd=4&ved=0CDoQFjAD&url=ht...) > > > Outtake: > > ----------- > > If the image-sequence is a procedure in a blocklist, make that something like > > (start procedure)-->imagedisplay1-->imagedisplay2-->...-->imagedisplay9 > > Let the blocklist have 9 attributes: "imagefile1", "imagefile2",.., "imagefile9", and two nested lists: distracters and targets, set them both to randomise. Give them both an attribute, respectively "distracter" and "target". Fill these attributes with all the targets and distracters you like. Let these lists randomise. > > Set the filename properties of the 9 imagedisplays to [imagefile1], [imagefile2], .., [imagefile9]. > > Set the attributes of imagefile1 to 9 (i.e. in the blocklist) to > > [distracter:1] > > [distracter:2] > > [distracter:3] > > [distracter:4] > > [distracter:5] > > [target:1] > > [distracter:6] > > [distracter:7] > > [distracter:8] > > > For a trial sequence in which the 6th display is the different (i.e. target, odd) picture. Obviously, you need two more lines, for the other 7th or 8th image to be the target. > > ---------------- > > > Given that you want something like distractor/distractor/distractor/target/distractor... etc, it may well be best to programme your experiment such that rather than having a "target" trial, you have a number of slides (or whatnots) after another in a single trial. You can then make your list so that sequences are randomised between trials, rather than trials themselves. So, if I have a list like: > > Slide1Word,Slide2Word,Slide3Word,Slide4Word > > [Distractor:1],[Target:1],[Distractor:2],Target:2],[Distractor:3] > > [Distractor:1],[Target:1],[Distractor:2],[Distractor:3],[Target:2] > > [Distractor:1],[Distractor:2],[Target1],[Distractor:3],[Target:2] > > ... > > And the list randomises between these 3 sequences, 1) there's no way that two targets can come after another, 2) targets/distractors are randomised and 3) orders are randomised to a very safe degree (since it's unlikely that for one participant, for example, all targets will come relatively to the end). > > Hope that helps. > > Best, > > Mich > > > Michiel Spap? > > Research Fellow > > Perception & Action group > > University of Nottingham > > School of Psychologywww.cognitology.eu > > > -----Original Message----- > > From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of David McFarlane > > Sent: 21 July 2011 22:05 > > To: e-prime at googlegroups.com > > Subject: Re: How to avoid presenting targets consecutively > > > Micah, > > > Great answer. I often get so wrapped up in looking for sophisticated > > automated solutions that I overlook the simple ones, and what you > > recommend is exactly what we do for fMRI in order to avoid problems > > with accidental multicollinearity (which flusters correlation & > > deconvolution analyses). And as it turns out, this answer also > > appeared in a discussion athttp://support.pstnet.com/forum/Topic3166-5-1.aspx. > > > -- David McFarlane, Professional Faultfinder > > > >Just as a general comment, and certainly not the best solution: > > > >I generally do my stimulus randomizations outside of e-prime. It's > > >much easier to specific a pseudo-random or fully random sequence of > > >stimuli outside of e-prime (in excel for example) and to then import > > >it into one triallist that is sequentially sampled. This way you can > > >randomize the list while keeping a look out for exactly the kinds of > > >problem you mention. > > > >Hope that helps, > > >Micah > > > >Mark A wrote: > > > > Dear E-Prime group, > > > > I am fairly new to E-Prime, but thus far have found online discussions > > > > within the group, as well as PST instructions and examples that have > > > > allowed me to program everything required, with one exception. The > > > > experimental task is simple: A participant listens to a series of > > > > words and presses a button whenever a particular word is heard (i.e., > > > > the target word, "apple" in the example below). The target word is > > > > presented 4 times. > > > > > My problem is this: I wish to present a series of stimuli (.wav files) > > > > randomly, with the restriction that I do not want "Target" files to be > > > > presented consecutively. Rather, I want them to be separated by at > > > > least one distractor (or non-target). > > > > > To illustrate, this is an excerpt from one of my lists: > > > > Weight Nested Procedure Sound Talker Target SoundDur > > > > 1 MAppleTrial m1apple.wav m1 > > > yes 422 > > > > 1 MAppleTrial f4apple.wav f4 > > > yes 546 > > > > 1 MAppleTrial m1apple.wav m1 > > > yes 422 > > > > 1 MAppleTrial f4apple.wav f4 > > > yes 546 > > > > 1 MAppleTrial m2bear.wav m2 > > > no 332 > > > > 1 MAppleTrial f3bin.wav f3 > > > no 375 > > > > 1 MAppleTrial m3cat.wav > > > m3 no 383 > > > > 1 MAppleTrial f2chalk.wav f2 > > > no 586 > > > > ..... and so forth (there are 4 targets and 23 distractors). > > > > > Currently, I have the list set to "Random", however, this does not > > > > guarantee that the Target files (top 4 rows) will not occur > > > > consecutively. I think that the solution will involve a conditional > > > > statement (perhaps using In line) comparing whether the previous file > > > > presented was a target, but I am unsure how to implement this. > > > > > An additional consideration is what to do if there are only 2 cycles > > > > left, and the two files left are both target files. If this is very > > > > hard to avoid, I am willing to live with this, as it is unlikely to > > > > occur very often. Any tips or links to helpful discussions on similar > > > > topics will be very much appreciated. > > > -- > > You received this message because you are subscribed to the Google Groups "E-Prime" group. > > To post to this group, send email to e-prime at googlegroups.com. > > To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. > > For more options, visit this group athttp://groups.google.com/group/e-prime?hl=en. > > > This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. > > > This message has been checked for viruses but the contents of an attachment > > may still contain software viruses which could damage your computer system: > > you are advised to perform your own checks. Email communications with the > > University of Nottingham may be monitored as > > ... > > Erfahren Sie mehr ? -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From rp677 at york.ac.uk Mon Jul 25 16:31:01 2011 From: rp677 at york.ac.uk (Becky Prince) Date: Mon, 25 Jul 2011 09:31:01 -0700 Subject: threading SoundOut/Wait and TextDisplay objects Message-ID: Dear Forum, Can anyone tell me how to set up multiple threads in E-Prime? I need separate threads for running SoundOut/Wait objects and a TextDisplay object. I'm creating a task which presents a continous loop of the following: -SoundOut1 -Wait1 -SoundOut2 -Wait2 The subject adjusts the timing of Wait1 and Wait2 using key responses, and the loop (trial) ends when the subject presses Enter. I'm using InLine scripts after each sound/wait object to check for any response and adjust the next wait timing accordingly. The problem is that I'm also presenting a TextDisplay with background/ default text, and I want to change this text display (to provide visual feedback) for 200 ms after a response, then have theTextDisplay return to the default text. I can change the TextDisplay after any response, but if I tell E-Prime to wait 200ms, then change the text again, it introduces a 200ms delay in my contionous audio/wait loop. The timing delay problem is resolved if I just set the TextDisplay object to "clear after = No", but then the response feedback display text is held on screen until the next response, which is problematic. Any thoughts and suggestions are much appreciated! Becky p.s. Apologies if this has been addressed in E-Prime support/forums already - I've searched for related topics but couldn't find a solution. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Mon Jul 25 17:44:47 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Mon, 25 Jul 2011 13:44:47 -0400 Subject: threading SoundOut/Wait and TextDisplay objects In-Reply-To: Message-ID: Becky, Stock reminder: 1) I do not work for PST. 2) PST's trained staff takes any and all questions at http://support.pstnet.com/e%2Dprime/support/login.asp , and they strive to respond to all requests in 24-48 hours -- this is pretty much their substitute for proper documentation, so make full use of it. 3) If you do get an answer from PST Web Support, please extend the courtesy of posting their reply back here for the sake of others. That said, here is my take... Offhand, I do not think that E-Prime natively supports multiple "threads" such as you would like for this task, but I hope somebody else chimes in and tells me that I am wrong. Again offhand, I think you could accomplish your end by implementing your own "event loop" directly in E-Basic code. Do a search on that term to see where I have mentioned this before, although I don't think I have ever gone into much detail. Wikipedia might have a better discussion of the topic in general. In your case your event loop would handle both timeout for your TextDisplay, and responses. -- David McFarlane, Professional Faultfinder >Can anyone tell me how to set up multiple threads in E-Prime? I need >separate threads for running SoundOut/Wait objects and a TextDisplay >object. I'm creating a task which presents a continous loop of the >following: > >-SoundOut1 >-Wait1 >-SoundOut2 >-Wait2 > >The subject adjusts the timing of Wait1 and Wait2 using key responses, >and the loop (trial) ends when the subject presses Enter. I'm using >InLine scripts after each sound/wait object to check for any response >and adjust the next wait timing accordingly. > >The problem is that I'm also presenting a TextDisplay with background/ >default text, and I want to change this text display (to provide >visual feedback) for 200 ms after a response, then have theTextDisplay >return to the default text. I can change the TextDisplay after any >response, but if I tell E-Prime to wait 200ms, then change the text >again, it introduces a 200ms delay in my contionous audio/wait loop. >The timing delay problem is resolved if I just set the TextDisplay >object to "clear after = No", but then the response feedback display >text is held on screen until the next response, which is >problematic. > >Any thoughts and suggestions are much appreciated! > >Becky > >p.s. Apologies if this has been addressed in E-Prime support/forums >already - I've searched for related topics but couldn't find a >solution. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Mon Jul 25 18:52:02 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Mon, 25 Jul 2011 14:52:02 -0400 Subject: Making movie clips for E-Prime? In-Reply-To: <4E1D84D2.1020801@ucl.ac.uk> Message-ID: Just passing on some further information that I have gleaned from other discussions: 1) MPEG-1 seems to be sort of a "lowest common denominator" [FN1] codec, and so might serve as the "safest" codec if we merely want to get a movie to work in E-Prime at all. But other codecs may provide higher performance. 2) For higher performance, we may find the best results with an .avi file that uses DIVX video and MP3 for the audio. As for codec libraries, both the true DIVX brand and ffdshow for divx should work fine. Sorry I do not have finer details on this, I am not really versed in video/audio codec lore. Much appreciated if someone could fill in the details, or provide a link to a suitable discussion elsewhere. -- David McFarlane, Professional Faultfinder [FN1] Should read, "greatest common divisor", see Wikipedia. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From pfc.groot at gmail.com Tue Jul 26 20:51:10 2011 From: pfc.groot at gmail.com (Paul Groot) Date: Tue, 26 Jul 2011 22:51:10 +0200 Subject: threading SoundOut/Wait and TextDisplay objects In-Reply-To: <4e2dab92.c9d12a0a.3c28.fffffc35SMTPIN_ADDED@gmr-mx.google.com> Message-ID: Hi Becky, I also don't think E-Basic has build-in support for running separate threads. The only way I could achieve this was by creating a separate DLL in C++ and call it from inline script. (I needed it for controlling infusions pumps, which were used for fluid delivery during an fMRI experiment). However, code in a separate DLL cannot make use of E-Prime functions, so that really limits its use. I think David already suggested the easiest workaround: just create your own event loop and handle all events (responses, timeouts) within this loop. I think you already figured out how to manage sound objects and responses. Drawing text or images on the display is also not very difficult. You could invoke 'low level' functions by using the Canvas object, or you could (re)draw existing E-Objects by invoking the Draw method. Catching the respones of the keyboard will probably the trickiest part... cheers Paul 2011/7/25 David McFarlane : > Becky, > > Stock reminder: ?1) I do not work for PST. ?2) PST's trained staff takes any > and all questions at http://support.pstnet.com/e%2Dprime/support/login.asp , > and they strive to respond to all requests in 24-48 hours -- this is pretty > much their substitute for proper documentation, so make full use of it. ?3) > If you do get an answer from PST Web Support, please extend the courtesy of > posting their reply back here for the sake of others. > > That said, here is my take... > > Offhand, I do not think that E-Prime natively supports multiple "threads" > such as you would like for this task, but I hope somebody else chimes in and > tells me that I am wrong. > > Again offhand, I think you could accomplish your end by implementing your > own "event loop" directly in E-Basic code. ?Do a search on that term to see > where I have mentioned this before, although I don't think I have ever gone > into much detail. ?Wikipedia might have a better discussion of the topic in > general. ?In your case your event loop would handle both timeout for your > TextDisplay, and responses. > > -- David McFarlane, Professional Faultfinder > > >> Can anyone tell me how to set up multiple threads in E-Prime? ?I need >> separate threads for running SoundOut/Wait objects and a TextDisplay >> object. ?I'm creating a task which presents a continous loop of the >> following: >> >> -SoundOut1 >> -Wait1 >> -SoundOut2 >> -Wait2 >> >> The subject adjusts the timing of Wait1 and Wait2 using key responses, >> and the loop (trial) ends when the subject presses Enter. ?I'm using >> InLine scripts after each sound/wait object to check for any response >> and adjust the next wait timing accordingly. >> >> The problem is that I'm also presenting a TextDisplay with background/ >> default text, and I want to change this text display (to provide >> visual feedback) for 200 ms after a response, then have theTextDisplay >> return to the default text. ?I can change the TextDisplay after any >> response, but if I tell E-Prime to wait 200ms, then change the text >> again, it introduces a 200ms delay in my contionous audio/wait loop. >> The timing delay problem is resolved if I just set the TextDisplay >> object to "clear after = No", but then the response feedback display >> text is held on screen until the next response, which is >> problematic. >> >> Any thoughts and suggestions are much appreciated! >> >> Becky >> >> p.s. Apologies if this has been addressed in E-Prime support/forums >> already - I've searched for related topics but couldn't find a >> solution. > > -- > You received this message because you are subscribed to the Google Groups > "E-Prime" group. > To post to this group, send email to e-prime at googlegroups.com. > To unsubscribe from this group, send email to > e-prime+unsubscribe at googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/e-prime?hl=en. > > -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From philippegoldin at gmail.com Wed Jul 27 02:10:27 2011 From: philippegoldin at gmail.com (philippe) Date: Tue, 26 Jul 2011 19:10:27 -0700 Subject: random pairing of cue word and audio file on a single slide Message-ID: I would like to randomly pair two objects (a cue word and audio file) on the same slide. The slide is a single trial lasting 13.5s I want one of three cues (react, reframe, observe) to appear with equality probability (33%) on the slide (and remain on the slide for 13.5s) along with one of 9 audio files (also presented for 13.5s). the final result would be 9 trials. 3 with react, 3 with reframe and 3 with observe cue words presented randomly 9 unique audio files presented once each randomly If a single List has 9 rows and one column for cue word and another column for audio file, and is set for random selection, will Eprime randomly pair all the cue words with audio files?? Or will random selection refer to randomly picking 1 of the 9 rows that always pairs the same cue word and audio file??? Any help will be greatly appreciated. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From Erika_Nyhus at brown.edu Wed Jul 27 18:42:38 2011 From: Erika_Nyhus at brown.edu (Erika Nyhus) Date: Wed, 27 Jul 2011 14:42:38 -0400 Subject: How to fade from slide1 to slide2 (inline?) Message-ID: I am trying to program an experiment in E Prime and was wondering if you had any tips/examples to help me out. What I am trying to do is have subjects indicate their confidence in their response by the length of time they press the response button. While they are pressing the button we would like to present a visual cue (e.g. a growing bar or changing color) indicating the length of the button press. This visual cue should stop changing as soon as they release the button and then should remain stable until the end of the trial period. Attached is a mini-experiment in which I have gotten the color of the stimuli to change (adapted from the example given here) and then remain stable until the end of the trial period. But I have three remaining issues that I would appreciate help on. First, the stimuli should only start changing colors when the response button is pressed. So I need to have the stimuli appear, as soon as the button is pressed it changes color, and then when it is released it remains that color for the remainder of the trial. Second, I need the total trial time to be 2500 ms including stimulus appearance, change in color as the button is pressed, and as the stimulus remains stable until the end of the trial period. The code I have added in Inline3 (c.setAttrib "Dur", 2500-(ResponseTime-Slide1Time) does not appear to work properly as it sometimes results in very high values (e.g. Dur=5000 ms) or negative values (e.g. Dur=-500 ms). Third, I need to log the time when the response button was pressed and when it was released to get a measure of how long the button was pressed. -- Erika Nyhus, Ph.D. Cognitive, Linguistic, and Psychological Sciences Brown University 229 Waterman St. Providence, RI 02912-1821 -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: TestImage.es2 Type: application/octet-stream Size: 30540 bytes Desc: not available URL: From baltimore.ben at gmail.com Wed Jul 27 19:30:34 2011 From: baltimore.ben at gmail.com (ben robinson) Date: Wed, 27 Jul 2011 15:30:34 -0400 Subject: Multiple choice quiz graying out incorrect answers until correct chosen In-Reply-To: Message-ID: did you ever figure this out? my suggestion would be something to have a single slide object display the question and each of four possible answers as five separate slidetext objects within that slide. enable mouse responding, and terminate the slide after a response. use HitTest to determine which answer was clicked. if the correct answer was clicked, jump to a label at the end of the trial. if an incorrect response was clicked, the next slide object in the trial procedure would redisplay everything from the original slide object but with the just-selected incorrect answer presented in gray font. and repeat. ben On Mon, Jul 18, 2011 at 11:50 AM, David Nicholson < david.averill.nicholson at gmail.com> wrote: > Hello, > > I'm creating an experiment where the participant first chooses a > difficulty level and is directed to one of three tests. I already > have this part created and working correctly. It is not the most > nicely structured program as the best way I found to accomplish this > is to use unreferenced e-objects, but it works. That is not my > current problem or what I am focusing on at the moment. But I'm open > to suggestions if a better method is known. > > What i'm currently trying to do is create a slide with a question and > four multiple choice answers. The subject will choose an answer until > the correct answer is chosen. I will be using a ranking system of > points to score them. (4pts for first try, 3 for second, etc.) I > will also require a certain percentage correct or it will kick them > out and have to restart, or just jump back to the start. > > What I cannot figure out is how to keep the same question and answers > displayed and gray out the incorrect answer(s). Then move forward to > the next question when the correct answer is picked. I've been > thinking of a few ideas but I am still unsure what the best way to > structure and write this. > > Thanks in advance for all your help! > David Nicholson > > -- > You received this message because you are subscribed to the Google Groups > "E-Prime" group. > To post to this group, send email to e-prime at googlegroups.com. > To unsubscribe from this group, send email to > e-prime+unsubscribe at googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/e-prime?hl=en. > > -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. -------------- next part -------------- An HTML attachment was scrubbed... URL: From baltimore.ben at gmail.com Wed Jul 27 19:47:32 2011 From: baltimore.ben at gmail.com (ben robinson) Date: Wed, 27 Jul 2011 15:47:32 -0400 Subject: InLine response time data logging In-Reply-To: Message-ID: in that case you would simply do "If strHit = 'Image1' Then DisplayScreen.RT = Clock.Read()" On Tue, Jul 12, 2011 at 5:36 PM, Anthony wrote: > Essentially, I want to record RT's after the "If strHit = 'Image1'" > conditions. > > On Jul 12, 2:34 pm, Anthony wrote: > > The problem that I encounter when I try to use automatic data logging > > is that it logs the first response, regardless of where it is on the > > screen. I only want to log the response time that it took for the > > subject to click within the boundaries of the box on the screen.My > > code is below, if this helps: > > > > 'This code was taken fromhttp:// > groups.google.com/group/e-prime/browse_thread/thread/6411f6b4b... > > 'and adapted for use by Anthony ******* > > > > 'Designate "theState" as the Default Slide State, which is the > > 'current, ActiveState on the Slide object "Stimulus" > > Dim theState as SlideState > > Set theState = DisplayScreen.States("Default") > > Dim next_mX as Long, next_mY as Long > > Dim strHit As String > > Dim theMouseResponseData As MouseResponseData > > Do > > 'Was there a response? > > If DisplayScreen.InputMasks.Responses.Count > 0 Then > > 'Get the mouse response > > Set theMouseResponseData = > > CMouseResponseData(DisplayScreen.InputMasks.Responses(1)) > > 'Determine string name of SlideImage or > > SlideText object at > > 'mouse click coordinates. Assign that value to > > strHit > > strHit = > > theState.HitTest(theMouseResponseData.CursorX, > > theMouseResponseData.CursorY) > > 'Compare string name where mouse click > > occurred to CorrectAnswer > > 'attribute on each trial, and dispense a treat > > if they are equal (i.e., the target was clicked) > > 'NOTE: This comparison is case sensitive > > If strHit = "Image1" Then > > writeport &H378,1 > > WritePort &H378,2 > > End If > > End If > > Do Until (strHit = "Image1") > > 'Capture & process further mouse clicks: > > If (Mouse.Buttons And ebMouseButton1) Then > > Mouse.GetCursorPos next_mX, next_mY > > strHit = theState.HitTest( next_mX, > > next_mY ) > > End If > > If strHit = "Image1" Then > > writeport &H378,1 > > WritePort &H378,2 > > End If > > > > 'Loops until the button is clicked > > Loop > > Loop Until (strHit = "Image1") > > > > On Jul 12, 12:47 pm, David McFarlane wrote: > > > > > > > > > > > > > > > > > Anthony, > > > > > Stock reminder: 1) I do not work for PST. 2) PST's trained staff > > > takes any and all questions athttp:// > support.pstnet.com/e%2Dprime/support/login.asp, and they > > > strive to respond to all requests in 24-48 hours -- this is pretty > > > much their substitute for proper documentation, so make full use of > > > it. 3) If you do get an answer from PST Web Support, please extend > > > the courtesy of posting their reply back here for the sake of others. > > > > > That said, here is my take... > > > > > Not sure that I fully understand the issue, but if you have an input > > > mask launched from a stimulus object called, say, StimSlide, then you > > > may log responses at any time using inline code such as > > > > > c.SetAttrib "StimSlide.Resp", StimSlide.Resp > > > c.SetAttrib "StimSlide.RT", StimSlide.RT > > > > > You can see this for yourself just by looking at the logging code > > > automatically generated by E-Studio whenever you enable logging. > > > > > For that matter, just because you do not want the Slide to advance on > > > a mouse click does not mean that you cannot use automatice data > > > logging on it. Try enabling data logging on your stimulus Slide, and > > > see if that does it for you. > > > > > -- David McFarlane, Professional Faultfinder > > > > > >I am currently having issues logging the response time from a slide. > > > >The program setup is such that the slide does not advance until an > > > >InLine conditional has been met (the subject clicks on a box). The > > > >slide advances fine; however, the response time data is not logged > > > >because I have setup the slide properties such that it does not > > > >advance on any click (because I only want clicks in the box to > > > >advance the slide). My question is: how can I log response times > > > >from an InLine code under certain conditional circumstances? > > > > > >Thank you, > > > >Anthony > > -- > You received this message because you are subscribed to the Google Groups > "E-Prime" group. > To post to this group, send email to e-prime at googlegroups.com. > To unsubscribe from this group, send email to > e-prime+unsubscribe at googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/e-prime?hl=en. > > -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. -------------- next part -------------- An HTML attachment was scrubbed... URL: From baltimore.ben at gmail.com Wed Jul 27 20:08:34 2011 From: baltimore.ben at gmail.com (ben robinson) Date: Wed, 27 Jul 2011 16:08:34 -0400 Subject: How to avoid presenting targets consecutively In-Reply-To: <83a39d45-3cc3-4924-879b-9cfc4cd6b855@e35g2000yqc.googlegroups.com> Message-ID: maybe you've already figured out your solution maybe not. here's what i'd do. i would have a List1 with two procedures: Target and NonTarget. set List1 to random. * the Target procedure would have a List2 with two rows and one added column, WavFile. WavFile would be filled in with "[Wav]" to pull from a column by that name in a nested list. on one row you would nest the list TargetWavs (unless there were only ever a single target wav, in which case you wouldn't need to fool with a nested list), and on the other row you would nest the list NonTargetWavs. fill NonTargetWavs with all the nontarget.wav filenames under a column named Wav. * the NonTarget procedure would have a List3 with one added column, WavFile. again, if there's only a single nontarget.wav (apple.wav) you might just enter that by hand in the column, WavFile. otherwise, nest your NonTargetWavs list. adjust the weighting in List1 or in List3 to determine how many nontargets are presented between each target presentation. does that make sense? On Fri, Jul 15, 2011 at 10:18 PM, Mark A wrote: > Dear E-Prime group, > I am fairly new to E-Prime, but thus far have found online discussions > within the group, as well as PST instructions and examples that have > allowed me to program everything required, with one exception. The > experimental task is simple: A participant listens to a series of > words and presses a button whenever a particular word is heard (i.e., > the target word, "apple" in the example below). The target word is > presented 4 times. > > My problem is this: I wish to present a series of stimuli (.wav files) > randomly, with the restriction that I do not want "Target" files to be > presented consecutively. Rather, I want them to be separated by at > least one distractor (or non-target). > > To illustrate, this is an excerpt from one of my lists: > > Weight Nested Procedure Sound Talker Target SoundDur > 1 MAppleTrial m1apple.wav m1 > yes 422 > 1 MAppleTrial f4apple.wav f4 > yes 546 > 1 MAppleTrial m1apple.wav m1 > yes 422 > 1 MAppleTrial f4apple.wav f4 > yes 546 > 1 MAppleTrial m2bear.wav m2 > no 332 > 1 MAppleTrial f3bin.wav f3 > no 375 > 1 MAppleTrial m3cat.wav m3 > no 383 > 1 MAppleTrial f2chalk.wav f2 > no 586 > ..... and so forth (there are 4 targets and 23 distractors). > > Currently, I have the list set to "Random", however, this does not > guarantee that the Target files (top 4 rows) will not occur > consecutively. I think that the solution will involve a conditional > statement (perhaps using In line) comparing whether the previous file > presented was a target, but I am unsure how to implement this. > > An additional consideration is what to do if there are only 2 cycles > left, and the two files left are both target files. If this is very > hard to avoid, I am willing to live with this, as it is unlikely to > occur very often. Any tips or links to helpful discussions on similar > topics will be very much appreciated. > > -- > You received this message because you are subscribed to the Google Groups > "E-Prime" group. > To post to this group, send email to e-prime at googlegroups.com. > To unsubscribe from this group, send email to > e-prime+unsubscribe at googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/e-prime?hl=en. > > -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. -------------- next part -------------- An HTML attachment was scrubbed... URL: From baltimore.ben at gmail.com Wed Jul 27 20:17:39 2011 From: baltimore.ben at gmail.com (ben robinson) Date: Wed, 27 Jul 2011 16:17:39 -0400 Subject: How to avoid presenting targets consecutively In-Reply-To: Message-ID: here's how i'd avoid repeating the same target type 10 times in a row, without doing any If...Then stuff: i'd have a list with four rows, one for each of your target types. this list would be set to random. the weighting for all the rows would be '1'. that last part is critical. each time you call a target from this list you'd get one of the four, after the fourth call the list would reset. the 5th call to that newly reset list might return a repeat from your previous target, but only that single repeat. the 6th call to your target list would necessarily pull one of the 3 remaining target types in the list. etc. if you need to sample those 4 target types many times, you just change the number of times you pull from that list, but keep the weight of each of your 4 target types to '1' and you'll never get more than a single repeat. does that make sense? On Fri, Jul 22, 2011 at 10:06 AM, Tobias wrote: > I have a similar problem. In a visual search experiment, I have four > target types and it happens often that one of them is used 10 times in > a row. Let's not discuss how random E-Primes "random" is (I don't > really trust it!). > > But: How can I implement a pseudorandom selection from a list? Let's > say I want E-Prime to choose randomly trials from a list, but one of > the four target types must not be repeated more than twice in a row. > > I see your answers here, but I think we have to tell apart two things > here: No repitition of stimuli within a trial (e.g. attentional blink) > on one side and no repition from trial to trial (e.g. two target types > in visual search) on the other side. > > Michiel's solution works perfectly for the former case I think. But I > don't see any way of implementing that for my case. Micah's solution > might be a good idea, but it is not very handy if you want a different > random order of trials for each subject. > > I guess it would be best if there is a way to make this in code. For > example, E-Prime could record the recent trial types: > > target_t1 = target_t2 > target_t2 = c.getattrib("targettype") > > and then, E-Prime could check each new trial for repition: > > if c.getattrib("targettype")=target_t1 or > c.getattrib("targettype")=target_t2 then "draw new trial". > > Unfortunately there is no command "draw new trials" > > That would be my way to go. Any hints? > > On 22 Jul., 11:02, Michiel Spape > wrote: > > Hi all, > > Pseudo- (or actually offline) randomisation, would work depending on the > task and duration (if indeed fMRI, I'd go for that - but EEG with hundreds > of trials, not so much). Another answer may be found inspired in an old > trick for programming an attentional blink (see my post here: > http://www.google.co.uk/url?sa=t&source=web&cd=4&ved=0CDoQFjAD&url=ht...) > > > > Outtake: > > ----------- > > If the image-sequence is a procedure in a blocklist, make that something > like > > (start procedure)-->imagedisplay1-->imagedisplay2-->...-->imagedisplay9 > > Let the blocklist have 9 attributes: "imagefile1", "imagefile2",.., > "imagefile9", and two nested lists: distracters and targets, set them both > to randomise. Give them both an attribute, respectively "distracter" and > "target". Fill these attributes with all the targets and distracters you > like. Let these lists randomise. > > Set the filename properties of the 9 imagedisplays to [imagefile1], > [imagefile2], .., [imagefile9]. > > Set the attributes of imagefile1 to 9 (i.e. in the blocklist) to > > [distracter:1] > > [distracter:2] > > [distracter:3] > > [distracter:4] > > [distracter:5] > > [target:1] > > [distracter:6] > > [distracter:7] > > [distracter:8] > > > > For a trial sequence in which the 6th display is the different (i.e. > target, odd) picture. Obviously, you need two more lines, for the other 7th > or 8th image to be the target. > > ---------------- > > > > Given that you want something like > distractor/distractor/distractor/target/distractor... etc, it may well be > best to programme your experiment such that rather than having a "target" > trial, you have a number of slides (or whatnots) after another in a single > trial. You can then make your list so that sequences are randomised between > trials, rather than trials themselves. So, if I have a list like: > > Slide1Word,Slide2Word,Slide3Word,Slide4Word > > [Distractor:1],[Target:1],[Distractor:2],Target:2],[Distractor:3] > > [Distractor:1],[Target:1],[Distractor:2],[Distractor:3],[Target:2] > > [Distractor:1],[Distractor:2],[Target1],[Distractor:3],[Target:2] > > ... > > And the list randomises between these 3 sequences, 1) there's no way that > two targets can come after another, 2) targets/distractors are randomised > and 3) orders are randomised to a very safe degree (since it's unlikely that > for one participant, for example, all targets will come relatively to the > end). > > Hope that helps. > > Best, > > Mich > > > > Michiel Spap? > > Research Fellow > > Perception & Action group > > University of Nottingham > > School of Psychologywww.cognitology.eu > > > > -----Original Message----- > > From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On > Behalf Of David McFarlane > > Sent: 21 July 2011 22:05 > > To: e-prime at googlegroups.com > > Subject: Re: How to avoid presenting targets consecutively > > > > Micah, > > > > Great answer. I often get so wrapped up in looking for sophisticated > > automated solutions that I overlook the simple ones, and what you > > recommend is exactly what we do for fMRI in order to avoid problems > > with accidental multicollinearity (which flusters correlation & > > deconvolution analyses). And as it turns out, this answer also > > appeared in a discussion athttp:// > support.pstnet.com/forum/Topic3166-5-1.aspx. > > > > -- David McFarlane, Professional Faultfinder > > > > >Just as a general comment, and certainly not the best solution: > > > > >I generally do my stimulus randomizations outside of e-prime. It's > > >much easier to specific a pseudo-random or fully random sequence of > > >stimuli outside of e-prime (in excel for example) and to then import > > >it into one triallist that is sequentially sampled. This way you can > > >randomize the list while keeping a look out for exactly the kinds of > > >problem you mention. > > > > >Hope that helps, > > >Micah > > > > >Mark A wrote: > > > > Dear E-Prime group, > > > > I am fairly new to E-Prime, but thus far have found online > discussions > > > > within the group, as well as PST instructions and examples that have > > > > allowed me to program everything required, with one exception. The > > > > experimental task is simple: A participant listens to a series of > > > > words and presses a button whenever a particular word is heard (i.e., > > > > the target word, "apple" in the example below). The target word is > > > > presented 4 times. > > > > > > My problem is this: I wish to present a series of stimuli (.wav > files) > > > > randomly, with the restriction that I do not want "Target" files to > be > > > > presented consecutively. Rather, I want them to be separated by at > > > > least one distractor (or non-target). > > > > > > To illustrate, this is an excerpt from one of my lists: > > > > > Weight Nested Procedure Sound Talker Target > SoundDur > > > > > 1 MAppleTrial m1apple.wav m1 > > > yes 422 > > > > > 1 MAppleTrial f4apple.wav f4 > > > yes 546 > > > > > 1 MAppleTrial m1apple.wav m1 > > > yes 422 > > > > > 1 MAppleTrial f4apple.wav f4 > > > yes 546 > > > > > 1 MAppleTrial m2bear.wav m2 > > > no 332 > > > > > 1 MAppleTrial f3bin.wav f3 > > > no 375 > > > > > 1 MAppleTrial m3cat.wav > > > m3 no 383 > > > > > 1 MAppleTrial f2chalk.wav f2 > > > no 586 > > > > ..... and so forth (there are 4 targets and 23 distractors). > > > > > > Currently, I have the list set to "Random", however, this does not > > > > guarantee that the Target files (top 4 rows) will not occur > > > > consecutively. I think that the solution will involve a conditional > > > > statement (perhaps using In line) comparing whether the previous file > > > > presented was a target, but I am unsure how to implement this. > > > > > > An additional consideration is what to do if there are only 2 cycles > > > > left, and the two files left are both target files. If this is very > > > > hard to avoid, I am willing to live with this, as it is unlikely to > > > > occur very often. Any tips or links to helpful discussions on similar > > > > topics will be very much appreciated. > > > > -- > > You received this message because you are subscribed to the Google Groups > "E-Prime" group. > > To post to this group, send email to e-prime at googlegroups.com. > > To unsubscribe from this group, send email to > e-prime+unsubscribe at googlegroups.com. > > For more options, visit this group athttp:// > groups.google.com/group/e-prime?hl=en. > > > > This message and any attachment are intended solely for the addressee and > may contain confidential information. If you have received this message in > error, please send it back to me, and immediately delete it. Please do not > use, copy or disclose the information contained in this message or in any > attachment. Any views or opinions expressed by the author of this email do > not necessarily reflect the views of the University of Nottingham. > > > > This message has been checked for viruses but the contents of an > attachment > > may still contain software viruses which could damage your computer > system: > > you are advised to perform your own checks. Email communications with the > > University of Nottingham may be monitored as permitted by UK legislation. > > -- > You received this message because you are subscribed to the Google Groups > "E-Prime" group. > To post to this group, send email to e-prime at googlegroups.com. > To unsubscribe from this group, send email to > e-prime+unsubscribe at googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/e-prime?hl=en. > > -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. -------------- next part -------------- An HTML attachment was scrubbed... URL: From baltimore.ben at gmail.com Wed Jul 27 20:25:24 2011 From: baltimore.ben at gmail.com (ben robinson) Date: Wed, 27 Jul 2011 16:25:24 -0400 Subject: random pairing of cue word and audio file on a single slide In-Reply-To: <797bc047-f4dd-46c9-912b-587501adead0@v11g2000prn.googlegroups.com> Message-ID: random selection will randomly select one of the 9 rows, with the words and sounds already paired, if i've understood how you set up your list. instead, try this. List1 has three rows, each row has a weight of 3. each row runs the same procedure, TrialProc. there is a nested list on all three rows called WavFiles. there is an added column called CueWord. on row1 CueWord has "react", row2 has "reframe", row3 "observe". there is another added column called AudioFile. under AudioFile, every row has [Wav]. your nested list, WavFiles, add a column called Wav. you'll need 9 rows in WavFiles, and in each row under the column Wav type the name of one of your 9 audio files. set both List1 and WavFiles to random. this way, List1 will run through 9 times. 3 times it will present each of your words. each of the 9 times it runs it will call a different one of your 9 audio files from the nested list, WavFiles. hope that helps. On Tue, Jul 26, 2011 at 10:10 PM, philippe wrote: > I would like to randomly pair two objects (a cue word and audio file) > on the same slide. > > The slide is a single trial lasting 13.5s > > I want one of three cues (react, reframe, observe) to appear with > equality probability (33%) on the slide (and remain on the slide for > 13.5s) along with one of 9 audio files (also presented for 13.5s). > > the final result would be 9 trials. > > 3 with react, 3 with reframe and 3 with observe cue words presented > randomly > > 9 unique audio files presented once each randomly > > If a single List has 9 rows and one column for cue word and another > column for audio file, and is set for random selection, will Eprime > randomly pair all the cue words with audio files?? Or will random > selection refer to randomly picking 1 of the 9 rows that always pairs > the same cue word and audio file??? > > Any help will be greatly appreciated. > > -- > You received this message because you are subscribed to the Google Groups > "E-Prime" group. > To post to this group, send email to e-prime at googlegroups.com. > To unsubscribe from this group, send email to > e-prime+unsubscribe at googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/e-prime?hl=en. > > -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.averill.nicholson at gmail.com Thu Jul 28 00:40:56 2011 From: david.averill.nicholson at gmail.com (David Nicholson) Date: Wed, 27 Jul 2011 17:40:56 -0700 Subject: Multiple choice quiz graying out incorrect answers until correct chosen In-Reply-To: Message-ID: Hey Ben, Thanks for your response. I eventually got it and opted for having the participant choose a,b,c,d then press enter. This way there was not an accidental choice and they could think about it before they answer. I did it a very similar way as you described. I did end up using a single slide with four separate text boxes for a,b,c,d and one for the question of course. I then compared their answer using instr and if the accuracy was 0, i used if then statements to grey out the incorrect and just go to the beginning of the slide. This would repeat until correct. I then cleared the slide of incorrect and picked another question by random. I implemented a counter to keep score of correct and deductions, then terminated the question list once a minimum score was reached. My next step it to export this score along with subject number and session to use in the next test as a base score. I'm pretty sure I have a good idea how to write that up. I'm also looking into a way to take the data from multiple sources and automate it giving an overall score comparison. I know e- kick no longer works but I just need to devote more time to get the coding right for this. I was also thinking I may have to end up using a CSV but I would rather not as that seems like it would take too much time. If you have any ideas feel free to make suggestions. Thanks, David On Jul 27, 3:30?pm, ben robinson wrote: > did you ever figure this out? > my suggestion would be something to have a single slide object display the > question and each of four possible answers as five separate slidetext > objects within that slide. ?enable mouse responding, and terminate the slide > after a response. ?use HitTest to determine which answer was clicked. ?if > the correct answer was clicked, jump to a label at the end of the trial. ?if > an incorrect response was clicked, the next slide object in the trial > procedure would redisplay everything from the original slide object but with > the just-selected incorrect answer presented in gray font. ?and repeat. > > ben > > On Mon, Jul 18, 2011 at 11:50 AM, David Nicholson < > > > > > > > > david.averill.nichol... at gmail.com> wrote: > > Hello, > > > I'm creating an experiment where the participant first chooses a > > difficulty level and is directed to one of three tests. ?I already > > have this part created and working correctly. ?It is not the most > > nicely structured program as the best way I found to accomplish this > > is to use unreferenced e-objects, but it works. ?That is not my > > current problem or what I am focusing on at the moment. ?But I'm open > > to suggestions if a better method is known. > > > What i'm currently trying to do is create a slide with a question and > > four multiple choice answers. ?The subject will choose an answer until > > the correct answer is chosen. ?I will be using a ranking system of > > points to score them. ?(4pts for first try, 3 for second, etc.) ?I > > will also require a certain percentage correct or it will kick them > > out and have to restart, or just jump back to the start. > > > What I cannot figure out is how to keep the same question and answers > > displayed and gray out the incorrect answer(s). ?Then move forward to > > the next question when the correct answer is picked. ?I've been > > thinking of a few ideas but I am still unsure what the best way to > > structure and write this. > > > Thanks in advance for all your help! > > David Nicholson > > > -- > > You received this message because you are subscribed to the Google Groups > > "E-Prime" group. > > To post to this group, send email to e-prime at googlegroups.com. > > To unsubscribe from this group, send email to > > e-prime+unsubscribe at googlegroups.com. > > For more options, visit this group at > >http://groups.google.com/group/e-prime?hl=en. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From baltimore.ben at gmail.com Thu Jul 28 14:39:51 2011 From: baltimore.ben at gmail.com (ben robinson) Date: Thu, 28 Jul 2011 10:39:51 -0400 Subject: Multiple choice quiz graying out incorrect answers until correct chosen In-Reply-To: Message-ID: i don't fully understand what you are asking, but one simple method for using information from one experiment in another that i've used myself is to have your first experiment create a text file and write, say, your accuracy score into the text file. save the text file with the subject number in the filename, use the same subject number in your next experiment, and have that next experiment look for a text file with the appropriate filename. open the text file, read the accuracy, and viola, you have the information from a previous experiment available to you in your next experiment. ben On Wed, Jul 27, 2011 at 8:40 PM, David Nicholson < david.averill.nicholson at gmail.com> wrote: > Hey Ben, > > Thanks for your response. I eventually got it and opted for having > the participant choose a,b,c,d then press enter. This way there was > not an accidental choice and they could think about it before they > answer. I did it a very similar way as you described. I did end up > using a single slide with four separate text boxes for a,b,c,d and one > for the question of course. I then compared their answer using instr > and if the accuracy was 0, i used if then statements to grey out the > incorrect and just go to the beginning of the slide. This would > repeat until correct. I then cleared the slide of incorrect and > picked another question by random. I implemented a counter to keep > score of correct and deductions, then terminated the question list > once a minimum score was reached. My next step it to export this > score along with subject number and session to use in the next test as > a base score. I'm pretty sure I have a good idea how to write that > up. I'm also looking into a way to take the data from multiple > sources and automate it giving an overall score comparison. I know e- > kick no longer works but I just need to devote more time to get the > coding right for this. I was also thinking I may have to end up using > a CSV but I would rather not as that seems like it would take too much > time. If you have any ideas feel free to make suggestions. > > Thanks, > David > > On Jul 27, 3:30 pm, ben robinson wrote: > > did you ever figure this out? > > my suggestion would be something to have a single slide object display > the > > question and each of four possible answers as five separate slidetext > > objects within that slide. enable mouse responding, and terminate the > slide > > after a response. use HitTest to determine which answer was clicked. if > > the correct answer was clicked, jump to a label at the end of the trial. > if > > an incorrect response was clicked, the next slide object in the trial > > procedure would redisplay everything from the original slide object but > with > > the just-selected incorrect answer presented in gray font. and repeat. > > > > ben > > > > On Mon, Jul 18, 2011 at 11:50 AM, David Nicholson < > > > > > > > > > > > > > > > > david.averill.nichol... at gmail.com> wrote: > > > Hello, > > > > > I'm creating an experiment where the participant first chooses a > > > difficulty level and is directed to one of three tests. I already > > > have this part created and working correctly. It is not the most > > > nicely structured program as the best way I found to accomplish this > > > is to use unreferenced e-objects, but it works. That is not my > > > current problem or what I am focusing on at the moment. But I'm open > > > to suggestions if a better method is known. > > > > > What i'm currently trying to do is create a slide with a question and > > > four multiple choice answers. The subject will choose an answer until > > > the correct answer is chosen. I will be using a ranking system of > > > points to score them. (4pts for first try, 3 for second, etc.) I > > > will also require a certain percentage correct or it will kick them > > > out and have to restart, or just jump back to the start. > > > > > What I cannot figure out is how to keep the same question and answers > > > displayed and gray out the incorrect answer(s). Then move forward to > > > the next question when the correct answer is picked. I've been > > > thinking of a few ideas but I am still unsure what the best way to > > > structure and write this. > > > > > Thanks in advance for all your help! > > > David Nicholson > > > > > -- > > > You received this message because you are subscribed to the Google > Groups > > > "E-Prime" group. > > > To post to this group, send email to e-prime at googlegroups.com. > > > To unsubscribe from this group, send email to > > > e-prime+unsubscribe at googlegroups.com. > > > For more options, visit this group at > > >http://groups.google.com/group/e-prime?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "E-Prime" group. > To post to this group, send email to e-prime at googlegroups.com. > To unsubscribe from this group, send email to > e-prime+unsubscribe at googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/e-prime?hl=en. > > -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ahafri at gmail.com Thu Jul 28 15:13:50 2011 From: ahafri at gmail.com (Alon Hafri) Date: Thu, 28 Jul 2011 08:13:50 -0700 Subject: How to fade from slide1 to slide2 (inline?) In-Reply-To: Message-ID: Hi Erika, I did not have a chance to look at your attached script so excuse me if I mention something you've already done, but I think I can offer a few quick tips, and maybe others can offer follow-ups or different approaches as well. I would make the Slide duration 0 and then use an Inline to control the key presses and release, the changing color effect, and the trial duration. Another thing to note is that in E-Prime registering key releases is achieved with a minus sign, so for example {SPACE} is a press and {-SPACE} is a release (likewise {1} is a press and {-1} is a release). You have to set the CollectionMode property of the InputMask to accept both presses and releases, which you can achieve I believe either in the Input Mask properties window (maybe advanced settings) or in code (Keyboard.CollectionMode = ebPressesAndReleases). First put an InLine (SetTrialStartTime) at the very beginning of the trial like this. This gets the experiment time from the start of the trial: '----------------------------------------------------------------------------- Dim lngTrialStart As Long lngTrialStart = Clock.Read '----------------------------------------------------------------------------- Then a label "Repeat" after the stimulus slide and before the next InLine, and another label "SkipInLine" after the next inline: Then the following InLine (WaitForKeypresses): '----------------------------------------------------------------------------- If Clock.Read - lngTrialStart >= 2500 Then GoTo SkipInLine Dim nResps As Long nResps = Keyboard.Responses.Count 'waits for the initial keypress If nResps > 0 Then 'loops until either a response is made or the trial time runs out: nResps = Keyboard.Responses.Count Do Until Keyboard.Responses(nResps) = "{SPACE}" If Clock.Read - lngTrialStart >= 2500 Then GoTo SkipInLine Sleep 1 Loop 'logs the keypress time: c.SetAttrib "Keypress", Clock.Read 'loops the color changing code until either the release or the trial time time runs out Do Until Keyboard.Responses(Keyboard.Responses.Count) = "{-SPACE}" If Clock.Read - lngTrialStart >= 2500 Then GoTo SkipInLine 'insert color changing code here Loop Else Sleep 1 GoTo Repeat End If 'logs the key release time: c.SetAttrib "Keyrelease", Clock.Read '----------------------------------------------------------------------------- Then after the label "SkipInLine" you can have a simple InLine (WaitForTrialEnd) that waits untilt 2500 ms has passed from the start of the trial until the trial end: '----------------------------------------------------------------------------- Do Until Clock.Read - lngTrialStart >= 2500 Sleep 1 Loop '----------------------------------------------------------------------------- So the trial structure would be something like: SetTrialStartTime (InLine) Stimulus Slide Repeat label WaitForKeypresses InLine SkipInLine label WaitForTrialEnd (InLine) That should do it. You said you have the color changing code, yes? Good luck! If anyone else has a different way, please share! Alon On Jul 27, 2:42?pm, Erika Nyhus wrote: > I am trying to program an experiment in E Prime and was wondering if you had > any tips/examples to help me out. > > What I am trying to do is have subjects indicate their confidence in their > response by the length of time they press the response button. ?While they > are pressing the button we would like to present a visual cue (e.g. a > growing bar or changing color) indicating the length of the button press. > This visual cue should stop changing as soon as they release the button and > then should remain stable until the end of the trial period. > > Attached is a mini-experiment in which I have gotten the color of the > stimuli to change (adapted from the example given here) and then remain > stable until the end of the trial period. ?But I have three remaining issues > that I would appreciate help on. ?First, the stimuli should only start > changing colors when the response button is pressed. ?So I need to have the > stimuli appear, as soon as the button is pressed it changes color, and then > when it is released it remains that color for the remainder of the trial. > Second, I need the total trial time to be 2500 ms including stimulus > appearance, change in color as the button is pressed, and as the stimulus > remains stable until the end of the trial period. ?The code I have added in > Inline3 (c.setAttrib "Dur", 2500-(ResponseTime-Slide1Time) does not appear > to work properly as it sometimes results in very high values (e.g. Dur=5000 > ms) or negative values (e.g. Dur=-500 ms). ?Third, I need to log the time > when the response button was pressed and when it was released to get a > measure of how long the button was pressed. > > -- > Erika Nyhus, Ph.D. > Cognitive, Linguistic, and Psychological Sciences > Brown University > 229 Waterman St. > Providence, RI 02912-1821 > > ?TestImage.es2 > 40KViewDownload -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Thu Jul 28 15:28:36 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Thu, 28 Jul 2011 11:28:36 -0400 Subject: Multiple choice quiz graying out incorrect answers until correct chosen In-Reply-To: Message-ID: David, At 7/27/2011 08:40 PM Wednesday, you wrote: >I'm also looking into a way to take the data from multiple sources >and automate it giving an overall score comparison. I know e-kick >no longer works but I just need to devote more time to get the >coding right for this. I think that some people have gotten AutoIt (http://www.autoitscript.com/site/autoit ) to help with this sort of thing. If you search about the Group or the Forum you should find some earlier discussions about this. -- David McFarlane, Professional Faultfinder -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From erika.nyhus at gmail.com Thu Jul 28 16:05:06 2011 From: erika.nyhus at gmail.com (enyhus) Date: Thu, 28 Jul 2011 09:05:06 -0700 Subject: How to fade from slide1 to slide2 (inline?) In-Reply-To: <1090b649-3605-4d5c-b7c5-f69c8be887a4@fq4g2000vbb.googlegroups.com> Message-ID: Thank you so much for your help! I think this code should work for what I want to do, but I am getting the following error when I run it. Responses is not a property of the object For line: nResps = Keyboard.Responses.Count I do have the following color changing code that I plan to add once this is working: 'create all the variables you'll need: dim r as integer dim g as integer dim b as integer dim vr as string dim vb as string dim vg as string dim stepcounter as integer dim Slide1Time as integer dim ResponseTime as integer 'assign value 255 to the red green and blue channels, rgb 255,255,255 is white r=255 b=255 g=255 'map the integer values of r, g, and b onto the string variables vr, vb and vg vr$= r vb$= b vg$= g 'use the string rgb variables to modify the backgroundcolor of the textobject CSlideText(Slide1.States(Slide1.ActiveState).Objects("Text1")).forecolor=CColor (""& vr$ &","& vg$ &","& vb$ &"") 'First the values of green and blue will be decreased by 5 points, we started at 255,255,255 and this way after 50 repeats we will end at 255,0,0, which is pure red r = r g = g - 5 b = b - 5 'Map the integer values of rgb onto the string variables of rgb vr$= r vb$= b vg$= g 'Assign the new value to forecolor CSlideText(Slide1.States(Slide1.ActiveState).Objects("Text1")).forecolor=CColor (""& vr$ &","& vg$ &","& vb$ &"") Erika On Jul 28, 11:13?am, Alon Hafri wrote: > Hi Erika, > > I did not have a chance to look at your attached script so excuse me > if I mention something you've already done, but I think I can offer a > few quick tips, and maybe others can offer follow-ups or different > approaches as well. > > I would make the Slide duration 0 and then use an Inline to control > the key presses and release, the changing color effect, and the trial > duration. Another thing to note is that in E-Prime registering key > releases is achieved with a minus sign, so for example {SPACE} is a > press and {-SPACE} is a release (likewise {1} is a press and {-1} is a > release). You have to set the CollectionMode property of the InputMask > to accept both presses and releases, which you can achieve I believe > either in the Input Mask properties window (maybe advanced settings) > or in code (Keyboard.CollectionMode = ebPressesAndReleases). > > First put an InLine (SetTrialStartTime) at the very beginning of the > trial like this. This gets the experiment time from the start of the > trial: > '----------------------------------------------------------------------------- > Dim lngTrialStart As Long > lngTrialStart = Clock.Read > '----------------------------------------------------------------------------- > > Then a label "Repeat" after the stimulus slide and before the next > InLine, and another label "SkipInLine" after the next inline: > > Then the following InLine (WaitForKeypresses): > '----------------------------------------------------------------------------- > If Clock.Read - lngTrialStart >= 2500 Then GoTo SkipInLine > > Dim nResps As Long > > nResps = Keyboard.Responses.Count > > 'waits for the initial keypress > If nResps > 0 Then > > ? ?'loops until either a response is made or the trial time runs out: > ? ?nResps = Keyboard.Responses.Count > ? ?Do Until Keyboard.Responses(nResps) = "{SPACE}" > ? ? ? If Clock.Read - lngTrialStart >= 2500 Then GoTo SkipInLine > ? ? ? Sleep 1 > ? ?Loop > > ? ?'logs the keypress time: > ? ?c.SetAttrib "Keypress", Clock.Read > > ? ?'loops the color changing code until either the release or the > trial time time runs out > ? ?Do Until Keyboard.Responses(Keyboard.Responses.Count) = "{-SPACE}" > ? ? ? If Clock.Read - lngTrialStart >= 2500 Then GoTo SkipInLine > ? ? ? 'insert color changing code here > ? ?Loop > Else > ? ?Sleep 1 > ? ?GoTo Repeat > End If > > 'logs the key release time: > c.SetAttrib "Keyrelease", Clock.Read > '----------------------------------------------------------------------------- > > Then after the label "SkipInLine" you can have a simple InLine > (WaitForTrialEnd) that waits untilt 2500 ms has passed from the start > of the trial until the trial end: > '----------------------------------------------------------------------------- > Do Until Clock.Read - lngTrialStart >= 2500 > ? ?Sleep 1 > Loop > '----------------------------------------------------------------------------- > > So the trial structure would be something like: > SetTrialStartTime (InLine) > Stimulus Slide > Repeat label > WaitForKeypresses InLine > SkipInLine label > WaitForTrialEnd (InLine) > > That should do it. You said you have the color changing code, yes? > Good luck! If anyone else has a different way, please share! > > Alon > > On Jul 27, 2:42?pm, Erika Nyhus wrote: > > > I am trying to program an experiment in E Prime and was wondering if you had > > any tips/examples to help me out. > > > What I am trying to do is have subjects indicate their confidence in their > > response by the length of time they press the response button. ?While they > > are pressing the button we would like to present a visual cue (e.g. a > > growing bar or changing color) indicating the length of the button press. > > This visual cue should stop changing as soon as they release the button and > > then should remain stable until the end of the trial period. > > > Attached is a mini-experiment in which I have gotten the color of the > > stimuli to change (adapted from the example given here) and then remain > > stable until the end of the trial period. ?But I have three remaining issues > > that I would appreciate help on. ?First, the stimuli should only start > > changing colors when the response button is pressed. ?So I need to have the > > stimuli appear, as soon as the button is pressed it changes color, and then > > when it is released it remains that color for the remainder of the trial. > > Second, I need the total trial time to be 2500 ms including stimulus > > appearance, change in color as the button is pressed, and as the stimulus > > remains stable until the end of the trial period. ?The code I have added in > > Inline3 (c.setAttrib "Dur", 2500-(ResponseTime-Slide1Time) does not appear > > to work properly as it sometimes results in very high values (e.g. Dur=5000 > > ms) or negative values (e.g. Dur=-500 ms). ?Third, I need to log the time > > when the response button was pressed and when it was released to get a > > measure of how long the button was pressed. > > > -- > > Erika Nyhus, Ph.D. > > Cognitive, Linguistic, and Psychological Sciences > > Brown University > > 229 Waterman St. > > Providence, RI 02912-1821 > > > ?TestImage.es2 > > 40KViewDownload -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Thu Jul 28 16:51:11 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Thu, 28 Jul 2011 12:51:11 -0400 Subject: How to fade from slide1 to slide2 (inline?) In-Reply-To: <3b704610-4b32-420e-a279-15e45932e50c@f20g2000yqm.googlegro ups.com> Message-ID: Erika, At 7/28/2011 12:05 PM Thursday, you wrote: >Thank you so much for your help! I think this code should work for >what I want to do, but I am getting the following error when I run it. > >Responses is not a property of the object >For line: nResps = Keyboard.Responses.Count Yeah, the Keyboard object does not have a Responses property. Responses would be a property of an input mask, so you would have to do something more like nResps = Slide1.InputMasks(1).Responses.Count The "Multiple Responses" example from the PST web site might help you with this. BTW, if you really do want to access Keyboard activity directly without going through an input mask, you could use its History property. For more information, see the appropriate topics in the E-Basic Help facility (that's the closest we get to technical documentation for E-Prime). Or, post a request to PST Web Support, they seem to be pretty generous with helping folks out with this sort of thing (in lieu of providing full documentation). -- David McFarlane, Professional Faultfinder >I do have the following color changing code that I plan to add once >this is working: > >'create all the variables you'll need: >dim r as integer >dim g as integer >dim b as integer >dim vr as string >dim vb as string >dim vg as string >dim stepcounter as integer >dim Slide1Time as integer >dim ResponseTime as integer > >'assign value 255 to the red green and blue channels, rgb 255,255,255 >is white >r=255 >b=255 >g=255 > >'map the integer values of r, g, and b onto the string variables vr, >vb and vg >vr$= r >vb$= b >vg$= g > >'use the string rgb variables to modify the backgroundcolor of the >textobject >CSlideText(Slide1.States(Slide1.ActiveState).Objects("Text1")).forecolor=CColor >(""& vr$ &","& vg$ &","& vb$ &"") > >'First the values of green and blue will be decreased by 5 points, we >started at 255,255,255 and this way after 50 repeats we will end at >255,0,0, which is pure red >r = r >g = g - 5 >b = b - 5 > >'Map the integer values of rgb onto the string variables of rgb >vr$= r >vb$= b >vg$= g > >'Assign the new value to forecolor >CSlideText(Slide1.States(Slide1.ActiveState).Objects("Text1")).forecolor=CColor >(""& vr$ &","& vg$ &","& vb$ &"") > >Erika > >On Jul 28, 11:13 am, Alon Hafri wrote: > > Hi Erika, > > > > I did not have a chance to look at your attached script so excuse me > > if I mention something you've already done, but I think I can offer a > > few quick tips, and maybe others can offer follow-ups or different > > approaches as well. > > > > I would make the Slide duration 0 and then use an Inline to control > > the key presses and release, the changing color effect, and the trial > > duration. Another thing to note is that in E-Prime registering key > > releases is achieved with a minus sign, so for example {SPACE} is a > > press and {-SPACE} is a release (likewise {1} is a press and {-1} is a > > release). You have to set the CollectionMode property of the InputMask > > to accept both presses and releases, which you can achieve I believe > > either in the Input Mask properties window (maybe advanced settings) > > or in code (Keyboard.CollectionMode = ebPressesAndReleases). > > > > First put an InLine (SetTrialStartTime) at the very beginning of the > > trial like this. This gets the experiment time from the start of the > > trial: > > > '----------------------------------------------------------------------------- > > Dim lngTrialStart As Long > > lngTrialStart = Clock.Read > > > '----------------------------------------------------------------------------- > > > > Then a label "Repeat" after the stimulus slide and before the next > > InLine, and another label "SkipInLine" after the next inline: > > > > Then the following InLine (WaitForKeypresses): > > > '----------------------------------------------------------------------------- > > If Clock.Read - lngTrialStart >= 2500 Then GoTo SkipInLine > > > > Dim nResps As Long > > > > nResps = Keyboard.Responses.Count > > > > 'waits for the initial keypress > > If nResps > 0 Then > > > > 'loops until either a response is made or the trial time runs out: > > nResps = Keyboard.Responses.Count > > Do Until Keyboard.Responses(nResps) = "{SPACE}" > > If Clock.Read - lngTrialStart >= 2500 Then GoTo SkipInLine > > Sleep 1 > > Loop > > > > 'logs the keypress time: > > c.SetAttrib "Keypress", Clock.Read > > > > 'loops the color changing code until either the release or the > > trial time time runs out > > Do Until Keyboard.Responses(Keyboard.Responses.Count) = "{-SPACE}" > > If Clock.Read - lngTrialStart >= 2500 Then GoTo SkipInLine > > 'insert color changing code here > > Loop > > Else > > Sleep 1 > > GoTo Repeat > > End If > > > > 'logs the key release time: > > c.SetAttrib "Keyrelease", Clock.Read > > > '----------------------------------------------------------------------------- > > > > Then after the label "SkipInLine" you can have a simple InLine > > (WaitForTrialEnd) that waits untilt 2500 ms has passed from the start > > of the trial until the trial end: > > > '----------------------------------------------------------------------------- > > Do Until Clock.Read - lngTrialStart >= 2500 > > Sleep 1 > > Loop > > > '----------------------------------------------------------------------------- > > > > So the trial structure would be something like: > > SetTrialStartTime (InLine) > > Stimulus Slide > > Repeat label > > WaitForKeypresses InLine > > SkipInLine label > > WaitForTrialEnd (InLine) > > > > That should do it. You said you have the color changing code, yes? > > Good luck! If anyone else has a different way, please share! > > > > Alon > > > > On Jul 27, 2:42 pm, Erika Nyhus wrote: > > > > > I am trying to program an experiment in E Prime and was > wondering if you had > > > any tips/examples to help me out. > > > > > What I am trying to do is have subjects indicate their > confidence in their > > > response by the length of time they press the response > button. While they > > > are pressing the button we would like to present a visual cue (e.g. a > > > growing bar or changing color) indicating the length of the button press. > > > This visual cue should stop changing as soon as they release > the button and > > > then should remain stable until the end of the trial period. > > > > > Attached is a mini-experiment in which I have gotten the color of the > > > stimuli to change (adapted from the example given here) and then remain > > > stable until the end of the trial period. But I have three > remaining issues > > > that I would appreciate help on. First, the stimuli should only start > > > changing colors when the response button is pressed. So I need > to have the > > > stimuli appear, as soon as the button is pressed it changes > color, and then > > > when it is released it remains that color for the remainder of the trial. > > > Second, I need the total trial time to be 2500 ms including stimulus > > > appearance, change in color as the button is pressed, and as the stimulus > > > remains stable until the end of the trial period. The code I > have added in > > > Inline3 (c.setAttrib "Dur", 2500-(ResponseTime-Slide1Time) does > not appear > > > to work properly as it sometimes results in very high values > (e.g. Dur=5000 > > > ms) or negative values (e.g. Dur=-500 ms). Third, I need to log the time > > > when the response button was pressed and when it was released to get a > > > measure of how long the button was pressed. > > > > > -- > > > Erika Nyhus, Ph.D. > > > Cognitive, Linguistic, and Psychological Sciences > > > Brown University > > > 229 Waterman St. > > > Providence, RI 02912-1821 > > > > > TestImage.es2 > > > 40KViewDownload -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Thu Jul 28 16:58:59 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Thu, 28 Jul 2011 12:58:59 -0400 Subject: How to fade from slide1 to slide2 (inline?) In-Reply-To: <4e3193ad.ce5e2a0a.7ac4.2d5bSMTPIN_ADDED@gmr-mx.google.com> Message-ID: At 7/28/2011 12:51 PM Thursday, David McFarlane wrote: >Responses would be a property of an input mask... Let me amplify that slightly for the sake of fuller clarity: Responses would be a property of an input mask, and input masks in turn are properties of stimulus objects (e.g, TextDisplay, ImageDisplay, SoundOut, Slide, Wait) ... -- David McFarlane, Professional Faultfinder -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From erika.nyhus at gmail.com Thu Jul 28 17:55:41 2011 From: erika.nyhus at gmail.com (enyhus) Date: Thu, 28 Jul 2011 10:55:41 -0700 Subject: How to fade from slide1 to slide2 (inline?) In-Reply-To: <4e319554.cf3c2b0a.0ad2.2df5SMTPIN_ADDED@gmr-mx.google.com> Message-ID: Thank you so much for your help! I have changed all the code to use Slide1.InputMasks(1).Responses.Count, but I am getting the following error when I run it. Operator type mismatch For line: Do Until Slide1.InputMasks(1).Responses(nResps) = "{SPACE}" Here is the full code that I am trying to get to work: If Clock.Read - lngTrialStart >= 2500 Then GoTo SkipInLine Dim nResps As Long nResps = Slide1.InputMasks(1).Responses.Count 'waits for the initial keypress If nResps > 0 Then 'loops until either a response is made or the trial time runs out: nResps = Slide1.InputMasks(1).Responses.Count Do Until Slide1.InputMasks(1).Responses(nResps) = "{SPACE}" If Clock.Read - lngTrialStart >= 2500 Then GoTo SkipInLine Sleep 1 Loop 'logs the keypress time: c.SetAttrib "Keypress", Clock.Read 'loops the color changing code until either the release or the trial time time runs out Do Until Slide1.InputMasks(1).Responses(Slide1.InputMasks(1).Responses.Count) = "{-SPACE}" If Clock.Read - lngTrialStart >= 2500 Then GoTo SkipInLine 'insert color changing code here Loop Else Sleep 1 GoTo Repeat End If 'logs the key release time: c.SetAttrib "Keyrelease", Clock.Read Erika On Jul 28, 12:58?pm, David McFarlane wrote: > At 7/28/2011 12:51 PM Thursday, David McFarlane wrote: > > >Responses would be a property of an input mask... > > Let me amplify that slightly for the sake of fuller clarity: > > Responses would be a property of an input mask, and input masks in > turn are properties of stimulus objects (e.g, TextDisplay, > ImageDisplay, SoundOut, Slide, Wait) ... > > -- David McFarlane, Professional Faultfinder -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Thu Jul 28 18:17:58 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Thu, 28 Jul 2011 14:17:58 -0400 Subject: How to fade from slide1 to slide2 (inline?) In-Reply-To: <854faa4b-eda2-4626-9671-2adb8e7445c9@y8g2000vba.googlegrou ps.com> Message-ID: Erika, At 7/28/2011 01:55 PM Thursday, you wrote: >I have changed all the code to use >Slide1.InputMasks(1).Responses.Count, but I am getting the following >error when I run it. > >Operator type mismatch >For line: Do Until Slide1.InputMasks(1).Responses(nResps) = "{SPACE}" Um, Slide1.InputMasks(1).Responses gets you to the ResponseDataCollection object associated with Slide1.InputMasks(1), and Slide1.InputMasks(1).Responses(nResps) only gets you to a particular ResponseData object, not any of its component properties. You have to drill down a little further to specific ResponseData properties, e.g., Do Until Slide1.InputMasks(1).Responses(nResps).RESP = "{SPACE}" Please, please read through all the relevant topics in the E-Basic Help facility. This would also all become clear if you would take a course on VBA, or give yourself some training using a book like "VBA for Dummies". It is a huge mistake to try to get an intricate program to work without understanding *how* it works -- even if it *appears* to work to you, chances are it does not really do what you think it does, and you will unwittingly publish invalid results. -- David McFarlane, Professional Faultfinder -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From david.averill.nicholson at gmail.com Thu Jul 28 19:36:52 2011 From: david.averill.nicholson at gmail.com (David Nicholson) Date: Thu, 28 Jul 2011 12:36:52 -0700 Subject: Multiple choice quiz graying out incorrect answers until correct chosen In-Reply-To: <4e31802a.c1602a0a.1685.27dfSMTPIN_ADDED@gmr-mx.google.com> Message-ID: The way you described is the way i'm leaning toward now Ben. I'll look into autoit, it may be more efficient in the long run. I'll keep you guys posted. Thanks for all you help!!! David On Jul 28, 11:28?am, David McFarlane wrote: > David, > > At 7/27/2011 08:40 PM Wednesday, you wrote: > > >I'm also looking into a way to take the data from multiple sources > >and automate it giving an overall score comparison. ?I know e-kick > >no longer works but I just need to devote more time to get the > >coding right for this. > > I think that some people have gotten AutoIt > (http://www.autoitscript.com/site/autoit) to help with this sort of > thing. ?If you search about the Group or the Forum you should find > some earlier discussions about this. > > -- David McFarlane, Professional Faultfinder -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From rp677 at york.ac.uk Sun Jul 31 00:30:33 2011 From: rp677 at york.ac.uk (Becky Prince) Date: Sat, 30 Jul 2011 17:30:33 -0700 Subject: threading SoundOut/Wait and TextDisplay objects In-Reply-To: Message-ID: Many thanks Paul and David for the replies! I'll see if I can manage the display timeouts within the SoundOut/Wait loop as you've both suggested. If I find some genius/elegant solution to this problem then I'll be sure to post it here. Best, Becky On Jul 26, 9:51?pm, Paul Groot wrote: > Hi Becky, > > I also don't think E-Basic has build-in support for running separate > threads. The only way I could achieve this was by creating a separate > DLL in C++ and call it from inline script. (I needed it for > controlling infusions pumps, which were used for fluid delivery during > an fMRI experiment). However, code in a separate DLL cannot make use > of E-Prime functions, so that really limits its use. ?I think David > already suggested the easiest workaround: just create your own event > loop and handle all events (responses, timeouts) within this loop. I > think you already figured out how to manage sound objects and > responses. Drawing text or images on the display is also not very > difficult. You could invoke 'low level' functions by using the Canvas > object, or you could (re)draw existing E-Objects by invoking the Draw > method. Catching the respones of the keyboard will probably the > trickiest part... > > cheers > Paul > > 2011/7/25 David McFarlane : > > > Becky, > > > Stock reminder: ?1) I do not work for PST. ?2) PST's trained staff takes any > > and all questions athttp://support.pstnet.com/e%2Dprime/support/login.asp, > > and they strive to respond to all requests in 24-48 hours -- this is pretty > > much their substitute for proper documentation, so make full use of it. ?3) > > If you do get an answer from PST Web Support, please extend the courtesy of > > posting their reply back here for the sake of others. > > > That said, here is my take... > > > Offhand, I do not think that E-Prime natively supports multiple "threads" > > such as you would like for this task, but I hope somebody else chimes in and > > tells me that I am wrong. > > > Again offhand, I think you could accomplish your end by implementing your > > own "event loop" directly in E-Basic code. ?Do a search on that term to see > > where I have mentioned this before, although I don't think I have ever gone > > into much detail. ?Wikipedia might have a better discussion of the topic in > > general. ?In your case your event loop would handle both timeout for your > > TextDisplay, and responses. > > > -- David McFarlane, Professional Faultfinder > > >> Can anyone tell me how to set up multiple threads in E-Prime? ?I need > >> separate threads for running SoundOut/Wait objects and a TextDisplay > >> object. ?I'm creating a task which presents a continous loop of the > >> following: > > >> -SoundOut1 > >> -Wait1 > >> -SoundOut2 > >> -Wait2 > > >> The subject adjusts the timing of Wait1 and Wait2 using key responses, > >> and the loop (trial) ends when the subject presses Enter. ?I'm using > >> InLine scripts after each sound/wait object to check for any response > >> and adjust the next wait timing accordingly. > > >> The problem is that I'm also presenting a TextDisplay with background/ > >> default text, and I want to change this text display (to provide > >> visual feedback) for 200 ms after a response, then have theTextDisplay > >> return to the default text. ?I can change the TextDisplay after any > >> response, but if I tell E-Prime to wait 200ms, then change the text > >> again, it introduces a 200ms delay in my contionous audio/wait loop. > >> The timing delay problem is resolved if I just set the TextDisplay > >> object to "clear after = No", but then the response feedback display > >> text is held on screen until the next response, which is > >> problematic. > > >> Any thoughts and suggestions are much appreciated! > > >> Becky > > >> p.s. Apologies if this has been addressed in E-Prime support/forums > >> already - I've searched for related topics but couldn't find a > >> solution. > > > -- > > You received this message because you are subscribed to the Google Groups > > "E-Prime" group. > > To post to this group, send email to e-prime at googlegroups.com. > > To unsubscribe from this group, send email to > > e-prime+unsubscribe at googlegroups.com. > > For more options, visit this group at > >http://groups.google.com/group/e-prime?hl=en. > > -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.