By peter - 1/23/2020
Hi, about 6 months ago we attempted to get a Ouija board style study up and running but simply could not get a workable script. We decided to simplify the study but have run in to the same stumbling block as before.
WHAT WE HAVE WORKING SO FAR The script CURRENTLY displays a black screen with a viewing window in the centre. As the participant moves the mouse a coloured board beneath the black screen moves along with the movement of the mouse. Part of that coloured board can be seen through the viewing window. Participants move the coloured board around, eventually manoeuvring one of the coloured circles into the viewing window. WHAT WE HAVE BEEN TRYING TO ADD Moving one of the coloured circles into the viewing window needs to prompt an audio tone that is specific to the coloured circle in the viewing window. The current position of the mouse should also be recorded. This activity should be repeated for a set time.
The problem we are having is that the looping nature of the trial (necessary for syncing the movement of the coloured board to the mouse) seems to make adding additional elements or branching impossible. Any help would be greatly appreciated.
<defaults> / minimumversion = "4.0.0.0" / inputdevice = mouseover / fontstyle = ("Arial", 3%, false, false, false, false, 5, 0) / canvasaspectratio = (4,3) </defaults>
************************************************************************************************************* *************************************************************************************************************
<values> / x = -1 / y = -1 </values>
<data> /file = "Data.iqdat" / columns = [mouse.x mouse.y] /separatefiles = true </data>
*********************************************************************************************************** ***********************************************************************************************************
<expt main> / blocks = [1=search] </expt>
<block search> / trials = [1 = search] / timeout= (8000) </block>
<trial search> / stimulusframes = [1=clearscreen, bord, viewhole] / ontrialbegin = [picture.bord.hposition = 1px * mouse.x;picture.bord.vposition = 1px * mouse.y;] / inputdevice = mouse / validresponse = (mousemove) / branch = [trial.search] / recorddata = false </trial>
<trial win> / ontrialbegin = [trial.win.insertstimulustime(sound.Win, 100)] / recorddata = false / timeout= (1000) </trial> <sound Win> /items = win /playthrough = false /select = noreplace /resetinterval = 0 </sound>
<item win> /1 = "win.wav" </item>
<trial lose> / ontrialbegin = [trial.lose.insertstimulustime(sound.lose, 100)] / recorddata = false / timeout= (1000) </trial>
<sound lose> /items = lose /playthrough = false /select = noreplace /volume = -999 /resetinterval = 0 </sound>
<item lose> /1 = "lose.wav" </item>
<picture viewhole> / items = ("Hole.png") / erase = false / size=(3000, 3000) </picture>
<picture bord> / items = ("Board.jpg") / erase = false / size=(2200, 2200) </picture>
|
By Dave - 1/23/2020
+xHi, about 6 months ago we attempted to get a Ouija board style study up and running but simply could not get a workable script. We decided to simplify the study but have run in to the same stumbling block as before. WHAT WE HAVE WORKING SO FAR The script CURRENTLY displays a black screen with a viewing window in the centre. As the participant moves the mouse a coloured board beneath the black screen moves along with the movement of the mouse. Part of that coloured board can be seen through the viewing window. Participants move the coloured board around, eventually manoeuvring one of the coloured circles into the viewing window. WHAT WE HAVE BEEN TRYING TO ADD Moving one of the coloured circles into the viewing window needs to prompt an audio tone that is specific to the coloured circle in the viewing window. The current position of the mouse should also be recorded. This activity should be repeated for a set time. The problem we are having is that the looping nature of the trial (necessary for syncing the movement of the coloured board to the mouse) seems to make adding additional elements or branching impossible. Any help would be greatly appreciated. <defaults> / minimumversion = "4.0.0.0" / inputdevice = mouseover / fontstyle = ("Arial", 3%, false, false, false, false, 5, 0) / canvasaspectratio = (4,3) </defaults> ************************************************************************************************************* ************************************************************************************************************* <values> / x = -1 / y = -1 </values> <data> /file = "Data.iqdat" / columns = [mouse.x mouse.y] /separatefiles = true </data> *********************************************************************************************************** *********************************************************************************************************** <expt main> / blocks = [1=search] </expt> <block search> / trials = [1 = search] / timeout= (8000) </block> <trial search> / stimulusframes = [1=clearscreen, bord, viewhole] / ontrialbegin = [picture.bord.hposition = 1px * mouse.x;picture.bord.vposition = 1px * mouse.y;] / inputdevice = mouse / validresponse = (mousemove) / branch = [trial.search] / recorddata = false </trial> <trial win> / ontrialbegin = [trial.win.insertstimulustime(sound.Win, 100)] / recorddata = false / timeout= (1000) </trial> <sound Win> /items = win /playthrough = false /select = noreplace /resetinterval = 0 </sound> <item win> /1 = "win.wav" </item> <trial lose> / ontrialbegin = [trial.lose.insertstimulustime(sound.lose, 100)] / recorddata = false / timeout= (1000) </trial> <sound lose> /items = lose /playthrough = false /select = noreplace /volume = -999 /resetinterval = 0 </sound> <item lose> /1 = "lose.wav" </item> <picture viewhole> / items = ("Hole.png") / erase = false / size=(3000, 3000) </picture> <picture bord> / items = ("Board.jpg") / erase = false / size=(2200, 2200) </picture> > The problem we are having is that the looping nature of the trial (necessary for syncing the movement of the coloured board to the mouse) seems to make adding additional elements or branching impossible.
That's not quite true. What you'll have to do is /branch to a trial playing back your win or lose sound if some condition is met. I.e. if the board has reached a position where a given dot is in the area of the view hole in the center of the screen. Only otherwise /branch to trial.search itself, i.e. "loop" the trial.
In a nutshell:
<trial search> / stimulusframes = [1=clearscreen, bord, viewhole] / ontrialbegin = [picture.bord.hposition = 1px * mouse.x;picture.bord.vposition = 1px * mouse.y;] / inputdevice = mouse / validresponse = (mousemove) / branch = [if (picture.bord.hposition == ?? && picture.bord.vposition == ??) { trial.winsound; } else if (picture.bord.hposition == ?? && picture.bord.vposition == ??) { trial.losesound; } else { trial.search; } ] / recorddata = false </trial>
Conceptually, the Inquisit 4 version of the Tower of London script does very similar things, so that would be a script worth studying in-depth:
https://www.millisecond.com/download/library/v4/toweroflondon/toweroflondon.iqzip
Also conceptually related, here's a very simple example showing how to detect whether the mouse is in a given area / on top of one of several on-screen objects:
https://www.millisecond.com/forums/FindPost13217.aspx
|
By peter - 1/25/2020
+x+xHi, about 6 months ago we attempted to get a Ouija board style study up and running but simply could not get a workable script. We decided to simplify the study but have run in to the same stumbling block as before. WHAT WE HAVE WORKING SO FAR The script CURRENTLY displays a black screen with a viewing window in the centre. As the participant moves the mouse a coloured board beneath the black screen moves along with the movement of the mouse. Part of that coloured board can be seen through the viewing window. Participants move the coloured board around, eventually manoeuvring one of the coloured circles into the viewing window. WHAT WE HAVE BEEN TRYING TO ADD Moving one of the coloured circles into the viewing window needs to prompt an audio tone that is specific to the coloured circle in the viewing window. The current position of the mouse should also be recorded. This activity should be repeated for a set time. The problem we are having is that the looping nature of the trial (necessary for syncing the movement of the coloured board to the mouse) seems to make adding additional elements or branching impossible. Any help would be greatly appreciated. <defaults> / minimumversion = "4.0.0.0" / inputdevice = mouseover / fontstyle = ("Arial", 3%, false, false, false, false, 5, 0) / canvasaspectratio = (4,3) </defaults> ************************************************************************************************************* ************************************************************************************************************* <values> / x = -1 / y = -1 </values> <data> /file = "Data.iqdat" / columns = [mouse.x mouse.y] /separatefiles = true </data> *********************************************************************************************************** *********************************************************************************************************** <expt main> / blocks = [1=search] </expt> <block search> / trials = [1 = search] / timeout= (8000) </block> <trial search> / stimulusframes = [1=clearscreen, bord, viewhole] / ontrialbegin = [picture.bord.hposition = 1px * mouse.x;picture.bord.vposition = 1px * mouse.y;] / inputdevice = mouse / validresponse = (mousemove) / branch = [trial.search] / recorddata = false </trial> <trial win> / ontrialbegin = [trial.win.insertstimulustime(sound.Win, 100)] / recorddata = false / timeout= (1000) </trial> <sound Win> /items = win /playthrough = false /select = noreplace /resetinterval = 0 </sound> <item win> /1 = "win.wav" </item> <trial lose> / ontrialbegin = [trial.lose.insertstimulustime(sound.lose, 100)] / recorddata = false / timeout= (1000) </trial> <sound lose> /items = lose /playthrough = false /select = noreplace /volume = -999 /resetinterval = 0 </sound> <item lose> /1 = "lose.wav" </item> <picture viewhole> / items = ("Hole.png") / erase = false / size=(3000, 3000) </picture> <picture bord> / items = ("Board.jpg") / erase = false / size=(2200, 2200) </picture> > The problem we are having is that the looping nature of the trial (necessary for syncing the movement of the coloured board to the mouse) seems to make adding additional elements or branching impossible. That's not quite true. What you'll have to do is /branch to a trial playing back your win or lose sound if some condition is met. I.e. if the board has reached a position where a given dot is in the area of the view hole in the center of the screen. Only otherwise /branch to trial.search itself, i.e. "loop" the trial. In a nutshell: <trial search> / stimulusframes = [1=clearscreen, bord, viewhole] / ontrialbegin = [picture.bord.hposition = 1px * mouse.x;picture.bord.vposition = 1px * mouse.y;] / inputdevice = mouse / validresponse = (mousemove) / branch = [if (picture.bord.hposition == ?? && picture.bord.vposition == ??) { trial.winsound; } else if (picture.bord.hposition == ?? && picture.bord.vposition == ??) { trial.losesound; } else { trial.search; } ] / recorddata = false </trial> Conceptually, the Inquisit 4 version of the Tower of London script does very similar things, so that would be a script worth studying in-depth: https://www.millisecond.com/download/library/v4/toweroflondon/toweroflondon.iqzipAlso conceptually related, here's a very simple example showing how to detect whether the mouse is in a given area / on top of one of several on-screen objects: https://www.millisecond.com/forums/FindPost13217.aspx Many Thanks for the suggestion. I will give it a try. Peter
|
By peter - 1/30/2020
+x+x+xHi, about 6 months ago we attempted to get a Ouija board style study up and running but simply could not get a workable script. We decided to simplify the study but have run in to the same stumbling block as before. WHAT WE HAVE WORKING SO FAR The script CURRENTLY displays a black screen with a viewing window in the centre. As the participant moves the mouse a coloured board beneath the black screen moves along with the movement of the mouse. Part of that coloured board can be seen through the viewing window. Participants move the coloured board around, eventually manoeuvring one of the coloured circles into the viewing window. WHAT WE HAVE BEEN TRYING TO ADD Moving one of the coloured circles into the viewing window needs to prompt an audio tone that is specific to the coloured circle in the viewing window. The current position of the mouse should also be recorded. This activity should be repeated for a set time. The problem we are having is that the looping nature of the trial (necessary for syncing the movement of the coloured board to the mouse) seems to make adding additional elements or branching impossible. Any help would be greatly appreciated. <defaults> / minimumversion = "4.0.0.0" / inputdevice = mouseover / fontstyle = ("Arial", 3%, false, false, false, false, 5, 0) / canvasaspectratio = (4,3) </defaults> ************************************************************************************************************* ************************************************************************************************************* <values> / x = -1 / y = -1 </values> <data> /file = "Data.iqdat" / columns = [mouse.x mouse.y] /separatefiles = true </data> *********************************************************************************************************** *********************************************************************************************************** <expt main> / blocks = [1=search] </expt> <block search> / trials = [1 = search] / timeout= (8000) </block> <trial search> / stimulusframes = [1=clearscreen, bord, viewhole] / ontrialbegin = [picture.bord.hposition = 1px * mouse.x;picture.bord.vposition = 1px * mouse.y;] / inputdevice = mouse / validresponse = (mousemove) / branch = [trial.search] / recorddata = false </trial> <trial win> / ontrialbegin = [trial.win.insertstimulustime(sound.Win, 100)] / recorddata = false / timeout= (1000) </trial> <sound Win> /items = win /playthrough = false /select = noreplace /resetinterval = 0 </sound> <item win> /1 = "win.wav" </item> <trial lose> / ontrialbegin = [trial.lose.insertstimulustime(sound.lose, 100)] / recorddata = false / timeout= (1000) </trial> <sound lose> /items = lose /playthrough = false /select = noreplace /volume = -999 /resetinterval = 0 </sound> <item lose> /1 = "lose.wav" </item> <picture viewhole> / items = ("Hole.png") / erase = false / size=(3000, 3000) </picture> <picture bord> / items = ("Board.jpg") / erase = false / size=(2200, 2200) </picture> > The problem we are having is that the looping nature of the trial (necessary for syncing the movement of the coloured board to the mouse) seems to make adding additional elements or branching impossible. That's not quite true. What you'll have to do is /branch to a trial playing back your win or lose sound if some condition is met. I.e. if the board has reached a position where a given dot is in the area of the view hole in the center of the screen. Only otherwise /branch to trial.search itself, i.e. "loop" the trial. In a nutshell: <trial search> / stimulusframes = [1=clearscreen, bord, viewhole] / ontrialbegin = [picture.bord.hposition = 1px * mouse.x;picture.bord.vposition = 1px * mouse.y;] / inputdevice = mouse / validresponse = (mousemove) / branch = [if (picture.bord.hposition == ?? && picture.bord.vposition == ??) { trial.winsound; } else if (picture.bord.hposition == ?? && picture.bord.vposition == ??) { trial.losesound; } else { trial.search; } ] / recorddata = false </trial> Conceptually, the Inquisit 4 version of the Tower of London script does very similar things, so that would be a script worth studying in-depth: https://www.millisecond.com/download/library/v4/toweroflondon/toweroflondon.iqzipAlso conceptually related, here's a very simple example showing how to detect whether the mouse is in a given area / on top of one of several on-screen objects: https://www.millisecond.com/forums/FindPost13217.aspx Many Thanks for the suggestion. I will give it a try. Peter This solution seems to be working thus far, many thanks to you. Can i ask if there is a way to allow sound stimuli to continue playing even though the next trial has started. I basically need to keep my mouse movement permanently locked to the movement of my Ouija board yet play sound clips, without halting the mouse/board movement. Any help would be gratefully received
|
By Dave - 1/30/2020
+x+x+x+xHi, about 6 months ago we attempted to get a Ouija board style study up and running but simply could not get a workable script. We decided to simplify the study but have run in to the same stumbling block as before. WHAT WE HAVE WORKING SO FAR The script CURRENTLY displays a black screen with a viewing window in the centre. As the participant moves the mouse a coloured board beneath the black screen moves along with the movement of the mouse. Part of that coloured board can be seen through the viewing window. Participants move the coloured board around, eventually manoeuvring one of the coloured circles into the viewing window. WHAT WE HAVE BEEN TRYING TO ADD Moving one of the coloured circles into the viewing window needs to prompt an audio tone that is specific to the coloured circle in the viewing window. The current position of the mouse should also be recorded. This activity should be repeated for a set time. The problem we are having is that the looping nature of the trial (necessary for syncing the movement of the coloured board to the mouse) seems to make adding additional elements or branching impossible. Any help would be greatly appreciated. <defaults> / minimumversion = "4.0.0.0" / inputdevice = mouseover / fontstyle = ("Arial", 3%, false, false, false, false, 5, 0) / canvasaspectratio = (4,3) </defaults> ************************************************************************************************************* ************************************************************************************************************* <values> / x = -1 / y = -1 </values> <data> /file = "Data.iqdat" / columns = [mouse.x mouse.y] /separatefiles = true </data> *********************************************************************************************************** *********************************************************************************************************** <expt main> / blocks = [1=search] </expt> <block search> / trials = [1 = search] / timeout= (8000) </block> <trial search> / stimulusframes = [1=clearscreen, bord, viewhole] / ontrialbegin = [picture.bord.hposition = 1px * mouse.x;picture.bord.vposition = 1px * mouse.y;] / inputdevice = mouse / validresponse = (mousemove) / branch = [trial.search] / recorddata = false </trial> <trial win> / ontrialbegin = [trial.win.insertstimulustime(sound.Win, 100)] / recorddata = false / timeout= (1000) </trial> <sound Win> /items = win /playthrough = false /select = noreplace /resetinterval = 0 </sound> <item win> /1 = "win.wav" </item> <trial lose> / ontrialbegin = [trial.lose.insertstimulustime(sound.lose, 100)] / recorddata = false / timeout= (1000) </trial> <sound lose> /items = lose /playthrough = false /select = noreplace /volume = -999 /resetinterval = 0 </sound> <item lose> /1 = "lose.wav" </item> <picture viewhole> / items = ("Hole.png") / erase = false / size=(3000, 3000) </picture> <picture bord> / items = ("Board.jpg") / erase = false / size=(2200, 2200) </picture> > The problem we are having is that the looping nature of the trial (necessary for syncing the movement of the coloured board to the mouse) seems to make adding additional elements or branching impossible. That's not quite true. What you'll have to do is /branch to a trial playing back your win or lose sound if some condition is met. I.e. if the board has reached a position where a given dot is in the area of the view hole in the center of the screen. Only otherwise /branch to trial.search itself, i.e. "loop" the trial. In a nutshell: <trial search> / stimulusframes = [1=clearscreen, bord, viewhole] / ontrialbegin = [picture.bord.hposition = 1px * mouse.x;picture.bord.vposition = 1px * mouse.y;] / inputdevice = mouse / validresponse = (mousemove) / branch = [if (picture.bord.hposition == ?? && picture.bord.vposition == ??) { trial.winsound; } else if (picture.bord.hposition == ?? && picture.bord.vposition == ??) { trial.losesound; } else { trial.search; } ] / recorddata = false </trial> Conceptually, the Inquisit 4 version of the Tower of London script does very similar things, so that would be a script worth studying in-depth: https://www.millisecond.com/download/library/v4/toweroflondon/toweroflondon.iqzipAlso conceptually related, here's a very simple example showing how to detect whether the mouse is in a given area / on top of one of several on-screen objects: https://www.millisecond.com/forums/FindPost13217.aspx Many Thanks for the suggestion. I will give it a try. Peter This solution seems to be working thus far, many thanks to you. Can i ask if there is a way to allow sound stimuli to continue playing even though the next trial has started. I basically need to keep my mouse movement permanently locked to the movement of my Ouija board yet play sound clips, without halting the mouse/board movement. Any help would be gratefully received > Can i ask if there is a way to allow sound stimuli to continue playing even though the next trial has started.
The only way to do this would be to shift some of the /branch logic up to the <block> level. I.e. when a "win" condition is met, /stop in <block search> and /branch to <block win> playing back the "win" sound stimulus per its /bgstim. Same for the "lose" condition(s). You can have these win a lose blocks /timeout such that they're long enough to allow for full playback of the sounds, then /branch back to the silent search block. The overall /timeout across all blocks would have to be shifted to the <expt> level.
|
By peter - 1/31/2020
+x+x+x+x+xHi, about 6 months ago we attempted to get a Ouija board style study up and running but simply could not get a workable script. We decided to simplify the study but have run in to the same stumbling block as before. WHAT WE HAVE WORKING SO FAR The script CURRENTLY displays a black screen with a viewing window in the centre. As the participant moves the mouse a coloured board beneath the black screen moves along with the movement of the mouse. Part of that coloured board can be seen through the viewing window. Participants move the coloured board around, eventually manoeuvring one of the coloured circles into the viewing window. WHAT WE HAVE BEEN TRYING TO ADD Moving one of the coloured circles into the viewing window needs to prompt an audio tone that is specific to the coloured circle in the viewing window. The current position of the mouse should also be recorded. This activity should be repeated for a set time. The problem we are having is that the looping nature of the trial (necessary for syncing the movement of the coloured board to the mouse) seems to make adding additional elements or branching impossible. Any help would be greatly appreciated. <defaults> / minimumversion = "4.0.0.0" / inputdevice = mouseover / fontstyle = ("Arial", 3%, false, false, false, false, 5, 0) / canvasaspectratio = (4,3) </defaults> ************************************************************************************************************* ************************************************************************************************************* <values> / x = -1 / y = -1 </values> <data> /file = "Data.iqdat" / columns = [mouse.x mouse.y] /separatefiles = true </data> *********************************************************************************************************** *********************************************************************************************************** <expt main> / blocks = [1=search] </expt> <block search> / trials = [1 = search] / timeout= (8000) </block> <trial search> / stimulusframes = [1=clearscreen, bord, viewhole] / ontrialbegin = [picture.bord.hposition = 1px * mouse.x;picture.bord.vposition = 1px * mouse.y;] / inputdevice = mouse / validresponse = (mousemove) / branch = [trial.search] / recorddata = false </trial> <trial win> / ontrialbegin = [trial.win.insertstimulustime(sound.Win, 100)] / recorddata = false / timeout= (1000) </trial> <sound Win> /items = win /playthrough = false /select = noreplace /resetinterval = 0 </sound> <item win> /1 = "win.wav" </item> <trial lose> / ontrialbegin = [trial.lose.insertstimulustime(sound.lose, 100)] / recorddata = false / timeout= (1000) </trial> <sound lose> /items = lose /playthrough = false /select = noreplace /volume = -999 /resetinterval = 0 </sound> <item lose> /1 = "lose.wav" </item> <picture viewhole> / items = ("Hole.png") / erase = false / size=(3000, 3000) </picture> <picture bord> / items = ("Board.jpg") / erase = false / size=(2200, 2200) </picture> > The problem we are having is that the looping nature of the trial (necessary for syncing the movement of the coloured board to the mouse) seems to make adding additional elements or branching impossible. That's not quite true. What you'll have to do is /branch to a trial playing back your win or lose sound if some condition is met. I.e. if the board has reached a position where a given dot is in the area of the view hole in the center of the screen. Only otherwise /branch to trial.search itself, i.e. "loop" the trial. In a nutshell: <trial search> / stimulusframes = [1=clearscreen, bord, viewhole] / ontrialbegin = [picture.bord.hposition = 1px * mouse.x;picture.bord.vposition = 1px * mouse.y;] / inputdevice = mouse / validresponse = (mousemove) / branch = [if (picture.bord.hposition == ?? && picture.bord.vposition == ??) { trial.winsound; } else if (picture.bord.hposition == ?? && picture.bord.vposition == ??) { trial.losesound; } else { trial.search; } ] / recorddata = false </trial> Conceptually, the Inquisit 4 version of the Tower of London script does very similar things, so that would be a script worth studying in-depth: https://www.millisecond.com/download/library/v4/toweroflondon/toweroflondon.iqzipAlso conceptually related, here's a very simple example showing how to detect whether the mouse is in a given area / on top of one of several on-screen objects: https://www.millisecond.com/forums/FindPost13217.aspx Many Thanks for the suggestion. I will give it a try. Peter This solution seems to be working thus far, many thanks to you. Can i ask if there is a way to allow sound stimuli to continue playing even though the next trial has started. I basically need to keep my mouse movement permanently locked to the movement of my Ouija board yet play sound clips, without halting the mouse/board movement. Any help would be gratefully received > Can i ask if there is a way to allow sound stimuli to continue playing even though the next trial has started. The only way to do this would be to shift some of the /branch logic up to the <block> level. I.e. when a "win" condition is met, /stop in <block search> and /branch to <block win> playing back the "win" sound stimulus per its /bgstim. Same for the "lose" condition(s). You can have these win a lose blocks /timeout such that they're long enough to allow for full playback of the sounds, then /branch back to the silent search block. The overall /timeout across all blocks would have to be shifted to the <expt> level. , So this will this let the sound continue playing over the next trial ? excellent thanks!
|
By Dave - 1/31/2020
+x+x+x+x+x+xHi, about 6 months ago we attempted to get a Ouija board style study up and running but simply could not get a workable script. We decided to simplify the study but have run in to the same stumbling block as before. WHAT WE HAVE WORKING SO FAR The script CURRENTLY displays a black screen with a viewing window in the centre. As the participant moves the mouse a coloured board beneath the black screen moves along with the movement of the mouse. Part of that coloured board can be seen through the viewing window. Participants move the coloured board around, eventually manoeuvring one of the coloured circles into the viewing window. WHAT WE HAVE BEEN TRYING TO ADD Moving one of the coloured circles into the viewing window needs to prompt an audio tone that is specific to the coloured circle in the viewing window. The current position of the mouse should also be recorded. This activity should be repeated for a set time. The problem we are having is that the looping nature of the trial (necessary for syncing the movement of the coloured board to the mouse) seems to make adding additional elements or branching impossible. Any help would be greatly appreciated. <defaults> / minimumversion = "4.0.0.0" / inputdevice = mouseover / fontstyle = ("Arial", 3%, false, false, false, false, 5, 0) / canvasaspectratio = (4,3) </defaults> ************************************************************************************************************* ************************************************************************************************************* <values> / x = -1 / y = -1 </values> <data> /file = "Data.iqdat" / columns = [mouse.x mouse.y] /separatefiles = true </data> *********************************************************************************************************** *********************************************************************************************************** <expt main> / blocks = [1=search] </expt> <block search> / trials = [1 = search] / timeout= (8000) </block> <trial search> / stimulusframes = [1=clearscreen, bord, viewhole] / ontrialbegin = [picture.bord.hposition = 1px * mouse.x;picture.bord.vposition = 1px * mouse.y;] / inputdevice = mouse / validresponse = (mousemove) / branch = [trial.search] / recorddata = false </trial> <trial win> / ontrialbegin = [trial.win.insertstimulustime(sound.Win, 100)] / recorddata = false / timeout= (1000) </trial> <sound Win> /items = win /playthrough = false /select = noreplace /resetinterval = 0 </sound> <item win> /1 = "win.wav" </item> <trial lose> / ontrialbegin = [trial.lose.insertstimulustime(sound.lose, 100)] / recorddata = false / timeout= (1000) </trial> <sound lose> /items = lose /playthrough = false /select = noreplace /volume = -999 /resetinterval = 0 </sound> <item lose> /1 = "lose.wav" </item> <picture viewhole> / items = ("Hole.png") / erase = false / size=(3000, 3000) </picture> <picture bord> / items = ("Board.jpg") / erase = false / size=(2200, 2200) </picture> > The problem we are having is that the looping nature of the trial (necessary for syncing the movement of the coloured board to the mouse) seems to make adding additional elements or branching impossible. That's not quite true. What you'll have to do is /branch to a trial playing back your win or lose sound if some condition is met. I.e. if the board has reached a position where a given dot is in the area of the view hole in the center of the screen. Only otherwise /branch to trial.search itself, i.e. "loop" the trial. In a nutshell: <trial search> / stimulusframes = [1=clearscreen, bord, viewhole] / ontrialbegin = [picture.bord.hposition = 1px * mouse.x;picture.bord.vposition = 1px * mouse.y;] / inputdevice = mouse / validresponse = (mousemove) / branch = [if (picture.bord.hposition == ?? && picture.bord.vposition == ??) { trial.winsound; } else if (picture.bord.hposition == ?? && picture.bord.vposition == ??) { trial.losesound; } else { trial.search; } ] / recorddata = false </trial> Conceptually, the Inquisit 4 version of the Tower of London script does very similar things, so that would be a script worth studying in-depth: https://www.millisecond.com/download/library/v4/toweroflondon/toweroflondon.iqzipAlso conceptually related, here's a very simple example showing how to detect whether the mouse is in a given area / on top of one of several on-screen objects: https://www.millisecond.com/forums/FindPost13217.aspx Many Thanks for the suggestion. I will give it a try. Peter This solution seems to be working thus far, many thanks to you. Can i ask if there is a way to allow sound stimuli to continue playing even though the next trial has started. I basically need to keep my mouse movement permanently locked to the movement of my Ouija board yet play sound clips, without halting the mouse/board movement. Any help would be gratefully received > Can i ask if there is a way to allow sound stimuli to continue playing even though the next trial has started. The only way to do this would be to shift some of the /branch logic up to the <block> level. I.e. when a "win" condition is met, /stop in <block search> and /branch to <block win> playing back the "win" sound stimulus per its /bgstim. Same for the "lose" condition(s). You can have these win a lose blocks /timeout such that they're long enough to allow for full playback of the sounds, then /branch back to the silent search block. The overall /timeout across all blocks would have to be shifted to the <expt> level. , So this will this let the sound continue playing over the next trial ? excellent thanks! Yes, sounds displayed via /bgstim will continue running in the backgroud, while the block runs its trials.
|
|