﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Millisecond Forums » Millisecond Forums » Inquisit 4  » random stimulus presentation times</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Thu, 29 Oct 2026 17:13:56 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: random stimulus presentation times</title><link>https://forums.millisecond.com/Topic11712.aspx</link><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;good idea. I altered it a little bit by assigning the filename to a value on trialend (e.g., /ontrialend = [trial.fg2.resetstimulusframes();values.file = picture.fg2.pic.currentitem]) and then reporting values.file as a column in the data-element. &lt;/p&gt;
&lt;p&gt;Best regards Jens&lt;/p&gt;</description><pubDate>Mon, 25 Nov 2013 08:45:42 GMT</pubDate><dc:creator>jens</dc:creator></item><item><title>RE: random stimulus presentation times</title><link>https://forums.millisecond.com/Topic11711.aspx</link><description>&lt;p&gt;Usually&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;lt;data&amp;gt;&lt;br /&gt;/ columns = [..., picture.mg1.pic.currentitem, ...]&lt;br /&gt;[...]&lt;br /&gt;&amp;lt;/data&amp;gt;&lt;/span&gt;&lt;/p&gt;</description><pubDate>Mon, 25 Nov 2013 07:42:09 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: random stimulus presentation times</title><link>https://forums.millisecond.com/Topic11708.aspx</link><description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;is there a way to store/display the filename of the inserted picture in the data file?&lt;/p&gt;
&lt;p&gt;Best wishes Jens&lt;/p&gt;</description><pubDate>Mon, 25 Nov 2013 06:33:14 GMT</pubDate><dc:creator>jens</dc:creator></item><item><title>RE: random stimulus presentation times</title><link>https://forums.millisecond.com/Topic11675.aspx</link><description>&lt;p&gt;Hello Dave,&lt;/p&gt;
&lt;p&gt;as in your example, proper syntax helps. [:)] &lt;/p&gt;
&lt;p&gt;Best Jens&lt;/p&gt;</description><pubDate>Mon, 18 Nov 2013 08:05:53 GMT</pubDate><dc:creator>jens</dc:creator></item><item><title>RE: random stimulus presentation times</title><link>https://forums.millisecond.com/Topic11674.aspx</link><description>&lt;p&gt;Just like in my example, you need to provide proper syntax including element type:&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;lt;trial mg1&amp;gt;&lt;br /&gt;/ontrialbegin = [trial.mg1.setstimulusframe(mg1.pic, list.onset.nextvalue); ...]&lt;br /&gt;[...]&lt;br /&gt;&amp;lt;/trial&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;ought to be&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;lt;trial mg1&amp;gt;&lt;br /&gt;/ontrialbegin = [trial.mg1.setstimulusframe(&lt;span style="color: #ff0000;"&gt;picture.&lt;/span&gt;mg1.pic, list.onset.nextvalue); ...]&lt;br /&gt;[...]&lt;br /&gt;&amp;lt;/trial&amp;gt;&lt;/span&gt;&lt;/p&gt;</description><pubDate>Mon, 18 Nov 2013 07:47:22 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: random stimulus presentation times</title><link>https://forums.millisecond.com/Topic11673.aspx</link><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;thanks a lot for pointing me to the proper functions. The example you provided worked nicely. I, however, get the message that the message "Failed to call the function 'setstimulusframe' on element 'trial.mg1'." When changing everything to stimulustimes, I get the comparable error message. I attached the script, perhaps this helps (BTW, the file filter of the upload function rejects iqx-files).&lt;/p&gt;
&lt;p&gt;Best wishes Jens&lt;/p&gt;

</description><pubDate>Mon, 18 Nov 2013 07:42:35 GMT</pubDate><dc:creator>jens</dc:creator></item><item><title>RE: random stimulus presentation times</title><link>https://forums.millisecond.com/Topic11672.aspx</link><description>&lt;p&gt;It isn't supposed to work like that. To do this, you need to make use of some of the &amp;lt;trial&amp;gt; element's member functions via /ontrialbegin. You'll want to see the language reference for setstimulustime(), insertstimulustime() and resetstimulusframes().&lt;/p&gt;
&lt;p&gt;Edited to add:&lt;/p&gt;
&lt;p&gt;[1] There are, of course, corresponding frame-based functions: setstimulusframe(), insertstimulusframe(), etc.&lt;/p&gt;
&lt;p&gt;[2] Here's a re-posting of a self-contained illustrative example (http://www.millisecond.com/forums/Topic11148.aspx#11148):&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;lt;list fixationduration&amp;gt;&lt;br /&gt;/ items = (500, 5000, 10000)&lt;br /&gt;&amp;lt;/list&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;trial mytrial&amp;gt;&lt;br /&gt;/ ontrialbegin = [trial.mytrial.setstimulustime(text.a, list.fixationduration.nextvalue);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; trial.mytrial.insertstimulustime(text.b, list.fixationduration.nextvalue)]&lt;br /&gt;/ ontrialend = [trial.mytrial.resetstimulusframes()]&lt;br /&gt;/ stimulustimes = [0=fixation]&lt;br /&gt;/ validresponse = (57)&lt;br /&gt;&amp;lt;/trial&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;text fixation&amp;gt;&lt;br /&gt;/ items = ("+")&lt;br /&gt;&amp;lt;/text&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;text a&amp;gt;&lt;br /&gt;/ items = ("A")&lt;br /&gt;/ position = (45%, 50%)&lt;br /&gt;&amp;lt;/text&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;text b&amp;gt;&lt;br /&gt;/ items = ("B")&lt;br /&gt;/ position = (55%, 50%)&lt;br /&gt;&amp;lt;/text&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;block myblock&amp;gt;&lt;br /&gt;/ trials = [1-3=mytrial]&lt;br /&gt;&amp;lt;/block&amp;gt;&lt;/span&gt;&lt;/p&gt;</description><pubDate>Mon, 18 Nov 2013 04:42:19 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>random stimulus presentation times</title><link>https://forums.millisecond.com/Topic11671.aspx</link><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I am writing an Inquisit-script for a EEG-experiment. One requirement is to jitter the presentation times of various stimuli, e.g. the time interval of the fixation cross, the blank screen and the stimulus. Inquisit offers function to random number generation, e.g. rand(40,43). However a definition such as the following does not work&lt;/p&gt;
&lt;p&gt;&amp;lt;trial mg1&amp;gt;&lt;br /&gt;/stimulusframes = [10 = fixation.pic; 25 = maske; ipart(rand(40,43) = mg1.pic]&lt;br /&gt;/validresponse = ("F", "J")&lt;br /&gt;/correctresponse = ("J")&lt;br /&gt;/pretrialpause = rand(400,600)&lt;br /&gt;&amp;lt;/trial&amp;gt;&lt;/p&gt;
&lt;p&gt;Using an expression or defining the onset-variable as a counter or value did not work. At least, I did not get to run. Any suggestions?&lt;/p&gt;
&lt;p&gt;Jens&lt;/p&gt;
</description><pubDate>Mon, 18 Nov 2013 04:34:53 GMT</pubDate><dc:creator>jens</dc:creator></item></channel></rss>