Leap Motion CHOP

From Derivative
Jump to: navigation, search

Summary
[edit]

The Leap Motion CHOP reads hand, finger, tool and gesture data from the Leap Motion controller. It outputs hand, finger and tool positions, rotations and 'tracking' channels that indicate if these values are currently being detected and updated. Currently only 1 Leap Motion device can be connected at a time.

See also Leap Motion

To use it you will need to install the Leap Motion software which is available here:

PythonIcon.pngleapmotionCHOP_Class


Parameters - Setup Page

Active active - If set, this CHOP will update the values in its channels.

HMD Mode hmd - - Switches the device to Head Mounted Display mode.

  • Default default -
  • On on -
  • Off off -

Debug Channels debugchannels - If set, the following channels will be included:

  • connected - 1 if the Leap Motion sensor is connected, 0 otherwise.
  • sequence_id - Unique id corresponding to the current frame.

Status Channels statuschannels - If set, the following channels will be included:

  • hands - Number of hands detected by the sensor.
  • fingers - Number of fingers detected by the sensor.
  • tools - Number of tools detected by the sensor.
  • gestures - Number of gestures detected by the sensor.
  • [hand

Named Hands namedhands -

Hands hands - Number of hands. The following channels will be included for each detected hand:

  • hand*:t[xyz] - Coordinates of the hand relative to the sensor.
  • hand*:r[xyz] - Rotation of the detected hand.

Left Hands lefthands -

Right Hands righthands -

Hand Velocity handvelocity - If set, the following channels will be included for each hand, in addition to any others:

  • hand*:v[xyz] - Velocity of the detected hand.

Hand Sphere handsphere -

Pinch Strength pinchstrength -

Grab Strength grabstrength -

Named Fingers namedfingers -

Fingers per Hand fingersperhand -

Finger Rotation fingerrotation -

Finger Size fingersize - If set, the following channels will be included for each finger, in addition to any others:

  • hand*/finger*:length - Length of the detected finger.
  • hand*/finger*:width - Width of the detected finger.

Finger Extended fingerextended -

Finger Joints fingerjoints -

Tools tools - Number of tools. The following channels will be included for each detected tool:

  • tool*:t[xyz] - Coordinates of the tool relative to the sensor.
  • tool*:length - Length of the detected tool.
  • tool*:width - Width of the detected tool.

Circle Gestures circlegestures - Number of circle gestures. The following channels will be included for each detected Circle Gesture:

  • circle*:handindex - Index of the hand associated with the gesture. See Notes.
  • circle*:t[xyz] - Coordinates of the center of the Circle Gesture relative to the sensor.
  • circle*:radius - Radius of the circle in the gesture.
  • circle*:progress - Number of cycles done in the gesture.

Swipe Gestures swipegestures - Number of swipe gestures. The following channels will be included for each detected Swipe Gesture:

  • swipe*:handindex - Index of the hand associated with the gesture. See Notes.
  • swipe*:fingerindex - Index of the finger associated with the gesture. See Notes.
  • swipe*:t[xyz] - Coordinates of the Swipe Gesture relative to the sensor.
  • swipe*:start[xyz] - Coordinates of the start of the Swipe Gesture relative to the sensor.
  • swipe*:speed - Speed of the swipe.

Key Tap Gestures keytapgestures - Number of key tap gestures. The following channels will be included for each detected Key Tap Gesture:

  • keytap*:handindex - Index of the hand associated with the gesture. See Notes.
  • keytap*:fingerindex - Index of the finger associated with the gesture. See Notes.
  • keytap*:t[xyz] - CCoordinates of the Screen Tap Gesture relative to the sensor.


NOTES: Rotation order is Rx Ry Rz. All vectors are given in the following coordinate system.

For gestures, if handindex is 1, then channels with the prefix hand1 contain the data for the hand associated with the gesture. If handindex is -1 it means there are no channels available for the hand associated with the gesture. The same follows for fingerindex.

Data for all indexed prefixes (hand*, hand/finger*, etc.) will continue to correspond to the same hand/finger/tool/gesture as long as the Leap Motion sensor is detecting it.

Limits for hands/fingers/tools/gestures will filter data from the Leap Motion sensor if there are more than the specified limit detected.

Screen Tap Gestures screentapgestures -


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).


CHOPs
Ableton Link • Analyze • Angle • Attribute • Audio Band EQ • Audio Device In • Audio Device Out • Audio Dynamics • Audio File In • Audio Filter • Audio Movie • Audio Oscillator • Audio Para EQ • Audio Play • Audio Render • Audio Spectrum • Audio Stream In • Audio Stream Out • Beat • BlackTrax • Blend • Clip Blender • Clip • Clock • Composite • Constant • Copy • Count • CPlusPlus • Cross • Cycle • DAT to • Delay • Delete • DMX In • DMX Out • Envelope • EtherDream • Event • Expression • Extend • Fan • Feedback • File In • File Out • Filter • Function • Gesture • Handle • Helios DAC • Hog • Hokuyo • Hold • In • Info • Interpolate • Introduction To CHOPs id• Inverse Curve • Inverse Kin • Join • Joystick • Keyboard In • Keyframe • Kinect • Lag • Leap Motion • Leuze ROD4 • LFO • Limit • Logic • Lookup • LTC In • LTC Out • 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 • Parameter • Pattern • Perform • 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 • Switch • Sync In • Sync Out • Tablet • Time Slice • Timeline • Timer • TOP to • Touch In • Touch Out • Trail • Transform • Trigger • Trim • Warp • Wave • ZED

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

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.

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.

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 is on. The current value of a channel can be exported to a parameter of any operator, overriding that parameter's value. See .

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

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 . To refer instead to a filesystem folder, directory, disk file or http: address, see .

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 by pressing the keyboard shortcut 'p'.

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