By YL - 11/1/2017
Hi there, I want to create a shape that appear and disappear continuously for a certain period. What types of attribute would you recommend to use?
Thanks!
|
By Dave - 11/1/2017
+xHi there, I want to create a shape that appear and disappear continuously for a certain period. What types of attribute would you recommend to use? Thanks! If you want this to happen during a single <trial>, define a <shape> as needed and then display and erase it as needed via the <trial>'s /stimulustimes:
<trial sometrial> / stimulustimes = [0=myshape; 500=clearscreen; 1000=myshape; 1500=clearscreen; 2000=myshape; 2500=clearscreen; 3000=myshape; 3500=clearscreen; ...] ... </trial>
In the above, the shape would appear and disappear in 500ms intervals.
|
By YL - 11/1/2017
+x+xHi there, I want to create a shape that appear and disappear continuously for a certain period. What types of attribute would you recommend to use? Thanks! If you want this to happen during a single <trial>, define a <shape> as needed and then display and erase it as needed via the <trial>'s /stimulustimes: <trial sometrial> / stimulustimes = [0=myshape; 500=clearscreen; 1000=myshape; 1500=clearscreen; 2000=myshape; 2500=clearscreen; 3000=myshape; 3500=clearscreen; ...] ... </trial> In the above, the shape would appear and disappear in 500ms intervals. Hi Dave,
Thanks for your reply. Because I have a number of shapes flash sequentially on screen, is there a more convenient way to set up the display instead of writing hundred rows of code?
|
By Dave - 11/1/2017
+x+x+xHi there, I want to create a shape that appear and disappear continuously for a certain period. What types of attribute would you recommend to use? Thanks! If you want this to happen during a single <trial>, define a <shape> as needed and then display and erase it as needed via the <trial>'s /stimulustimes: <trial sometrial> / stimulustimes = [0=myshape; 500=clearscreen; 1000=myshape; 1500=clearscreen; 2000=myshape; 2500=clearscreen; 3000=myshape; 3500=clearscreen; ...] ... </trial> In the above, the shape would appear and disappear in 500ms intervals. Hi Dave, Thanks for your reply. Because I have a number of shapes flash sequentially on screen, is there a more convenient way to set up the display instead of writing hundred rows of code? That depends on what exactly you want to achieve, e.g. the suitable approach will vary depending on what responses (if any) you wish to collect during or after the "flashing" phase and so forth. Since you have not elaborated on any of that, I cannot give you a concrete recommendation. One alternative (whether suitable in your case or not, I cannot tell you) is to have a <trial> display the given shape and erase it a single time and then run that trial X times in a row.
<values> / flashcount = 0 / nflashes = 5 </values>
<block myblock> / trials = [1-2 = start] </block>
<trial start> / ontrialbegin = [ values.flashcount = 0; ] / branch = [ trial.shapetrial ] / validresponse = (0) / trialduration = 0 </trial>
<trial shapetrial> / ontrialbegin = [values.flashcount +=1] / stimulustimes = [0=shapestim; 500=clearscreen] / validresponse = (0) / trialduration = 1000 / branch = [ if (values.flashcount < values.nflashes) trial.shapetrial else trial.end ] </trial>
<trial end> / stimulusframes = [1=endmsg] / validresponse = (57) </trial>
<text shapestim> / items = shapeitems / select = sequence / erase = false </text>
<item shapeitems> / 1 = "shape 1" / 2 = "shape 2" / 3 = "shape 3" / 4 = "shape 4" / 5 = "shape 5" </item>
<text endmsg> / items = ("This ends the current round of flashing.") </text>
|
|