Non-random targets for the xml stimulation scenario player

Concerning processing components: filters, file load/save, visualizations, communication ...
Post Reply
ddvlamin
Posts: 160
Joined: Thu Aug 13, 2009 8:39 am
Location: Ghent University
Contact:

Non-random targets for the xml stimulation scenario player

Post by ddvlamin »

Sorry for all the different questions, I'm still looking into the others.

However, for the P300 setup I wanted to fix the target word, that users need to spell in the test phase. At this moment these target characters are selected randomly. Therefore, I tried to change the scenario file "p300-speller-stimulations-targets.xml" for the xml stimulation scenario player by throwing away the loop and the probability switches. But there seems to be a problem now. The first character is displayed correctly, but starting from the second one, all following characters are also displayed. The algorithm does not wait anymore until the next TrialStop event. It seems as if the TrialStop is activated for the first time it stays actived.

My code looks like this:

Code: Select all

<Node class="ActionWaitEvent">
				<Property class="Event">
					<Parameter class="IVariable">TrialRestStart</Parameter>
				</Property>
			</Node>
			<Node class="ActionWaitTime">
				<Property class="Duration">
					<Parameter class="IVariable">PreTrialWait</Parameter>
				</Property>
			</Node>
			<Node class="ActionSendEvent">
				<Property class="Event">
					<Parameter class="IVariable">TargetRow2</Parameter>
				</Property>
			</Node>
			<Node class="ActionSendEvent">
				<Property class="Event">
					<Parameter class="IVariable">TargetColumn1</Parameter>
				</Property>
			</Node>
			<Node class="ActionWaitEvent">
				<Property class="Event">
					<Parameter class="IVariable">TrialStop</Parameter>
				</Property>
			</Node>




			<Node class="ActionWaitEvent">
				<Property class="Event">
					<Parameter class="IVariable">TrialRestStart</Parameter>
				</Property>
			</Node>
			<Node class="ActionWaitTime">
				<Property class="Duration">
					<Parameter class="IVariable">PreTrialWait</Parameter>
				</Property>
			</Node>
			<Node class="ActionSendEvent">
				<Property class="Event">
					<Parameter class="IVariable">TargetRow4</Parameter>
				</Property>
			</Node>
			<Node class="ActionSendEvent">
				<Property class="Event">
					<Parameter class="IVariable">TargetColumn3</Parameter>
				</Property>
			</Node>
			<Node class="ActionWaitEvent">
				<Property class="Event">
					<Parameter class="IVariable">TrialStop</Parameter>
				</Property>
			</Node>



			<Node class="ActionWaitEvent">
				<Property class="Event">
					<Parameter class="IVariable">TrialRestStart</Parameter>
				</Property>
			</Node>
			<Node class="ActionWaitTime">
				<Property class="Duration">
					<Parameter class="IVariable">PreTrialWait</Parameter>
				</Property>
			</Node>
			<Node class="ActionSendEvent">
				<Property class="Event">
					<Parameter class="IVariable">TargetRow2</Parameter>
				</Property>
			</Node>
			<Node class="ActionSendEvent">
				<Property class="Event">
					<Parameter class="IVariable">TargetColumn3</Parameter>
				</Property>
			</Node>
			<Node class="ActionWaitEvent">
				<Property class="Event">
					<Parameter class="IVariable">TrialStop</Parameter>
				</Property>
			</Node>
I also attached the complete file.
Attachments
p300-speller-targetword-GUISLAIN.xml
(3.73 KiB) Downloaded 257 times

yrenard
Site Admin
Posts: 645
Joined: Fri Sep 01, 2006 3:39 pm
Contact:

Re: Non-random targets for the xml stimulation scenario player

Post by yrenard »

Dear ddvlamin,

I got such problem in the past with the XML stimulation player box. I found a dirty workaround at that time but I can't remember what... I'll give a look at your scenario and keep you informed. However, I'm currently working on a LUA stimulation box. LUA is a scripting language. It's far more easy to write such stimulation scenario in LUA that it is with this automaton XML file ;)

Stay tuned.
Yann

yrenard
Site Admin
Posts: 645
Joined: Fri Sep 01, 2006 3:39 pm
Contact:

Re: Non-random targets for the xml stimulation scenario player

Post by yrenard »

Dear ddvlamin,

the automaton code is bugged and hard to solve for what you want to achieve.

I see three solutions :
  • - you could ignore the bugged ActionWaitEvent node and replace it with an ActionWaitTime node (just keep the first one). You can easily compute the duration to wait based on the values you entered in the P300 stimulator. This is fast to do but you will have more work to keep it synced with the P300 stimulator when you'll later change its timings.
    - you wait a couple of days for the LUA box to be available... scripting with LUA is very fast forward but I haven't finished this box yet.
    - you write your own stimulator box in C++ (probably not a reasonable choice given that I'm working on the LUA one right now).
Are you working on the packaged release or on the SVN repository ?

Keep me informed about your choice.

Yann

ddvlamin
Posts: 160
Joined: Thu Aug 13, 2009 8:39 am
Location: Ghent University
Contact:

Re: Non-random targets for the xml stimulation scenario player

Post by ddvlamin »

Dear Yann,

For demo purposes I can try to use the time event as I fix the settings of the P300 that work best for me.

Once you finished the LUA stimulation box, I will off course use that one :). It's not that I really need it right now because I can use a free speller and write the target characters on a blackboard so that people see that it is working. I just think OpenVibe can benefit from a programmable target word as it is done in other projects too.

The third option... tempting, but no :), I don't like reinventing the wheel by doing things that are already done or are in the progress of being done, certainly not if it's done better than I would do it.

I'm working on the SVN repository.

best regards,
Dieter

yrenard
Site Admin
Posts: 645
Joined: Fri Sep 01, 2006 3:39 pm
Contact:

Re: Non-random targets for the xml stimulation scenario player

Post by yrenard »

Dear ddvlamin,
ddvlamin wrote:I can try to use the time event as I fix the settings of the P300 that work best for me.
Right !
ddvlamin wrote:Once you finished the Lua stimulation box, I will off course use that one :). It's not that I really need it right now because I can use a free speller and write the target characters on a blackboard so that people see that it is working. I just think OpenVibe can benefit from a programmable target word as it is done in other projects too.
Yes you are right, it will be very easy to do with Lua !
ddvlamin wrote:I'm working on the SVN repository.
Nice, you'll have the Lua box soon.
Yann

Post Reply