# Get started with virtual routing

> Create Shapes and Virtual Bundles from physical bundles, connect them with a Matching Preset and take a first virtual-to-virtual route.

## The problem virtual routing solves

A broadcast device is rarely one routeable signal. A camera, replay server, feed, or production area can include video, audio, data, intercom, and other paths. The router exposes those paths as ports, but operators normally think in devices and production tasks:

- `Camera 1`
- `Replay A`
- `Feed 3`
- `PCR 1`

Building every control panel and routing Preset directly from physical ports ties the operator controls to the current hardware design. Replacing a router, moving a device, or changing from SDI to IP can then require the same physical changes to be reproduced across panels, Presets, and operating procedures.

Virtual routing adds a logical routing layer between the operator's intent and the physical system. Engineering maps a logical object such as `Camera 1` to its physical signals. Operators route the logical object. Buttons resolves that intent into routes on real ports.

This separation has two benefits:

- Operators work with names and groupings that match production operations.
- Engineering can replace or rearrange physical equipment by updating the mapping behind a virtual object, without redesigning every panel or routing Preset that uses it.

Virtual routing does not replace physical routing. Every virtual route must still resolve to valid, controllable ports.

A common division of responsibility is for technical staff to configure and maintain the physical-to-virtual mappings, while operators work only with virtual-to-virtual routes. This keeps hardware details out of normal operation without hiding them from the people responsible for engineering the system.

This first guide uses flat virtual Shapes. It does not use nested Shapes or reverse routing.

## Example

Assume the routing configuration contains:

- A physical source bundle named `Camera 1`, with one video port and two audio ports.
- A physical destination bundle named `Studio Monitor 1`, with matching video and audio ports.

You will create:

- A source Virtual Bundle from `Camera 1`.
- A destination Virtual Bundle from `Studio Monitor 1`.
- A Matching Preset describing how their slots connect.
- A virtual-to-virtual route between them.

<callout color="yellow" title="Warning">
  Use non-production ports for this example. Creating or changing a virtual mapping can complete an end-to-end path and cause Buttons to update a physical destination. Taking the final virtual route can change several physical destinations.
</callout>

## Create a source virtual from a physical bundle

The quickest way to get started is to let Buttons create the virtual resources from physical ports you already have. One action creates the Shape, the Virtual Bundles and the mappings to the physical ports, so you can inspect a working result first and build Shapes by hand later if you need to.

1. Open **Routing → Ports**.
2. Find the physical source bundle `Camera 1`. To create several at once, select every bundle that shares the same structure, for example `Camera 1` to `Camera 4`.
3. Right-click the selection and select **Virtual → Create Virtual Bundle**.
4. Under **Shape**, leave **Create New Shape** selected.
5. Set **Shape Label** to `Camera`.
6. Under **Bundle Labels**, keep the physical bundle label or choose a suitable numbered label.
7. Review the **Shape Preview**. Confirm that it contains the expected video and audio slots.
8. Leave **Strict Physical/Virtual Boundary** off for this introductory example.
9. Leave **Route the incoming side** or **Route the outgoing side** enabled, according to the side shown by Buttons.
10. Leave the **Hide** and **Lock** options off during the initial setup.
11. Select **Create**.
12. Review the routing report, then use **Go to bundles** to open the new Virtual Bundle.

The dialog derives slots from the selected physical bundles' port types. With several bundles selected, it creates one shared Shape and one Virtual Bundle for each physical bundle, numbered from **Start Number** when you use numbered labels. If the selected bundles don't share a compatible port structure, Buttons can't produce one useful Shape for all of them.

### What you created

The operation creates two related resources:

- The `Camera` **Shape** describes the reusable structure: one video slot and the available audio slots.
- The `Camera 1` **Virtual Bundle** is one logical device built from that Shape.

When **Route the … side** is enabled, it also creates mappings between the physical ports and the corresponding virtual slots. These mappings become the physical edge of routes that use the Virtual Bundle.

## Use the source virtual

Open **Routing → Virtual → Bundles**, then select `Camera 1`.

The bundle detail shows:

- The Shape used by the bundle.
- **Incoming** on the left and **Outgoing** on the right.
- One row for each slot.
- The physical or virtual routes currently touching each side.

At this point, `Camera 1` can be selected as a logical source in routing interfaces that allow virtual resources. The operator no longer needs to select the camera's video and audio ports separately.

The Virtual Bundle is also the stable object that panels and saved routing Presets can refer to. If the physical camera is later connected through different hardware, update the physical mapping behind `Camera 1`. The operator-facing logical route can remain unchanged.

## Hide or lock the implementation side

A Virtual Bundle has separate **Incoming** and **Outgoing** sides. Often, one side exists only to connect the virtual to the physical system and should not be part of normal operator routing.

For a source virtual, engineering might map the physical source ports to the virtual's incoming side once. The incoming side can then be hidden so operators route only from the logical outgoing side.

For a destination virtual, the outgoing side can similarly hold the fixed mapping from the virtual to physical destination ports while operators route only to its logical incoming side.

Open the Virtual Bundle and use its side settings:

- **Hidden** removes that side's ports from routing interfaces.
- **Locked** keeps the side visible but prevents routing changes.
- **Hidden** and **Locked** together conceal the implementation mapping from routing interfaces and protect it from changes.

A useful setup sequence is:

1. Leave the implementation side visible and unlocked while configuring it.
2. Map every required physical port.
3. Become familiar with the resulting route and its report.
4. Turn on **Hidden** if operators should never select that side in routing interfaces.
5. Turn on **Locked** if the mapping must not be changed during normal operation.
6. Save the Virtual Bundle settings and confirm that the operator-facing side remains available.

The **Create Virtual Bundle** dialog also offers **Hide the … side** and **Lock the … side**. Use those options when the generated mapping is already understood. During the initial setup, leaving them off makes the mapping easier to inspect.

## Understand the generated Shape

A **Shape** is a reusable template for a kind of Virtual Bundle. It defines which signal positions are available and the bundle's main direction.

Open **Routing → Virtual → Shapes**, then select `Camera`.

The generated Shape contains:

- A **Label** identifying the device type.
- A **Main Direction** of **Source** because it was created from a physical source bundle.
- A list of **Slots** derived from the physical bundle.
- An icon, color, label, and data type for each slot.
- Visibility settings for the Shape's incoming and outgoing sides.

A slot is one routeable position in the logical device. The slot does not contain the physical port. It provides the stable logical position to which a physical or virtual port can be mapped.

For example, the `Video` slot remains the camera's logical video output even if the physical SDI connector or IP sender changes later.

## How to make a Shape manually

The port-config shortcut is useful when physical bundles already describe the required structure. You can also create the structure directly:

1. Open **Routing → Virtual → Shapes**.
2. Select **+ Shape**.
3. Change **Label** from `New Shape` to the device type, such as `Camera`.
4. Set **Main Direction** to **Source** or **Destination**.
5. Use **+** under **Slots** to add each signal position.
6. Give every slot an operational label and the correct **Data Type**.
7. Order the slots consistently.
8. Leave **Reverse Slots** off for this flat Shape.
9. Set **Incoming Side** and **Outgoing Side** visibility to **Any context** while configuring the Shape.
10. Save the Shape.

Keep the first Shape flat and small. Use one slot for each signal that needs independent routing behavior. Do not add hierarchy merely to organize the display; nested Shapes affect matching and route expansion and are covered separately.

After creating a Shape, open **Routing → Virtual → Bundles** and select **+ Bundle** to create instances from it. A Shape can be reused for many devices, such as `Camera 1`, `Camera 2`, and `Camera 3`.

## Create a destination virtual from a physical bundle

Create the destination in the same way:

1. Return to **Routing → Ports**.
2. Find the physical destination bundle `Studio Monitor 1`.
3. Right-click it and select **Virtual → Create Virtual Bundle**.
4. Leave **Create New Shape** selected.
5. Set **Shape Label** to `Studio Monitor`.
6. Review the preview and confirm that its slot types correspond to the source Shape.
7. Leave the strict-boundary, hide, and lock options off during the initial setup.
8. Leave **Route the … side** enabled.
9. Select **Create** and review the routing report.

Buttons creates:

- A destination Shape named `Studio Monitor`.
- A destination Virtual Bundle named `Studio Monitor 1`.
- Mappings between the Virtual Bundle's slots and the selected physical destination ports.

Open both Shapes and compare their slots. The labels do not have to be identical, but the intended source and destination slots must have compatible directions and data types.

## Create a Matching Preset

A **Matching Preset** describes how slots from one Shape connect to slots in another Shape. It is different from a saved routing **Preset**, which stores routes for later recall.

1. Open **Routing → Virtual → Presets**.
2. Create a Matching Preset.
3. Set **Name** to `Camera to Studio Monitor`.
4. Set **Source Shape** to `Camera`.
5. Set **Destination Shape** to `Studio Monitor`.
6. Leave **Reverse Routing** off.
7. Select **Create**.
8. Review the generated **Rules**.
9. Connect the camera video slot to the monitor video slot.
10. Connect each audio source slot to the intended audio destination slot.
11. Remove any incorrect rule.
12. Leave **Exclusive Destination** off for this first example.
13. Save the Matching Preset.

Buttons initially auto-matches compatible forward slots. **Auto-match Forward Only** can rebuild those rules, but the result still needs review. A Matching Preset expresses engineering intent; matching labels or data types alone do not prove that a route is operationally correct.

### How the route is resolved

The physical-to-virtual mappings and Matching Preset have different roles:

1. The physical mappings connect physical source and destination ports to virtual slots.
2. When a virtual-to-virtual route uses a Matching Preset, Buttons expands its rules into virtual slot-to-slot mappings.
3. Buttons follows the resulting end-to-end paths from physical sources, through the virtual mappings, to physical destinations.
4. For each physical destination that is not already on the resolved source, Buttons creates the physical route request required to satisfy that path.

The Matching Preset therefore determines which virtual slots connect and, together with the physical edge mappings, which physical route requests result. The routing report can contain both virtual mapping changes and actions sent to physical routing backends.

## Route virtual to virtual

1. Open **Routing → Route**.
2. Select the virtual source `Camera 1`.
3. Select the virtual destination `Studio Monitor 1`.
4. In the staged bundle row, select `Camera to Studio Monitor` as the Matching Preset.
5. Select the eye control to open **Preview preset mapping**.
6. Confirm that every forward slot maps to the intended destination slot.
7. Inspect the expanded mappings and the physical destination changes that Buttons plans to make.
8. Select **Take**.
9. Review the execution result and route state.

The operator chose one logical route: `Camera 1 → Studio Monitor 1`. Buttons expanded the Matching Preset into virtual slot mappings, resolved the complete paths through their physical edges, and sent the required physical route requests.

## Why use this instead of physical routes everywhere?

Virtual routing is most useful when the logical routing design should outlive the current infrastructure:

- **Simpler operation:** one device-wide selection can represent several related signals.
- **Consistent panels:** every panel can use the same logical names and groupings.
- **Reusable routing intent:** one Matching Preset can describe how every Camera bundle connects to every compatible Studio Monitor bundle.
- **Hardware independence:** replace a router port, gateway, sender, receiver, or complete device by updating the virtual-to-physical mapping.
- **Safer maintenance:** engineering changes remain behind the logical interface instead of being repeated in every operator panel and saved route.
- **Scalable configuration:** define the Shape once, then create many Virtual Bundles from it.

The abstraction depends on accurate physical mappings. After hardware changes, become familiar with the updated behavior before deploying it in production.
