MCT showing a picture before skip


Author
Message
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: 108K

The problem is in your branching logic in <trial EraseDot>


/ branch = [if (values.sign == false && values.skip == false && script.elapsedtime <= values.total_runtime) trial.NoSkipNoSign]
/ branch = [if (values.sign_and_skip == false && values.sign== true && values.skip == false && script.elapsedtime <= values.total_runtime) trial.NoSkipWithSign]
/ branch = [if (values.sign_and_skip == false && values.skip == true && script.elapsedtime <= values.total_runtime) trial.DoSkip]
/ branch = [if (values.sign_and_skip == true && values.skip == true && script.elapsedtime <= values.total_runtime) trial.DoSkipWithSign]


In short, you don't cover all possible cases there. I.e., situations may arise when none of the branches evaluates to 'true' and thus the script has nowhere to go and must terminate.


To debug this, you can for example add


<expressions>
/ b1 = if (values.sign == false && values.skip == false && script.elapsedtime <= values.total_runtime) true else false
/ b2 = if (values.sign_and_skip == false && values.sign== true && values.skip == false && script.elapsedtime <= values.total_runtime) true else false
/ b3 = if (values.sign_and_skip == false && values.skip == true && script.elapsedtime <= values.total_runtime) true else false
/ b4 = if (values.sign_and_skip == true && values.skip == true && script.elapsedtime <= values.total_runtime) true else false
</expressions>


to the script, set <trial EraseDot>'s /recorddata to true and log the above expressions (which check the branch conditions) to the data file.


Regards,


~Dave


pprat
pprat
Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)
Group: Forum Members
Posts: 26, Visits: 1

Dave,


Thanks a lot.  That was very helpful. 


pprat
pprat
Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)
Group: Forum Members
Posts: 26, Visits: 1

Dave,


I was able to modify the MCT to include visual stimuli and now I want to basically do the same type of thing, but instead of visual stimuli, I want to do sound stimuli. 


How might I do that? Could you point me to the right direction?



I know the basics of setting up the sound item, etc.  But how would I present the stimulus in a trial at the same time as the clock flashes?  Does it work the same way as the visual?  Meaning could I just set the stimulusframe equal to the sound and have it be presented each time the trial is called?  Or is there a special way to deal with sounds?



I attached what I think is the debugged version of the MCT with visual stimuli for you to see how I've set the experiment up.  Basically the visual stimulus is given either at the same time as the skip of the clock or before the skip.  And I want to do the same type of thing with the sound stimulus.



Thanks!




Attachments
MCT with Visual.zip (245 views, 23.00 KB)
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: 108K

There essentially isn't any difference between displaying a <sound> or a <picture> as cue stimulus.


pprat
pprat
Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)
Group: Forum Members
Posts: 26, Visits: 1

For some reason, my script won't run when I change the stimulus into a sound stimulus.  I've set up the sound stimulus as shown below:


<item sounds>


/1 = "sound1.mp3"


</item>



<sound sound1>


/items = sounds


/erase = false


/playthrough = true


</sound>



Then at a trial called <trial NoSkipWithSign>, I have set the following:


/stimulusframes = [1=FlashMark, sound1]



Everything else I kept the same as what I had when it was a picture stimulus, so the timing of the cue should still be the same.  Do you see anything wrong with what's above?


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: 108K

The <sound> element doesn't play mp3s, only straight, uncompressed wavs. For mp3s and other streaming audio formats, use the <video> element.


pprat
pprat
Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)
Group: Forum Members
Posts: 26, Visits: 1

Dave,


My experiment involves giving vibrational cues to the participants.  I have been in contact with other users of Inquisit and they advised me to use the sound element of Inquisit and connect a vibrating motor into the audio jack. 


Has anyone ever attempted this?


Do you have any ideas on what type of motor I can use?  What type of voltage can be received from the audio jack?  I purchased a motor that requires 3V (you can see the specs in this website: https://www.sparkfun.com/products/8449), and I also purchased an amplifier (http://www.bhphotovideo.com/bnh/controller/home?O=&sku=763204&Q=&is=REG&A=details) to be used for it.  There hasn't been any success. 


I am assuming that Inquisit does not have USB capabilities, is that right?  The only ways to send vibrational cues would be through the sound port or the parallel/serial port, is that right?


If you could point me in the right direction, I would greatly appreciate it.


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: 108K

Interesting idea.


Has anyone ever attempted this?


I am not aware of anyone.


Do you have any ideas on what type of motor I can use?


No.


What type of voltage can be received from the audio jack?


This would depend on your hardware specs, i.e., it's unrelated to Inquisit. I'd try a voltmeter to check.


I am assuming that Inquisit does not have USB capabilities, is that right?


No, there are no generic capabilities to interface w/ USB devices. However, if your device comes with drivers installing a COM (serial) port, it may be possible to trigger the device via Inquisit's <port> facilities.


The only ways to send vibrational cues would be through the sound port or the parallel/serial port, is that right?


Yes. FWIW, any person familiar with electronics you have around would probably be able to assemble something to get the job done without too much hassle.


Regards,


~Dave



pprat
pprat
Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)Partner Member (614 reputation)
Group: Forum Members
Posts: 26, Visits: 1

Thanks,


I have another question: can Inquisit call on an executable from inside the script?


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: 108K

No, it can't.


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search