> For the complete documentation index, see [llms.txt](https://stage-precision.gitbook.io/grid/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://stage-precision.gitbook.io/grid/touch-designer-integration/parameter-control/value-example.md).

# Value Example

Receive a named brightness value from Grid Studio and use the SPNet Generic CHOP to control an image through a Level TOP.

## Control image brightness

This example sends a Float named `brightness` from Grid Studio to TouchDesigner.

The SPNet Generic CHOP receives the value. A CHOP export connects it to the Brightness 1 parameter of a Level TOP.

### 1. Prepare Grid Studio

Use the setup described in **Send parameter values from Grid Studio**.

Configure a Workflow Action or Modifier node to send:

| Setting           | Value          |
| ----------------- | -------------- |
| Name              | `brightness`   |
| Type              | Float          |
| Initial value     | `0.5`          |
| SPNet destination | `237.37.37.37` |
| UDP port          | `37373`        |

Start the SPNet Sender. If you use a Workflow, execute the send action after the TouchDesigner receiver is ready.

### 2. Add the SPNet Generic CHOP

In `/project1`:

1. Add the **CHOP version of SPNet Generic** from the Custom operators.
2. Rename it to `spnet_controls`.
3. On its **Data** page, configure:

| Parameter   | Value        |
| ----------- | ------------ |
| Output Mode | `Live Data`  |
| Data Type   | `Float`      |
| Name Filter | `brightness` |
| Timeout ms  | `0`          |

On the **Connection** page, use:

| Parameter         | Value          |
| ----------------- | -------------- |
| Port              | `37373`        |
| Bind Address      | `0.0.0.0`      |
| Multicast Group   | `237.37.37.37` |
| Interface Address | `0.0.0.0`      |

{% hint style="info" %}
Name Filter is case-sensitive. Use the same spelling and capitalization as the outgoing name in Grid Studio.
{% endhint %}

### 3. Receive the first value

Send `brightness = 0.5` from Grid Studio.

For a Workflow, trigger the send action. For a Modifier, ensure the chain is processing and sending its value.

The CHOP should now contain a channel named `brightness` with one sample showing `0.5`.

Confirm that this channel is available before creating the export.

### 4. Prepare the image

In `/project1`:

1. Create a **Movie File In TOP** named `image`.
2. Load an image or video.
3. Create a **Level TOP** named `image_level`.
4. Connect the image to the Level TOP.
5. Add a **Null TOP** named `image_out` after the Level TOP.

The image chain is:

```
image → image_level → image_out
```

Leave the Level TOP's settings at their defaults for now.

### 5. Add a control output

Create a **Null CHOP** named `controls_out` and connect:

```
spnet_controls → controls_out
```

This Null CHOP provides the channel used for the parameter export.

### 6. Export brightness to the Level TOP

1. Enable **Viewer Active** on `controls_out`.
2. Open `image_level` and select its **Pre** parameter page.
3. Drag the `brightness` channel from the Null CHOP's viewer onto **Brightness 1**.
4. Choose **Export CHOP** from the menu.
5. Ensure the **Export flag** on `controls_out` is enabled.

Brightness 1 turns green when the export is connected.

The incoming number now becomes the Level TOP's Brightness 1 setting.

### 7. Test the control

View `image_out` and send different values from Grid Studio.

| Sent value | Expected Brightness 1 setting |
| ---------- | ----------------------------- |
| `0.25`     | `0.25`                        |
| `0.5`      | `0.5`                         |
| `0.75`     | `0.75`                        |

Watch the image change as you adjust the value.

For Workflow Actions, execute the action again after changing its value. For Modifiers, update the value feeding the SPNet send node.

{% hint style="info" %}
Timeout is set to zero, so the latest brightness value remains available between updates. This also works when the value is sent only once by a Workflow Action.
{% endhint %}

### Check the result

You should be able to follow the value through:

```
Grid Studio
    → SPNet Generic CHOP
    → Null CHOP
    → Level TOP: Brightness 1
    → Processed image
```

If no brightness channel appears, check the name, Float data type, connection settings, and whether the send action has executed.

If the channel updates but the image does not change, check the Null CHOP's Export flag and confirm that the export targets Brightness 1 on `image_level`.
