Difference between revisions of "Keyboard In CHOP"

From TouchDesigner Documentation
Jump to: navigation, search
(TD Editor)
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{Summary
 
{{Summary
|OPfilter=False
+
|opFilter=False
 
|long=The Keyboard In CHOP receives ASCII input from the keyboard, and outputs channels for the number of keys specified. It creates a single-frame channel representing the current state of each key.
 
|long=The Keyboard In CHOP receives ASCII input from the keyboard, and outputs channels for the number of keys specified. It creates a single-frame channel representing the current state of each key.
 
 
 
The channels for keys are created by specifying the first key, the number of keys to follow, and the order with which they are selected. Key channel names are either determined by the name of the key, or the channel number.
 
The channels for keys are created by specifying the first key, the number of keys to follow, and the order with which they are selected. Key channel names are either determined by the name of the key, or the channel number.
 
 
'''NOTE:''' The Keyboard In CHOP does not handle rapid repeats of characters and does not output channels or all keys. A better way is as follows: Create a [[Panel Execute DAT]], and set the 'From Component' to the panel in which keyboard keys need to be monitored.
+
'''NOTE:''' The Keyboard In CHOP does not handle rapid repeats of characters and does not output channels or all keys. A better way is as follows: Create a [[Panel Execute DAT]], and set the 'Panel' parameter to the panel in which keyboard keys need to be monitored.
 
Set the Panel Value to: <code>key</code>.
 
Set the Panel Value to: <code>key</code>.
In this DAT, if you enter <code>echo $args</code>, you will see a line printed for every keystroke.
+
In this DAT, if you enter <code>print(panelValue)</code> in the onValueChange() callback, you will see a line printed for every keystroke.
+
See also the [[keystate()]] and [[mouse()]] expressions.
+
|opLicense=Non-Commercial
|OPlicense=Non-Commercial
+
|opClass=keyboardinCHOP_Class
|OPclass=keyboardinCHOP_Class
+
|opLabel=Keyboard In
|OPlabel=Keyboard In
+
|opFamily=CHOP
|OPfamily=CHOP
+
|opType=keyboardin
|OPtype=keyboardin
 
 
|short=The Keyboard In CHOP receives ASCII input from the keyboard, and outputs channels for the number of keys specified.
 
|short=The Keyboard In CHOP receives ASCII input from the keyboard, and outputs channels for the number of keys specified.
 
}}
 
}}
 
{{ParameterPage
 
{{ParameterPage
|OPfamily=CHOP
+
|opFamily=CHOP
|Pagename=Keys
+
|pageName=Keys
 
|items=
 
|items=
{{ParMenu
+
{{Parameter|parName=active
|Parname=active
+
|parItems=
|Paritems=
+
{{ParameterItem|itemName=off
{{Menuitem
+
|opFamily=CHOP
|Itemname=off
+
|parName=active
|OPfamily=CHOP
+
|itemLabel=Off
|Parname=active
+
|itemSummary=
|Itemlabel=Off
+
}}<!--
|Itemsummary=
+
-->{{ParameterItem|itemName=on
}}
+
|opFamily=CHOP
{{Menuitem
+
|parName=active
|Itemname=on
+
|itemLabel=On
|OPfamily=CHOP
+
|itemSummary=
|Parname=active
+
}}<!--
|Itemlabel=On
+
-->{{ParameterItem|itemName=play
|Itemsummary=
+
|opFamily=CHOP
}}
+
|parName=active
{{Menuitem
+
|itemLabel=While Playing
|Itemname=play
+
|itemSummary=
|OPfamily=CHOP
 
|Parname=active
 
|Itemlabel=While Playing
 
|Itemsummary=
 
 
}}
 
}}
 
 
|Parorder=0
+
|parOrder=0
|Parlabel=Active
+
|parLabel=Active
|OPfamily=CHOP
+
|opFamily=CHOP
|OPtype=keyboardin
+
|opType=keyboardin
|Parsummary=While '''On''', the keyboard inputs will be monitored and the CHOP will cook every frame. When set to '''Off''' it will not cook and the current keyboard values will not be output. '''While Playing''' will capture keyboard events only when the [[Timeline]] is playing forward.
+
|parSummary=While '''On''', the keyboard inputs will be monitored and the CHOP will cook every frame. When set to '''Off''' it will not cook and the current keyboard values will not be output. '''While Playing''' will capture keyboard events only when the [[Timeline]] is playing forward.
}}
+
|parType=
{{ParMenu
+
|parReadOnly=
|Parname=firstkey
+
}}
|Paritems=
+
{{Parameter|parName=firstkey
{{Menuitem
+
|parItems=
|Itemname=0
+
{{ParameterItem|itemName=0
|OPfamily=CHOP
+
|opFamily=CHOP
|Parname=firstkey
+
|parName=firstkey
|Itemlabel=0
+
|itemLabel=0
|Itemsummary=
+
|itemSummary=
}}
+
}}<!--
{{Menuitem
+
-->{{ParameterItem|itemName=1
|Itemname=1
+
|opFamily=CHOP
|OPfamily=CHOP
+
|parName=firstkey
|Parname=firstkey
+
|itemLabel=1
|Itemlabel=1
+
|itemSummary=
|Itemsummary=
+
}}<!--
}}
+
-->{{ParameterItem|itemName=2
{{Menuitem
+
|opFamily=CHOP
|Itemname=2
+
|parName=firstkey
|OPfamily=CHOP
+
|itemLabel=2
|Parname=firstkey
+
|itemSummary=
|Itemlabel=2
+
}}<!--
|Itemsummary=
+
-->{{ParameterItem|itemName=3
}}
+
|opFamily=CHOP
{{Menuitem
+
|parName=firstkey
|Itemname=3
+
|itemLabel=3
|OPfamily=CHOP
+
|itemSummary=
|Parname=firstkey
+
}}<!--
|Itemlabel=3
+
-->{{ParameterItem|itemName=4
|Itemsummary=
+
|opFamily=CHOP
}}
+
|parName=firstkey
{{Menuitem
+
|itemLabel=4
|Itemname=4
+
|itemSummary=
|OPfamily=CHOP
+
}}<!--
|Parname=firstkey
+
-->{{ParameterItem|itemName=5
|Itemlabel=4
+
|opFamily=CHOP
|Itemsummary=
+
|parName=firstkey
}}
+
|itemLabel=5
{{Menuitem
+
|itemSummary=
|Itemname=5
+
}}<!--
|OPfamily=CHOP
+
-->{{ParameterItem|itemName=6
|Parname=firstkey
+
|opFamily=CHOP
|Itemlabel=5
+
|parName=firstkey
|Itemsummary=
+
|itemLabel=6
}}
+
|itemSummary=
{{Menuitem
+
}}<!--
|Itemname=6
+
-->{{ParameterItem|itemName=7
|OPfamily=CHOP
+
|opFamily=CHOP
|Parname=firstkey
+
|parName=firstkey
|Itemlabel=6
+
|itemLabel=7
|Itemsummary=
+
|itemSummary=
}}
+
}}<!--
{{Menuitem
+
-->{{ParameterItem|itemName=8
|Itemname=7
+
|opFamily=CHOP
|OPfamily=CHOP
+
|parName=firstkey
|Parname=firstkey
+
|itemLabel=8
|Itemlabel=7
+
|itemSummary=
|Itemsummary=
+
}}<!--
}}
+
-->{{ParameterItem|itemName=9
{{Menuitem
+
|opFamily=CHOP
|Itemname=8
+
|parName=firstkey
|OPfamily=CHOP
+
|itemLabel=9
|Parname=firstkey
+
|itemSummary=
|Itemlabel=8
+
}}<!--
|Itemsummary=
+
-->{{ParameterItem|itemName=a
}}
+
|opFamily=CHOP
{{Menuitem
+
|parName=firstkey
|Itemname=9
+
|itemLabel=A
|OPfamily=CHOP
+
|itemSummary=
|Parname=firstkey
+
}}<!--
|Itemlabel=9
+
-->{{ParameterItem|itemName=b
|Itemsummary=
+
|opFamily=CHOP
}}
+
|parName=firstkey
{{Menuitem
+
|itemLabel=B
|Itemname=a
+
|itemSummary=
|OPfamily=CHOP
+
}}<!--
|Parname=firstkey
+
-->{{ParameterItem|itemName=c
|Itemlabel=A
+
|opFamily=CHOP
|Itemsummary=
+
|parName=firstkey
}}
+
|itemLabel=C
{{Menuitem
+
|itemSummary=
|Itemname=b
+
}}<!--
|OPfamily=CHOP
+
-->{{ParameterItem|itemName=d
|Parname=firstkey
+
|opFamily=CHOP
|Itemlabel=B
+
|parName=firstkey
|Itemsummary=
+
|itemLabel=D
}}
+
|itemSummary=
{{Menuitem
+
}}<!--
|Itemname=c
+
-->{{ParameterItem|itemName=e
|OPfamily=CHOP
+
|opFamily=CHOP
|Parname=firstkey
+
|parName=firstkey
|Itemlabel=C
+
|itemLabel=E
|Itemsummary=
+
|itemSummary=
}}
+
}}<!--
{{Menuitem
+
-->{{ParameterItem|itemName=f
|Itemname=d
+
|opFamily=CHOP
|OPfamily=CHOP
+
|parName=firstkey
|Parname=firstkey
+
|itemLabel=F
|Itemlabel=D
+
|itemSummary=
|Itemsummary=
+
}}<!--
}}
+
-->{{ParameterItem|itemName=g
{{Menuitem
+
|opFamily=CHOP
|Itemname=e
+
|parName=firstkey
|OPfamily=CHOP
+
|itemLabel=G
|Parname=firstkey
+
|itemSummary=
|Itemlabel=E
+
}}<!--
|Itemsummary=
+
-->{{ParameterItem|itemName=h
}}
+
|opFamily=CHOP
{{Menuitem
+
|parName=firstkey
|Itemname=f
+
|itemLabel=H
|OPfamily=CHOP
+
|itemSummary=
|Parname=firstkey
+
}}<!--
|Itemlabel=F
+
-->{{ParameterItem|itemName=i
|Itemsummary=
+
|opFamily=CHOP
}}
+
|parName=firstkey
{{Menuitem
+
|itemLabel=I
|Itemname=g
+
|itemSummary=
|OPfamily=CHOP
+
}}<!--
|Parname=firstkey
+
-->{{ParameterItem|itemName=j
|Itemlabel=G
+
|opFamily=CHOP
|Itemsummary=
+
|parName=firstkey
}}
+
|itemLabel=J
{{Menuitem
+
|itemSummary=
|Itemname=h
+
}}<!--
|OPfamily=CHOP
+
-->{{ParameterItem|itemName=k
|Parname=firstkey
+
|opFamily=CHOP
|Itemlabel=H
+
|parName=firstkey
|Itemsummary=
+
|itemLabel=K
}}
+
|itemSummary=
{{Menuitem
+
}}<!--
|Itemname=i
+
-->{{ParameterItem|itemName=l
|OPfamily=CHOP
+
|opFamily=CHOP
|Parname=firstkey
+
|parName=firstkey
|Itemlabel=I
+
|itemLabel=L
|Itemsummary=
+
|itemSummary=
}}
+
}}<!--
{{Menuitem
+
-->{{ParameterItem|itemName=m
|Itemname=j
+
|opFamily=CHOP
|OPfamily=CHOP
+
|parName=firstkey
|Parname=firstkey
+
|itemLabel=M
|Itemlabel=J
+
|itemSummary=
|Itemsummary=
+
}}<!--
}}
+
-->{{ParameterItem|itemName=n
{{Menuitem
+
|opFamily=CHOP
|Itemname=k
+
|parName=firstkey
|OPfamily=CHOP
+
|itemLabel=N
|Parname=firstkey
+
|itemSummary=
|Itemlabel=K
+
}}<!--
|Itemsummary=
+
-->{{ParameterItem|itemName=o
}}
+
|opFamily=CHOP
{{Menuitem
+
|parName=firstkey
|Itemname=l
+
|itemLabel=O
|OPfamily=CHOP
+
|itemSummary=
|Parname=firstkey
+
}}<!--
|Itemlabel=L
+
-->{{ParameterItem|itemName=p
|Itemsummary=
+
|opFamily=CHOP
}}
+
|parName=firstkey
{{Menuitem
+
|itemLabel=P
|Itemname=m
+
|itemSummary=
|OPfamily=CHOP
+
}}<!--
|Parname=firstkey
+
-->{{ParameterItem|itemName=q
|Itemlabel=M
+
|opFamily=CHOP
|Itemsummary=
+
|parName=firstkey
}}
+
|itemLabel=Q
{{Menuitem
+
|itemSummary=
|Itemname=n
+
}}<!--
|OPfamily=CHOP
+
-->{{ParameterItem|itemName=r
|Parname=firstkey
+
|opFamily=CHOP
|Itemlabel=N
+
|parName=firstkey
|Itemsummary=
+
|itemLabel=R
}}
+
|itemSummary=
{{Menuitem
+
}}<!--
|Itemname=o
+
-->{{ParameterItem|itemName=s
|OPfamily=CHOP
+
|opFamily=CHOP
|Parname=firstkey
+
|parName=firstkey
|Itemlabel=O
+
|itemLabel=S
|Itemsummary=
+
|itemSummary=
}}
+
}}<!--
{{Menuitem
+
-->{{ParameterItem|itemName=t
|Itemname=p
+
|opFamily=CHOP
|OPfamily=CHOP
+
|parName=firstkey
|Parname=firstkey
+
|itemLabel=T
|Itemlabel=P
+
|itemSummary=
|Itemsummary=
+
}}<!--
}}
+
-->{{ParameterItem|itemName=u
{{Menuitem
+
|opFamily=CHOP
|Itemname=q
+
|parName=firstkey
|OPfamily=CHOP
+
|itemLabel=U
|Parname=firstkey
+
|itemSummary=
|Itemlabel=Q
+
}}<!--
|Itemsummary=
+
-->{{ParameterItem|itemName=v
}}
+
|opFamily=CHOP
{{Menuitem
+
|parName=firstkey
|Itemname=r
+
|itemLabel=V
|OPfamily=CHOP
+
|itemSummary=
|Parname=firstkey
+
}}<!--
|Itemlabel=R
+
-->{{ParameterItem|itemName=w
|Itemsummary=
+
|opFamily=CHOP
}}
+
|parName=firstkey
{{Menuitem
+
|itemLabel=W
|Itemname=s
+
|itemSummary=
|OPfamily=CHOP
+
}}<!--
|Parname=firstkey
+
-->{{ParameterItem|itemName=x
|Itemlabel=S
+
|opFamily=CHOP
|Itemsummary=
+
|parName=firstkey
}}
+
|itemLabel=X
{{Menuitem
+
|itemSummary=
|Itemname=t
+
}}<!--
|OPfamily=CHOP
+
-->{{ParameterItem|itemName=y
|Parname=firstkey
+
|opFamily=CHOP
|Itemlabel=T
+
|parName=firstkey
|Itemsummary=
+
|itemLabel=Y
}}
+
|itemSummary=
{{Menuitem
+
}}<!--
|Itemname=u
+
-->{{ParameterItem|itemName=z
|OPfamily=CHOP
+
|opFamily=CHOP
|Parname=firstkey
+
|parName=firstkey
|Itemlabel=U
+
|itemLabel=Z
|Itemsummary=
+
|itemSummary=
}}
+
}}<!--
{{Menuitem
+
-->{{ParameterItem|itemName=keycomma
|Itemname=v
+
|opFamily=CHOP
|OPfamily=CHOP
+
|parName=firstkey
|Parname=firstkey
+
|itemLabel=Comma ,
|Itemlabel=V
+
|itemSummary=
|Itemsummary=
+
}}<!--
}}
+
-->{{ParameterItem|itemName=keyperiod
{{Menuitem
+
|opFamily=CHOP
|Itemname=w
+
|parName=firstkey
|OPfamily=CHOP
+
|itemLabel=Period .
|Parname=firstkey
+
|itemSummary=
|Itemlabel=W
+
}}<!--
|Itemsummary=
+
-->{{ParameterItem|itemName=keypad0
}}
+
|opFamily=CHOP
{{Menuitem
+
|parName=firstkey
|Itemname=x
+
|itemLabel=Keypad 0
|OPfamily=CHOP
+
|itemSummary=
|Parname=firstkey
+
}}<!--
|Itemlabel=X
+
-->{{ParameterItem|itemName=keypad1
|Itemsummary=
+
|opFamily=CHOP
}}
+
|parName=firstkey
{{Menuitem
+
|itemLabel=Keypad 1
|Itemname=y
+
|itemSummary=
|OPfamily=CHOP
+
}}<!--
|Parname=firstkey
+
-->{{ParameterItem|itemName=keypad2
|Itemlabel=Y
+
|opFamily=CHOP
|Itemsummary=
+
|parName=firstkey
}}
+
|itemLabel=Keypad 2
{{Menuitem
+
|itemSummary=
|Itemname=z
+
}}<!--
|OPfamily=CHOP
+
-->{{ParameterItem|itemName=keypad3
|Parname=firstkey
+
|opFamily=CHOP
|Itemlabel=Z
+
|parName=firstkey
|Itemsummary=
+
|itemLabel=Keypad 3
}}
+
|itemSummary=
{{Menuitem
+
}}<!--
|Itemname=keycomma
+
-->{{ParameterItem|itemName=keypad4
|OPfamily=CHOP
+
|opFamily=CHOP
|Parname=firstkey
+
|parName=firstkey
|Itemlabel=Comma ,
+
|itemLabel=Keypad 4
|Itemsummary=
+
|itemSummary=
}}
+
}}<!--
{{Menuitem
+
-->{{ParameterItem|itemName=keypad5
|Itemname=keyperiod
+
|opFamily=CHOP
|OPfamily=CHOP
+
|parName=firstkey
|Parname=firstkey
+
|itemLabel=Keypad 5
|Itemlabel=Period .
+
|itemSummary=
|Itemsummary=
+
}}<!--
}}
+
-->{{ParameterItem|itemName=keypad6
{{Menuitem
+
|opFamily=CHOP
|Itemname=keypad0
+
|parName=firstkey
|OPfamily=CHOP
+
|itemLabel=Keypad 6
|Parname=firstkey
+
|itemSummary=
|Itemlabel=Keypad 0
+
}}<!--
|Itemsummary=
+
-->{{ParameterItem|itemName=keypad7
}}
+
|opFamily=CHOP
{{Menuitem
+
|parName=firstkey
|Itemname=keypad1
+
|itemLabel=Keypad 7
|OPfamily=CHOP
+
|itemSummary=
|Parname=firstkey
+
}}<!--
|Itemlabel=Keypad 1
+
-->{{ParameterItem|itemName=keypad8
|Itemsummary=
+
|opFamily=CHOP
}}
+
|parName=firstkey
{{Menuitem
+
|itemLabel=Keypad 8
|Itemname=keypad2
+
|itemSummary=
|OPfamily=CHOP
+
}}<!--
|Parname=firstkey
+
-->{{ParameterItem|itemName=keypad9
|Itemlabel=Keypad 2
+
|opFamily=CHOP
|Itemsummary=
+
|parName=firstkey
}}
+
|itemLabel=Keypad 9
{{Menuitem
+
|itemSummary=
|Itemname=keypad3
+
}}<!--
|OPfamily=CHOP
+
-->{{ParameterItem|itemName=keypadperiod
|Parname=firstkey
+
|opFamily=CHOP
|Itemlabel=Keypad 3
+
|parName=firstkey
|Itemsummary=
+
|itemLabel=Keypad Period
}}
+
|itemSummary=
{{Menuitem
 
|Itemname=keypad4
 
|OPfamily=CHOP
 
|Parname=firstkey
 
|Itemlabel=Keypad 4
 
|Itemsummary=
 
}}
 
{{Menuitem
 
|Itemname=keypad5
 
|OPfamily=CHOP
 
|Parname=firstkey
 
|Itemlabel=Keypad 5
 
|Itemsummary=
 
}}
 
{{Menuitem
 
|Itemname=keypad6
 
|OPfamily=CHOP
 
|Parname=firstkey
 
|Itemlabel=Keypad 6
 
|Itemsummary=
 
}}
 
{{Menuitem
 
|Itemname=keypad7
 
|OPfamily=CHOP
 
|Parname=firstkey
 
|Itemlabel=Keypad 7
 
|Itemsummary=
 
}}
 
{{Menuitem
 
|Itemname=keypad8
 
|OPfamily=CHOP
 
|Parname=firstkey
 
|Itemlabel=Keypad 8
 
|Itemsummary=
 
}}
 
{{Menuitem
 
|Itemname=keypad9
 
|OPfamily=CHOP
 
|Parname=firstkey
 
|Itemlabel=Keypad 9
 
|Itemsummary=
 
}}
 
{{Menuitem
 
|Itemname=keypadperiod
 
|OPfamily=CHOP
 
|Parname=firstkey
 
|Itemlabel=Keypad Period
 
|Itemsummary=
 
 
}}
 
}}
 
 
|Parorder=1
+
|parOrder=1
|Parlabel=First Key
+
|parLabel=First Key
|OPfamily=CHOP
+
|opFamily=CHOP
|OPtype=keyboardin
+
|opType=keyboardin
|Parsummary=Specifies the key to start generating channels from. Valid keys are the numbers 0-9, letters A-Z, and keypad 0-9.
+
|parSummary=Specifies the key to start generating channels from. Valid keys are the numbers 0-9, letters A-Z, and keypad 0-9.
}}
+
|parType=
{{ParMenu
+
|parReadOnly=
|Parname=modifiers
+
}}
|Paritems=
+
{{Parameter|parName=modifiers
{{Menuitem
+
|parItems=
|Itemname=ignore
+
{{ParameterItem|itemName=ignore
|OPfamily=CHOP
+
|opFamily=CHOP
|Parname=modifiers
+
|parName=modifiers
|Itemlabel=Ignore
+
|itemLabel=Ignore
|Itemsummary=
+
|itemSummary=
}}
+
}}<!--
{{Menuitem
+
-->{{ParameterItem|itemName=none
|Itemname=none
+
|opFamily=CHOP
|OPfamily=CHOP
+
|parName=modifiers
|Parname=modifiers
+
|itemLabel=None
|Itemlabel=None
+
|itemSummary=
|Itemsummary=
+
}}<!--
}}
+
-->{{ParameterItem|itemName=ctrl
{{Menuitem
+
|opFamily=CHOP
|Itemname=ctrl
+
|parName=modifiers
|OPfamily=CHOP
+
|itemLabel=Control
|Parname=modifiers
+
|itemSummary=
|Itemlabel=Control
+
}}<!--
|Itemsummary=
+
-->{{ParameterItem|itemName=alt
}}
+
|opFamily=CHOP
{{Menuitem
+
|parName=modifiers
|Itemname=alt
+
|itemLabel=Alt
|OPfamily=CHOP
+
|itemSummary=
|Parname=modifiers
+
}}<!--
|Itemlabel=Alt
+
-->{{ParameterItem|itemName=ctrlalt
|Itemsummary=
+
|opFamily=CHOP
}}
+
|parName=modifiers
{{Menuitem
+
|itemLabel=Control and Alt
|Itemname=ctrlalt
+
|itemSummary=
|OPfamily=CHOP
 
|Parname=modifiers
 
|Itemlabel=Control and Alt
 
|Itemsummary=
 
 
}}
 
}}
 
 
|Parorder=2
+
|parOrder=2
|Parlabel=Modifier Keys
+
|parLabel=Modifier Keys
|OPfamily=CHOP
+
|opFamily=CHOP
|OPtype=keyboardin
+
|opType=keyboardin
|Parsummary=If it is set to <span class="tipTextCHOP">Ctrl</span>, the keys will only go On if you are also pressing the Ctrl key. If it set to <span class="tipTextCHOP">Ignore</span>, it doesn't matter if the Ctrl key is down or not. The Keyboard In CHOP does not use the Alt key, which has been reserved for shortcuts.
+
|parSummary=If it is set to Ctrl, the keys will only go On if you are also pressing the Ctrl key. If it set to Ignore, it doesn't matter if the Ctrl key is down or not. The Keyboard In CHOP does not use the Alt key, which has been reserved for shortcuts.
}}
+
|parType=
{{ParInteger
+
|parReadOnly=
|Parname=number
+
}}
|Parorder=3
+
{{Parameter|parName=number
|Parlabel=Number of Keys
+
|parOrder=3
|OPfamily=CHOP
+
|parLabel=Number of Keys
|OPtype=keyboardin
+
|opFamily=CHOP
|Parsummary=Specifies the number of keys to generate including the first key.
+
|opType=keyboardin
}}
+
|parSummary=Specifies the number of keys to generate including the first key.
{{ParMenu
+
|parType=
|Parname=order
+
|parReadOnly=
|Paritems=
+
|parItems=
{{Menuitem
+
}}
|Itemname=qwerty
+
{{Parameter|parName=order
|OPfamily=CHOP
+
|parItems=
|Parname=order
+
{{ParameterItem|itemName=qwerty
|Itemlabel=QWERTY
+
|opFamily=CHOP
|Itemsummary=Where it follows the keyboard rows, and E is followed by R, T, Y and U.
+
|parName=order
}}
+
|itemLabel=QWERTY
{{Menuitem
+
|itemSummary=Where it follows the keyboard rows, and E is followed by R, T, Y and U.
|Itemname=alphabetic
+
}}<!--
|OPfamily=CHOP
+
-->{{ParameterItem|itemName=alphabetic
|Parname=order
+
|opFamily=CHOP
|Itemlabel=Alphabetic
+
|parName=order
|Itemsummary=Where E is followed by F, G, H and I.
+
|itemLabel=Alphabetic
}}
+
|itemSummary=Where E is followed by F, G, H and I.
{{Menuitem
+
}}<!--
|Itemname=1qaz
+
-->{{ParameterItem|itemName=1qaz
|OPfamily=CHOP
+
|opFamily=CHOP
|Parname=order
+
|parName=order
|Itemlabel=1QAZ
+
|itemLabel=1QAZ
|Itemsummary=Where it follows the keyboard columns, and E is followed by F, V, 4 and R.
+
|itemSummary=Where it follows the keyboard columns, and E is followed by F, V, 4 and R.
 
The keypad keys are ordered: keypad 0, keypad period, keypad 1, keypad 2, etc.
 
The keypad keys are ordered: keypad 0, keypad period, keypad 1, keypad 2, etc.
 
 
 
}}
 
}}
 
 
|Parorder=4
+
|parOrder=4
|Parlabel=Key Order
+
|parLabel=Key Order
|OPfamily=CHOP
+
|opFamily=CHOP
|OPtype=keyboardin
+
|opType=keyboardin
|Parsummary=If you ask for 5 keys, they are sequential on the keyboard by three methods:
+
|parSummary=If you ask for 5 keys, they are sequential on the keyboard by three methods:
}}
+
|parType=
{{ParMenu
+
|parReadOnly=
|Parname=channelnames
+
}}
|Paritems=
+
{{Parameter|parName=channelnames
{{Menuitem
+
|parItems=
|Itemname=key
+
{{ParameterItem|itemName=key
|OPfamily=CHOP
+
|opFamily=CHOP
|Parname=channelnames
+
|parName=channelnames
|Itemlabel=by Key Name
+
|itemLabel=by Key Name
|Itemsummary=
+
|itemSummary=Keys Q W R will be called kq kw ke, based on the key name (key pad channels are named kp0, kp1...).
}}
+
}}<!--
{{Menuitem
+
-->{{ParameterItem|itemName=number
|Itemname=number
+
|opFamily=CHOP
|OPfamily=CHOP
+
|parName=channelnames
|Parname=channelnames
+
|itemLabel=by Channel Number
|Itemlabel=by Channel Number
+
|itemSummary=Channels are named k1 k2 k3 k4 based on the order of the channels.
|Itemsummary=
 
 
}}
 
}}
 
 
|Parorder=5
+
|parOrder=5
|Parlabel=Channel Names
+
|parLabel=Channel Names
|OPfamily=CHOP
+
|opFamily=CHOP
|OPtype=keyboardin
+
|opType=keyboardin
|Parsummary=
+
|parSummary=Channel names are generated automatically using one of these criteria.
}}
+
|parType=
 +
|parReadOnly=
 +
}}
 
 
|Pagesummary=
+
|pageSummary=
 
}}
 
}}
 
{{ParameterPage
 
{{ParameterPage
|OPfamily=CHOP
+
|opFamily=CHOP
|Pagename=Channel
+
|pageName=Channel
 
|items=
 
|items=
{{ParFloat
+
{{Parameter|parName=rate
|Parname=rate
+
|parOrder=0
|Parorder=0
+
|parLabel=Sample Rate
|Parlabel=Sample Rate
+
|opFamily=CHOP
|OPfamily=CHOP
+
|opType=keyboardin
|OPtype=keyboardin
+
|parSummary=
|Parsummary=
+
|parType=
}}
+
|parReadOnly=
{{ParMenu
+
|parItems=
|Parname=left
+
}}
|Paritems=
+
{{Parameter|parName=left
{{Menuitem
+
|parItems=
|Itemname=hold
+
{{ParameterItem|itemName=hold
|OPfamily=CHOP
+
|opFamily=CHOP
|Parname=left
+
|parName=left
|Itemlabel=Hold
+
|itemLabel=Hold
|Itemsummary=
+
|itemSummary=
 +
}}<!--
 +
-->{{ParameterItem|itemName=slope
 +
|opFamily=CHOP
 +
|parName=left
 +
|itemLabel=Slope
 +
|itemSummary=
 +
}}<!--
 +
-->{{ParameterItem|itemName=cycle
 +
|opFamily=CHOP
 +
|parName=left
 +
|itemLabel=Cycle
 +
|itemSummary=
 +
}}<!--
 +
-->{{ParameterItem|itemName=mirror
 +
|opFamily=CHOP
 +
|parName=left
 +
|itemLabel=Mirror
 +
|itemSummary=
 +
}}<!--
 +
-->{{ParameterItem|itemName=default
 +
|opFamily=CHOP
 +
|parName=left
 +
|itemLabel=Default Value
 +
|itemSummary=
 
}}
 
}}
{{Menuitem
+
|Itemname=slope
+
|parOrder=1
|OPfamily=CHOP
+
|parLabel=Extend Left
|Parname=left
+
|opFamily=CHOP
|Itemlabel=Slope
+
|opType=keyboardin
|Itemsummary=
+
|parSummary=
}}
+
|parType=
{{Menuitem
+
|parReadOnly=
|Itemname=cycle
+
}}
|OPfamily=CHOP
+
{{Parameter|parName=right
|Parname=left
+
|parItems=
|Itemlabel=Cycle
+
{{ParameterItem|itemName=hold
|Itemsummary=
+
|opFamily=CHOP
}}
+
|parName=right
{{Menuitem
+
|itemLabel=Hold
|Itemname=mirror
+
|itemSummary=
|OPfamily=CHOP
+
}}<!--
|Parname=left
+
-->{{ParameterItem|itemName=slope
|Itemlabel=Mirror
+
|opFamily=CHOP
|Itemsummary=
+
|parName=right
}}
+
|itemLabel=Slope
{{Menuitem
+
|itemSummary=
|Itemname=default
+
}}<!--
|OPfamily=CHOP
+
-->{{ParameterItem|itemName=cycle
|Parname=left
+
|opFamily=CHOP
|Itemlabel=Default Value
+
|parName=right
|Itemsummary=
+
|itemLabel=Cycle
 +
|itemSummary=
 +
}}<!--
 +
-->{{ParameterItem|itemName=mirror
 +
|opFamily=CHOP
 +
|parName=right
 +
|itemLabel=Mirror
 +
|itemSummary=
 +
}}<!--
 +
-->{{ParameterItem|itemName=default
 +
|opFamily=CHOP
 +
|parName=right
 +
|itemLabel=Default Value
 +
|itemSummary=
 
}}
 
}}
 
 
|Parorder=1
+
|parOrder=2
|Parlabel=Extend Left
+
|parLabel=Extend Right
|OPfamily=CHOP
+
|opFamily=CHOP
|OPtype=keyboardin
+
|opType=keyboardin
|Parsummary=
+
|parSummary=
}}
+
|parType=
{{ParMenu
+
|parReadOnly=
|Parname=right
+
}}
|Paritems=
+
{{Parameter|parName=defval
{{Menuitem
+
|parOrder=3
|Itemname=hold
+
|parLabel=Default Value
|OPfamily=CHOP
+
|opFamily=CHOP
|Parname=right
+
|opType=keyboardin
|Itemlabel=Hold
+
|parSummary=
|Itemsummary=
+
|parType=
}}
+
|parReadOnly=
{{Menuitem
+
|parItems=
|Itemname=slope
+
}}
|OPfamily=CHOP
 
|Parname=right
 
|Itemlabel=Slope
 
|Itemsummary=
 
}}
 
{{Menuitem
 
|Itemname=cycle
 
|OPfamily=CHOP
 
|Parname=right
 
|Itemlabel=Cycle
 
|Itemsummary=
 
}}
 
{{Menuitem
 
|Itemname=mirror
 
|OPfamily=CHOP
 
|Parname=right
 
|Itemlabel=Mirror
 
|Itemsummary=
 
}}
 
{{Menuitem
 
|Itemname=default
 
|OPfamily=CHOP
 
|Parname=right
 
|Itemlabel=Default Value
 
|Itemsummary=
 
}}
 
 
 
|Parorder=2
+
|pageSummary=This sets the [[CHOP Channel Page#Sample Rate|Sample Rate]] and the [[CHOP Channel Page#Extend Conditions|Extend Conditions]].
|Parlabel=Extend Right
 
|OPfamily=CHOP
 
|OPtype=keyboardin
 
|Parsummary=
 
}}
 
{{ParFloat
 
|Parname=defval
 
|Parorder=3
 
|Parlabel=Default Value
 
|OPfamily=CHOP
 
|OPtype=keyboardin
 
|Parsummary=
 
}}
 
 
 
|Pagesummary=
 
 
}}
 
}}
 
{{:CHOP Generator Common Page
 
{{:CHOP Generator Common Page
Line 636: Line 577:
 
}}
 
}}
 
{{CHOPNavBox
 
{{CHOPNavBox
|OPfamily=CHOP
+
|opFamily=CHOP
 
}}
 
}}
 
{{#invoke:Category
 
{{#invoke:Category
 
|list|CHOPs}}
 
|list|CHOPs}}

Latest revision as of 18:22, 29 May 2019

Summary
[edit]

The Keyboard In CHOP receives ASCII input from the keyboard, and outputs channels for the number of keys specified. It creates a single-frame channel representing the current state of each key.

The channels for keys are created by specifying the first key, the number of keys to follow, and the order with which they are selected. Key channel names are either determined by the name of the key, or the channel number.

NOTE: The Keyboard In CHOP does not handle rapid repeats of characters and does not output channels or all keys. A better way is as follows: Create a Panel Execute DAT, and set the 'Panel' parameter to the panel in which keyboard keys need to be monitored. Set the Panel Value to: key. In this DAT, if you enter print(panelValue) in the onValueChange() callback, you will see a line printed for every keystroke.

PythonIcon.pngkeyboardinCHOP_Class


Parameters - Keys Page

Active active - - While On, the keyboard inputs will be monitored and the CHOP will cook every frame. When set to Off it will not cook and the current keyboard values will not be output. While Playing will capture keyboard events only when the Timeline is playing forward.

  • Off off -
  • On on -
  • While Playing play -

First Key firstkey - - Specifies the key to start generating channels from. Valid keys are the numbers 0-9, letters A-Z, and keypad 0-9.

  • 0 0 -
  • 1 1 -
  • 2 2 -
  • 3 3 -
  • 4 4 -
  • 5 5 -
  • 6 6 -
  • 7 7 -
  • 8 8 -
  • 9 9 -
  • A a -
  • B b -
  • C c -
  • D d -
  • E e -
  • F f -
  • G g -
  • H h -
  • I i -
  • J j -
  • K k -
  • L l -
  • M m -
  • N n -
  • O o -
  • P p -
  • Q q -
  • R r -
  • S s -
  • T t -
  • U u -
  • V v -
  • W w -
  • X x -
  • Y y -
  • Z z -
  • Comma , keycomma -
  • Period . keyperiod -
  • Keypad 0 keypad0 -
  • Keypad 1 keypad1 -
  • Keypad 2 keypad2 -
  • Keypad 3 keypad3 -
  • Keypad 4 keypad4 -
  • Keypad 5 keypad5 -
  • Keypad 6 keypad6 -
  • Keypad 7 keypad7 -
  • Keypad 8 keypad8 -
  • Keypad 9 keypad9 -
  • Keypad Period keypadperiod -

Modifier Keys modifiers - - If it is set to Ctrl, the keys will only go On if you are also pressing the Ctrl key. If it set to Ignore, it doesn't matter if the Ctrl key is down or not. The Keyboard In CHOP does not use the Alt key, which has been reserved for shortcuts.

  • Ignore ignore -
  • None none -
  • Control ctrl -
  • Alt alt -
  • Control and Alt ctrlalt -

Number of Keys number - Specifies the number of keys to generate including the first key.  

Key Order order - - If you ask for 5 keys, they are sequential on the keyboard by three methods:

  • QWERTY qwerty - Where it follows the keyboard rows, and E is followed by R, T, Y and U.
  • Alphabetic alphabetic - Where E is followed by F, G, H and I.
  • 1QAZ 1qaz - Where it follows the keyboard columns, and E is followed by F, V, 4 and R.

The keypad keys are ordered: keypad 0, keypad period, keypad 1, keypad 2, etc.

Channel Names channelnames - - Channel names are generated automatically using one of these criteria.

  • by Key Name key - Keys Q W R will be called kq kw ke, based on the key name (key pad channels are named kp0, kp1...).
  • by Channel Number number - Channels are named k1 k2 k3 k4 based on the order of the channels.


Parameters - Channel Page

This sets the Sample Rate and the Extend Conditions.

Sample Rate rate -  

Extend Left left - -

  • Hold hold -
  • Slope slope -
  • Cycle cycle -
  • Mirror mirror -
  • Default Value default -

Extend Right right - -

  • Hold hold -
  • Slope slope -
  • Cycle cycle -
  • Mirror mirror -
  • Default Value default -

Default Value defval -  


Parameters - Common Page

Time Slice timeslice - Turning this on forces the channels to be "Time Sliced". A Time Slice is the time between the last cook frame and the current cook frame.  

Scope scope - To determine which channels get affected, some CHOPs use a Scope string on the Common page.  

Sample Rate Match srselect - - Handle cases where multiple input CHOPs' sample rates are different. When Resampling occurs, the curves are interpolated according to the Interpolation Method Option, or "Linear" if the Interpolate Options are not available.

  • Resample At First Input's Rate first - Use rate of first input to resample others.
  • Resample At Maximum Rate max - Resample to the highest sample rate.
  • Resample At Minimum Rate min - Resample to the lowest sample rate.
  • Error If Rates Differ err - Doesn't accept conflicting sample rates.

Export Method exportmethod - - This will determine how to connect the CHOP channel to the parameter. Refer to the Export article for more information.

  • DAT Table by Index datindex - Uses the docked DAT table and references the channel via the index of the channel in the CHOP.
  • DAT Table by Name datname - Uses the docked DAT table and references the channel via the name of the channel in the CHOP.
  • Channel Name is Path:Parameter autoname - The channel is the full destination of where to export to, such has geo1/transform1:tx.

Export Root autoexportroot - This path points to the root node where all of the paths that exporting by Channel Name is Path:Parameter are relative to.  

Export Table exporttable - The DAT used to hold the export information when using the DAT Table Export Methods (See above).  

TouchDesigner Build:

CHOPs
Ableton Link • Analyze • Angle • Attribute • Audio Band EQ • Audio Device In • Audio Device Out • Audio Dynamics • Audio File In • Audio File Out • Audio Filter • Audio Movie • Audio NDI • Audio Oscillator • Audio Para EQ • Audio Play • Audio Render • Audio Spectrum • Audio Stream In • Experimental:Audio Stream In • Audio Stream Out • Beat • Bind • BlackTrax • Blend • Blob Track • Bullet Solver • Clip Blender • Clip • Clock • Composite • Constant • Copy • Count • CPlusPlus • Cross • Cycle • DAT to • Delay • Delete • DMX In • Experimental:DMX In • DMX Out • Envelope • EtherDream • Event • Expression • Extend • Fan • Feedback • File In • File Out • Filter • Experimental:Filter • Experimental:FreeD • Function • Gesture • Handle • Helios DAC • Hog • Hokuyo • Hold • Import Select • In • Info • Interpolate • Introduction To CHOPs id • Inverse Curve • Inverse Kin • Join • Joystick • Keyboard In • Keyframe • Kinect Azure • Kinect • Lag • Laser • Leap Motion • Leuze ROD4 • LFO • Limit • Logic • Lookup • LTC In • LTC Out • Math • Experimental:Math • Merge • MIDI In • MIDI In Map • MIDI Out • Mouse In • Mouse Out • NatNet In • Noise • Null • Object • Oculus Audio • Oculus Rift • OpenVR • OSC In • OSC Out • Out • Override • Panel • Pangolin • Parameter • Pattern • Perform • Experimental:Phaser • Pipe In • Pipe Out • PosiStageNet • Pulse • RealSense • Record • Rename • Render Pick • Reorder • Replace • Resample • S Curve • Scan • Script • Select • Sequencer • Serial • Shared Mem In • Shared Mem Out • Shift • Shuffle • Slope • SOP to • Sort • Speed • Splice • Spring • Stretch • Stype • Switch • Sync In • Sync Out • Tablet • Time Slice • Timeline • Timer • TOP to • Touch In • Touch Out • Trail • Transform • Transform XYZ • Trigger • Trim • Warp • Wave • Experimental:WrnchAI • ZED

An Operator Family which operate on Channels (a series of numbers) which are used for animation, audio, mathematics, simulation, logic, UI construction, and many other applications.

A custom interactive control panel built within TouchDesigner. Panels are created using Panel Components whose look is created entirely with TOPs.

The internal states of a panel component are Panel Values, and are accessed with a Panel CHOP, a OP.panel Python expression, or a Panel Execute DAT.

An Operator Family that manipulates text strings: multi-line text or tables. Multi-line text is often a command Script, but can be any multi-line text. Tables are rows and columns of cells, each containing a text string.

samples-per-second of a CHOP. Each CHOP in your network has a sample rate, whether it is used or not. The overall timeline has a "frame rate", which is the number of animation frames per second, generally your monitor display frequency.

A Time Slice is the time from the last cook frame to the current cook frame. In CHOPs it is the set of short channels that only contain the CHOP channels' samples between the last and the current cook frame.

A parameter in most CHOPs that restricts which channels of that CHOP will be affected. Normally all channels of a CHOP are affected by the operator.

Exporting is the connection of CHOP channels to parameters of operators. The output of each exporting CHOP is one or more channels, active only while the CHOP Viewer is on. The current value of a channel can be exported to a parameter of any operator, overriding that parameter's value. See Parameter.

The location of an operator within the TouchDesigner environment, for example, /geo1/torus1, a node called torus1 in a component called geo1. The path / is called Root. To refer instead to a filesystem folder, directory, disk file or http: address, see Folder.

Parameters in TouchDesigner are an operator's settings (numbers, menus, flags, strings, paths) which the user can alter. Parameters for any operator can be opened by right-clicking on the operator and selecting "Parameters..." A currently selected operator's parameters can be viewed in a Network Editor by pressing the keyboard shortcut 'p'.

TouchDesigner is a hierarchy of components. "root" is the top-most network in the hierarchy. The Path is simply /. A typical path is /project1/moviein1.