loop display


Author
Message
YL
YL
Respected Member (494 reputation)Respected Member (494 reputation)Respected Member (494 reputation)Respected Member (494 reputation)Respected Member (494 reputation)Respected Member (494 reputation)Respected Member (494 reputation)Respected Member (494 reputation)Respected Member (494 reputation)
Group: Forum Members
Posts: 6, Visits: 49
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!
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 105K
YL - Wednesday, November 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!

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.

YL
YL
Respected Member (494 reputation)Respected Member (494 reputation)Respected Member (494 reputation)Respected Member (494 reputation)Respected Member (494 reputation)Respected Member (494 reputation)Respected Member (494 reputation)Respected Member (494 reputation)Respected Member (494 reputation)
Group: Forum Members
Posts: 6, Visits: 49
Dave - Wednesday, November 1, 2017
YL - Wednesday, November 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!

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?
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 105K
YL - Wednesday, November 1, 2017
Dave - Wednesday, November 1, 2017
YL - Wednesday, November 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!

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>


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search