Replacing a text item multiple times within a trial


Replacing a text item multiple times within a trial

Author
Message
pops
pops
Partner Member
Partner Member (861 reputation)Partner Member (861 reputation)Partner Member (861 reputation)Partner Member (861 reputation)Partner Member (861 reputation)Partner Member (861 reputation)Partner Member (861 reputation)Partner Member (861 reputation)Partner Member (861 reputation)

Group: Forum Members
Posts: 43, Visits: 27
Hi there,
I'm trying to display a counter that starts at 1 and goes up to (max) 60 at approximately 100 ms per number. I can't use a video because I need to end the trial when the counter gets up to a certain number (different per participant). Using the clock (stopwatch) element will take too long (will only advance in increments of 1 second).

I am trying to do this using one text element (text.LevelCountUp) with multiple items (/items = ("1", "2") etc .
Then, during the trial, I use the insertstimulustime command to try and present the numbers sequentially at a rate of 100 ms. Here is a short version.

<trial CountUpPoints>
/ ontrialbegin =[trial.CountUpPoints.clearstimulusframes();
trial.CountUpPoints.insertstimulustime(picture.LevelUp, 0);
trial.CountUpPoints.insertstimulustime(text.LevelCountUp.item(1),100);
trial.CountUpPoints.insertstimulustime(text.LevelCountUp.item(2),200);
trial.CountUpPoints.insertstimulustime(text.LevelCountUp.item(3),300);
trial.CountUpPoints.insertstimulustime(text.LevelCountUp.item(4),400);
trial.CountUpPoints.insertstimulustime(text.LevelCountUp.item(5),500);
trial.CountUpPoints.insertstimulustime(text.LevelCountUp.item(6),600);
trial.CountUpPoints.insertstimulustime(text.LevelCountUp.item(7),700);
trial.CountUpPoints.insertstimulustime(text.LevelCountUp.item(8),800);
trial.CountUpPoints.insertstimulustime(text.LevelCountUp.item(9),900);]
/timeout = 1000
</trial>

Needless to say it is not working. Is this because I can only present one unique item from a text element on each trial? Should I make 60 unique text elements and then set their onsettimes within the trial?
I realise that I could run 60 trials selecting the next text item at the beginning of each trial (which would prob be more efficient coding wise) but then this means that I am creating a unique block, which makes integration at the <expt> level more complicated.
Any thoughts appreciated on the best way forward.

Dave
Dave
Supreme Being
Supreme Being (618K reputation)Supreme Being (618K reputation)Supreme Being (618K reputation)Supreme Being (618K reputation)Supreme Being (618K reputation)Supreme Being (618K reputation)Supreme Being (618K reputation)Supreme Being (618K reputation)Supreme Being (618K reputation)

Group: Administrators
Posts: 9.6K, Visits: 43K
pops - 5/27/2019
Hi there,
I'm trying to display a counter that starts at 1 and goes up to (max) 60 at approximately 100 ms per number. I can't use a video because I need to end the trial when the counter gets up to a certain number (different per participant). Using the clock (stopwatch) element will take too long (will only advance in increments of 1 second).

I am trying to do this using one text element (text.LevelCountUp) with multiple items (/items = ("1", "2") etc .
Then, during the trial, I use the insertstimulustime command to try and present the numbers sequentially at a rate of 100 ms. Here is a short version.

<trial CountUpPoints>
/ ontrialbegin =[trial.CountUpPoints.clearstimulusframes();
trial.CountUpPoints.insertstimulustime(picture.LevelUp, 0);
trial.CountUpPoints.insertstimulustime(text.LevelCountUp.item(1),100);
trial.CountUpPoints.insertstimulustime(text.LevelCountUp.item(2),200);
trial.CountUpPoints.insertstimulustime(text.LevelCountUp.item(3),300);
trial.CountUpPoints.insertstimulustime(text.LevelCountUp.item(4),400);
trial.CountUpPoints.insertstimulustime(text.LevelCountUp.item(5),500);
trial.CountUpPoints.insertstimulustime(text.LevelCountUp.item(6),600);
trial.CountUpPoints.insertstimulustime(text.LevelCountUp.item(7),700);
trial.CountUpPoints.insertstimulustime(text.LevelCountUp.item(8),800);
trial.CountUpPoints.insertstimulustime(text.LevelCountUp.item(9),900);]
/timeout = 1000
</trial>

Needless to say it is not working. Is this because I can only present one unique item from a text element on each trial? Should I make 60 unique text elements and then set their onsettimes within the trial?
I realise that I could run 60 trials selecting the next text item at the beginning of each trial (which would prob be more efficient coding wise) but then this means that I am creating a unique block, which makes integration at the <expt> level more complicated.
Any thoughts appreciated on the best way forward.

> Needless to say it is not working. Is this because I can only present one unique item from a text element on each trial?

Yes, that's exactly right.

> Should I make 60 unique text elements and then set their onsettimes within the trial?

That would be the way to go.



pops
pops
Partner Member
Partner Member (861 reputation)Partner Member (861 reputation)Partner Member (861 reputation)Partner Member (861 reputation)Partner Member (861 reputation)Partner Member (861 reputation)Partner Member (861 reputation)Partner Member (861 reputation)Partner Member (861 reputation)

Group: Forum Members
Posts: 43, Visits: 27

I realised that I could just make one looping trial with the branch element at the end to repeat it so integration at the <block> and <expt> levels is actually very simple. So I now have one list of items, one text element and one trial - much more sensible! Thanks for the fast response.

GO


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....






Millisecond Forums


Search