Loading...
Searching...
No Matches
juce::universal_midi_packets::VirtualEndpoint Class Reference

## Detailed Description

Represents a virtual device that allows this program to advertise itself to other MIDI-aware applications on the system.

Creating a VirtualEndpoint will install a new endpoint on the system. This endpoint will be visible when enumerating endpoints using the Endpoints singleton. If you're displaying a list of endpoints in your UI, it's probably a good idea to omit any virtual endpoints created by the current application in order to avoid confusion.

After creating a VirtualEndpoint, it can be opened like any other connection, by calling Session::connectInput() and Session::connectOutput(), passing the EndpointId for the virtual endpoint.

The documentation for this class was generated from the following file:

- juce_audio_devices/midi_io/ump/juce_UMPVirtualEndpoint.h

## Public Member Functions

| VirtualEndpoint ()
| Creates an invalid virtual endpoint that doesn't correspond to any virtual device.
| ~VirtualEndpoint ()
| VirtualEndpoint (VirtualEndpoint &&) noexcept
VirtualEndpoint & | operator= (VirtualEndpoint &&) noexcept
| VirtualEndpoint (const VirtualEndpoint &)=delete
VirtualEndpoint & | operator= (const VirtualEndpoint &)=delete
EndpointId | getId () const
| Retrieves the unique id of this endpoint.
bool | setBlock (uint8_t index, const Block &newBlock)
| Sets new properties for the block at the given zero-based index.
bool | setName (const String &)
| Assigns a new name to this endpoint, and sends a notification to connected endpoints.
bool | isAlive () const
| Returns true if this object represents an endpoint that is currently alive, or false if the endpoint is not alive.
| operator bool () const

## Constructors and Destructors

## VirtualEndpoint() [1/3]

juce::universal_midi_packets::VirtualEndpoint::VirtualEndpoint | ( |  | ) |

Creates an invalid virtual endpoint that doesn't correspond to any virtual device.

isAlive() will return false for a default-constructed VirtualEndpoint.

Referenced by operator=(), operator=(), VirtualEndpoint(), and VirtualEndpoint().

## ~VirtualEndpoint()

juce::universal_midi_packets::VirtualEndpoint::~VirtualEndpoint | ( |  | ) |

## VirtualEndpoint() [2/3]

juce::universal_midi_packets::VirtualEndpoint::VirtualEndpoint | ( | VirtualEndpoint && |  | ) |

noexcept

References VirtualEndpoint().

## VirtualEndpoint() [3/3]

juce::universal_midi_packets::VirtualEndpoint::VirtualEndpoint | ( | const VirtualEndpoint & |  | ) |

delete

References VirtualEndpoint().

## Member Functions

## operator=() [1/2]

VirtualEndpoint & juce::universal_midi_packets::VirtualEndpoint::operator= | ( | VirtualEndpoint && |  | ) |

noexcept

References VirtualEndpoint().

## operator=() [2/2]

VirtualEndpoint & juce::universal_midi_packets::VirtualEndpoint::operator= | ( | const VirtualEndpoint & |  | ) |

delete

References VirtualEndpoint().

## getId()

EndpointId juce::universal_midi_packets::VirtualEndpoint::getId | ( |  | ) | const

Retrieves the unique id of this endpoint.

Pass this ID to Session::connectInput() and/or Session::connectOutput in order to send and receive messages through the virtual endpoint.

Note that this ID is not guaranteed to be stable - creating the 'same' virtual device across several program invocations may produce a different ID each time.

To fetch the current details of this device, you can pass this ID to Endpoints::getEndpoint().

References getId().

Referenced by getId().

## setBlock()

bool juce::universal_midi_packets::VirtualEndpoint::setBlock | ( | uint8_t | index,
|  | const Block & | newBlock )

Sets new properties for the block at the given zero-based index.

The number of function blocks on an endpoint may not change.

Returns true on success, or false otherwise.

This may fail for several reasons, including:

- attempting to modify an endpoint with static function blocks
- attempting to update a block index that doesn't exist on this endpoint
- attempting to set a block with invalid properties, e.g. the sum of the start index and number of included groups is greater than 16
- platform-specific reasons, e.g. macOS doesn't currently allow changing the number of spanned groups in a block

References setBlock().

Referenced by setBlock().

## setName()

bool juce::universal_midi_packets::VirtualEndpoint::setName | ( | const String & |  | ) |

Assigns a new name to this endpoint, and sends a notification to connected endpoints.

References setName().

Referenced by setName().

## isAlive()

bool juce::universal_midi_packets::VirtualEndpoint::isAlive | ( |  | ) | const

Returns true if this object represents an endpoint that is currently alive, or false if the endpoint is not alive.

This can happen because the endpoint failed to open, or if the session holding the endpoint was closed.

This function returns false for a default-constructed instance.

References isAlive().

Referenced by isAlive(), and operator bool().

## operator bool()

juce::universal_midi_packets::VirtualEndpoint::operator bool | ( |  | ) | const

inline explicit

References isAlive().

### Purchase

Get JUCE

### Discover

What's New in JUCE Features

### Learn

Documentaion Tutorials Made with JUCE Resources

### Support

JUCE Forum Newsletter Archive

### About

Contact Us JUCE Legal JUCE Licensing FAQ

### Events

Audio Developer Conference
© Raw Material Software Limited