# Send message

**Send message** layer template is designed to allow you to send messages through various sender nodes such as UDP, TCP or OSC.

## Variables

### Default

<div align="left"><figure><img src="https://3312042618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9sVaJpWJhPbmscipukhh%2Fuploads%2Fgit-blob-5a19e9b2d418552d23cc4f78a9b7cecc50dbd5c3%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure></div>

* **Device**: select the device which you want to use as the receiver of the message.
* **Type**: select the type of the device you selected in the Device variable. It determines whether you are sending UDP, TCP or OSC message.
* **Frequency**: determines the frequency with which the message is sent. Options are:
  * *Run onc&#x65;**:*** this means, the message will be sent once every time the play head enters the layer.
  * *Delay*: this means, the message will be sent continuously with a delay as long as the playhead is on the layer.
* **Delay**: if you specified *Delay* in the *Frequency* variable, this is where you determine the duration of the delay.
* **Message:** message you'd like to send.

### **OSC**

<div align="left"><figure><img src="https://3312042618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9sVaJpWJhPbmscipukhh%2Fuploads%2Fgit-blob-9f0ead05cf172328730faa656b98bcbc2b030358%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure></div>

These variables are applicable only if you selected one of the OSC options in the *Type* variable.

* **OSC Address:** configure OSC address under which the data is going to be sent.
* **OSC Float:** this is the float value you will be sending if you chose *OSC Float* as the *Type* of the message
* **OSC Int:** this is the float value you will be sending if you chose *OSC Int*as the *Type* of the message
* **OSC String:** this is the float value you will be sending if you chose *OSC String* as the *Type* of the message

## Setting up

### **1. Create the appropriate Device node**

<figure><img src="https://3312042618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9sVaJpWJhPbmscipukhh%2Fuploads%2Fgit-blob-ba49bf9609da4a5c519107f9242e3b593809f306%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

In the Devices window, create an appropriate *Sender* device node. Set it up the way you want and check the **Send** checkbox. For more information you might want to refer to the [Network page](https://docs.lightact.com/integrations/network).

### **2. Inserting the layer**

**Through the right click menu**

Right click in the Timeline, select *Control* category and choose **Send message** layer.

### **3. Set up the layer**

Select the device you created in step 1 and set up all the variables they way you want.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.lightact.com/layers-and-layouts/stock-layer-templates/control-layer-templates/send-message.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
