Port triggered from Random displayed images


Port triggered from Random displayed images

Author
Message
Lostcode
Lostcode
Guru
Guru (5.7K reputation)Guru (5.7K reputation)Guru (5.7K reputation)Guru (5.7K reputation)Guru (5.7K reputation)Guru (5.7K reputation)Guru (5.7K reputation)Guru (5.7K reputation)Guru (5.7K reputation)

Group: Forum Members
Posts: 29, Visits: 1

I have a couple different images set up in an item list named trigg. I have a trial that will display the picture for a certain duration. The block will add one to the current target list so it will cylce through until done.



What I am trying to do is get it so that the 10 specific images in the 30 will trigger a port when displayed. There are 2 images for each port because they send a different data output.



Is there any way to get this to work. Like an if statement/ condition in the Block?


Dave
Dave
Supreme Being
Supreme Being (713K reputation)Supreme Being (713K reputation)Supreme Being (713K reputation)Supreme Being (713K reputation)Supreme Being (713K reputation)Supreme Being (713K reputation)Supreme Being (713K reputation)Supreme Being (713K reputation)Supreme Being (713K reputation)

Group: Administrators
Posts: 9.8K, Visits: 47K

Since <port> elements are essentially equivalent to all other stimulus elements such as <text> or <picture>, the "How to present stimulus pairs" topic in the documentation should answer your question.


Lostcode
Lostcode
Guru
Guru (5.7K reputation)Guru (5.7K reputation)Guru (5.7K reputation)Guru (5.7K reputation)Guru (5.7K reputation)Guru (5.7K reputation)Guru (5.7K reputation)Guru (5.7K reputation)Guru (5.7K reputation)

Group: Forum Members
Posts: 29, Visits: 1

So if I were to do a
/ select = picture.trigg

What would be required for the first image?


Dave
Dave
Supreme Being
Supreme Being (713K reputation)Supreme Being (713K reputation)Supreme Being (713K reputation)Supreme Being (713K reputation)Supreme Being (713K reputation)Supreme Being (713K reputation)Supreme Being (713K reputation)Supreme Being (713K reputation)Supreme Being (713K reputation)

Group: Administrators
Posts: 9.8K, Visits: 47K

So if I were to do a
/ select = picture.trigg

What would be required for the first image?


Unfortunately this example is meaningless without context. In general: Your <picture> elements comprise a number of /items. So do your <port> elements. You'll want to have the "item" (i.e. TTL signal) in the <port> depend on the item of the <picture>. Exactly that you'll find covered in the documentation topic I mentioned, only with <text> elements.


Lostcode
Lostcode
Guru
Guru (5.7K reputation)Guru (5.7K reputation)Guru (5.7K reputation)Guru (5.7K reputation)Guru (5.7K reputation)Guru (5.7K reputation)Guru (5.7K reputation)Guru (5.7K reputation)Guru (5.7K reputation)

Group: Forum Members
Posts: 29, Visits: 1

<item trigg>


there are 10 pics here


/1 = "Img/muffins.jpg" <-- example


</item>



<picture trigg>


/ items = trigg


</picture>



<port ptrigg>


/ port = lpt1


/ subport = data


/ items = ("00000001")


/ select = ?????


</port>




What needs to be where?


Dave
Dave
Supreme Being
Supreme Being (713K reputation)Supreme Being (713K reputation)Supreme Being (713K reputation)Supreme Being (713K reputation)Supreme Being (713K reputation)Supreme Being (713K reputation)Supreme Being (713K reputation)Supreme Being (713K reputation)Supreme Being (713K reputation)

Group: Administrators
Posts: 9.8K, Visits: 47K

(1) If the TTL signal is *always the same* as in your example, there is no need for any selection stuff at all. Simply have your <trial> "display" it along with the picture.


(2) Have you given http://www.millisecond.com/support/docs/v4/html/howto/howtopairs.htm a look? If so, it should be clear how to define the dependency between elements.


Lostcode
Lostcode
Guru
Guru (5.7K reputation)Guru (5.7K reputation)Guru (5.7K reputation)Guru (5.7K reputation)Guru (5.7K reputation)Guru (5.7K reputation)Guru (5.7K reputation)Guru (5.7K reputation)Guru (5.7K reputation)

Group: Forum Members
Posts: 29, Visits: 1

The TTL signals will be different for groupings of 2 images in the 10 items.


The trial I have does:

<trial trigg>
/ stimulustimes = [0=trigg]
/ trialduration = 1700
/ validresponse = ("W")
/ correctresponse = ("W")
</trial>


So I would need to associate multiple <port> Since there would be 5 other ports sending different data.


Dave
Dave
Supreme Being
Supreme Being (713K reputation)Supreme Being (713K reputation)Supreme Being (713K reputation)Supreme Being (713K reputation)Supreme Being (713K reputation)Supreme Being (713K reputation)Supreme Being (713K reputation)Supreme Being (713K reputation)Supreme Being (713K reputation)

Group: Administrators
Posts: 9.8K, Visits: 47K

So I would need to associate multiple <port> Since there would be 5 other ports sending different data.


No. A <port> can have multiple /items just like a <text> or <picture>.


Lostcode
Lostcode
Guru
Guru (5.7K reputation)Guru (5.7K reputation)Guru (5.7K reputation)Guru (5.7K reputation)Guru (5.7K reputation)Guru (5.7K reputation)Guru (5.7K reputation)Guru (5.7K reputation)Guru (5.7K reputation)

Group: Forum Members
Posts: 29, Visits: 1

I will be associating different <port> items with different pictures.


My trial pulls from the pictures listed in <picture trigg> which is from a <item trigg> list.



The block takes that info and randomizes the pictures being displayed.

How would I go about making the picture that is displayed send the item in <port>?


Dave
Dave
Supreme Being
Supreme Being (713K reputation)Supreme Being (713K reputation)Supreme Being (713K reputation)Supreme Being (713K reputation)Supreme Being (713K reputation)Supreme Being (713K reputation)Supreme Being (713K reputation)Supreme Being (713K reputation)Supreme Being (713K reputation)

Group: Administrators
Posts: 9.8K, Visits: 47K

Suppose I have a <text> element with two items, A and B. I want to sent a <port> signal, 00000001 for A and 00000010 for B:

<trial mytrial>
/ stimulusframes = [1=mytext, myport]
[...]
</trial>

<text mytext>
/ items = ("A", "B")
/ select = noreplace
</text>

<port myport>
/ items = ("00000001", "00000010")
/ select = text.mytext.currentindex
</port>


The same applies when using a <picture> instead of <text>.


GO


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....






Millisecond Forums


Search