ODIN Unreal Engine SDK Blueprint Reference

Functions

Construct Local Room Handle

Definition

Name
Construct Local Room Handle
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/construct-local-room-handle
Construct Local Room Handle

Creates a local room object that will be used to handle events and client side connection settings. Connect the Room output to the Room input of the Join Room node. You can also use the Room output to handle events like Room Joined or Media Added.

Inputs

NameTypeDescription
Initial APM SettingsAPMSettingsThe initial APM settings to use when constructing the room. Use the Make APM Settings node to create initial APM Settings.

Outputs

NameTypeDescription
Return ValueRoomThe constructed room object.

Make ODIN APM Settings

Definition

Name
Make ODIN APM Settings
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/make-odin-apm-settings
Make ODIN APM Settings

Creates an APM settings object that can be used to construct a local room handle.

Inputs

NameTypeDescription
Enable Voice Activity DetectionbooleanWhen enabled, ODIN will analyze the audio input signal using smart voice detection algorithm to determine the presence of speech. You can define both the probability required to start and stop transmitting.
Attack ProbabilityfloatVoice probability value when the VAD should engage.
Release ProbabilityfloatVoice probability value when the VAD should disengage. It’s recommended to keep this value 0.1 lower than the attack probability.
Enable Volume GatebooleanWhen enabled, the volume gate will measure the volume of the input audio signal, thus deciding when a user is speaking loud enough to transmit voice data. You can define both the root mean square power (dBFS) for when the gate should engage and disengage.
Attack Loudness (D BFS)floatRoot mean square power (dBFS) when the volume gate should engage.
Release Loudness (D BFS)floatRoot mean square power (dBFS) when the volume gate should disengage. It’s recommended to keep this value 10 lower than the attack loudness.
Echo CancellerbooleanWhen enabled, aligns the original and the reverse audio stream to negate the output inside the input, resulting in effective echo cancellation
High Pass FilterbooleanWhen enabled, the high-pass filter will remove low-frequency content from the input audio signal, thus making it sound cleaner and more focused.
Pre AmplifierbooleanWhen enabled, the preamplifier will boost the signal of sensitive microphones by taking really weak audio signals and making them louder.
Noise SuppressionenumWhen enabled, the noise suppressor will remove distracting background noise from the input audio signal. You can control the aggressiveness of the suppression. Increasing the level will reduce the noise level at the expense of a higher speech distortion.
Transient SuppressionbooleanWhen enabled, the transient suppressor will try to detect and attenuate keyboard clicks.
Gain ControllerbooleanWhen enabled, the gain controller will automatically bring the signal to an appropriate range. This means input signals with low volume will be amplified and high volume will be limited.

Outputs

NameTypeDescription
Return ValueAPMSettingsThe constructed APM settings object.

Discussion

Audio settings can sometimes be challenging to navigate, especially for those new to the field. While many options are straightforward, some require specific values to optimize performance.

In environments with high background noise, it’s essential to prevent this noise from being transmitted. To address this, we offer two key settings:

Voice Activity Detection

Our system utilizes a few milliseconds of audio to ascertain if the user is speaking by leveraging an advanced AI model. It’s recommended to keep this feature enabled.

The AI model operates on a probability scale ranging from 0.0 to 1.0, where 0.0 indicates zero likelihood of voice presence, and 1.0 signifies absolute certainty. Adjust the Attack and Release settings to define the probability thresholds for starting and stopping transmission.

Optimal settings are generally 0.9 for Attack (90% certainty of voice) and 0.8 for Release. We recommend setting the Release value slightly lower than the Attack value, ideally maintaining an offset of 0.1.

While effective in many scenarios, certain situations, like a bustling open-office, may require additional measures. In these cases, the AI might confidently detect voice, but it may not be the voice of the intended speaker.

Here, the Volume Gate filter proves useful:

Volume Gate

The Volume Gate operates by setting a volume threshold below which the microphone remains disabled. This helps distinguish between actual speech and lower-volume background noises. The gate activates only when the detected sound exceeds this threshold.

Understanding this concept might be initially complex. A useful resource is Wikipedia on DBFS.

It’s generally advisable to disable this feature initially. A starting points for settings could be -40 for Release and -30 for Attack. We recommend setting the Release value slightly lower than the Attack value, ideally maintaining an offset of 10. For further assistance, please feel free to contact our support team.

Generate Room Token

Definition

Name
Generate Room Token
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/generate-room-token
Generate Room Token

Takes an access key and a room id and creates a room token that is used to join a room. In production this should be done in a protected environment, e.g. your authentication server (see example project `Token Server´)

Inputs

NameTypeDescription
Execexec
TargetToken GeneratorUse the Construct Token Generator node to generate a token generator.
Room IdstringThe room id to generate a token for. Every user connected to the same room can talk to each other and exchange data.
User IdstringThe user id to generate a token for. You can use any string that makes sense for you to connect Odin peers to your users.
Token AudienceenumThe enum value of the token audience. Possible values are Default (for using a gateway) or Single Server (for using a specific Odin server without a gateway).

Outputs

NameTypeDescription
Execexec
Return ValuestringReturns a room token that can be used to join a room.

Construct a Token Generator

Definition

Name
Construct a Token Generator
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/construct-a-token-generator
Construct a Token Generator

Creates a token generator that is used to generate room tokens on client side.

Important

It is ok for development and testing purposes to create room tokens on client side - but in production you should switch to server side generation of room tokens!

Inputs

NameTypeDescription
Access KeystringThe access key for generating room tokens. You need to get an access key by signing up to the service or create a test key by following our Getting Started guide.

Outputs

NameTypeDescription
Return ValueToken GeneratorThe constructed token generator object. Connect to Generate Room Token to generate a room token.

Join Room

Definition

Name
Join Room
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/join-room
Join Room

Joins an ODIN room with the room token provided. Every peer connected to the same room will be able to talk to each other and exchange data.

Inputs

NameTypeDescription
Execexec
RoomRoomConnect the Room instance created by the Construct local room handle node. This room handle will later be used to handle events.
UrlstringThe url to the ODIN gateway. Typically this is https://gateway.odin.4players.io.
TokenstringThe token you created with the Generate Room Token node.
Initial Peer User DataArray of byteUser data can be anything and will be associated with the user (peer) on ODIN servers. User Data is automatically synchronized with other users in the same ODIN room. This enables you to easily exchange data like names or IDs.
Initial Peer PositionvectorThe initial peer position in Odin’s space. This value is used to optimize audio streams by not streaming audio data to peer’s that are outside of hearing range. Please refer to the Update Peer Position node for more information and to update the position later on.
On ErrordelegateDelegate to handle errors while joining a room. Most of the time, an error will occur when the room token is invalid or the room is full.
On SuccessdelegateCalled when the room has been successfully joined.

Outputs

NameTypeDescription
Execexec
On ResponseexecCalled when the gateway has returned its response. The success output indicates whether the room was successfully joined.
Successbooleantrue if the room has been successfully joined.

Discussion

Once you have joined the room, a sequence of events is created. You can learn more about these events here.

To handle these events create a Bind to .... node and connect that to your Room node created earlier in Construct local room handle node.

Info

If you cannot find the Bind to .... node (for example Bind to Room Joined Event), you need to disable the context filter in the blueprint node selection dialog.

Construct Local Media

Definition

Name
Construct Local Media
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/construct-local-media
Construct Local Media

Creates a media object that will be used in the Add Media To Room node input. Connect an Audio Capture or Odin Audio Capture object to it.

Important

Use the Create Audio Capture or Create Odin Audio Capture node to get access to the microphone on the users device. Make sure that the Audio Capture Plugin is enabled. You’ll find it in the Audio section of the Plugin Manager.

Inputs

NameTypeDescription
Audio CaptureAudio Capture Object ReferenceThe audio capture object reference.

Outputs

NameTypeDescription
Return ValueOdin Capture Media Object ReferenceA reference to the constructed Odin Capture Media object.

Create Odin Audio Capture

Definition

Name
Create Odin Audio Capture
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/create-odin-audio-capture
Create Odin Audio Capture

Creates an Odin Audio Capture object, that can be used to get access to the microphone on the users device. The Odin Audio Capture object adds features to the default Unreal Audio Capture, like enabling capture device switching on supported platforms or improved Push-To-Talk features. Please make sure, that the Audio Capture Plugin is enabled.

Outputs

NameTypeDescription
Return ValueOdin Audio Capture Object ReferenceA reference to the constructed Odin Audio Capture object.

Add Media To Room

Definition

Name
Add Media To Room
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/add-media-to-room
Add Media To Room

Adds a previously generated media object to the room. Once this is done, the users microphone input will be sent to other users so they can hear the audio.

Important

The user must have joined the room before adding media. Use the Join Room node to join the room. Also, you cannot use the same media stream for multiple rooms at once, but you have to create a new one for each room.

Inputs

NameTypeDescription
Execexec
RoomRoomThe room to which the media will be added.
MediaMediaThe media which should be added. Construct Local Media can be used to create a media object.
On ErrordelegateDelegate to handle errors while adding a media to a room.
On SuccessdelegateCalled when the media has been successfully added to the room. See On Media Added Success event for details.

Outputs

NameTypeDescription
Execexec
On ResponseexecCalled when the gateway has returned its response. Use the success output to understand if anything went fine.
Successbooleantrue if the media has been successfully joined.

On Add Media To Room Success

Definition

Name
On Add Media To Room Success
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-add-media-to-room-success
On Add Media To Room Success

This event is triggered in the Add Media To Room function once the media has been added to the room successfully.

Inputs

NameTypeDescription
DelegatedelegateBind to a Add Media To Room On Success delegate node to get this event triggered once the media has been added to the room.

Outputs

NameTypeDescription
Execexec
Media IdintegerThe media id added to the room.

Format Error

Definition

Name
Format Error
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/format-error
Format Error

Takes an ODIN error code and returns an error message a string which can be printed to the log.

Inputs

NameTypeDescription
CodeintegerThe error code.

Outputs

NameTypeDescription
Return ValuestringThe error message for the code.

Generate Access Key

Definition

Name
Generate Access Key
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/generate-access-key
Generate Access Key

Creates an access key that can be used to generate room tokens. These keys are only for development and should not be used in production.

Important

Do not connect this node directly to the Generate Room Token node, as a new access key would be generated during each play session for each users. Instead, print the generated access key into a log and store it in a variable, connecting that variable with the Generate Room Token node.

Outputs

NameTypeDescription
Return ValuestringThe access key for up to 25 peak concurrent users (PCU) per day. Connect to a log function to output the access key and then use that access key as input for the Generate Room Token node.

Add Odin Synth Component

Definition

Name
Add Odin Synth Component
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/add-odin-synth-component
Add Odin Synth Component

Adds the Odin Synth Component to the specified actor.

Inputs

NameTypeDescription
Execexec
TargetActor Object ReferenceThe Actor to which the Odin Synth Component will be added.
Manual AttachmentbooleanWhen Manual Attachment is set, automatic attachment to the target actor is skipped and it is up to the user to attach the resulting component (or set it up as the root) themselves.
Relative TransformTransformThe relative transform of the component to the target actor.

Outputs

NameTypeDescription
Execexec
Return ValueOdin Synth ComponentReturns the Odin Synth Component that will output audio from the media stream assigned by the Odin Assign Synth to Media node.

Odin Assign Synth to Media

Definition

Name
Odin Assign Synth to Media
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/odin-synth-component/odin-assign-synth-to-media
Odin Assign Synth to Media

Assign a media stream coming with the Media Added event to the Odin Synth Component which will generate audio output from the incoming stream.

Inputs

NameTypeDescription
Execexec
TargetOdin Synth ComponentThe Odin Synth Component that you either get from an Actor using the GetComponentByClass node or from the Add Odin Synth Component node.
MediaMedia Object ReferenceThe media stream to be assigned to the Odin Synth Component. You’ll get that from the Media Added event.

Outputs

NameTypeDescription
Execexec

Set Room Position Scale

Definition

Name
Set Room Position Scale
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/set-room-position-scale
Set Room Position Scale

Sets the multiplicative scale for all coordinates used in position updates. Use this as the maximum radius in which a peer can be heard. The scale value is used to optimize audio streams by not streaming audio data to peer’s that are outside of hearing range.

Important

The position scale should be set to the same value for all peers in the ODIN room. The scale value also has to be set individually for each room that will utilize ODIN’s optimization feature.

Inputs

NameTypeDescription
Execexec
TargetRoomThe room for which the scale should be set.
ScalefloatThe value of the scale as float.

Outputs

NameTypeDescription
Execexec

Update Peer Position

Definition

Name
Update Peer Position
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/update-peer-position
Update Peer Position

Updates the position of the own peer in the room. You have to set the scale beforehand via Set Room Position Scale.

Important

Invoking this method too frequently can lead to operational issues where the optimization of audio streams may not function correctly. Limit the frequency of calling Update Peer Position to a maximum of 10 times per second.

Tip

This function is optional and only used for performance reasons and to save bandwidth. This is not needed to make spatial audio work.

Inputs

NameTypeDescription
Execexec
RoomRoomThe room in which the peer’s position shall be set.
PositionvectorThe value of the position.
On ErrordelegateDelegate to handle errors while updating the position.
On SuccessdelegateCalled when the position has been successfully updated.

Outputs

NameTypeDescription
Execexec
On ResponseexecCalled when the server has returned its response. Use the ‘success’ value to check if the position has been successfully set.
Successbooleantrue if the position has been successfully set.

Bind to On Connection State Changed

Definition

Name
Bind to On Connection State Changed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-connection-state-changed
Bind to On Connection State Changed

Listens to on Connection State Changed events from the given Room object and calls the connected event handler of type On Connection Changed.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be checked. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect a On Connection State Changed Event to handle this event.

Outputs

NameTypeDescription
Execexec

On Connection State Changed

Definition

Name
On Connection State Changed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-connection-state-changed
On Connection State Changed

Handles Connection State Changed events which are called when the connection state changed (i.e. a disconnect to the server). Connect a Bind to On Connection State Changed delegate node to handle this event for the specified room.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Onnection State Changed node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateBind to a Bind to On Connection State Changed delegate node to get this event triggered once the room has been joined.

Outputs

NameTypeDescription
Execexec
Connection StateenumThe enum value of the connection state. Possible values are Disconnected, Disconnecting, Connecting, Connected.
RoomRoom Object ReferenceThe Room object reference for which the connection changed event occured.

Bind to On Room Joined

Definition

Name
Bind to On Room Joined
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-room-joined
Bind to On Room Joined

Listens on Room Joined events on the given Room object and calls the connected Room Joined Event handler.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be triggered. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect a Room Joined Event to handle this event.

Outputs

NameTypeDescription
Execexec

On Room Joined

Definition

Name
On Room Joined
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-room-joined
On Room Joined

Handles Room Joined events which are called once the local user has successfully joined a room. Connect a Bind to On Room Joined delegate node to handle this event for the specified room.

Important

The resulting peer id is only valid in the context of this room. This event will only be called for the local user.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Room Joined node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateCall the Bind to On Room Joined node to get this event triggered once the room has been joined.

Outputs

NameTypeDescription
Execexec
Peer IdintegerThe id of the peer that joined the room. This is the self peer id, i.e. the peer id of the local player. This peer id is only valid in the context of this room!
Room User DataArray of byteThe user data stored in the room for the peer as an array of bytes.
RoomOdin Room Object ReferenceThe Odin Room to which the peer joined.

Bind to On Room User Data Changed

Definition

Name
Bind to On Room User Data Changed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-room-user-data-changed
Bind to On Room User Data Changed

Bind to Room User Data Changed events in the given Room.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be triggered. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect an On Room User Data Changed Event to handle this event.

Outputs

NameTypeDescription
Execexec

On Room User Data Changed

Definition

Name
On Room User Data Changed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-room-user-data-changed
On Room User Data Changed

Called whenever the user data of the room changed. Connect a Bind to On Room User Data Changed delegate node to handle this event for the specified room.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Room User Data Changed node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateConnect to the Bind to On Room User Data Changed node to get this event triggered once a peer has left the room.

Outputs

NameTypeDescription
Execexec
User DataArray of byteThe updated user data of the room as an array of bytes.
RoomRoom Object ReferenceThe Room object reference for which the Room User Data was changed.

Bind to On Peer Joined

Definition

Name
Bind to On Peer Joined
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-peer-joined
Bind to On Peer Joined

Listens to Peer Joined events in the given Room object. Peer Joined events will be called whenever a peer joins the room. Will not be called for the local player. Use the On Room Joined event to handle joins from the local player instead.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be triggered. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect a Peer Joined Event to handle this event.

Outputs

NameTypeDescription
Execexec

On Peer Joined

Definition

Name
On Peer Joined
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-peer-joined
On Peer Joined

Called whenever a peer joins the room. Connect a Bind to On Peer Joined delegate node to handle this event for the specified room.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Peer Joined node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateBind to a Bind to On Peer Joined delegate node to get this event triggered once a peer has joined the room.

Outputs

NameTypeDescription
Execexec
Peer IdintegerThe id of the peer that joined the room. This is the self peer id, i.e. the peer id of the local player.
User DataArray of byteThe user data of the peer as an array of bytes
RoomRoom Object ReferenceThe Room object reference for which the event was triggered.

Bind to On Peer Left

Definition

Name
Bind to On Peer Left
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-peer-left
Bind to On Peer Left

Listens on Peer Left events on the given Room object which will be called whenever a peer left the room. Is not called for the local player.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be triggered. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect to an On Peer Left Event to handle Peer Left event calls.

Outputs

NameTypeDescription
Execexec

On Peer Left

Definition

Name
On Peer Left
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-peer-left
On Peer Left

Called whenever a peer leaves the room. Connect to a Bind to On Peer Left node to handle this event for the specified room.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Peer Left node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateConnect to a Bind to On Peer Left delegate node to get this event triggered once a peer has left the room.

Outputs

NameTypeDescription
Execexec
Peer IdintegerThe id of the peer that joined the room.
RoomRoom Object ReferenceThe Room object reference for which the event was triggered.

Bind to On Peer User Data Changed

Definition

Name
Bind to On Peer User Data Changed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-peer-user-data-changed
Bind to On Peer User Data Changed

Listens to Peer User Data Changed events for the given Room object. Peer User Data Changed events will be called whenever a peer updates their user data. Is not called for the local player.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be triggered. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect to a Peer User Data Changed Event to handle this event.

Outputs

NameTypeDescription
Execexec

On Peer User Data Changed

Definition

Name
On Peer User Data Changed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-peer-user-data-changed
On Peer User Data Changed

Called whenever a peer has changed its user data. Connect to a Bind to On Peer User Data Changed node to handle this event for the specified room.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Peer User Data Changed node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateConnect to a Bind to On Peer User Data Changed node to get this event triggered once a peer has left the room.

Outputs

NameTypeDescription
Execexec
Peer IdintegerThe id of the peer that joined the room.
User DataArray of byteThe updated user data of the peer as an array of bytes.
RoomRoom Object ReferenceThe Room object reference for which the event was triggered.

Bind to On Media Added

Definition

Name
Bind to On Media Added
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-media-added
Bind to On Media Added

Listens for On Media Added events in the given Room object. On Media Added events will be called whenever a peer has added a media (i.e. activated the microphone). Is not called for the local player.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be triggered. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect to an On Media Added to handle this event.

Outputs

NameTypeDescription
Execexec

On Media Added

Definition

Name
On Media Added
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-media-added
On Media Added

Called whenever a peer has added a media (i.e. activated the microphone). Connect to a Bind to On Media Added delegate node to handle this event for the specified room. Will not be called for the local player.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Media Added node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateConnect to a Bind to On Media Added delegate node to get this event triggered once a peer has added a media object.

Outputs

NameTypeDescription
Execexec
Peer IdintegerThe id of the peer that added the media.
MediaMedia Object ReferenceAn object reference to the media added to the room for the peer. Assign this media object to an Odin Synth Component for audio to be played in-game.
PropertiesProperties Object ReferenceProperties of the media object.
RoomRoom Object ReferenceThe Room object reference for which the event was triggered.

Bind to On Media Removed

Definition

Name
Bind to On Media Removed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-media-removed
Bind to On Media Removed

Listens to On Media Removed events in the given Room. On Media Removed will be called whenever a peer has removed a media (i.e. muted the microphone). Is not called for the local player.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be triggered. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect to a On Media Removed event to handle this event.

Outputs

NameTypeDescription
Execexec

On Media Removed

Definition

Name
On Media Removed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-media-removed
On Media Removed

Called whenever a peer has removed a media stream. Connect to a Bind to On Media Removed delegate node to handle this event for the specified room.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Media Removed node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateBind to a Bind to On Media Removed delegate node to get this event triggered once a peer has removed a media object.

Outputs

NameTypeDescription
Execexec
Peer IdintegerThe id of the peer that removed the media.
MediaMedia Object ReferenceAn object reference to the media removed from the room.
RoomRoom Object ReferenceThe Room object reference that the media was removed from.

Bind to On Message Received

Definition

Name
Bind to On Message Received
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-message-received
Bind to On Message Received

Listens to On Message Received events in the given Room object. On Message Received events will be triggered whenever another peer has sent a message.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be triggered. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect to a On Message Received event to handle this event.

Outputs

NameTypeDescription
Execexec

On Message Received

Definition

Name
On Message Received
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-message-received
On Message Received

Called whenever another peer has sent a message. Connect to a Bind to On Message Received delegate node to handle this event for the specified room.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Media Removed node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateConnect to a Bind to On Message Received delegate node to get this event triggered when another peer sent a message.

Outputs

NameTypeDescription
Execexec
Peer IdintegerThe id of the peer that sent the message.
DataArray of byteThe message payload data as an array of bytes.
RoomRoom Object ReferenceThe Room object reference of the room the message was sent in.

Send Message

Definition

Name
Send Message
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/send-message
Send Message

Sends arbitrary data to a list of target peers to an ODIN room. Every peer connected to the same room will be able to receive the message.

Tip

Use Bind to On Message Received node to receive messages sent from other peers.

Inputs

NameTypeDescription
Execexec
RoomRoomThe room in which the message is sent.
TargetsArray of int64List of targeted peer ids. If not specified, the message will be sent to all other peers in the same room.
DataArray of byteMessage data can be anything. This enables you to easily exchange data between peers directly over the Odin server.
On ErrordelegateDelegate to handle errors when sending a message.
On SuccessdelegateCalled when the message has been successfully sent.

Outputs

NameTypeDescription
Execexec
On ResponseexecCalled when the server has returned its response. Use the success value to check if the message has been successfully sent.
Successbooleantrue if the message has been successfully sent.

Get Capture Devices Available

Definition

Name
Get Capture Devices Available
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/get-capture-devices-available
Get Capture Devices Available

Returns all available capture devices with the device id. IMPORTANT! Use the Async version in case you experience stuttering. The Async version runs asynchronously and uses a callback when the result is available.

Inputs

NameTypeDescription
Execexec
On Result (Async Only)delegateCallback for when the result is available. Used only in the async version.

Outputs

NameTypeDescription
Execexec
Out DevicesArray of objectAll available capture devices. This is the output for both synchronous and asynchronous versions.

Get Current Audio Capture Device

Definition

Name
Get Current Audio Capture Device
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/get-current-audio-capture-device
Get Current Audio Capture Device

Returns info on the current capture device.

Outputs

NameTypeDescription
Current DeviceOdinCaptureDeviceInfoInfo on the current capture device.

Change Capture Device By Id

Definition

Name
Change Capture Device By Id
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/change-capture-device-by-id
Change Capture Device By Id

IMPORTANT! Use the Async version in case you experience stuttering. Updates the capture device and restarts the capture stream of the Audio Capture component. The Async version runs asynchronously and does not block the main thread.

Inputs

NameTypeDescription
Execexec
New Device IdstringThe id of the targeted capture device.
On Change Completed (Async Only)delegateCallback for when the change result is available. Used only in the async version.

Outputs

NameTypeDescription
Execexec
SuccessbooleanWhether or not the capture device was successfully changed. This is for the synchronous version only.

Change Capture Device By Name

Definition

Name
Change Capture Device By Name
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/change-capture-device-by-name
Change Capture Device By Name

IMPORTANT! Use the Async version in case you experience stuttering. Updates the capture device and restarts the capture stream of the Audio Capture component. The Async version runs asynchronously and does not block the main thread.

Inputs

NameTypeDescription
Execexec
Device NamenameThe name of the targeted capture device. Needs to be an exact match.
On Change Completed (Async Only)delegateCallback for when the change result is available. Used only in the async version.

Outputs

NameTypeDescription
Execexec
SuccessbooleanWhether or not the capture device was successfully changed. This is for the synchronous version only.

Restart Capturing

Definition

Name
Restart Capturing
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/restart-capturing
Restart Capturing

Restart the stream, using CurrentSelectedDeviceIndex as the new input.

Inputs

NameTypeDescription
Execexec
Automatically Start CapturebooleanIf true, the capture will automatically start. Defaults to true.

Outputs

NameTypeDescription
Execexec
ReturnbooleanReturns true if the capturing restarts successfully.

Get and Set Is Paused

Definition

Name
Get and Set Is Paused
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/get-and-set-is-paused
Get and Set Is Paused

Get Is Capturing Paused: Returns whether the audio capture is paused. Set Is Capturing Paused: Sets the paused state of the audio capture.

Tip

Use these Nodes, if you’d like to implement Push-To-Talk or Mute Functionality. The Is Paused state is optimized for this use case.

Inputs

NameTypeDescription
Is Capturing PausedbooleanThe new paused state to set. Only used in Set Is Capturing Paused.

Outputs

NameTypeDescription
Is Capturing PausedbooleanThe current paused state. Only used in Get Is Capturing Paused.

On Capture Device Reset

Definition

Name
On Capture Device Reset
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/on-capture-device-reset
On Capture Device Reset

Will be called if ODIN recognizes that the selected capture device does not supply data anymore, i.e., if a microphone was unplugged. ODIN will wait for AllowedTimeWithoutStreamUpdate seconds before trying a stream restart. You can set the AllowedTimeWithoutStreamUpdate parameter on the Odin Audio Capture Object.

Outputs

NameTypeDescription
Capture Device ChangedelegateA dynamic multicast delegate that is called when the capture device needs to be reset.

On Default Device Changed

Definition

Name
On Default Device Changed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/on-default-device-changed
On Default Device Changed

Will be called if the Default Device is the currently selected device and if the Default Device was switched by the system.

Outputs

NameTypeDescription
Capture Device ChangedelegateA dynamic multicast delegate that is called when the default capture device changes.

Reset Odin Media

Definition

Name
Reset Odin Media
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/odin-synth-component/reset-odin-media
Reset Odin Media

This function can be used to reset the media handle assigned to the targeted ODIN Synth Component instance. Resetting a media handle will restore it to its default configuration. This operation resets the internal Opus encoder/decoder, ensuring a clean state. Additionally, it clears internal buffers, providing a fresh start.

Inputs

NameTypeDescription
Execexec
TargetOdin Synth ComponentThe Odin Synth Component to call this function on.

Outputs

NameTypeDescription
Execexec

Adjust Attenuation

Definition

Name
Adjust Attenuation
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/odin-synth-component/adjust-attenuation
Adjust Attenuation

This function is used to modify the Attenuation Settings on the targeted ODIN Synth instance. It is worth noting that Attenuation Settings are only passed to new Active Sounds on start, so modified Attenuation data should be set before sound playback.

Inputs

NameTypeDescription
Execexec
TargetOdin Synth ComponentThe Odin Synth Component to call this function on.
In Attenuation SettingsFSoundAttenuationSettingsThe attenuation settings to apply to the targeted ODIN Synth instance.

Outputs

NameTypeDescription
Execexec

Get Room Connection Stats

Definition

Name
Get Room Connection Stats
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/get-room-connection-stats
Get Room Connection Stats

Get statistics for a room connection. This function provides detailed information about the connection status and metrics in an ODIN room.

Inputs

NameTypeDescription
Execexec
TargetRoomThe Room object to call this function on.

Outputs

NameTypeDescription
Execexec
Connection StatsOdinConnectionStatsThe statistics for the room connection.

Set Room APM Config

Definition

Name
Set Room APM Config
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/set-room-apm-config
Set Room APM Config

Updates audio processing settings for capture media handles in a specific room. This function allows modification of various audio processing parameters for a room.

Inputs

NameTypeDescription
Execexec
TargetRoomThe room object where the audio processing settings will be updated.
APM ConfigFOdinApmSettingsThe audio processing settings to be applied.

Outputs

NameTypeDescription
Execexec

Set Room APM Stream Delay

Definition

Name
Set Room APM Stream Delay
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/set-room-apm-stream-delay
Set Room APM Stream Delay

Updates the delay estimate in ms for reverse stream used in echo cancellation. This function modifies the delay settings for a specific room.

Inputs

NameTypeDescription
Execexec
TargetRoomThe room object where the APM stream delay will be updated.
Delay In Msint64The delay estimate in milliseconds for the reverse stream used in echo cancellation.

Outputs

NameTypeDescription
Execexec

Destroy Local Room Handle

Definition

Name
Destroy Local Room Handle
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/destroy-local-room-handle
Destroy Local Room Handle

Closes the connection to the server and destroys the local room handle. This function is used to properly disconnect and clean up resources associated with a room.

Inputs

NameTypeDescription
Execexec
TargetRoomThe room object whose connection to the server will be closed and handle destroyed.

Outputs

NameTypeDescription
Execexec

Get and Set Volume Multiplier

Definition

Name
Get and Set Volume Multiplier
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/get-and-set-volume-multiplier
Get and Set Volume Multiplier

GetVolumeMultiplier: Retrieves the current volume multiplier of the capture device’s input. SetVolumeMultiplier: Sets the volume multiplier for the capture device’s input.

Important

For security reasons, the volume multiplier is capped to the range [0, MaxVolumeMultiplier]. The maximum volume multiplier defaults to 3.0. To change the maximum volume multiplier, use the Set Max Volume Multiplier function.

Inputs

NameTypeDescription
Execexec
TargetOdinCaptureMediaThe Odin Capture Media object whose volume multiplier is being retrieved or set.
Volume MultiplierfloatThe new volume multiplier to set. Used only in SetVolumeMultiplier.

Outputs

NameTypeDescription
Execexec
Volume MultiplierfloatThe current volume multiplier. Returned only by GetVolumeMultiplier.

Get and Set Max Volume Multiplier

Definition

Name
Get and Set Max Volume Multiplier
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/get-and-set-max-volume-multiplier
Get and Set Max Volume Multiplier

GetMaxVolumeMultiplier: Retrieves the current maximum volume multiplier value. SetMaxVolumeMultiplier: Sets the new maximum volume multiplier value.

Tip

This value will cap the Volume Multiplier value. The default value is 3.0.

Inputs

NameTypeDescription
Execexec
TargetOdinCaptureMediaThe Odin Capture Media object whose max volume multiplier is being retrieved or set.
Max Volume MultiplierfloatThe new max volume multiplier value to set. Used only in SetMaxVolumeMultiplier.

Outputs

NameTypeDescription
Execexec
Max Volume MultiplierfloatThe current maximum volume multiplier. Returned only by GetMaxVolumeMultiplier.
NameDescription
Construct Local Room HandleCreates a local room object that will be used to handle events and client side connection settings. Connect the Room output to the Room input of the Join Room node. You can also use the Room output to handle events like Room Joined or Media Added.
Make ODIN APM SettingsCreates an APM settings object that can be used to construct a local room handle.
Generate Room TokenTakes an access key and a room id and creates a room token that is used to join a room. In production this should be done in a protected environment, e.g. your authentication server (see example project `Token Server´)
Construct a Token GeneratorCreates a token generator that is used to generate room tokens on client side.
Create Odin Audio CaptureCreates an Odin Audio Capture object, that can be used to get access to the microphone on the users device. The Odin Audio Capture object adds features to the default Unreal Audio Capture, like enabling capture device switching on supported platforms or improved Push-To-Talk features. Please make sure, that the Audio Capture Plugin is enabled.
Format ErrorTakes an ODIN error code and returns an error message a string which can be printed to the log.
Generate Access KeyCreates an access key that can be used to generate room tokens. These keys are only for development and should not be used in production.
Add Odin Synth ComponentAdds the Odin Synth Component to the specified actor.
Get and Set Volume MultiplierGetVolumeMultiplier: Retrieves the current volume multiplier of the capture device’s input. SetVolumeMultiplier: Sets the volume multiplier for the capture device’s input.
Get and Set Max Volume MultiplierGetMaxVolumeMultiplier: Retrieves the current maximum volume multiplier value. SetMaxVolumeMultiplier: Sets the new maximum volume multiplier value.

Events

Construct Local Room Handle

Definition

Name
Construct Local Room Handle
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/construct-local-room-handle
Construct Local Room Handle

Creates a local room object that will be used to handle events and client side connection settings. Connect the Room output to the Room input of the Join Room node. You can also use the Room output to handle events like Room Joined or Media Added.

Inputs

NameTypeDescription
Initial APM SettingsAPMSettingsThe initial APM settings to use when constructing the room. Use the Make APM Settings node to create initial APM Settings.

Outputs

NameTypeDescription
Return ValueRoomThe constructed room object.

Make ODIN APM Settings

Definition

Name
Make ODIN APM Settings
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/make-odin-apm-settings
Make ODIN APM Settings

Creates an APM settings object that can be used to construct a local room handle.

Inputs

NameTypeDescription
Enable Voice Activity DetectionbooleanWhen enabled, ODIN will analyze the audio input signal using smart voice detection algorithm to determine the presence of speech. You can define both the probability required to start and stop transmitting.
Attack ProbabilityfloatVoice probability value when the VAD should engage.
Release ProbabilityfloatVoice probability value when the VAD should disengage. It’s recommended to keep this value 0.1 lower than the attack probability.
Enable Volume GatebooleanWhen enabled, the volume gate will measure the volume of the input audio signal, thus deciding when a user is speaking loud enough to transmit voice data. You can define both the root mean square power (dBFS) for when the gate should engage and disengage.
Attack Loudness (D BFS)floatRoot mean square power (dBFS) when the volume gate should engage.
Release Loudness (D BFS)floatRoot mean square power (dBFS) when the volume gate should disengage. It’s recommended to keep this value 10 lower than the attack loudness.
Echo CancellerbooleanWhen enabled, aligns the original and the reverse audio stream to negate the output inside the input, resulting in effective echo cancellation
High Pass FilterbooleanWhen enabled, the high-pass filter will remove low-frequency content from the input audio signal, thus making it sound cleaner and more focused.
Pre AmplifierbooleanWhen enabled, the preamplifier will boost the signal of sensitive microphones by taking really weak audio signals and making them louder.
Noise SuppressionenumWhen enabled, the noise suppressor will remove distracting background noise from the input audio signal. You can control the aggressiveness of the suppression. Increasing the level will reduce the noise level at the expense of a higher speech distortion.
Transient SuppressionbooleanWhen enabled, the transient suppressor will try to detect and attenuate keyboard clicks.
Gain ControllerbooleanWhen enabled, the gain controller will automatically bring the signal to an appropriate range. This means input signals with low volume will be amplified and high volume will be limited.

Outputs

NameTypeDescription
Return ValueAPMSettingsThe constructed APM settings object.

Discussion

Audio settings can sometimes be challenging to navigate, especially for those new to the field. While many options are straightforward, some require specific values to optimize performance.

In environments with high background noise, it’s essential to prevent this noise from being transmitted. To address this, we offer two key settings:

Voice Activity Detection

Our system utilizes a few milliseconds of audio to ascertain if the user is speaking by leveraging an advanced AI model. It’s recommended to keep this feature enabled.

The AI model operates on a probability scale ranging from 0.0 to 1.0, where 0.0 indicates zero likelihood of voice presence, and 1.0 signifies absolute certainty. Adjust the Attack and Release settings to define the probability thresholds for starting and stopping transmission.

Optimal settings are generally 0.9 for Attack (90% certainty of voice) and 0.8 for Release. We recommend setting the Release value slightly lower than the Attack value, ideally maintaining an offset of 0.1.

While effective in many scenarios, certain situations, like a bustling open-office, may require additional measures. In these cases, the AI might confidently detect voice, but it may not be the voice of the intended speaker.

Here, the Volume Gate filter proves useful:

Volume Gate

The Volume Gate operates by setting a volume threshold below which the microphone remains disabled. This helps distinguish between actual speech and lower-volume background noises. The gate activates only when the detected sound exceeds this threshold.

Understanding this concept might be initially complex. A useful resource is Wikipedia on DBFS.

It’s generally advisable to disable this feature initially. A starting points for settings could be -40 for Release and -30 for Attack. We recommend setting the Release value slightly lower than the Attack value, ideally maintaining an offset of 10. For further assistance, please feel free to contact our support team.

Generate Room Token

Definition

Name
Generate Room Token
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/generate-room-token
Generate Room Token

Takes an access key and a room id and creates a room token that is used to join a room. In production this should be done in a protected environment, e.g. your authentication server (see example project `Token Server´)

Inputs

NameTypeDescription
Execexec
TargetToken GeneratorUse the Construct Token Generator node to generate a token generator.
Room IdstringThe room id to generate a token for. Every user connected to the same room can talk to each other and exchange data.
User IdstringThe user id to generate a token for. You can use any string that makes sense for you to connect Odin peers to your users.
Token AudienceenumThe enum value of the token audience. Possible values are Default (for using a gateway) or Single Server (for using a specific Odin server without a gateway).

Outputs

NameTypeDescription
Execexec
Return ValuestringReturns a room token that can be used to join a room.

Construct a Token Generator

Definition

Name
Construct a Token Generator
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/construct-a-token-generator
Construct a Token Generator

Creates a token generator that is used to generate room tokens on client side.

Important

It is ok for development and testing purposes to create room tokens on client side - but in production you should switch to server side generation of room tokens!

Inputs

NameTypeDescription
Access KeystringThe access key for generating room tokens. You need to get an access key by signing up to the service or create a test key by following our Getting Started guide.

Outputs

NameTypeDescription
Return ValueToken GeneratorThe constructed token generator object. Connect to Generate Room Token to generate a room token.

Join Room

Definition

Name
Join Room
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/join-room
Join Room

Joins an ODIN room with the room token provided. Every peer connected to the same room will be able to talk to each other and exchange data.

Inputs

NameTypeDescription
Execexec
RoomRoomConnect the Room instance created by the Construct local room handle node. This room handle will later be used to handle events.
UrlstringThe url to the ODIN gateway. Typically this is https://gateway.odin.4players.io.
TokenstringThe token you created with the Generate Room Token node.
Initial Peer User DataArray of byteUser data can be anything and will be associated with the user (peer) on ODIN servers. User Data is automatically synchronized with other users in the same ODIN room. This enables you to easily exchange data like names or IDs.
Initial Peer PositionvectorThe initial peer position in Odin’s space. This value is used to optimize audio streams by not streaming audio data to peer’s that are outside of hearing range. Please refer to the Update Peer Position node for more information and to update the position later on.
On ErrordelegateDelegate to handle errors while joining a room. Most of the time, an error will occur when the room token is invalid or the room is full.
On SuccessdelegateCalled when the room has been successfully joined.

Outputs

NameTypeDescription
Execexec
On ResponseexecCalled when the gateway has returned its response. The success output indicates whether the room was successfully joined.
Successbooleantrue if the room has been successfully joined.

Discussion

Once you have joined the room, a sequence of events is created. You can learn more about these events here.

To handle these events create a Bind to .... node and connect that to your Room node created earlier in Construct local room handle node.

Info

If you cannot find the Bind to .... node (for example Bind to Room Joined Event), you need to disable the context filter in the blueprint node selection dialog.

Construct Local Media

Definition

Name
Construct Local Media
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/construct-local-media
Construct Local Media

Creates a media object that will be used in the Add Media To Room node input. Connect an Audio Capture or Odin Audio Capture object to it.

Important

Use the Create Audio Capture or Create Odin Audio Capture node to get access to the microphone on the users device. Make sure that the Audio Capture Plugin is enabled. You’ll find it in the Audio section of the Plugin Manager.

Inputs

NameTypeDescription
Audio CaptureAudio Capture Object ReferenceThe audio capture object reference.

Outputs

NameTypeDescription
Return ValueOdin Capture Media Object ReferenceA reference to the constructed Odin Capture Media object.

Create Odin Audio Capture

Definition

Name
Create Odin Audio Capture
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/create-odin-audio-capture
Create Odin Audio Capture

Creates an Odin Audio Capture object, that can be used to get access to the microphone on the users device. The Odin Audio Capture object adds features to the default Unreal Audio Capture, like enabling capture device switching on supported platforms or improved Push-To-Talk features. Please make sure, that the Audio Capture Plugin is enabled.

Outputs

NameTypeDescription
Return ValueOdin Audio Capture Object ReferenceA reference to the constructed Odin Audio Capture object.

Add Media To Room

Definition

Name
Add Media To Room
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/add-media-to-room
Add Media To Room

Adds a previously generated media object to the room. Once this is done, the users microphone input will be sent to other users so they can hear the audio.

Important

The user must have joined the room before adding media. Use the Join Room node to join the room. Also, you cannot use the same media stream for multiple rooms at once, but you have to create a new one for each room.

Inputs

NameTypeDescription
Execexec
RoomRoomThe room to which the media will be added.
MediaMediaThe media which should be added. Construct Local Media can be used to create a media object.
On ErrordelegateDelegate to handle errors while adding a media to a room.
On SuccessdelegateCalled when the media has been successfully added to the room. See On Media Added Success event for details.

Outputs

NameTypeDescription
Execexec
On ResponseexecCalled when the gateway has returned its response. Use the success output to understand if anything went fine.
Successbooleantrue if the media has been successfully joined.

On Add Media To Room Success

Definition

Name
On Add Media To Room Success
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-add-media-to-room-success
On Add Media To Room Success

This event is triggered in the Add Media To Room function once the media has been added to the room successfully.

Inputs

NameTypeDescription
DelegatedelegateBind to a Add Media To Room On Success delegate node to get this event triggered once the media has been added to the room.

Outputs

NameTypeDescription
Execexec
Media IdintegerThe media id added to the room.

Format Error

Definition

Name
Format Error
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/format-error
Format Error

Takes an ODIN error code and returns an error message a string which can be printed to the log.

Inputs

NameTypeDescription
CodeintegerThe error code.

Outputs

NameTypeDescription
Return ValuestringThe error message for the code.

Generate Access Key

Definition

Name
Generate Access Key
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/generate-access-key
Generate Access Key

Creates an access key that can be used to generate room tokens. These keys are only for development and should not be used in production.

Important

Do not connect this node directly to the Generate Room Token node, as a new access key would be generated during each play session for each users. Instead, print the generated access key into a log and store it in a variable, connecting that variable with the Generate Room Token node.

Outputs

NameTypeDescription
Return ValuestringThe access key for up to 25 peak concurrent users (PCU) per day. Connect to a log function to output the access key and then use that access key as input for the Generate Room Token node.

Add Odin Synth Component

Definition

Name
Add Odin Synth Component
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/add-odin-synth-component
Add Odin Synth Component

Adds the Odin Synth Component to the specified actor.

Inputs

NameTypeDescription
Execexec
TargetActor Object ReferenceThe Actor to which the Odin Synth Component will be added.
Manual AttachmentbooleanWhen Manual Attachment is set, automatic attachment to the target actor is skipped and it is up to the user to attach the resulting component (or set it up as the root) themselves.
Relative TransformTransformThe relative transform of the component to the target actor.

Outputs

NameTypeDescription
Execexec
Return ValueOdin Synth ComponentReturns the Odin Synth Component that will output audio from the media stream assigned by the Odin Assign Synth to Media node.

Odin Assign Synth to Media

Definition

Name
Odin Assign Synth to Media
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/odin-synth-component/odin-assign-synth-to-media
Odin Assign Synth to Media

Assign a media stream coming with the Media Added event to the Odin Synth Component which will generate audio output from the incoming stream.

Inputs

NameTypeDescription
Execexec
TargetOdin Synth ComponentThe Odin Synth Component that you either get from an Actor using the GetComponentByClass node or from the Add Odin Synth Component node.
MediaMedia Object ReferenceThe media stream to be assigned to the Odin Synth Component. You’ll get that from the Media Added event.

Outputs

NameTypeDescription
Execexec

Set Room Position Scale

Definition

Name
Set Room Position Scale
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/set-room-position-scale
Set Room Position Scale

Sets the multiplicative scale for all coordinates used in position updates. Use this as the maximum radius in which a peer can be heard. The scale value is used to optimize audio streams by not streaming audio data to peer’s that are outside of hearing range.

Important

The position scale should be set to the same value for all peers in the ODIN room. The scale value also has to be set individually for each room that will utilize ODIN’s optimization feature.

Inputs

NameTypeDescription
Execexec
TargetRoomThe room for which the scale should be set.
ScalefloatThe value of the scale as float.

Outputs

NameTypeDescription
Execexec

Update Peer Position

Definition

Name
Update Peer Position
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/update-peer-position
Update Peer Position

Updates the position of the own peer in the room. You have to set the scale beforehand via Set Room Position Scale.

Important

Invoking this method too frequently can lead to operational issues where the optimization of audio streams may not function correctly. Limit the frequency of calling Update Peer Position to a maximum of 10 times per second.

Tip

This function is optional and only used for performance reasons and to save bandwidth. This is not needed to make spatial audio work.

Inputs

NameTypeDescription
Execexec
RoomRoomThe room in which the peer’s position shall be set.
PositionvectorThe value of the position.
On ErrordelegateDelegate to handle errors while updating the position.
On SuccessdelegateCalled when the position has been successfully updated.

Outputs

NameTypeDescription
Execexec
On ResponseexecCalled when the server has returned its response. Use the ‘success’ value to check if the position has been successfully set.
Successbooleantrue if the position has been successfully set.

Bind to On Connection State Changed

Definition

Name
Bind to On Connection State Changed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-connection-state-changed
Bind to On Connection State Changed

Listens to on Connection State Changed events from the given Room object and calls the connected event handler of type On Connection Changed.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be checked. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect a On Connection State Changed Event to handle this event.

Outputs

NameTypeDescription
Execexec

On Connection State Changed

Definition

Name
On Connection State Changed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-connection-state-changed
On Connection State Changed

Handles Connection State Changed events which are called when the connection state changed (i.e. a disconnect to the server). Connect a Bind to On Connection State Changed delegate node to handle this event for the specified room.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Onnection State Changed node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateBind to a Bind to On Connection State Changed delegate node to get this event triggered once the room has been joined.

Outputs

NameTypeDescription
Execexec
Connection StateenumThe enum value of the connection state. Possible values are Disconnected, Disconnecting, Connecting, Connected.
RoomRoom Object ReferenceThe Room object reference for which the connection changed event occured.

Bind to On Room Joined

Definition

Name
Bind to On Room Joined
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-room-joined
Bind to On Room Joined

Listens on Room Joined events on the given Room object and calls the connected Room Joined Event handler.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be triggered. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect a Room Joined Event to handle this event.

Outputs

NameTypeDescription
Execexec

On Room Joined

Definition

Name
On Room Joined
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-room-joined
On Room Joined

Handles Room Joined events which are called once the local user has successfully joined a room. Connect a Bind to On Room Joined delegate node to handle this event for the specified room.

Important

The resulting peer id is only valid in the context of this room. This event will only be called for the local user.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Room Joined node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateCall the Bind to On Room Joined node to get this event triggered once the room has been joined.

Outputs

NameTypeDescription
Execexec
Peer IdintegerThe id of the peer that joined the room. This is the self peer id, i.e. the peer id of the local player. This peer id is only valid in the context of this room!
Room User DataArray of byteThe user data stored in the room for the peer as an array of bytes.
RoomOdin Room Object ReferenceThe Odin Room to which the peer joined.

Bind to On Room User Data Changed

Definition

Name
Bind to On Room User Data Changed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-room-user-data-changed
Bind to On Room User Data Changed

Bind to Room User Data Changed events in the given Room.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be triggered. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect an On Room User Data Changed Event to handle this event.

Outputs

NameTypeDescription
Execexec

On Room User Data Changed

Definition

Name
On Room User Data Changed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-room-user-data-changed
On Room User Data Changed

Called whenever the user data of the room changed. Connect a Bind to On Room User Data Changed delegate node to handle this event for the specified room.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Room User Data Changed node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateConnect to the Bind to On Room User Data Changed node to get this event triggered once a peer has left the room.

Outputs

NameTypeDescription
Execexec
User DataArray of byteThe updated user data of the room as an array of bytes.
RoomRoom Object ReferenceThe Room object reference for which the Room User Data was changed.

Bind to On Peer Joined

Definition

Name
Bind to On Peer Joined
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-peer-joined
Bind to On Peer Joined

Listens to Peer Joined events in the given Room object. Peer Joined events will be called whenever a peer joins the room. Will not be called for the local player. Use the On Room Joined event to handle joins from the local player instead.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be triggered. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect a Peer Joined Event to handle this event.

Outputs

NameTypeDescription
Execexec

On Peer Joined

Definition

Name
On Peer Joined
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-peer-joined
On Peer Joined

Called whenever a peer joins the room. Connect a Bind to On Peer Joined delegate node to handle this event for the specified room.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Peer Joined node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateBind to a Bind to On Peer Joined delegate node to get this event triggered once a peer has joined the room.

Outputs

NameTypeDescription
Execexec
Peer IdintegerThe id of the peer that joined the room. This is the self peer id, i.e. the peer id of the local player.
User DataArray of byteThe user data of the peer as an array of bytes
RoomRoom Object ReferenceThe Room object reference for which the event was triggered.

Bind to On Peer Left

Definition

Name
Bind to On Peer Left
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-peer-left
Bind to On Peer Left

Listens on Peer Left events on the given Room object which will be called whenever a peer left the room. Is not called for the local player.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be triggered. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect to an On Peer Left Event to handle Peer Left event calls.

Outputs

NameTypeDescription
Execexec

On Peer Left

Definition

Name
On Peer Left
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-peer-left
On Peer Left

Called whenever a peer leaves the room. Connect to a Bind to On Peer Left node to handle this event for the specified room.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Peer Left node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateConnect to a Bind to On Peer Left delegate node to get this event triggered once a peer has left the room.

Outputs

NameTypeDescription
Execexec
Peer IdintegerThe id of the peer that joined the room.
RoomRoom Object ReferenceThe Room object reference for which the event was triggered.

Bind to On Peer User Data Changed

Definition

Name
Bind to On Peer User Data Changed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-peer-user-data-changed
Bind to On Peer User Data Changed

Listens to Peer User Data Changed events for the given Room object. Peer User Data Changed events will be called whenever a peer updates their user data. Is not called for the local player.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be triggered. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect to a Peer User Data Changed Event to handle this event.

Outputs

NameTypeDescription
Execexec

On Peer User Data Changed

Definition

Name
On Peer User Data Changed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-peer-user-data-changed
On Peer User Data Changed

Called whenever a peer has changed its user data. Connect to a Bind to On Peer User Data Changed node to handle this event for the specified room.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Peer User Data Changed node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateConnect to a Bind to On Peer User Data Changed node to get this event triggered once a peer has left the room.

Outputs

NameTypeDescription
Execexec
Peer IdintegerThe id of the peer that joined the room.
User DataArray of byteThe updated user data of the peer as an array of bytes.
RoomRoom Object ReferenceThe Room object reference for which the event was triggered.

Bind to On Media Added

Definition

Name
Bind to On Media Added
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-media-added
Bind to On Media Added

Listens for On Media Added events in the given Room object. On Media Added events will be called whenever a peer has added a media (i.e. activated the microphone). Is not called for the local player.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be triggered. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect to an On Media Added to handle this event.

Outputs

NameTypeDescription
Execexec

On Media Added

Definition

Name
On Media Added
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-media-added
On Media Added

Called whenever a peer has added a media (i.e. activated the microphone). Connect to a Bind to On Media Added delegate node to handle this event for the specified room. Will not be called for the local player.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Media Added node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateConnect to a Bind to On Media Added delegate node to get this event triggered once a peer has added a media object.

Outputs

NameTypeDescription
Execexec
Peer IdintegerThe id of the peer that added the media.
MediaMedia Object ReferenceAn object reference to the media added to the room for the peer. Assign this media object to an Odin Synth Component for audio to be played in-game.
PropertiesProperties Object ReferenceProperties of the media object.
RoomRoom Object ReferenceThe Room object reference for which the event was triggered.

Bind to On Media Removed

Definition

Name
Bind to On Media Removed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-media-removed
Bind to On Media Removed

Listens to On Media Removed events in the given Room. On Media Removed will be called whenever a peer has removed a media (i.e. muted the microphone). Is not called for the local player.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be triggered. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect to a On Media Removed event to handle this event.

Outputs

NameTypeDescription
Execexec

On Media Removed

Definition

Name
On Media Removed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-media-removed
On Media Removed

Called whenever a peer has removed a media stream. Connect to a Bind to On Media Removed delegate node to handle this event for the specified room.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Media Removed node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateBind to a Bind to On Media Removed delegate node to get this event triggered once a peer has removed a media object.

Outputs

NameTypeDescription
Execexec
Peer IdintegerThe id of the peer that removed the media.
MediaMedia Object ReferenceAn object reference to the media removed from the room.
RoomRoom Object ReferenceThe Room object reference that the media was removed from.

Bind to On Message Received

Definition

Name
Bind to On Message Received
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-message-received
Bind to On Message Received

Listens to On Message Received events in the given Room object. On Message Received events will be triggered whenever another peer has sent a message.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be triggered. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect to a On Message Received event to handle this event.

Outputs

NameTypeDescription
Execexec

On Message Received

Definition

Name
On Message Received
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-message-received
On Message Received

Called whenever another peer has sent a message. Connect to a Bind to On Message Received delegate node to handle this event for the specified room.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Media Removed node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateConnect to a Bind to On Message Received delegate node to get this event triggered when another peer sent a message.

Outputs

NameTypeDescription
Execexec
Peer IdintegerThe id of the peer that sent the message.
DataArray of byteThe message payload data as an array of bytes.
RoomRoom Object ReferenceThe Room object reference of the room the message was sent in.

Send Message

Definition

Name
Send Message
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/send-message
Send Message

Sends arbitrary data to a list of target peers to an ODIN room. Every peer connected to the same room will be able to receive the message.

Tip

Use Bind to On Message Received node to receive messages sent from other peers.

Inputs

NameTypeDescription
Execexec
RoomRoomThe room in which the message is sent.
TargetsArray of int64List of targeted peer ids. If not specified, the message will be sent to all other peers in the same room.
DataArray of byteMessage data can be anything. This enables you to easily exchange data between peers directly over the Odin server.
On ErrordelegateDelegate to handle errors when sending a message.
On SuccessdelegateCalled when the message has been successfully sent.

Outputs

NameTypeDescription
Execexec
On ResponseexecCalled when the server has returned its response. Use the success value to check if the message has been successfully sent.
Successbooleantrue if the message has been successfully sent.

Get Capture Devices Available

Definition

Name
Get Capture Devices Available
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/get-capture-devices-available
Get Capture Devices Available

Returns all available capture devices with the device id. IMPORTANT! Use the Async version in case you experience stuttering. The Async version runs asynchronously and uses a callback when the result is available.

Inputs

NameTypeDescription
Execexec
On Result (Async Only)delegateCallback for when the result is available. Used only in the async version.

Outputs

NameTypeDescription
Execexec
Out DevicesArray of objectAll available capture devices. This is the output for both synchronous and asynchronous versions.

Get Current Audio Capture Device

Definition

Name
Get Current Audio Capture Device
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/get-current-audio-capture-device
Get Current Audio Capture Device

Returns info on the current capture device.

Outputs

NameTypeDescription
Current DeviceOdinCaptureDeviceInfoInfo on the current capture device.

Change Capture Device By Id

Definition

Name
Change Capture Device By Id
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/change-capture-device-by-id
Change Capture Device By Id

IMPORTANT! Use the Async version in case you experience stuttering. Updates the capture device and restarts the capture stream of the Audio Capture component. The Async version runs asynchronously and does not block the main thread.

Inputs

NameTypeDescription
Execexec
New Device IdstringThe id of the targeted capture device.
On Change Completed (Async Only)delegateCallback for when the change result is available. Used only in the async version.

Outputs

NameTypeDescription
Execexec
SuccessbooleanWhether or not the capture device was successfully changed. This is for the synchronous version only.

Change Capture Device By Name

Definition

Name
Change Capture Device By Name
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/change-capture-device-by-name
Change Capture Device By Name

IMPORTANT! Use the Async version in case you experience stuttering. Updates the capture device and restarts the capture stream of the Audio Capture component. The Async version runs asynchronously and does not block the main thread.

Inputs

NameTypeDescription
Execexec
Device NamenameThe name of the targeted capture device. Needs to be an exact match.
On Change Completed (Async Only)delegateCallback for when the change result is available. Used only in the async version.

Outputs

NameTypeDescription
Execexec
SuccessbooleanWhether or not the capture device was successfully changed. This is for the synchronous version only.

Restart Capturing

Definition

Name
Restart Capturing
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/restart-capturing
Restart Capturing

Restart the stream, using CurrentSelectedDeviceIndex as the new input.

Inputs

NameTypeDescription
Execexec
Automatically Start CapturebooleanIf true, the capture will automatically start. Defaults to true.

Outputs

NameTypeDescription
Execexec
ReturnbooleanReturns true if the capturing restarts successfully.

Get and Set Is Paused

Definition

Name
Get and Set Is Paused
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/get-and-set-is-paused
Get and Set Is Paused

Get Is Capturing Paused: Returns whether the audio capture is paused. Set Is Capturing Paused: Sets the paused state of the audio capture.

Tip

Use these Nodes, if you’d like to implement Push-To-Talk or Mute Functionality. The Is Paused state is optimized for this use case.

Inputs

NameTypeDescription
Is Capturing PausedbooleanThe new paused state to set. Only used in Set Is Capturing Paused.

Outputs

NameTypeDescription
Is Capturing PausedbooleanThe current paused state. Only used in Get Is Capturing Paused.

On Capture Device Reset

Definition

Name
On Capture Device Reset
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/on-capture-device-reset
On Capture Device Reset

Will be called if ODIN recognizes that the selected capture device does not supply data anymore, i.e., if a microphone was unplugged. ODIN will wait for AllowedTimeWithoutStreamUpdate seconds before trying a stream restart. You can set the AllowedTimeWithoutStreamUpdate parameter on the Odin Audio Capture Object.

Outputs

NameTypeDescription
Capture Device ChangedelegateA dynamic multicast delegate that is called when the capture device needs to be reset.

On Default Device Changed

Definition

Name
On Default Device Changed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/on-default-device-changed
On Default Device Changed

Will be called if the Default Device is the currently selected device and if the Default Device was switched by the system.

Outputs

NameTypeDescription
Capture Device ChangedelegateA dynamic multicast delegate that is called when the default capture device changes.

Reset Odin Media

Definition

Name
Reset Odin Media
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/odin-synth-component/reset-odin-media
Reset Odin Media

This function can be used to reset the media handle assigned to the targeted ODIN Synth Component instance. Resetting a media handle will restore it to its default configuration. This operation resets the internal Opus encoder/decoder, ensuring a clean state. Additionally, it clears internal buffers, providing a fresh start.

Inputs

NameTypeDescription
Execexec
TargetOdin Synth ComponentThe Odin Synth Component to call this function on.

Outputs

NameTypeDescription
Execexec

Adjust Attenuation

Definition

Name
Adjust Attenuation
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/odin-synth-component/adjust-attenuation
Adjust Attenuation

This function is used to modify the Attenuation Settings on the targeted ODIN Synth instance. It is worth noting that Attenuation Settings are only passed to new Active Sounds on start, so modified Attenuation data should be set before sound playback.

Inputs

NameTypeDescription
Execexec
TargetOdin Synth ComponentThe Odin Synth Component to call this function on.
In Attenuation SettingsFSoundAttenuationSettingsThe attenuation settings to apply to the targeted ODIN Synth instance.

Outputs

NameTypeDescription
Execexec

Get Room Connection Stats

Definition

Name
Get Room Connection Stats
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/get-room-connection-stats
Get Room Connection Stats

Get statistics for a room connection. This function provides detailed information about the connection status and metrics in an ODIN room.

Inputs

NameTypeDescription
Execexec
TargetRoomThe Room object to call this function on.

Outputs

NameTypeDescription
Execexec
Connection StatsOdinConnectionStatsThe statistics for the room connection.

Set Room APM Config

Definition

Name
Set Room APM Config
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/set-room-apm-config
Set Room APM Config

Updates audio processing settings for capture media handles in a specific room. This function allows modification of various audio processing parameters for a room.

Inputs

NameTypeDescription
Execexec
TargetRoomThe room object where the audio processing settings will be updated.
APM ConfigFOdinApmSettingsThe audio processing settings to be applied.

Outputs

NameTypeDescription
Execexec

Set Room APM Stream Delay

Definition

Name
Set Room APM Stream Delay
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/set-room-apm-stream-delay
Set Room APM Stream Delay

Updates the delay estimate in ms for reverse stream used in echo cancellation. This function modifies the delay settings for a specific room.

Inputs

NameTypeDescription
Execexec
TargetRoomThe room object where the APM stream delay will be updated.
Delay In Msint64The delay estimate in milliseconds for the reverse stream used in echo cancellation.

Outputs

NameTypeDescription
Execexec

Destroy Local Room Handle

Definition

Name
Destroy Local Room Handle
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/destroy-local-room-handle
Destroy Local Room Handle

Closes the connection to the server and destroys the local room handle. This function is used to properly disconnect and clean up resources associated with a room.

Inputs

NameTypeDescription
Execexec
TargetRoomThe room object whose connection to the server will be closed and handle destroyed.

Outputs

NameTypeDescription
Execexec

Get and Set Volume Multiplier

Definition

Name
Get and Set Volume Multiplier
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/get-and-set-volume-multiplier
Get and Set Volume Multiplier

GetVolumeMultiplier: Retrieves the current volume multiplier of the capture device’s input. SetVolumeMultiplier: Sets the volume multiplier for the capture device’s input.

Important

For security reasons, the volume multiplier is capped to the range [0, MaxVolumeMultiplier]. The maximum volume multiplier defaults to 3.0. To change the maximum volume multiplier, use the Set Max Volume Multiplier function.

Inputs

NameTypeDescription
Execexec
TargetOdinCaptureMediaThe Odin Capture Media object whose volume multiplier is being retrieved or set.
Volume MultiplierfloatThe new volume multiplier to set. Used only in SetVolumeMultiplier.

Outputs

NameTypeDescription
Execexec
Volume MultiplierfloatThe current volume multiplier. Returned only by GetVolumeMultiplier.

Get and Set Max Volume Multiplier

Definition

Name
Get and Set Max Volume Multiplier
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/get-and-set-max-volume-multiplier
Get and Set Max Volume Multiplier

GetMaxVolumeMultiplier: Retrieves the current maximum volume multiplier value. SetMaxVolumeMultiplier: Sets the new maximum volume multiplier value.

Tip

This value will cap the Volume Multiplier value. The default value is 3.0.

Inputs

NameTypeDescription
Execexec
TargetOdinCaptureMediaThe Odin Capture Media object whose max volume multiplier is being retrieved or set.
Max Volume MultiplierfloatThe new max volume multiplier value to set. Used only in SetMaxVolumeMultiplier.

Outputs

NameTypeDescription
Execexec
Max Volume MultiplierfloatThe current maximum volume multiplier. Returned only by GetMaxVolumeMultiplier.
NameDescription
On Add Media To Room SuccessThis event is triggered in the Add Media To Room function once the media has been added to the room successfully.
On Connection State ChangedHandles Connection State Changed events which are called when the connection state changed (i.e. a disconnect to the server). Connect a Bind to On Connection State Changed delegate node to handle this event for the specified room.
On Room JoinedHandles Room Joined events which are called once the local user has successfully joined a room. Connect a Bind to On Room Joined delegate node to handle this event for the specified room.
On Room User Data ChangedCalled whenever the user data of the room changed. Connect a Bind to On Room User Data Changed delegate node to handle this event for the specified room.
On Peer JoinedCalled whenever a peer joins the room. Connect a Bind to On Peer Joined delegate node to handle this event for the specified room.
On Peer LeftCalled whenever a peer leaves the room. Connect to a Bind to On Peer Left node to handle this event for the specified room.
On Peer User Data ChangedCalled whenever a peer has changed its user data. Connect to a Bind to On Peer User Data Changed node to handle this event for the specified room.
On Media AddedCalled whenever a peer has added a media (i.e. activated the microphone). Connect to a Bind to On Media Added delegate node to handle this event for the specified room. Will not be called for the local player.
On Media RemovedCalled whenever a peer has removed a media stream. Connect to a Bind to On Media Removed delegate node to handle this event for the specified room.
On Message ReceivedCalled whenever another peer has sent a message. Connect to a Bind to On Message Received delegate node to handle this event for the specified room.

Delegates

Construct Local Room Handle

Definition

Name
Construct Local Room Handle
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/construct-local-room-handle
Construct Local Room Handle

Creates a local room object that will be used to handle events and client side connection settings. Connect the Room output to the Room input of the Join Room node. You can also use the Room output to handle events like Room Joined or Media Added.

Inputs

NameTypeDescription
Initial APM SettingsAPMSettingsThe initial APM settings to use when constructing the room. Use the Make APM Settings node to create initial APM Settings.

Outputs

NameTypeDescription
Return ValueRoomThe constructed room object.

Make ODIN APM Settings

Definition

Name
Make ODIN APM Settings
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/make-odin-apm-settings
Make ODIN APM Settings

Creates an APM settings object that can be used to construct a local room handle.

Inputs

NameTypeDescription
Enable Voice Activity DetectionbooleanWhen enabled, ODIN will analyze the audio input signal using smart voice detection algorithm to determine the presence of speech. You can define both the probability required to start and stop transmitting.
Attack ProbabilityfloatVoice probability value when the VAD should engage.
Release ProbabilityfloatVoice probability value when the VAD should disengage. It’s recommended to keep this value 0.1 lower than the attack probability.
Enable Volume GatebooleanWhen enabled, the volume gate will measure the volume of the input audio signal, thus deciding when a user is speaking loud enough to transmit voice data. You can define both the root mean square power (dBFS) for when the gate should engage and disengage.
Attack Loudness (D BFS)floatRoot mean square power (dBFS) when the volume gate should engage.
Release Loudness (D BFS)floatRoot mean square power (dBFS) when the volume gate should disengage. It’s recommended to keep this value 10 lower than the attack loudness.
Echo CancellerbooleanWhen enabled, aligns the original and the reverse audio stream to negate the output inside the input, resulting in effective echo cancellation
High Pass FilterbooleanWhen enabled, the high-pass filter will remove low-frequency content from the input audio signal, thus making it sound cleaner and more focused.
Pre AmplifierbooleanWhen enabled, the preamplifier will boost the signal of sensitive microphones by taking really weak audio signals and making them louder.
Noise SuppressionenumWhen enabled, the noise suppressor will remove distracting background noise from the input audio signal. You can control the aggressiveness of the suppression. Increasing the level will reduce the noise level at the expense of a higher speech distortion.
Transient SuppressionbooleanWhen enabled, the transient suppressor will try to detect and attenuate keyboard clicks.
Gain ControllerbooleanWhen enabled, the gain controller will automatically bring the signal to an appropriate range. This means input signals with low volume will be amplified and high volume will be limited.

Outputs

NameTypeDescription
Return ValueAPMSettingsThe constructed APM settings object.

Discussion

Audio settings can sometimes be challenging to navigate, especially for those new to the field. While many options are straightforward, some require specific values to optimize performance.

In environments with high background noise, it’s essential to prevent this noise from being transmitted. To address this, we offer two key settings:

Voice Activity Detection

Our system utilizes a few milliseconds of audio to ascertain if the user is speaking by leveraging an advanced AI model. It’s recommended to keep this feature enabled.

The AI model operates on a probability scale ranging from 0.0 to 1.0, where 0.0 indicates zero likelihood of voice presence, and 1.0 signifies absolute certainty. Adjust the Attack and Release settings to define the probability thresholds for starting and stopping transmission.

Optimal settings are generally 0.9 for Attack (90% certainty of voice) and 0.8 for Release. We recommend setting the Release value slightly lower than the Attack value, ideally maintaining an offset of 0.1.

While effective in many scenarios, certain situations, like a bustling open-office, may require additional measures. In these cases, the AI might confidently detect voice, but it may not be the voice of the intended speaker.

Here, the Volume Gate filter proves useful:

Volume Gate

The Volume Gate operates by setting a volume threshold below which the microphone remains disabled. This helps distinguish between actual speech and lower-volume background noises. The gate activates only when the detected sound exceeds this threshold.

Understanding this concept might be initially complex. A useful resource is Wikipedia on DBFS.

It’s generally advisable to disable this feature initially. A starting points for settings could be -40 for Release and -30 for Attack. We recommend setting the Release value slightly lower than the Attack value, ideally maintaining an offset of 10. For further assistance, please feel free to contact our support team.

Generate Room Token

Definition

Name
Generate Room Token
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/generate-room-token
Generate Room Token

Takes an access key and a room id and creates a room token that is used to join a room. In production this should be done in a protected environment, e.g. your authentication server (see example project `Token Server´)

Inputs

NameTypeDescription
Execexec
TargetToken GeneratorUse the Construct Token Generator node to generate a token generator.
Room IdstringThe room id to generate a token for. Every user connected to the same room can talk to each other and exchange data.
User IdstringThe user id to generate a token for. You can use any string that makes sense for you to connect Odin peers to your users.
Token AudienceenumThe enum value of the token audience. Possible values are Default (for using a gateway) or Single Server (for using a specific Odin server without a gateway).

Outputs

NameTypeDescription
Execexec
Return ValuestringReturns a room token that can be used to join a room.

Construct a Token Generator

Definition

Name
Construct a Token Generator
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/construct-a-token-generator
Construct a Token Generator

Creates a token generator that is used to generate room tokens on client side.

Important

It is ok for development and testing purposes to create room tokens on client side - but in production you should switch to server side generation of room tokens!

Inputs

NameTypeDescription
Access KeystringThe access key for generating room tokens. You need to get an access key by signing up to the service or create a test key by following our Getting Started guide.

Outputs

NameTypeDescription
Return ValueToken GeneratorThe constructed token generator object. Connect to Generate Room Token to generate a room token.

Join Room

Definition

Name
Join Room
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/join-room
Join Room

Joins an ODIN room with the room token provided. Every peer connected to the same room will be able to talk to each other and exchange data.

Inputs

NameTypeDescription
Execexec
RoomRoomConnect the Room instance created by the Construct local room handle node. This room handle will later be used to handle events.
UrlstringThe url to the ODIN gateway. Typically this is https://gateway.odin.4players.io.
TokenstringThe token you created with the Generate Room Token node.
Initial Peer User DataArray of byteUser data can be anything and will be associated with the user (peer) on ODIN servers. User Data is automatically synchronized with other users in the same ODIN room. This enables you to easily exchange data like names or IDs.
Initial Peer PositionvectorThe initial peer position in Odin’s space. This value is used to optimize audio streams by not streaming audio data to peer’s that are outside of hearing range. Please refer to the Update Peer Position node for more information and to update the position later on.
On ErrordelegateDelegate to handle errors while joining a room. Most of the time, an error will occur when the room token is invalid or the room is full.
On SuccessdelegateCalled when the room has been successfully joined.

Outputs

NameTypeDescription
Execexec
On ResponseexecCalled when the gateway has returned its response. The success output indicates whether the room was successfully joined.
Successbooleantrue if the room has been successfully joined.

Discussion

Once you have joined the room, a sequence of events is created. You can learn more about these events here.

To handle these events create a Bind to .... node and connect that to your Room node created earlier in Construct local room handle node.

Info

If you cannot find the Bind to .... node (for example Bind to Room Joined Event), you need to disable the context filter in the blueprint node selection dialog.

Construct Local Media

Definition

Name
Construct Local Media
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/construct-local-media
Construct Local Media

Creates a media object that will be used in the Add Media To Room node input. Connect an Audio Capture or Odin Audio Capture object to it.

Important

Use the Create Audio Capture or Create Odin Audio Capture node to get access to the microphone on the users device. Make sure that the Audio Capture Plugin is enabled. You’ll find it in the Audio section of the Plugin Manager.

Inputs

NameTypeDescription
Audio CaptureAudio Capture Object ReferenceThe audio capture object reference.

Outputs

NameTypeDescription
Return ValueOdin Capture Media Object ReferenceA reference to the constructed Odin Capture Media object.

Create Odin Audio Capture

Definition

Name
Create Odin Audio Capture
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/create-odin-audio-capture
Create Odin Audio Capture

Creates an Odin Audio Capture object, that can be used to get access to the microphone on the users device. The Odin Audio Capture object adds features to the default Unreal Audio Capture, like enabling capture device switching on supported platforms or improved Push-To-Talk features. Please make sure, that the Audio Capture Plugin is enabled.

Outputs

NameTypeDescription
Return ValueOdin Audio Capture Object ReferenceA reference to the constructed Odin Audio Capture object.

Add Media To Room

Definition

Name
Add Media To Room
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/add-media-to-room
Add Media To Room

Adds a previously generated media object to the room. Once this is done, the users microphone input will be sent to other users so they can hear the audio.

Important

The user must have joined the room before adding media. Use the Join Room node to join the room. Also, you cannot use the same media stream for multiple rooms at once, but you have to create a new one for each room.

Inputs

NameTypeDescription
Execexec
RoomRoomThe room to which the media will be added.
MediaMediaThe media which should be added. Construct Local Media can be used to create a media object.
On ErrordelegateDelegate to handle errors while adding a media to a room.
On SuccessdelegateCalled when the media has been successfully added to the room. See On Media Added Success event for details.

Outputs

NameTypeDescription
Execexec
On ResponseexecCalled when the gateway has returned its response. Use the success output to understand if anything went fine.
Successbooleantrue if the media has been successfully joined.

On Add Media To Room Success

Definition

Name
On Add Media To Room Success
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-add-media-to-room-success
On Add Media To Room Success

This event is triggered in the Add Media To Room function once the media has been added to the room successfully.

Inputs

NameTypeDescription
DelegatedelegateBind to a Add Media To Room On Success delegate node to get this event triggered once the media has been added to the room.

Outputs

NameTypeDescription
Execexec
Media IdintegerThe media id added to the room.

Format Error

Definition

Name
Format Error
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/format-error
Format Error

Takes an ODIN error code and returns an error message a string which can be printed to the log.

Inputs

NameTypeDescription
CodeintegerThe error code.

Outputs

NameTypeDescription
Return ValuestringThe error message for the code.

Generate Access Key

Definition

Name
Generate Access Key
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/generate-access-key
Generate Access Key

Creates an access key that can be used to generate room tokens. These keys are only for development and should not be used in production.

Important

Do not connect this node directly to the Generate Room Token node, as a new access key would be generated during each play session for each users. Instead, print the generated access key into a log and store it in a variable, connecting that variable with the Generate Room Token node.

Outputs

NameTypeDescription
Return ValuestringThe access key for up to 25 peak concurrent users (PCU) per day. Connect to a log function to output the access key and then use that access key as input for the Generate Room Token node.

Add Odin Synth Component

Definition

Name
Add Odin Synth Component
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/add-odin-synth-component
Add Odin Synth Component

Adds the Odin Synth Component to the specified actor.

Inputs

NameTypeDescription
Execexec
TargetActor Object ReferenceThe Actor to which the Odin Synth Component will be added.
Manual AttachmentbooleanWhen Manual Attachment is set, automatic attachment to the target actor is skipped and it is up to the user to attach the resulting component (or set it up as the root) themselves.
Relative TransformTransformThe relative transform of the component to the target actor.

Outputs

NameTypeDescription
Execexec
Return ValueOdin Synth ComponentReturns the Odin Synth Component that will output audio from the media stream assigned by the Odin Assign Synth to Media node.

Odin Assign Synth to Media

Definition

Name
Odin Assign Synth to Media
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/odin-synth-component/odin-assign-synth-to-media
Odin Assign Synth to Media

Assign a media stream coming with the Media Added event to the Odin Synth Component which will generate audio output from the incoming stream.

Inputs

NameTypeDescription
Execexec
TargetOdin Synth ComponentThe Odin Synth Component that you either get from an Actor using the GetComponentByClass node or from the Add Odin Synth Component node.
MediaMedia Object ReferenceThe media stream to be assigned to the Odin Synth Component. You’ll get that from the Media Added event.

Outputs

NameTypeDescription
Execexec

Set Room Position Scale

Definition

Name
Set Room Position Scale
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/set-room-position-scale
Set Room Position Scale

Sets the multiplicative scale for all coordinates used in position updates. Use this as the maximum radius in which a peer can be heard. The scale value is used to optimize audio streams by not streaming audio data to peer’s that are outside of hearing range.

Important

The position scale should be set to the same value for all peers in the ODIN room. The scale value also has to be set individually for each room that will utilize ODIN’s optimization feature.

Inputs

NameTypeDescription
Execexec
TargetRoomThe room for which the scale should be set.
ScalefloatThe value of the scale as float.

Outputs

NameTypeDescription
Execexec

Update Peer Position

Definition

Name
Update Peer Position
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/update-peer-position
Update Peer Position

Updates the position of the own peer in the room. You have to set the scale beforehand via Set Room Position Scale.

Important

Invoking this method too frequently can lead to operational issues where the optimization of audio streams may not function correctly. Limit the frequency of calling Update Peer Position to a maximum of 10 times per second.

Tip

This function is optional and only used for performance reasons and to save bandwidth. This is not needed to make spatial audio work.

Inputs

NameTypeDescription
Execexec
RoomRoomThe room in which the peer’s position shall be set.
PositionvectorThe value of the position.
On ErrordelegateDelegate to handle errors while updating the position.
On SuccessdelegateCalled when the position has been successfully updated.

Outputs

NameTypeDescription
Execexec
On ResponseexecCalled when the server has returned its response. Use the ‘success’ value to check if the position has been successfully set.
Successbooleantrue if the position has been successfully set.

Bind to On Connection State Changed

Definition

Name
Bind to On Connection State Changed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-connection-state-changed
Bind to On Connection State Changed

Listens to on Connection State Changed events from the given Room object and calls the connected event handler of type On Connection Changed.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be checked. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect a On Connection State Changed Event to handle this event.

Outputs

NameTypeDescription
Execexec

On Connection State Changed

Definition

Name
On Connection State Changed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-connection-state-changed
On Connection State Changed

Handles Connection State Changed events which are called when the connection state changed (i.e. a disconnect to the server). Connect a Bind to On Connection State Changed delegate node to handle this event for the specified room.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Onnection State Changed node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateBind to a Bind to On Connection State Changed delegate node to get this event triggered once the room has been joined.

Outputs

NameTypeDescription
Execexec
Connection StateenumThe enum value of the connection state. Possible values are Disconnected, Disconnecting, Connecting, Connected.
RoomRoom Object ReferenceThe Room object reference for which the connection changed event occured.

Bind to On Room Joined

Definition

Name
Bind to On Room Joined
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-room-joined
Bind to On Room Joined

Listens on Room Joined events on the given Room object and calls the connected Room Joined Event handler.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be triggered. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect a Room Joined Event to handle this event.

Outputs

NameTypeDescription
Execexec

On Room Joined

Definition

Name
On Room Joined
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-room-joined
On Room Joined

Handles Room Joined events which are called once the local user has successfully joined a room. Connect a Bind to On Room Joined delegate node to handle this event for the specified room.

Important

The resulting peer id is only valid in the context of this room. This event will only be called for the local user.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Room Joined node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateCall the Bind to On Room Joined node to get this event triggered once the room has been joined.

Outputs

NameTypeDescription
Execexec
Peer IdintegerThe id of the peer that joined the room. This is the self peer id, i.e. the peer id of the local player. This peer id is only valid in the context of this room!
Room User DataArray of byteThe user data stored in the room for the peer as an array of bytes.
RoomOdin Room Object ReferenceThe Odin Room to which the peer joined.

Bind to On Room User Data Changed

Definition

Name
Bind to On Room User Data Changed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-room-user-data-changed
Bind to On Room User Data Changed

Bind to Room User Data Changed events in the given Room.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be triggered. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect an On Room User Data Changed Event to handle this event.

Outputs

NameTypeDescription
Execexec

On Room User Data Changed

Definition

Name
On Room User Data Changed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-room-user-data-changed
On Room User Data Changed

Called whenever the user data of the room changed. Connect a Bind to On Room User Data Changed delegate node to handle this event for the specified room.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Room User Data Changed node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateConnect to the Bind to On Room User Data Changed node to get this event triggered once a peer has left the room.

Outputs

NameTypeDescription
Execexec
User DataArray of byteThe updated user data of the room as an array of bytes.
RoomRoom Object ReferenceThe Room object reference for which the Room User Data was changed.

Bind to On Peer Joined

Definition

Name
Bind to On Peer Joined
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-peer-joined
Bind to On Peer Joined

Listens to Peer Joined events in the given Room object. Peer Joined events will be called whenever a peer joins the room. Will not be called for the local player. Use the On Room Joined event to handle joins from the local player instead.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be triggered. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect a Peer Joined Event to handle this event.

Outputs

NameTypeDescription
Execexec

On Peer Joined

Definition

Name
On Peer Joined
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-peer-joined
On Peer Joined

Called whenever a peer joins the room. Connect a Bind to On Peer Joined delegate node to handle this event for the specified room.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Peer Joined node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateBind to a Bind to On Peer Joined delegate node to get this event triggered once a peer has joined the room.

Outputs

NameTypeDescription
Execexec
Peer IdintegerThe id of the peer that joined the room. This is the self peer id, i.e. the peer id of the local player.
User DataArray of byteThe user data of the peer as an array of bytes
RoomRoom Object ReferenceThe Room object reference for which the event was triggered.

Bind to On Peer Left

Definition

Name
Bind to On Peer Left
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-peer-left
Bind to On Peer Left

Listens on Peer Left events on the given Room object which will be called whenever a peer left the room. Is not called for the local player.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be triggered. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect to an On Peer Left Event to handle Peer Left event calls.

Outputs

NameTypeDescription
Execexec

On Peer Left

Definition

Name
On Peer Left
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-peer-left
On Peer Left

Called whenever a peer leaves the room. Connect to a Bind to On Peer Left node to handle this event for the specified room.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Peer Left node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateConnect to a Bind to On Peer Left delegate node to get this event triggered once a peer has left the room.

Outputs

NameTypeDescription
Execexec
Peer IdintegerThe id of the peer that joined the room.
RoomRoom Object ReferenceThe Room object reference for which the event was triggered.

Bind to On Peer User Data Changed

Definition

Name
Bind to On Peer User Data Changed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-peer-user-data-changed
Bind to On Peer User Data Changed

Listens to Peer User Data Changed events for the given Room object. Peer User Data Changed events will be called whenever a peer updates their user data. Is not called for the local player.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be triggered. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect to a Peer User Data Changed Event to handle this event.

Outputs

NameTypeDescription
Execexec

On Peer User Data Changed

Definition

Name
On Peer User Data Changed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-peer-user-data-changed
On Peer User Data Changed

Called whenever a peer has changed its user data. Connect to a Bind to On Peer User Data Changed node to handle this event for the specified room.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Peer User Data Changed node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateConnect to a Bind to On Peer User Data Changed node to get this event triggered once a peer has left the room.

Outputs

NameTypeDescription
Execexec
Peer IdintegerThe id of the peer that joined the room.
User DataArray of byteThe updated user data of the peer as an array of bytes.
RoomRoom Object ReferenceThe Room object reference for which the event was triggered.

Bind to On Media Added

Definition

Name
Bind to On Media Added
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-media-added
Bind to On Media Added

Listens for On Media Added events in the given Room object. On Media Added events will be called whenever a peer has added a media (i.e. activated the microphone). Is not called for the local player.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be triggered. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect to an On Media Added to handle this event.

Outputs

NameTypeDescription
Execexec

On Media Added

Definition

Name
On Media Added
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-media-added
On Media Added

Called whenever a peer has added a media (i.e. activated the microphone). Connect to a Bind to On Media Added delegate node to handle this event for the specified room. Will not be called for the local player.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Media Added node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateConnect to a Bind to On Media Added delegate node to get this event triggered once a peer has added a media object.

Outputs

NameTypeDescription
Execexec
Peer IdintegerThe id of the peer that added the media.
MediaMedia Object ReferenceAn object reference to the media added to the room for the peer. Assign this media object to an Odin Synth Component for audio to be played in-game.
PropertiesProperties Object ReferenceProperties of the media object.
RoomRoom Object ReferenceThe Room object reference for which the event was triggered.

Bind to On Media Removed

Definition

Name
Bind to On Media Removed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-media-removed
Bind to On Media Removed

Listens to On Media Removed events in the given Room. On Media Removed will be called whenever a peer has removed a media (i.e. muted the microphone). Is not called for the local player.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be triggered. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect to a On Media Removed event to handle this event.

Outputs

NameTypeDescription
Execexec

On Media Removed

Definition

Name
On Media Removed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-media-removed
On Media Removed

Called whenever a peer has removed a media stream. Connect to a Bind to On Media Removed delegate node to handle this event for the specified room.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Media Removed node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateBind to a Bind to On Media Removed delegate node to get this event triggered once a peer has removed a media object.

Outputs

NameTypeDescription
Execexec
Peer IdintegerThe id of the peer that removed the media.
MediaMedia Object ReferenceAn object reference to the media removed from the room.
RoomRoom Object ReferenceThe Room object reference that the media was removed from.

Bind to On Message Received

Definition

Name
Bind to On Message Received
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-message-received
Bind to On Message Received

Listens to On Message Received events in the given Room object. On Message Received events will be triggered whenever another peer has sent a message.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be triggered. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect to a On Message Received event to handle this event.

Outputs

NameTypeDescription
Execexec

On Message Received

Definition

Name
On Message Received
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-message-received
On Message Received

Called whenever another peer has sent a message. Connect to a Bind to On Message Received delegate node to handle this event for the specified room.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Media Removed node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateConnect to a Bind to On Message Received delegate node to get this event triggered when another peer sent a message.

Outputs

NameTypeDescription
Execexec
Peer IdintegerThe id of the peer that sent the message.
DataArray of byteThe message payload data as an array of bytes.
RoomRoom Object ReferenceThe Room object reference of the room the message was sent in.

Send Message

Definition

Name
Send Message
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/send-message
Send Message

Sends arbitrary data to a list of target peers to an ODIN room. Every peer connected to the same room will be able to receive the message.

Tip

Use Bind to On Message Received node to receive messages sent from other peers.

Inputs

NameTypeDescription
Execexec
RoomRoomThe room in which the message is sent.
TargetsArray of int64List of targeted peer ids. If not specified, the message will be sent to all other peers in the same room.
DataArray of byteMessage data can be anything. This enables you to easily exchange data between peers directly over the Odin server.
On ErrordelegateDelegate to handle errors when sending a message.
On SuccessdelegateCalled when the message has been successfully sent.

Outputs

NameTypeDescription
Execexec
On ResponseexecCalled when the server has returned its response. Use the success value to check if the message has been successfully sent.
Successbooleantrue if the message has been successfully sent.

Get Capture Devices Available

Definition

Name
Get Capture Devices Available
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/get-capture-devices-available
Get Capture Devices Available

Returns all available capture devices with the device id. IMPORTANT! Use the Async version in case you experience stuttering. The Async version runs asynchronously and uses a callback when the result is available.

Inputs

NameTypeDescription
Execexec
On Result (Async Only)delegateCallback for when the result is available. Used only in the async version.

Outputs

NameTypeDescription
Execexec
Out DevicesArray of objectAll available capture devices. This is the output for both synchronous and asynchronous versions.

Get Current Audio Capture Device

Definition

Name
Get Current Audio Capture Device
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/get-current-audio-capture-device
Get Current Audio Capture Device

Returns info on the current capture device.

Outputs

NameTypeDescription
Current DeviceOdinCaptureDeviceInfoInfo on the current capture device.

Change Capture Device By Id

Definition

Name
Change Capture Device By Id
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/change-capture-device-by-id
Change Capture Device By Id

IMPORTANT! Use the Async version in case you experience stuttering. Updates the capture device and restarts the capture stream of the Audio Capture component. The Async version runs asynchronously and does not block the main thread.

Inputs

NameTypeDescription
Execexec
New Device IdstringThe id of the targeted capture device.
On Change Completed (Async Only)delegateCallback for when the change result is available. Used only in the async version.

Outputs

NameTypeDescription
Execexec
SuccessbooleanWhether or not the capture device was successfully changed. This is for the synchronous version only.

Change Capture Device By Name

Definition

Name
Change Capture Device By Name
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/change-capture-device-by-name
Change Capture Device By Name

IMPORTANT! Use the Async version in case you experience stuttering. Updates the capture device and restarts the capture stream of the Audio Capture component. The Async version runs asynchronously and does not block the main thread.

Inputs

NameTypeDescription
Execexec
Device NamenameThe name of the targeted capture device. Needs to be an exact match.
On Change Completed (Async Only)delegateCallback for when the change result is available. Used only in the async version.

Outputs

NameTypeDescription
Execexec
SuccessbooleanWhether or not the capture device was successfully changed. This is for the synchronous version only.

Restart Capturing

Definition

Name
Restart Capturing
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/restart-capturing
Restart Capturing

Restart the stream, using CurrentSelectedDeviceIndex as the new input.

Inputs

NameTypeDescription
Execexec
Automatically Start CapturebooleanIf true, the capture will automatically start. Defaults to true.

Outputs

NameTypeDescription
Execexec
ReturnbooleanReturns true if the capturing restarts successfully.

Get and Set Is Paused

Definition

Name
Get and Set Is Paused
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/get-and-set-is-paused
Get and Set Is Paused

Get Is Capturing Paused: Returns whether the audio capture is paused. Set Is Capturing Paused: Sets the paused state of the audio capture.

Tip

Use these Nodes, if you’d like to implement Push-To-Talk or Mute Functionality. The Is Paused state is optimized for this use case.

Inputs

NameTypeDescription
Is Capturing PausedbooleanThe new paused state to set. Only used in Set Is Capturing Paused.

Outputs

NameTypeDescription
Is Capturing PausedbooleanThe current paused state. Only used in Get Is Capturing Paused.

On Capture Device Reset

Definition

Name
On Capture Device Reset
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/on-capture-device-reset
On Capture Device Reset

Will be called if ODIN recognizes that the selected capture device does not supply data anymore, i.e., if a microphone was unplugged. ODIN will wait for AllowedTimeWithoutStreamUpdate seconds before trying a stream restart. You can set the AllowedTimeWithoutStreamUpdate parameter on the Odin Audio Capture Object.

Outputs

NameTypeDescription
Capture Device ChangedelegateA dynamic multicast delegate that is called when the capture device needs to be reset.

On Default Device Changed

Definition

Name
On Default Device Changed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/on-default-device-changed
On Default Device Changed

Will be called if the Default Device is the currently selected device and if the Default Device was switched by the system.

Outputs

NameTypeDescription
Capture Device ChangedelegateA dynamic multicast delegate that is called when the default capture device changes.

Reset Odin Media

Definition

Name
Reset Odin Media
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/odin-synth-component/reset-odin-media
Reset Odin Media

This function can be used to reset the media handle assigned to the targeted ODIN Synth Component instance. Resetting a media handle will restore it to its default configuration. This operation resets the internal Opus encoder/decoder, ensuring a clean state. Additionally, it clears internal buffers, providing a fresh start.

Inputs

NameTypeDescription
Execexec
TargetOdin Synth ComponentThe Odin Synth Component to call this function on.

Outputs

NameTypeDescription
Execexec

Adjust Attenuation

Definition

Name
Adjust Attenuation
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/odin-synth-component/adjust-attenuation
Adjust Attenuation

This function is used to modify the Attenuation Settings on the targeted ODIN Synth instance. It is worth noting that Attenuation Settings are only passed to new Active Sounds on start, so modified Attenuation data should be set before sound playback.

Inputs

NameTypeDescription
Execexec
TargetOdin Synth ComponentThe Odin Synth Component to call this function on.
In Attenuation SettingsFSoundAttenuationSettingsThe attenuation settings to apply to the targeted ODIN Synth instance.

Outputs

NameTypeDescription
Execexec

Get Room Connection Stats

Definition

Name
Get Room Connection Stats
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/get-room-connection-stats
Get Room Connection Stats

Get statistics for a room connection. This function provides detailed information about the connection status and metrics in an ODIN room.

Inputs

NameTypeDescription
Execexec
TargetRoomThe Room object to call this function on.

Outputs

NameTypeDescription
Execexec
Connection StatsOdinConnectionStatsThe statistics for the room connection.

Set Room APM Config

Definition

Name
Set Room APM Config
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/set-room-apm-config
Set Room APM Config

Updates audio processing settings for capture media handles in a specific room. This function allows modification of various audio processing parameters for a room.

Inputs

NameTypeDescription
Execexec
TargetRoomThe room object where the audio processing settings will be updated.
APM ConfigFOdinApmSettingsThe audio processing settings to be applied.

Outputs

NameTypeDescription
Execexec

Set Room APM Stream Delay

Definition

Name
Set Room APM Stream Delay
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/set-room-apm-stream-delay
Set Room APM Stream Delay

Updates the delay estimate in ms for reverse stream used in echo cancellation. This function modifies the delay settings for a specific room.

Inputs

NameTypeDescription
Execexec
TargetRoomThe room object where the APM stream delay will be updated.
Delay In Msint64The delay estimate in milliseconds for the reverse stream used in echo cancellation.

Outputs

NameTypeDescription
Execexec

Destroy Local Room Handle

Definition

Name
Destroy Local Room Handle
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/destroy-local-room-handle
Destroy Local Room Handle

Closes the connection to the server and destroys the local room handle. This function is used to properly disconnect and clean up resources associated with a room.

Inputs

NameTypeDescription
Execexec
TargetRoomThe room object whose connection to the server will be closed and handle destroyed.

Outputs

NameTypeDescription
Execexec

Get and Set Volume Multiplier

Definition

Name
Get and Set Volume Multiplier
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/get-and-set-volume-multiplier
Get and Set Volume Multiplier

GetVolumeMultiplier: Retrieves the current volume multiplier of the capture device’s input. SetVolumeMultiplier: Sets the volume multiplier for the capture device’s input.

Important

For security reasons, the volume multiplier is capped to the range [0, MaxVolumeMultiplier]. The maximum volume multiplier defaults to 3.0. To change the maximum volume multiplier, use the Set Max Volume Multiplier function.

Inputs

NameTypeDescription
Execexec
TargetOdinCaptureMediaThe Odin Capture Media object whose volume multiplier is being retrieved or set.
Volume MultiplierfloatThe new volume multiplier to set. Used only in SetVolumeMultiplier.

Outputs

NameTypeDescription
Execexec
Volume MultiplierfloatThe current volume multiplier. Returned only by GetVolumeMultiplier.

Get and Set Max Volume Multiplier

Definition

Name
Get and Set Max Volume Multiplier
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/get-and-set-max-volume-multiplier
Get and Set Max Volume Multiplier

GetMaxVolumeMultiplier: Retrieves the current maximum volume multiplier value. SetMaxVolumeMultiplier: Sets the new maximum volume multiplier value.

Tip

This value will cap the Volume Multiplier value. The default value is 3.0.

Inputs

NameTypeDescription
Execexec
TargetOdinCaptureMediaThe Odin Capture Media object whose max volume multiplier is being retrieved or set.
Max Volume MultiplierfloatThe new max volume multiplier value to set. Used only in SetMaxVolumeMultiplier.

Outputs

NameTypeDescription
Execexec
Max Volume MultiplierfloatThe current maximum volume multiplier. Returned only by GetMaxVolumeMultiplier.
NameDescription
Bind to On Connection State ChangedListens to on Connection State Changed events from the given Room object and calls the connected event handler of type On Connection Changed.
Bind to On Room JoinedListens on Room Joined events on the given Room object and calls the connected Room Joined Event handler.
Bind to On Room User Data ChangedBind to Room User Data Changed events in the given Room.
Bind to On Peer JoinedListens to Peer Joined events in the given Room object. Peer Joined events will be called whenever a peer joins the room. Will not be called for the local player. Use the On Room Joined event to handle joins from the local player instead.
Bind to On Peer LeftListens on Peer Left events on the given Room object which will be called whenever a peer left the room. Is not called for the local player.
Bind to On Peer User Data ChangedListens to Peer User Data Changed events for the given Room object. Peer User Data Changed events will be called whenever a peer updates their user data. Is not called for the local player.
Bind to On Media AddedListens for On Media Added events in the given Room object. On Media Added events will be called whenever a peer has added a media (i.e. activated the microphone). Is not called for the local player.
Bind to On Media RemovedListens to On Media Removed events in the given Room. On Media Removed will be called whenever a peer has removed a media (i.e. muted the microphone). Is not called for the local player.
Bind to On Message ReceivedListens to On Message Received events in the given Room object. On Message Received events will be triggered whenever another peer has sent a message.

Audio Capture

Construct Local Room Handle

Definition

Name
Construct Local Room Handle
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/construct-local-room-handle
Construct Local Room Handle

Creates a local room object that will be used to handle events and client side connection settings. Connect the Room output to the Room input of the Join Room node. You can also use the Room output to handle events like Room Joined or Media Added.

Inputs

NameTypeDescription
Initial APM SettingsAPMSettingsThe initial APM settings to use when constructing the room. Use the Make APM Settings node to create initial APM Settings.

Outputs

NameTypeDescription
Return ValueRoomThe constructed room object.

Make ODIN APM Settings

Definition

Name
Make ODIN APM Settings
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/make-odin-apm-settings
Make ODIN APM Settings

Creates an APM settings object that can be used to construct a local room handle.

Inputs

NameTypeDescription
Enable Voice Activity DetectionbooleanWhen enabled, ODIN will analyze the audio input signal using smart voice detection algorithm to determine the presence of speech. You can define both the probability required to start and stop transmitting.
Attack ProbabilityfloatVoice probability value when the VAD should engage.
Release ProbabilityfloatVoice probability value when the VAD should disengage. It’s recommended to keep this value 0.1 lower than the attack probability.
Enable Volume GatebooleanWhen enabled, the volume gate will measure the volume of the input audio signal, thus deciding when a user is speaking loud enough to transmit voice data. You can define both the root mean square power (dBFS) for when the gate should engage and disengage.
Attack Loudness (D BFS)floatRoot mean square power (dBFS) when the volume gate should engage.
Release Loudness (D BFS)floatRoot mean square power (dBFS) when the volume gate should disengage. It’s recommended to keep this value 10 lower than the attack loudness.
Echo CancellerbooleanWhen enabled, aligns the original and the reverse audio stream to negate the output inside the input, resulting in effective echo cancellation
High Pass FilterbooleanWhen enabled, the high-pass filter will remove low-frequency content from the input audio signal, thus making it sound cleaner and more focused.
Pre AmplifierbooleanWhen enabled, the preamplifier will boost the signal of sensitive microphones by taking really weak audio signals and making them louder.
Noise SuppressionenumWhen enabled, the noise suppressor will remove distracting background noise from the input audio signal. You can control the aggressiveness of the suppression. Increasing the level will reduce the noise level at the expense of a higher speech distortion.
Transient SuppressionbooleanWhen enabled, the transient suppressor will try to detect and attenuate keyboard clicks.
Gain ControllerbooleanWhen enabled, the gain controller will automatically bring the signal to an appropriate range. This means input signals with low volume will be amplified and high volume will be limited.

Outputs

NameTypeDescription
Return ValueAPMSettingsThe constructed APM settings object.

Discussion

Audio settings can sometimes be challenging to navigate, especially for those new to the field. While many options are straightforward, some require specific values to optimize performance.

In environments with high background noise, it’s essential to prevent this noise from being transmitted. To address this, we offer two key settings:

Voice Activity Detection

Our system utilizes a few milliseconds of audio to ascertain if the user is speaking by leveraging an advanced AI model. It’s recommended to keep this feature enabled.

The AI model operates on a probability scale ranging from 0.0 to 1.0, where 0.0 indicates zero likelihood of voice presence, and 1.0 signifies absolute certainty. Adjust the Attack and Release settings to define the probability thresholds for starting and stopping transmission.

Optimal settings are generally 0.9 for Attack (90% certainty of voice) and 0.8 for Release. We recommend setting the Release value slightly lower than the Attack value, ideally maintaining an offset of 0.1.

While effective in many scenarios, certain situations, like a bustling open-office, may require additional measures. In these cases, the AI might confidently detect voice, but it may not be the voice of the intended speaker.

Here, the Volume Gate filter proves useful:

Volume Gate

The Volume Gate operates by setting a volume threshold below which the microphone remains disabled. This helps distinguish between actual speech and lower-volume background noises. The gate activates only when the detected sound exceeds this threshold.

Understanding this concept might be initially complex. A useful resource is Wikipedia on DBFS.

It’s generally advisable to disable this feature initially. A starting points for settings could be -40 for Release and -30 for Attack. We recommend setting the Release value slightly lower than the Attack value, ideally maintaining an offset of 10. For further assistance, please feel free to contact our support team.

Generate Room Token

Definition

Name
Generate Room Token
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/generate-room-token
Generate Room Token

Takes an access key and a room id and creates a room token that is used to join a room. In production this should be done in a protected environment, e.g. your authentication server (see example project `Token Server´)

Inputs

NameTypeDescription
Execexec
TargetToken GeneratorUse the Construct Token Generator node to generate a token generator.
Room IdstringThe room id to generate a token for. Every user connected to the same room can talk to each other and exchange data.
User IdstringThe user id to generate a token for. You can use any string that makes sense for you to connect Odin peers to your users.
Token AudienceenumThe enum value of the token audience. Possible values are Default (for using a gateway) or Single Server (for using a specific Odin server without a gateway).

Outputs

NameTypeDescription
Execexec
Return ValuestringReturns a room token that can be used to join a room.

Construct a Token Generator

Definition

Name
Construct a Token Generator
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/construct-a-token-generator
Construct a Token Generator

Creates a token generator that is used to generate room tokens on client side.

Important

It is ok for development and testing purposes to create room tokens on client side - but in production you should switch to server side generation of room tokens!

Inputs

NameTypeDescription
Access KeystringThe access key for generating room tokens. You need to get an access key by signing up to the service or create a test key by following our Getting Started guide.

Outputs

NameTypeDescription
Return ValueToken GeneratorThe constructed token generator object. Connect to Generate Room Token to generate a room token.

Join Room

Definition

Name
Join Room
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/join-room
Join Room

Joins an ODIN room with the room token provided. Every peer connected to the same room will be able to talk to each other and exchange data.

Inputs

NameTypeDescription
Execexec
RoomRoomConnect the Room instance created by the Construct local room handle node. This room handle will later be used to handle events.
UrlstringThe url to the ODIN gateway. Typically this is https://gateway.odin.4players.io.
TokenstringThe token you created with the Generate Room Token node.
Initial Peer User DataArray of byteUser data can be anything and will be associated with the user (peer) on ODIN servers. User Data is automatically synchronized with other users in the same ODIN room. This enables you to easily exchange data like names or IDs.
Initial Peer PositionvectorThe initial peer position in Odin’s space. This value is used to optimize audio streams by not streaming audio data to peer’s that are outside of hearing range. Please refer to the Update Peer Position node for more information and to update the position later on.
On ErrordelegateDelegate to handle errors while joining a room. Most of the time, an error will occur when the room token is invalid or the room is full.
On SuccessdelegateCalled when the room has been successfully joined.

Outputs

NameTypeDescription
Execexec
On ResponseexecCalled when the gateway has returned its response. The success output indicates whether the room was successfully joined.
Successbooleantrue if the room has been successfully joined.

Discussion

Once you have joined the room, a sequence of events is created. You can learn more about these events here.

To handle these events create a Bind to .... node and connect that to your Room node created earlier in Construct local room handle node.

Info

If you cannot find the Bind to .... node (for example Bind to Room Joined Event), you need to disable the context filter in the blueprint node selection dialog.

Construct Local Media

Definition

Name
Construct Local Media
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/construct-local-media
Construct Local Media

Creates a media object that will be used in the Add Media To Room node input. Connect an Audio Capture or Odin Audio Capture object to it.

Important

Use the Create Audio Capture or Create Odin Audio Capture node to get access to the microphone on the users device. Make sure that the Audio Capture Plugin is enabled. You’ll find it in the Audio section of the Plugin Manager.

Inputs

NameTypeDescription
Audio CaptureAudio Capture Object ReferenceThe audio capture object reference.

Outputs

NameTypeDescription
Return ValueOdin Capture Media Object ReferenceA reference to the constructed Odin Capture Media object.

Create Odin Audio Capture

Definition

Name
Create Odin Audio Capture
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/create-odin-audio-capture
Create Odin Audio Capture

Creates an Odin Audio Capture object, that can be used to get access to the microphone on the users device. The Odin Audio Capture object adds features to the default Unreal Audio Capture, like enabling capture device switching on supported platforms or improved Push-To-Talk features. Please make sure, that the Audio Capture Plugin is enabled.

Outputs

NameTypeDescription
Return ValueOdin Audio Capture Object ReferenceA reference to the constructed Odin Audio Capture object.

Add Media To Room

Definition

Name
Add Media To Room
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/add-media-to-room
Add Media To Room

Adds a previously generated media object to the room. Once this is done, the users microphone input will be sent to other users so they can hear the audio.

Important

The user must have joined the room before adding media. Use the Join Room node to join the room. Also, you cannot use the same media stream for multiple rooms at once, but you have to create a new one for each room.

Inputs

NameTypeDescription
Execexec
RoomRoomThe room to which the media will be added.
MediaMediaThe media which should be added. Construct Local Media can be used to create a media object.
On ErrordelegateDelegate to handle errors while adding a media to a room.
On SuccessdelegateCalled when the media has been successfully added to the room. See On Media Added Success event for details.

Outputs

NameTypeDescription
Execexec
On ResponseexecCalled when the gateway has returned its response. Use the success output to understand if anything went fine.
Successbooleantrue if the media has been successfully joined.

On Add Media To Room Success

Definition

Name
On Add Media To Room Success
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-add-media-to-room-success
On Add Media To Room Success

This event is triggered in the Add Media To Room function once the media has been added to the room successfully.

Inputs

NameTypeDescription
DelegatedelegateBind to a Add Media To Room On Success delegate node to get this event triggered once the media has been added to the room.

Outputs

NameTypeDescription
Execexec
Media IdintegerThe media id added to the room.

Format Error

Definition

Name
Format Error
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/format-error
Format Error

Takes an ODIN error code and returns an error message a string which can be printed to the log.

Inputs

NameTypeDescription
CodeintegerThe error code.

Outputs

NameTypeDescription
Return ValuestringThe error message for the code.

Generate Access Key

Definition

Name
Generate Access Key
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/generate-access-key
Generate Access Key

Creates an access key that can be used to generate room tokens. These keys are only for development and should not be used in production.

Important

Do not connect this node directly to the Generate Room Token node, as a new access key would be generated during each play session for each users. Instead, print the generated access key into a log and store it in a variable, connecting that variable with the Generate Room Token node.

Outputs

NameTypeDescription
Return ValuestringThe access key for up to 25 peak concurrent users (PCU) per day. Connect to a log function to output the access key and then use that access key as input for the Generate Room Token node.

Add Odin Synth Component

Definition

Name
Add Odin Synth Component
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/add-odin-synth-component
Add Odin Synth Component

Adds the Odin Synth Component to the specified actor.

Inputs

NameTypeDescription
Execexec
TargetActor Object ReferenceThe Actor to which the Odin Synth Component will be added.
Manual AttachmentbooleanWhen Manual Attachment is set, automatic attachment to the target actor is skipped and it is up to the user to attach the resulting component (or set it up as the root) themselves.
Relative TransformTransformThe relative transform of the component to the target actor.

Outputs

NameTypeDescription
Execexec
Return ValueOdin Synth ComponentReturns the Odin Synth Component that will output audio from the media stream assigned by the Odin Assign Synth to Media node.

Odin Assign Synth to Media

Definition

Name
Odin Assign Synth to Media
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/odin-synth-component/odin-assign-synth-to-media
Odin Assign Synth to Media

Assign a media stream coming with the Media Added event to the Odin Synth Component which will generate audio output from the incoming stream.

Inputs

NameTypeDescription
Execexec
TargetOdin Synth ComponentThe Odin Synth Component that you either get from an Actor using the GetComponentByClass node or from the Add Odin Synth Component node.
MediaMedia Object ReferenceThe media stream to be assigned to the Odin Synth Component. You’ll get that from the Media Added event.

Outputs

NameTypeDescription
Execexec

Set Room Position Scale

Definition

Name
Set Room Position Scale
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/set-room-position-scale
Set Room Position Scale

Sets the multiplicative scale for all coordinates used in position updates. Use this as the maximum radius in which a peer can be heard. The scale value is used to optimize audio streams by not streaming audio data to peer’s that are outside of hearing range.

Important

The position scale should be set to the same value for all peers in the ODIN room. The scale value also has to be set individually for each room that will utilize ODIN’s optimization feature.

Inputs

NameTypeDescription
Execexec
TargetRoomThe room for which the scale should be set.
ScalefloatThe value of the scale as float.

Outputs

NameTypeDescription
Execexec

Update Peer Position

Definition

Name
Update Peer Position
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/update-peer-position
Update Peer Position

Updates the position of the own peer in the room. You have to set the scale beforehand via Set Room Position Scale.

Important

Invoking this method too frequently can lead to operational issues where the optimization of audio streams may not function correctly. Limit the frequency of calling Update Peer Position to a maximum of 10 times per second.

Tip

This function is optional and only used for performance reasons and to save bandwidth. This is not needed to make spatial audio work.

Inputs

NameTypeDescription
Execexec
RoomRoomThe room in which the peer’s position shall be set.
PositionvectorThe value of the position.
On ErrordelegateDelegate to handle errors while updating the position.
On SuccessdelegateCalled when the position has been successfully updated.

Outputs

NameTypeDescription
Execexec
On ResponseexecCalled when the server has returned its response. Use the ‘success’ value to check if the position has been successfully set.
Successbooleantrue if the position has been successfully set.

Bind to On Connection State Changed

Definition

Name
Bind to On Connection State Changed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-connection-state-changed
Bind to On Connection State Changed

Listens to on Connection State Changed events from the given Room object and calls the connected event handler of type On Connection Changed.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be checked. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect a On Connection State Changed Event to handle this event.

Outputs

NameTypeDescription
Execexec

On Connection State Changed

Definition

Name
On Connection State Changed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-connection-state-changed
On Connection State Changed

Handles Connection State Changed events which are called when the connection state changed (i.e. a disconnect to the server). Connect a Bind to On Connection State Changed delegate node to handle this event for the specified room.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Onnection State Changed node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateBind to a Bind to On Connection State Changed delegate node to get this event triggered once the room has been joined.

Outputs

NameTypeDescription
Execexec
Connection StateenumThe enum value of the connection state. Possible values are Disconnected, Disconnecting, Connecting, Connected.
RoomRoom Object ReferenceThe Room object reference for which the connection changed event occured.

Bind to On Room Joined

Definition

Name
Bind to On Room Joined
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-room-joined
Bind to On Room Joined

Listens on Room Joined events on the given Room object and calls the connected Room Joined Event handler.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be triggered. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect a Room Joined Event to handle this event.

Outputs

NameTypeDescription
Execexec

On Room Joined

Definition

Name
On Room Joined
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-room-joined
On Room Joined

Handles Room Joined events which are called once the local user has successfully joined a room. Connect a Bind to On Room Joined delegate node to handle this event for the specified room.

Important

The resulting peer id is only valid in the context of this room. This event will only be called for the local user.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Room Joined node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateCall the Bind to On Room Joined node to get this event triggered once the room has been joined.

Outputs

NameTypeDescription
Execexec
Peer IdintegerThe id of the peer that joined the room. This is the self peer id, i.e. the peer id of the local player. This peer id is only valid in the context of this room!
Room User DataArray of byteThe user data stored in the room for the peer as an array of bytes.
RoomOdin Room Object ReferenceThe Odin Room to which the peer joined.

Bind to On Room User Data Changed

Definition

Name
Bind to On Room User Data Changed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-room-user-data-changed
Bind to On Room User Data Changed

Bind to Room User Data Changed events in the given Room.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be triggered. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect an On Room User Data Changed Event to handle this event.

Outputs

NameTypeDescription
Execexec

On Room User Data Changed

Definition

Name
On Room User Data Changed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-room-user-data-changed
On Room User Data Changed

Called whenever the user data of the room changed. Connect a Bind to On Room User Data Changed delegate node to handle this event for the specified room.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Room User Data Changed node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateConnect to the Bind to On Room User Data Changed node to get this event triggered once a peer has left the room.

Outputs

NameTypeDescription
Execexec
User DataArray of byteThe updated user data of the room as an array of bytes.
RoomRoom Object ReferenceThe Room object reference for which the Room User Data was changed.

Bind to On Peer Joined

Definition

Name
Bind to On Peer Joined
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-peer-joined
Bind to On Peer Joined

Listens to Peer Joined events in the given Room object. Peer Joined events will be called whenever a peer joins the room. Will not be called for the local player. Use the On Room Joined event to handle joins from the local player instead.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be triggered. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect a Peer Joined Event to handle this event.

Outputs

NameTypeDescription
Execexec

On Peer Joined

Definition

Name
On Peer Joined
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-peer-joined
On Peer Joined

Called whenever a peer joins the room. Connect a Bind to On Peer Joined delegate node to handle this event for the specified room.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Peer Joined node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateBind to a Bind to On Peer Joined delegate node to get this event triggered once a peer has joined the room.

Outputs

NameTypeDescription
Execexec
Peer IdintegerThe id of the peer that joined the room. This is the self peer id, i.e. the peer id of the local player.
User DataArray of byteThe user data of the peer as an array of bytes
RoomRoom Object ReferenceThe Room object reference for which the event was triggered.

Bind to On Peer Left

Definition

Name
Bind to On Peer Left
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-peer-left
Bind to On Peer Left

Listens on Peer Left events on the given Room object which will be called whenever a peer left the room. Is not called for the local player.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be triggered. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect to an On Peer Left Event to handle Peer Left event calls.

Outputs

NameTypeDescription
Execexec

On Peer Left

Definition

Name
On Peer Left
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-peer-left
On Peer Left

Called whenever a peer leaves the room. Connect to a Bind to On Peer Left node to handle this event for the specified room.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Peer Left node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateConnect to a Bind to On Peer Left delegate node to get this event triggered once a peer has left the room.

Outputs

NameTypeDescription
Execexec
Peer IdintegerThe id of the peer that joined the room.
RoomRoom Object ReferenceThe Room object reference for which the event was triggered.

Bind to On Peer User Data Changed

Definition

Name
Bind to On Peer User Data Changed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-peer-user-data-changed
Bind to On Peer User Data Changed

Listens to Peer User Data Changed events for the given Room object. Peer User Data Changed events will be called whenever a peer updates their user data. Is not called for the local player.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be triggered. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect to a Peer User Data Changed Event to handle this event.

Outputs

NameTypeDescription
Execexec

On Peer User Data Changed

Definition

Name
On Peer User Data Changed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-peer-user-data-changed
On Peer User Data Changed

Called whenever a peer has changed its user data. Connect to a Bind to On Peer User Data Changed node to handle this event for the specified room.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Peer User Data Changed node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateConnect to a Bind to On Peer User Data Changed node to get this event triggered once a peer has left the room.

Outputs

NameTypeDescription
Execexec
Peer IdintegerThe id of the peer that joined the room.
User DataArray of byteThe updated user data of the peer as an array of bytes.
RoomRoom Object ReferenceThe Room object reference for which the event was triggered.

Bind to On Media Added

Definition

Name
Bind to On Media Added
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-media-added
Bind to On Media Added

Listens for On Media Added events in the given Room object. On Media Added events will be called whenever a peer has added a media (i.e. activated the microphone). Is not called for the local player.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be triggered. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect to an On Media Added to handle this event.

Outputs

NameTypeDescription
Execexec

On Media Added

Definition

Name
On Media Added
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-media-added
On Media Added

Called whenever a peer has added a media (i.e. activated the microphone). Connect to a Bind to On Media Added delegate node to handle this event for the specified room. Will not be called for the local player.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Media Added node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateConnect to a Bind to On Media Added delegate node to get this event triggered once a peer has added a media object.

Outputs

NameTypeDescription
Execexec
Peer IdintegerThe id of the peer that added the media.
MediaMedia Object ReferenceAn object reference to the media added to the room for the peer. Assign this media object to an Odin Synth Component for audio to be played in-game.
PropertiesProperties Object ReferenceProperties of the media object.
RoomRoom Object ReferenceThe Room object reference for which the event was triggered.

Bind to On Media Removed

Definition

Name
Bind to On Media Removed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-media-removed
Bind to On Media Removed

Listens to On Media Removed events in the given Room. On Media Removed will be called whenever a peer has removed a media (i.e. muted the microphone). Is not called for the local player.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be triggered. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect to a On Media Removed event to handle this event.

Outputs

NameTypeDescription
Execexec

On Media Removed

Definition

Name
On Media Removed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-media-removed
On Media Removed

Called whenever a peer has removed a media stream. Connect to a Bind to On Media Removed delegate node to handle this event for the specified room.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Media Removed node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateBind to a Bind to On Media Removed delegate node to get this event triggered once a peer has removed a media object.

Outputs

NameTypeDescription
Execexec
Peer IdintegerThe id of the peer that removed the media.
MediaMedia Object ReferenceAn object reference to the media removed from the room.
RoomRoom Object ReferenceThe Room object reference that the media was removed from.

Bind to On Message Received

Definition

Name
Bind to On Message Received
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-message-received
Bind to On Message Received

Listens to On Message Received events in the given Room object. On Message Received events will be triggered whenever another peer has sent a message.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be triggered. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect to a On Message Received event to handle this event.

Outputs

NameTypeDescription
Execexec

On Message Received

Definition

Name
On Message Received
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-message-received
On Message Received

Called whenever another peer has sent a message. Connect to a Bind to On Message Received delegate node to handle this event for the specified room.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Media Removed node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateConnect to a Bind to On Message Received delegate node to get this event triggered when another peer sent a message.

Outputs

NameTypeDescription
Execexec
Peer IdintegerThe id of the peer that sent the message.
DataArray of byteThe message payload data as an array of bytes.
RoomRoom Object ReferenceThe Room object reference of the room the message was sent in.

Send Message

Definition

Name
Send Message
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/send-message
Send Message

Sends arbitrary data to a list of target peers to an ODIN room. Every peer connected to the same room will be able to receive the message.

Tip

Use Bind to On Message Received node to receive messages sent from other peers.

Inputs

NameTypeDescription
Execexec
RoomRoomThe room in which the message is sent.
TargetsArray of int64List of targeted peer ids. If not specified, the message will be sent to all other peers in the same room.
DataArray of byteMessage data can be anything. This enables you to easily exchange data between peers directly over the Odin server.
On ErrordelegateDelegate to handle errors when sending a message.
On SuccessdelegateCalled when the message has been successfully sent.

Outputs

NameTypeDescription
Execexec
On ResponseexecCalled when the server has returned its response. Use the success value to check if the message has been successfully sent.
Successbooleantrue if the message has been successfully sent.

Get Capture Devices Available

Definition

Name
Get Capture Devices Available
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/get-capture-devices-available
Get Capture Devices Available

Returns all available capture devices with the device id. IMPORTANT! Use the Async version in case you experience stuttering. The Async version runs asynchronously and uses a callback when the result is available.

Inputs

NameTypeDescription
Execexec
On Result (Async Only)delegateCallback for when the result is available. Used only in the async version.

Outputs

NameTypeDescription
Execexec
Out DevicesArray of objectAll available capture devices. This is the output for both synchronous and asynchronous versions.

Get Current Audio Capture Device

Definition

Name
Get Current Audio Capture Device
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/get-current-audio-capture-device
Get Current Audio Capture Device

Returns info on the current capture device.

Outputs

NameTypeDescription
Current DeviceOdinCaptureDeviceInfoInfo on the current capture device.

Change Capture Device By Id

Definition

Name
Change Capture Device By Id
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/change-capture-device-by-id
Change Capture Device By Id

IMPORTANT! Use the Async version in case you experience stuttering. Updates the capture device and restarts the capture stream of the Audio Capture component. The Async version runs asynchronously and does not block the main thread.

Inputs

NameTypeDescription
Execexec
New Device IdstringThe id of the targeted capture device.
On Change Completed (Async Only)delegateCallback for when the change result is available. Used only in the async version.

Outputs

NameTypeDescription
Execexec
SuccessbooleanWhether or not the capture device was successfully changed. This is for the synchronous version only.

Change Capture Device By Name

Definition

Name
Change Capture Device By Name
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/change-capture-device-by-name
Change Capture Device By Name

IMPORTANT! Use the Async version in case you experience stuttering. Updates the capture device and restarts the capture stream of the Audio Capture component. The Async version runs asynchronously and does not block the main thread.

Inputs

NameTypeDescription
Execexec
Device NamenameThe name of the targeted capture device. Needs to be an exact match.
On Change Completed (Async Only)delegateCallback for when the change result is available. Used only in the async version.

Outputs

NameTypeDescription
Execexec
SuccessbooleanWhether or not the capture device was successfully changed. This is for the synchronous version only.

Restart Capturing

Definition

Name
Restart Capturing
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/restart-capturing
Restart Capturing

Restart the stream, using CurrentSelectedDeviceIndex as the new input.

Inputs

NameTypeDescription
Execexec
Automatically Start CapturebooleanIf true, the capture will automatically start. Defaults to true.

Outputs

NameTypeDescription
Execexec
ReturnbooleanReturns true if the capturing restarts successfully.

Get and Set Is Paused

Definition

Name
Get and Set Is Paused
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/get-and-set-is-paused
Get and Set Is Paused

Get Is Capturing Paused: Returns whether the audio capture is paused. Set Is Capturing Paused: Sets the paused state of the audio capture.

Tip

Use these Nodes, if you’d like to implement Push-To-Talk or Mute Functionality. The Is Paused state is optimized for this use case.

Inputs

NameTypeDescription
Is Capturing PausedbooleanThe new paused state to set. Only used in Set Is Capturing Paused.

Outputs

NameTypeDescription
Is Capturing PausedbooleanThe current paused state. Only used in Get Is Capturing Paused.

On Capture Device Reset

Definition

Name
On Capture Device Reset
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/on-capture-device-reset
On Capture Device Reset

Will be called if ODIN recognizes that the selected capture device does not supply data anymore, i.e., if a microphone was unplugged. ODIN will wait for AllowedTimeWithoutStreamUpdate seconds before trying a stream restart. You can set the AllowedTimeWithoutStreamUpdate parameter on the Odin Audio Capture Object.

Outputs

NameTypeDescription
Capture Device ChangedelegateA dynamic multicast delegate that is called when the capture device needs to be reset.

On Default Device Changed

Definition

Name
On Default Device Changed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/on-default-device-changed
On Default Device Changed

Will be called if the Default Device is the currently selected device and if the Default Device was switched by the system.

Outputs

NameTypeDescription
Capture Device ChangedelegateA dynamic multicast delegate that is called when the default capture device changes.

Reset Odin Media

Definition

Name
Reset Odin Media
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/odin-synth-component/reset-odin-media
Reset Odin Media

This function can be used to reset the media handle assigned to the targeted ODIN Synth Component instance. Resetting a media handle will restore it to its default configuration. This operation resets the internal Opus encoder/decoder, ensuring a clean state. Additionally, it clears internal buffers, providing a fresh start.

Inputs

NameTypeDescription
Execexec
TargetOdin Synth ComponentThe Odin Synth Component to call this function on.

Outputs

NameTypeDescription
Execexec

Adjust Attenuation

Definition

Name
Adjust Attenuation
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/odin-synth-component/adjust-attenuation
Adjust Attenuation

This function is used to modify the Attenuation Settings on the targeted ODIN Synth instance. It is worth noting that Attenuation Settings are only passed to new Active Sounds on start, so modified Attenuation data should be set before sound playback.

Inputs

NameTypeDescription
Execexec
TargetOdin Synth ComponentThe Odin Synth Component to call this function on.
In Attenuation SettingsFSoundAttenuationSettingsThe attenuation settings to apply to the targeted ODIN Synth instance.

Outputs

NameTypeDescription
Execexec

Get Room Connection Stats

Definition

Name
Get Room Connection Stats
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/get-room-connection-stats
Get Room Connection Stats

Get statistics for a room connection. This function provides detailed information about the connection status and metrics in an ODIN room.

Inputs

NameTypeDescription
Execexec
TargetRoomThe Room object to call this function on.

Outputs

NameTypeDescription
Execexec
Connection StatsOdinConnectionStatsThe statistics for the room connection.

Set Room APM Config

Definition

Name
Set Room APM Config
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/set-room-apm-config
Set Room APM Config

Updates audio processing settings for capture media handles in a specific room. This function allows modification of various audio processing parameters for a room.

Inputs

NameTypeDescription
Execexec
TargetRoomThe room object where the audio processing settings will be updated.
APM ConfigFOdinApmSettingsThe audio processing settings to be applied.

Outputs

NameTypeDescription
Execexec

Set Room APM Stream Delay

Definition

Name
Set Room APM Stream Delay
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/set-room-apm-stream-delay
Set Room APM Stream Delay

Updates the delay estimate in ms for reverse stream used in echo cancellation. This function modifies the delay settings for a specific room.

Inputs

NameTypeDescription
Execexec
TargetRoomThe room object where the APM stream delay will be updated.
Delay In Msint64The delay estimate in milliseconds for the reverse stream used in echo cancellation.

Outputs

NameTypeDescription
Execexec

Destroy Local Room Handle

Definition

Name
Destroy Local Room Handle
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/destroy-local-room-handle
Destroy Local Room Handle

Closes the connection to the server and destroys the local room handle. This function is used to properly disconnect and clean up resources associated with a room.

Inputs

NameTypeDescription
Execexec
TargetRoomThe room object whose connection to the server will be closed and handle destroyed.

Outputs

NameTypeDescription
Execexec

Get and Set Volume Multiplier

Definition

Name
Get and Set Volume Multiplier
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/get-and-set-volume-multiplier
Get and Set Volume Multiplier

GetVolumeMultiplier: Retrieves the current volume multiplier of the capture device’s input. SetVolumeMultiplier: Sets the volume multiplier for the capture device’s input.

Important

For security reasons, the volume multiplier is capped to the range [0, MaxVolumeMultiplier]. The maximum volume multiplier defaults to 3.0. To change the maximum volume multiplier, use the Set Max Volume Multiplier function.

Inputs

NameTypeDescription
Execexec
TargetOdinCaptureMediaThe Odin Capture Media object whose volume multiplier is being retrieved or set.
Volume MultiplierfloatThe new volume multiplier to set. Used only in SetVolumeMultiplier.

Outputs

NameTypeDescription
Execexec
Volume MultiplierfloatThe current volume multiplier. Returned only by GetVolumeMultiplier.

Get and Set Max Volume Multiplier

Definition

Name
Get and Set Max Volume Multiplier
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/get-and-set-max-volume-multiplier
Get and Set Max Volume Multiplier

GetMaxVolumeMultiplier: Retrieves the current maximum volume multiplier value. SetMaxVolumeMultiplier: Sets the new maximum volume multiplier value.

Tip

This value will cap the Volume Multiplier value. The default value is 3.0.

Inputs

NameTypeDescription
Execexec
TargetOdinCaptureMediaThe Odin Capture Media object whose max volume multiplier is being retrieved or set.
Max Volume MultiplierfloatThe new max volume multiplier value to set. Used only in SetMaxVolumeMultiplier.

Outputs

NameTypeDescription
Execexec
Max Volume MultiplierfloatThe current maximum volume multiplier. Returned only by GetMaxVolumeMultiplier.
NameDescription
Construct Local MediaCreates a media object that will be used in the Add Media To Room node input. Connect an Audio Capture or Odin Audio Capture object to it.
Get Capture Devices AvailableReturns all available capture devices with the device id. IMPORTANT! Use the Async version in case you experience stuttering. The Async version runs asynchronously and uses a callback when the result is available.
Get Current Audio Capture DeviceReturns info on the current capture device.
Change Capture Device By IdIMPORTANT! Use the Async version in case you experience stuttering. Updates the capture device and restarts the capture stream of the Audio Capture component. The Async version runs asynchronously and does not block the main thread.
Change Capture Device By NameIMPORTANT! Use the Async version in case you experience stuttering. Updates the capture device and restarts the capture stream of the Audio Capture component. The Async version runs asynchronously and does not block the main thread.
Restart CapturingRestart the stream, using CurrentSelectedDeviceIndex as the new input.
Get and Set Is PausedGet Is Capturing Paused: Returns whether the audio capture is paused. Set Is Capturing Paused: Sets the paused state of the audio capture.
On Capture Device ResetWill be called if ODIN recognizes that the selected capture device does not supply data anymore, i.e., if a microphone was unplugged. ODIN will wait for AllowedTimeWithoutStreamUpdate seconds before trying a stream restart. You can set the AllowedTimeWithoutStreamUpdate parameter on the Odin Audio Capture Object.
On Default Device ChangedWill be called if the Default Device is the currently selected device and if the Default Device was switched by the system.

Room

Construct Local Room Handle

Definition

Name
Construct Local Room Handle
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/construct-local-room-handle
Construct Local Room Handle

Creates a local room object that will be used to handle events and client side connection settings. Connect the Room output to the Room input of the Join Room node. You can also use the Room output to handle events like Room Joined or Media Added.

Inputs

NameTypeDescription
Initial APM SettingsAPMSettingsThe initial APM settings to use when constructing the room. Use the Make APM Settings node to create initial APM Settings.

Outputs

NameTypeDescription
Return ValueRoomThe constructed room object.

Make ODIN APM Settings

Definition

Name
Make ODIN APM Settings
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/make-odin-apm-settings
Make ODIN APM Settings

Creates an APM settings object that can be used to construct a local room handle.

Inputs

NameTypeDescription
Enable Voice Activity DetectionbooleanWhen enabled, ODIN will analyze the audio input signal using smart voice detection algorithm to determine the presence of speech. You can define both the probability required to start and stop transmitting.
Attack ProbabilityfloatVoice probability value when the VAD should engage.
Release ProbabilityfloatVoice probability value when the VAD should disengage. It’s recommended to keep this value 0.1 lower than the attack probability.
Enable Volume GatebooleanWhen enabled, the volume gate will measure the volume of the input audio signal, thus deciding when a user is speaking loud enough to transmit voice data. You can define both the root mean square power (dBFS) for when the gate should engage and disengage.
Attack Loudness (D BFS)floatRoot mean square power (dBFS) when the volume gate should engage.
Release Loudness (D BFS)floatRoot mean square power (dBFS) when the volume gate should disengage. It’s recommended to keep this value 10 lower than the attack loudness.
Echo CancellerbooleanWhen enabled, aligns the original and the reverse audio stream to negate the output inside the input, resulting in effective echo cancellation
High Pass FilterbooleanWhen enabled, the high-pass filter will remove low-frequency content from the input audio signal, thus making it sound cleaner and more focused.
Pre AmplifierbooleanWhen enabled, the preamplifier will boost the signal of sensitive microphones by taking really weak audio signals and making them louder.
Noise SuppressionenumWhen enabled, the noise suppressor will remove distracting background noise from the input audio signal. You can control the aggressiveness of the suppression. Increasing the level will reduce the noise level at the expense of a higher speech distortion.
Transient SuppressionbooleanWhen enabled, the transient suppressor will try to detect and attenuate keyboard clicks.
Gain ControllerbooleanWhen enabled, the gain controller will automatically bring the signal to an appropriate range. This means input signals with low volume will be amplified and high volume will be limited.

Outputs

NameTypeDescription
Return ValueAPMSettingsThe constructed APM settings object.

Discussion

Audio settings can sometimes be challenging to navigate, especially for those new to the field. While many options are straightforward, some require specific values to optimize performance.

In environments with high background noise, it’s essential to prevent this noise from being transmitted. To address this, we offer two key settings:

Voice Activity Detection

Our system utilizes a few milliseconds of audio to ascertain if the user is speaking by leveraging an advanced AI model. It’s recommended to keep this feature enabled.

The AI model operates on a probability scale ranging from 0.0 to 1.0, where 0.0 indicates zero likelihood of voice presence, and 1.0 signifies absolute certainty. Adjust the Attack and Release settings to define the probability thresholds for starting and stopping transmission.

Optimal settings are generally 0.9 for Attack (90% certainty of voice) and 0.8 for Release. We recommend setting the Release value slightly lower than the Attack value, ideally maintaining an offset of 0.1.

While effective in many scenarios, certain situations, like a bustling open-office, may require additional measures. In these cases, the AI might confidently detect voice, but it may not be the voice of the intended speaker.

Here, the Volume Gate filter proves useful:

Volume Gate

The Volume Gate operates by setting a volume threshold below which the microphone remains disabled. This helps distinguish between actual speech and lower-volume background noises. The gate activates only when the detected sound exceeds this threshold.

Understanding this concept might be initially complex. A useful resource is Wikipedia on DBFS.

It’s generally advisable to disable this feature initially. A starting points for settings could be -40 for Release and -30 for Attack. We recommend setting the Release value slightly lower than the Attack value, ideally maintaining an offset of 10. For further assistance, please feel free to contact our support team.

Generate Room Token

Definition

Name
Generate Room Token
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/generate-room-token
Generate Room Token

Takes an access key and a room id and creates a room token that is used to join a room. In production this should be done in a protected environment, e.g. your authentication server (see example project `Token Server´)

Inputs

NameTypeDescription
Execexec
TargetToken GeneratorUse the Construct Token Generator node to generate a token generator.
Room IdstringThe room id to generate a token for. Every user connected to the same room can talk to each other and exchange data.
User IdstringThe user id to generate a token for. You can use any string that makes sense for you to connect Odin peers to your users.
Token AudienceenumThe enum value of the token audience. Possible values are Default (for using a gateway) or Single Server (for using a specific Odin server without a gateway).

Outputs

NameTypeDescription
Execexec
Return ValuestringReturns a room token that can be used to join a room.

Construct a Token Generator

Definition

Name
Construct a Token Generator
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/construct-a-token-generator
Construct a Token Generator

Creates a token generator that is used to generate room tokens on client side.

Important

It is ok for development and testing purposes to create room tokens on client side - but in production you should switch to server side generation of room tokens!

Inputs

NameTypeDescription
Access KeystringThe access key for generating room tokens. You need to get an access key by signing up to the service or create a test key by following our Getting Started guide.

Outputs

NameTypeDescription
Return ValueToken GeneratorThe constructed token generator object. Connect to Generate Room Token to generate a room token.

Join Room

Definition

Name
Join Room
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/join-room
Join Room

Joins an ODIN room with the room token provided. Every peer connected to the same room will be able to talk to each other and exchange data.

Inputs

NameTypeDescription
Execexec
RoomRoomConnect the Room instance created by the Construct local room handle node. This room handle will later be used to handle events.
UrlstringThe url to the ODIN gateway. Typically this is https://gateway.odin.4players.io.
TokenstringThe token you created with the Generate Room Token node.
Initial Peer User DataArray of byteUser data can be anything and will be associated with the user (peer) on ODIN servers. User Data is automatically synchronized with other users in the same ODIN room. This enables you to easily exchange data like names or IDs.
Initial Peer PositionvectorThe initial peer position in Odin’s space. This value is used to optimize audio streams by not streaming audio data to peer’s that are outside of hearing range. Please refer to the Update Peer Position node for more information and to update the position later on.
On ErrordelegateDelegate to handle errors while joining a room. Most of the time, an error will occur when the room token is invalid or the room is full.
On SuccessdelegateCalled when the room has been successfully joined.

Outputs

NameTypeDescription
Execexec
On ResponseexecCalled when the gateway has returned its response. The success output indicates whether the room was successfully joined.
Successbooleantrue if the room has been successfully joined.

Discussion

Once you have joined the room, a sequence of events is created. You can learn more about these events here.

To handle these events create a Bind to .... node and connect that to your Room node created earlier in Construct local room handle node.

Info

If you cannot find the Bind to .... node (for example Bind to Room Joined Event), you need to disable the context filter in the blueprint node selection dialog.

Construct Local Media

Definition

Name
Construct Local Media
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/construct-local-media
Construct Local Media

Creates a media object that will be used in the Add Media To Room node input. Connect an Audio Capture or Odin Audio Capture object to it.

Important

Use the Create Audio Capture or Create Odin Audio Capture node to get access to the microphone on the users device. Make sure that the Audio Capture Plugin is enabled. You’ll find it in the Audio section of the Plugin Manager.

Inputs

NameTypeDescription
Audio CaptureAudio Capture Object ReferenceThe audio capture object reference.

Outputs

NameTypeDescription
Return ValueOdin Capture Media Object ReferenceA reference to the constructed Odin Capture Media object.

Create Odin Audio Capture

Definition

Name
Create Odin Audio Capture
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/create-odin-audio-capture
Create Odin Audio Capture

Creates an Odin Audio Capture object, that can be used to get access to the microphone on the users device. The Odin Audio Capture object adds features to the default Unreal Audio Capture, like enabling capture device switching on supported platforms or improved Push-To-Talk features. Please make sure, that the Audio Capture Plugin is enabled.

Outputs

NameTypeDescription
Return ValueOdin Audio Capture Object ReferenceA reference to the constructed Odin Audio Capture object.

Add Media To Room

Definition

Name
Add Media To Room
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/add-media-to-room
Add Media To Room

Adds a previously generated media object to the room. Once this is done, the users microphone input will be sent to other users so they can hear the audio.

Important

The user must have joined the room before adding media. Use the Join Room node to join the room. Also, you cannot use the same media stream for multiple rooms at once, but you have to create a new one for each room.

Inputs

NameTypeDescription
Execexec
RoomRoomThe room to which the media will be added.
MediaMediaThe media which should be added. Construct Local Media can be used to create a media object.
On ErrordelegateDelegate to handle errors while adding a media to a room.
On SuccessdelegateCalled when the media has been successfully added to the room. See On Media Added Success event for details.

Outputs

NameTypeDescription
Execexec
On ResponseexecCalled when the gateway has returned its response. Use the success output to understand if anything went fine.
Successbooleantrue if the media has been successfully joined.

On Add Media To Room Success

Definition

Name
On Add Media To Room Success
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-add-media-to-room-success
On Add Media To Room Success

This event is triggered in the Add Media To Room function once the media has been added to the room successfully.

Inputs

NameTypeDescription
DelegatedelegateBind to a Add Media To Room On Success delegate node to get this event triggered once the media has been added to the room.

Outputs

NameTypeDescription
Execexec
Media IdintegerThe media id added to the room.

Format Error

Definition

Name
Format Error
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/format-error
Format Error

Takes an ODIN error code and returns an error message a string which can be printed to the log.

Inputs

NameTypeDescription
CodeintegerThe error code.

Outputs

NameTypeDescription
Return ValuestringThe error message for the code.

Generate Access Key

Definition

Name
Generate Access Key
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/generate-access-key
Generate Access Key

Creates an access key that can be used to generate room tokens. These keys are only for development and should not be used in production.

Important

Do not connect this node directly to the Generate Room Token node, as a new access key would be generated during each play session for each users. Instead, print the generated access key into a log and store it in a variable, connecting that variable with the Generate Room Token node.

Outputs

NameTypeDescription
Return ValuestringThe access key for up to 25 peak concurrent users (PCU) per day. Connect to a log function to output the access key and then use that access key as input for the Generate Room Token node.

Add Odin Synth Component

Definition

Name
Add Odin Synth Component
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/add-odin-synth-component
Add Odin Synth Component

Adds the Odin Synth Component to the specified actor.

Inputs

NameTypeDescription
Execexec
TargetActor Object ReferenceThe Actor to which the Odin Synth Component will be added.
Manual AttachmentbooleanWhen Manual Attachment is set, automatic attachment to the target actor is skipped and it is up to the user to attach the resulting component (or set it up as the root) themselves.
Relative TransformTransformThe relative transform of the component to the target actor.

Outputs

NameTypeDescription
Execexec
Return ValueOdin Synth ComponentReturns the Odin Synth Component that will output audio from the media stream assigned by the Odin Assign Synth to Media node.

Odin Assign Synth to Media

Definition

Name
Odin Assign Synth to Media
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/odin-synth-component/odin-assign-synth-to-media
Odin Assign Synth to Media

Assign a media stream coming with the Media Added event to the Odin Synth Component which will generate audio output from the incoming stream.

Inputs

NameTypeDescription
Execexec
TargetOdin Synth ComponentThe Odin Synth Component that you either get from an Actor using the GetComponentByClass node or from the Add Odin Synth Component node.
MediaMedia Object ReferenceThe media stream to be assigned to the Odin Synth Component. You’ll get that from the Media Added event.

Outputs

NameTypeDescription
Execexec

Set Room Position Scale

Definition

Name
Set Room Position Scale
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/set-room-position-scale
Set Room Position Scale

Sets the multiplicative scale for all coordinates used in position updates. Use this as the maximum radius in which a peer can be heard. The scale value is used to optimize audio streams by not streaming audio data to peer’s that are outside of hearing range.

Important

The position scale should be set to the same value for all peers in the ODIN room. The scale value also has to be set individually for each room that will utilize ODIN’s optimization feature.

Inputs

NameTypeDescription
Execexec
TargetRoomThe room for which the scale should be set.
ScalefloatThe value of the scale as float.

Outputs

NameTypeDescription
Execexec

Update Peer Position

Definition

Name
Update Peer Position
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/update-peer-position
Update Peer Position

Updates the position of the own peer in the room. You have to set the scale beforehand via Set Room Position Scale.

Important

Invoking this method too frequently can lead to operational issues where the optimization of audio streams may not function correctly. Limit the frequency of calling Update Peer Position to a maximum of 10 times per second.

Tip

This function is optional and only used for performance reasons and to save bandwidth. This is not needed to make spatial audio work.

Inputs

NameTypeDescription
Execexec
RoomRoomThe room in which the peer’s position shall be set.
PositionvectorThe value of the position.
On ErrordelegateDelegate to handle errors while updating the position.
On SuccessdelegateCalled when the position has been successfully updated.

Outputs

NameTypeDescription
Execexec
On ResponseexecCalled when the server has returned its response. Use the ‘success’ value to check if the position has been successfully set.
Successbooleantrue if the position has been successfully set.

Bind to On Connection State Changed

Definition

Name
Bind to On Connection State Changed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-connection-state-changed
Bind to On Connection State Changed

Listens to on Connection State Changed events from the given Room object and calls the connected event handler of type On Connection Changed.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be checked. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect a On Connection State Changed Event to handle this event.

Outputs

NameTypeDescription
Execexec

On Connection State Changed

Definition

Name
On Connection State Changed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-connection-state-changed
On Connection State Changed

Handles Connection State Changed events which are called when the connection state changed (i.e. a disconnect to the server). Connect a Bind to On Connection State Changed delegate node to handle this event for the specified room.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Onnection State Changed node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateBind to a Bind to On Connection State Changed delegate node to get this event triggered once the room has been joined.

Outputs

NameTypeDescription
Execexec
Connection StateenumThe enum value of the connection state. Possible values are Disconnected, Disconnecting, Connecting, Connected.
RoomRoom Object ReferenceThe Room object reference for which the connection changed event occured.

Bind to On Room Joined

Definition

Name
Bind to On Room Joined
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-room-joined
Bind to On Room Joined

Listens on Room Joined events on the given Room object and calls the connected Room Joined Event handler.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be triggered. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect a Room Joined Event to handle this event.

Outputs

NameTypeDescription
Execexec

On Room Joined

Definition

Name
On Room Joined
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-room-joined
On Room Joined

Handles Room Joined events which are called once the local user has successfully joined a room. Connect a Bind to On Room Joined delegate node to handle this event for the specified room.

Important

The resulting peer id is only valid in the context of this room. This event will only be called for the local user.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Room Joined node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateCall the Bind to On Room Joined node to get this event triggered once the room has been joined.

Outputs

NameTypeDescription
Execexec
Peer IdintegerThe id of the peer that joined the room. This is the self peer id, i.e. the peer id of the local player. This peer id is only valid in the context of this room!
Room User DataArray of byteThe user data stored in the room for the peer as an array of bytes.
RoomOdin Room Object ReferenceThe Odin Room to which the peer joined.

Bind to On Room User Data Changed

Definition

Name
Bind to On Room User Data Changed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-room-user-data-changed
Bind to On Room User Data Changed

Bind to Room User Data Changed events in the given Room.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be triggered. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect an On Room User Data Changed Event to handle this event.

Outputs

NameTypeDescription
Execexec

On Room User Data Changed

Definition

Name
On Room User Data Changed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-room-user-data-changed
On Room User Data Changed

Called whenever the user data of the room changed. Connect a Bind to On Room User Data Changed delegate node to handle this event for the specified room.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Room User Data Changed node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateConnect to the Bind to On Room User Data Changed node to get this event triggered once a peer has left the room.

Outputs

NameTypeDescription
Execexec
User DataArray of byteThe updated user data of the room as an array of bytes.
RoomRoom Object ReferenceThe Room object reference for which the Room User Data was changed.

Bind to On Peer Joined

Definition

Name
Bind to On Peer Joined
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-peer-joined
Bind to On Peer Joined

Listens to Peer Joined events in the given Room object. Peer Joined events will be called whenever a peer joins the room. Will not be called for the local player. Use the On Room Joined event to handle joins from the local player instead.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be triggered. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect a Peer Joined Event to handle this event.

Outputs

NameTypeDescription
Execexec

On Peer Joined

Definition

Name
On Peer Joined
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-peer-joined
On Peer Joined

Called whenever a peer joins the room. Connect a Bind to On Peer Joined delegate node to handle this event for the specified room.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Peer Joined node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateBind to a Bind to On Peer Joined delegate node to get this event triggered once a peer has joined the room.

Outputs

NameTypeDescription
Execexec
Peer IdintegerThe id of the peer that joined the room. This is the self peer id, i.e. the peer id of the local player.
User DataArray of byteThe user data of the peer as an array of bytes
RoomRoom Object ReferenceThe Room object reference for which the event was triggered.

Bind to On Peer Left

Definition

Name
Bind to On Peer Left
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-peer-left
Bind to On Peer Left

Listens on Peer Left events on the given Room object which will be called whenever a peer left the room. Is not called for the local player.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be triggered. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect to an On Peer Left Event to handle Peer Left event calls.

Outputs

NameTypeDescription
Execexec

On Peer Left

Definition

Name
On Peer Left
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-peer-left
On Peer Left

Called whenever a peer leaves the room. Connect to a Bind to On Peer Left node to handle this event for the specified room.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Peer Left node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateConnect to a Bind to On Peer Left delegate node to get this event triggered once a peer has left the room.

Outputs

NameTypeDescription
Execexec
Peer IdintegerThe id of the peer that joined the room.
RoomRoom Object ReferenceThe Room object reference for which the event was triggered.

Bind to On Peer User Data Changed

Definition

Name
Bind to On Peer User Data Changed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-peer-user-data-changed
Bind to On Peer User Data Changed

Listens to Peer User Data Changed events for the given Room object. Peer User Data Changed events will be called whenever a peer updates their user data. Is not called for the local player.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be triggered. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect to a Peer User Data Changed Event to handle this event.

Outputs

NameTypeDescription
Execexec

On Peer User Data Changed

Definition

Name
On Peer User Data Changed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-peer-user-data-changed
On Peer User Data Changed

Called whenever a peer has changed its user data. Connect to a Bind to On Peer User Data Changed node to handle this event for the specified room.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Peer User Data Changed node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateConnect to a Bind to On Peer User Data Changed node to get this event triggered once a peer has left the room.

Outputs

NameTypeDescription
Execexec
Peer IdintegerThe id of the peer that joined the room.
User DataArray of byteThe updated user data of the peer as an array of bytes.
RoomRoom Object ReferenceThe Room object reference for which the event was triggered.

Bind to On Media Added

Definition

Name
Bind to On Media Added
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-media-added
Bind to On Media Added

Listens for On Media Added events in the given Room object. On Media Added events will be called whenever a peer has added a media (i.e. activated the microphone). Is not called for the local player.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be triggered. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect to an On Media Added to handle this event.

Outputs

NameTypeDescription
Execexec

On Media Added

Definition

Name
On Media Added
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-media-added
On Media Added

Called whenever a peer has added a media (i.e. activated the microphone). Connect to a Bind to On Media Added delegate node to handle this event for the specified room. Will not be called for the local player.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Media Added node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateConnect to a Bind to On Media Added delegate node to get this event triggered once a peer has added a media object.

Outputs

NameTypeDescription
Execexec
Peer IdintegerThe id of the peer that added the media.
MediaMedia Object ReferenceAn object reference to the media added to the room for the peer. Assign this media object to an Odin Synth Component for audio to be played in-game.
PropertiesProperties Object ReferenceProperties of the media object.
RoomRoom Object ReferenceThe Room object reference for which the event was triggered.

Bind to On Media Removed

Definition

Name
Bind to On Media Removed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-media-removed
Bind to On Media Removed

Listens to On Media Removed events in the given Room. On Media Removed will be called whenever a peer has removed a media (i.e. muted the microphone). Is not called for the local player.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be triggered. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect to a On Media Removed event to handle this event.

Outputs

NameTypeDescription
Execexec

On Media Removed

Definition

Name
On Media Removed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-media-removed
On Media Removed

Called whenever a peer has removed a media stream. Connect to a Bind to On Media Removed delegate node to handle this event for the specified room.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Media Removed node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateBind to a Bind to On Media Removed delegate node to get this event triggered once a peer has removed a media object.

Outputs

NameTypeDescription
Execexec
Peer IdintegerThe id of the peer that removed the media.
MediaMedia Object ReferenceAn object reference to the media removed from the room.
RoomRoom Object ReferenceThe Room object reference that the media was removed from.

Bind to On Message Received

Definition

Name
Bind to On Message Received
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-message-received
Bind to On Message Received

Listens to On Message Received events in the given Room object. On Message Received events will be triggered whenever another peer has sent a message.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be triggered. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect to a On Message Received event to handle this event.

Outputs

NameTypeDescription
Execexec

On Message Received

Definition

Name
On Message Received
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-message-received
On Message Received

Called whenever another peer has sent a message. Connect to a Bind to On Message Received delegate node to handle this event for the specified room.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Media Removed node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateConnect to a Bind to On Message Received delegate node to get this event triggered when another peer sent a message.

Outputs

NameTypeDescription
Execexec
Peer IdintegerThe id of the peer that sent the message.
DataArray of byteThe message payload data as an array of bytes.
RoomRoom Object ReferenceThe Room object reference of the room the message was sent in.

Send Message

Definition

Name
Send Message
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/send-message
Send Message

Sends arbitrary data to a list of target peers to an ODIN room. Every peer connected to the same room will be able to receive the message.

Tip

Use Bind to On Message Received node to receive messages sent from other peers.

Inputs

NameTypeDescription
Execexec
RoomRoomThe room in which the message is sent.
TargetsArray of int64List of targeted peer ids. If not specified, the message will be sent to all other peers in the same room.
DataArray of byteMessage data can be anything. This enables you to easily exchange data between peers directly over the Odin server.
On ErrordelegateDelegate to handle errors when sending a message.
On SuccessdelegateCalled when the message has been successfully sent.

Outputs

NameTypeDescription
Execexec
On ResponseexecCalled when the server has returned its response. Use the success value to check if the message has been successfully sent.
Successbooleantrue if the message has been successfully sent.

Get Capture Devices Available

Definition

Name
Get Capture Devices Available
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/get-capture-devices-available
Get Capture Devices Available

Returns all available capture devices with the device id. IMPORTANT! Use the Async version in case you experience stuttering. The Async version runs asynchronously and uses a callback when the result is available.

Inputs

NameTypeDescription
Execexec
On Result (Async Only)delegateCallback for when the result is available. Used only in the async version.

Outputs

NameTypeDescription
Execexec
Out DevicesArray of objectAll available capture devices. This is the output for both synchronous and asynchronous versions.

Get Current Audio Capture Device

Definition

Name
Get Current Audio Capture Device
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/get-current-audio-capture-device
Get Current Audio Capture Device

Returns info on the current capture device.

Outputs

NameTypeDescription
Current DeviceOdinCaptureDeviceInfoInfo on the current capture device.

Change Capture Device By Id

Definition

Name
Change Capture Device By Id
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/change-capture-device-by-id
Change Capture Device By Id

IMPORTANT! Use the Async version in case you experience stuttering. Updates the capture device and restarts the capture stream of the Audio Capture component. The Async version runs asynchronously and does not block the main thread.

Inputs

NameTypeDescription
Execexec
New Device IdstringThe id of the targeted capture device.
On Change Completed (Async Only)delegateCallback for when the change result is available. Used only in the async version.

Outputs

NameTypeDescription
Execexec
SuccessbooleanWhether or not the capture device was successfully changed. This is for the synchronous version only.

Change Capture Device By Name

Definition

Name
Change Capture Device By Name
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/change-capture-device-by-name
Change Capture Device By Name

IMPORTANT! Use the Async version in case you experience stuttering. Updates the capture device and restarts the capture stream of the Audio Capture component. The Async version runs asynchronously and does not block the main thread.

Inputs

NameTypeDescription
Execexec
Device NamenameThe name of the targeted capture device. Needs to be an exact match.
On Change Completed (Async Only)delegateCallback for when the change result is available. Used only in the async version.

Outputs

NameTypeDescription
Execexec
SuccessbooleanWhether or not the capture device was successfully changed. This is for the synchronous version only.

Restart Capturing

Definition

Name
Restart Capturing
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/restart-capturing
Restart Capturing

Restart the stream, using CurrentSelectedDeviceIndex as the new input.

Inputs

NameTypeDescription
Execexec
Automatically Start CapturebooleanIf true, the capture will automatically start. Defaults to true.

Outputs

NameTypeDescription
Execexec
ReturnbooleanReturns true if the capturing restarts successfully.

Get and Set Is Paused

Definition

Name
Get and Set Is Paused
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/get-and-set-is-paused
Get and Set Is Paused

Get Is Capturing Paused: Returns whether the audio capture is paused. Set Is Capturing Paused: Sets the paused state of the audio capture.

Tip

Use these Nodes, if you’d like to implement Push-To-Talk or Mute Functionality. The Is Paused state is optimized for this use case.

Inputs

NameTypeDescription
Is Capturing PausedbooleanThe new paused state to set. Only used in Set Is Capturing Paused.

Outputs

NameTypeDescription
Is Capturing PausedbooleanThe current paused state. Only used in Get Is Capturing Paused.

On Capture Device Reset

Definition

Name
On Capture Device Reset
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/on-capture-device-reset
On Capture Device Reset

Will be called if ODIN recognizes that the selected capture device does not supply data anymore, i.e., if a microphone was unplugged. ODIN will wait for AllowedTimeWithoutStreamUpdate seconds before trying a stream restart. You can set the AllowedTimeWithoutStreamUpdate parameter on the Odin Audio Capture Object.

Outputs

NameTypeDescription
Capture Device ChangedelegateA dynamic multicast delegate that is called when the capture device needs to be reset.

On Default Device Changed

Definition

Name
On Default Device Changed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/on-default-device-changed
On Default Device Changed

Will be called if the Default Device is the currently selected device and if the Default Device was switched by the system.

Outputs

NameTypeDescription
Capture Device ChangedelegateA dynamic multicast delegate that is called when the default capture device changes.

Reset Odin Media

Definition

Name
Reset Odin Media
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/odin-synth-component/reset-odin-media
Reset Odin Media

This function can be used to reset the media handle assigned to the targeted ODIN Synth Component instance. Resetting a media handle will restore it to its default configuration. This operation resets the internal Opus encoder/decoder, ensuring a clean state. Additionally, it clears internal buffers, providing a fresh start.

Inputs

NameTypeDescription
Execexec
TargetOdin Synth ComponentThe Odin Synth Component to call this function on.

Outputs

NameTypeDescription
Execexec

Adjust Attenuation

Definition

Name
Adjust Attenuation
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/odin-synth-component/adjust-attenuation
Adjust Attenuation

This function is used to modify the Attenuation Settings on the targeted ODIN Synth instance. It is worth noting that Attenuation Settings are only passed to new Active Sounds on start, so modified Attenuation data should be set before sound playback.

Inputs

NameTypeDescription
Execexec
TargetOdin Synth ComponentThe Odin Synth Component to call this function on.
In Attenuation SettingsFSoundAttenuationSettingsThe attenuation settings to apply to the targeted ODIN Synth instance.

Outputs

NameTypeDescription
Execexec

Get Room Connection Stats

Definition

Name
Get Room Connection Stats
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/get-room-connection-stats
Get Room Connection Stats

Get statistics for a room connection. This function provides detailed information about the connection status and metrics in an ODIN room.

Inputs

NameTypeDescription
Execexec
TargetRoomThe Room object to call this function on.

Outputs

NameTypeDescription
Execexec
Connection StatsOdinConnectionStatsThe statistics for the room connection.

Set Room APM Config

Definition

Name
Set Room APM Config
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/set-room-apm-config
Set Room APM Config

Updates audio processing settings for capture media handles in a specific room. This function allows modification of various audio processing parameters for a room.

Inputs

NameTypeDescription
Execexec
TargetRoomThe room object where the audio processing settings will be updated.
APM ConfigFOdinApmSettingsThe audio processing settings to be applied.

Outputs

NameTypeDescription
Execexec

Set Room APM Stream Delay

Definition

Name
Set Room APM Stream Delay
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/set-room-apm-stream-delay
Set Room APM Stream Delay

Updates the delay estimate in ms for reverse stream used in echo cancellation. This function modifies the delay settings for a specific room.

Inputs

NameTypeDescription
Execexec
TargetRoomThe room object where the APM stream delay will be updated.
Delay In Msint64The delay estimate in milliseconds for the reverse stream used in echo cancellation.

Outputs

NameTypeDescription
Execexec

Destroy Local Room Handle

Definition

Name
Destroy Local Room Handle
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/destroy-local-room-handle
Destroy Local Room Handle

Closes the connection to the server and destroys the local room handle. This function is used to properly disconnect and clean up resources associated with a room.

Inputs

NameTypeDescription
Execexec
TargetRoomThe room object whose connection to the server will be closed and handle destroyed.

Outputs

NameTypeDescription
Execexec

Get and Set Volume Multiplier

Definition

Name
Get and Set Volume Multiplier
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/get-and-set-volume-multiplier
Get and Set Volume Multiplier

GetVolumeMultiplier: Retrieves the current volume multiplier of the capture device’s input. SetVolumeMultiplier: Sets the volume multiplier for the capture device’s input.

Important

For security reasons, the volume multiplier is capped to the range [0, MaxVolumeMultiplier]. The maximum volume multiplier defaults to 3.0. To change the maximum volume multiplier, use the Set Max Volume Multiplier function.

Inputs

NameTypeDescription
Execexec
TargetOdinCaptureMediaThe Odin Capture Media object whose volume multiplier is being retrieved or set.
Volume MultiplierfloatThe new volume multiplier to set. Used only in SetVolumeMultiplier.

Outputs

NameTypeDescription
Execexec
Volume MultiplierfloatThe current volume multiplier. Returned only by GetVolumeMultiplier.

Get and Set Max Volume Multiplier

Definition

Name
Get and Set Max Volume Multiplier
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/get-and-set-max-volume-multiplier
Get and Set Max Volume Multiplier

GetMaxVolumeMultiplier: Retrieves the current maximum volume multiplier value. SetMaxVolumeMultiplier: Sets the new maximum volume multiplier value.

Tip

This value will cap the Volume Multiplier value. The default value is 3.0.

Inputs

NameTypeDescription
Execexec
TargetOdinCaptureMediaThe Odin Capture Media object whose max volume multiplier is being retrieved or set.
Max Volume MultiplierfloatThe new max volume multiplier value to set. Used only in SetMaxVolumeMultiplier.

Outputs

NameTypeDescription
Execexec
Max Volume MultiplierfloatThe current maximum volume multiplier. Returned only by GetMaxVolumeMultiplier.
NameDescription
Join RoomJoins an ODIN room with the room token provided. Every peer connected to the same room will be able to talk to each other and exchange data.
Add Media To RoomAdds a previously generated media object to the room. Once this is done, the users microphone input will be sent to other users so they can hear the audio.
Set Room Position ScaleSets the multiplicative scale for all coordinates used in position updates. Use this as the maximum radius in which a peer can be heard. The scale value is used to optimize audio streams by not streaming audio data to peer’s that are outside of hearing range.
Update Peer PositionUpdates the position of the own peer in the room. You have to set the scale beforehand via Set Room Position Scale.
Send MessageSends arbitrary data to a list of target peers to an ODIN room. Every peer connected to the same room will be able to receive the message.
Get Room Connection StatsGet statistics for a room connection. This function provides detailed information about the connection status and metrics in an ODIN room.
Set Room APM ConfigUpdates audio processing settings for capture media handles in a specific room. This function allows modification of various audio processing parameters for a room.
Set Room APM Stream DelayUpdates the delay estimate in ms for reverse stream used in echo cancellation. This function modifies the delay settings for a specific room.
Destroy Local Room HandleCloses the connection to the server and destroys the local room handle. This function is used to properly disconnect and clean up resources associated with a room.

Odin Synth Component

Construct Local Room Handle

Definition

Name
Construct Local Room Handle
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/construct-local-room-handle
Construct Local Room Handle

Creates a local room object that will be used to handle events and client side connection settings. Connect the Room output to the Room input of the Join Room node. You can also use the Room output to handle events like Room Joined or Media Added.

Inputs

NameTypeDescription
Initial APM SettingsAPMSettingsThe initial APM settings to use when constructing the room. Use the Make APM Settings node to create initial APM Settings.

Outputs

NameTypeDescription
Return ValueRoomThe constructed room object.

Make ODIN APM Settings

Definition

Name
Make ODIN APM Settings
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/make-odin-apm-settings
Make ODIN APM Settings

Creates an APM settings object that can be used to construct a local room handle.

Inputs

NameTypeDescription
Enable Voice Activity DetectionbooleanWhen enabled, ODIN will analyze the audio input signal using smart voice detection algorithm to determine the presence of speech. You can define both the probability required to start and stop transmitting.
Attack ProbabilityfloatVoice probability value when the VAD should engage.
Release ProbabilityfloatVoice probability value when the VAD should disengage. It’s recommended to keep this value 0.1 lower than the attack probability.
Enable Volume GatebooleanWhen enabled, the volume gate will measure the volume of the input audio signal, thus deciding when a user is speaking loud enough to transmit voice data. You can define both the root mean square power (dBFS) for when the gate should engage and disengage.
Attack Loudness (D BFS)floatRoot mean square power (dBFS) when the volume gate should engage.
Release Loudness (D BFS)floatRoot mean square power (dBFS) when the volume gate should disengage. It’s recommended to keep this value 10 lower than the attack loudness.
Echo CancellerbooleanWhen enabled, aligns the original and the reverse audio stream to negate the output inside the input, resulting in effective echo cancellation
High Pass FilterbooleanWhen enabled, the high-pass filter will remove low-frequency content from the input audio signal, thus making it sound cleaner and more focused.
Pre AmplifierbooleanWhen enabled, the preamplifier will boost the signal of sensitive microphones by taking really weak audio signals and making them louder.
Noise SuppressionenumWhen enabled, the noise suppressor will remove distracting background noise from the input audio signal. You can control the aggressiveness of the suppression. Increasing the level will reduce the noise level at the expense of a higher speech distortion.
Transient SuppressionbooleanWhen enabled, the transient suppressor will try to detect and attenuate keyboard clicks.
Gain ControllerbooleanWhen enabled, the gain controller will automatically bring the signal to an appropriate range. This means input signals with low volume will be amplified and high volume will be limited.

Outputs

NameTypeDescription
Return ValueAPMSettingsThe constructed APM settings object.

Discussion

Audio settings can sometimes be challenging to navigate, especially for those new to the field. While many options are straightforward, some require specific values to optimize performance.

In environments with high background noise, it’s essential to prevent this noise from being transmitted. To address this, we offer two key settings:

Voice Activity Detection

Our system utilizes a few milliseconds of audio to ascertain if the user is speaking by leveraging an advanced AI model. It’s recommended to keep this feature enabled.

The AI model operates on a probability scale ranging from 0.0 to 1.0, where 0.0 indicates zero likelihood of voice presence, and 1.0 signifies absolute certainty. Adjust the Attack and Release settings to define the probability thresholds for starting and stopping transmission.

Optimal settings are generally 0.9 for Attack (90% certainty of voice) and 0.8 for Release. We recommend setting the Release value slightly lower than the Attack value, ideally maintaining an offset of 0.1.

While effective in many scenarios, certain situations, like a bustling open-office, may require additional measures. In these cases, the AI might confidently detect voice, but it may not be the voice of the intended speaker.

Here, the Volume Gate filter proves useful:

Volume Gate

The Volume Gate operates by setting a volume threshold below which the microphone remains disabled. This helps distinguish between actual speech and lower-volume background noises. The gate activates only when the detected sound exceeds this threshold.

Understanding this concept might be initially complex. A useful resource is Wikipedia on DBFS.

It’s generally advisable to disable this feature initially. A starting points for settings could be -40 for Release and -30 for Attack. We recommend setting the Release value slightly lower than the Attack value, ideally maintaining an offset of 10. For further assistance, please feel free to contact our support team.

Generate Room Token

Definition

Name
Generate Room Token
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/generate-room-token
Generate Room Token

Takes an access key and a room id and creates a room token that is used to join a room. In production this should be done in a protected environment, e.g. your authentication server (see example project `Token Server´)

Inputs

NameTypeDescription
Execexec
TargetToken GeneratorUse the Construct Token Generator node to generate a token generator.
Room IdstringThe room id to generate a token for. Every user connected to the same room can talk to each other and exchange data.
User IdstringThe user id to generate a token for. You can use any string that makes sense for you to connect Odin peers to your users.
Token AudienceenumThe enum value of the token audience. Possible values are Default (for using a gateway) or Single Server (for using a specific Odin server without a gateway).

Outputs

NameTypeDescription
Execexec
Return ValuestringReturns a room token that can be used to join a room.

Construct a Token Generator

Definition

Name
Construct a Token Generator
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/construct-a-token-generator
Construct a Token Generator

Creates a token generator that is used to generate room tokens on client side.

Important

It is ok for development and testing purposes to create room tokens on client side - but in production you should switch to server side generation of room tokens!

Inputs

NameTypeDescription
Access KeystringThe access key for generating room tokens. You need to get an access key by signing up to the service or create a test key by following our Getting Started guide.

Outputs

NameTypeDescription
Return ValueToken GeneratorThe constructed token generator object. Connect to Generate Room Token to generate a room token.

Join Room

Definition

Name
Join Room
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/join-room
Join Room

Joins an ODIN room with the room token provided. Every peer connected to the same room will be able to talk to each other and exchange data.

Inputs

NameTypeDescription
Execexec
RoomRoomConnect the Room instance created by the Construct local room handle node. This room handle will later be used to handle events.
UrlstringThe url to the ODIN gateway. Typically this is https://gateway.odin.4players.io.
TokenstringThe token you created with the Generate Room Token node.
Initial Peer User DataArray of byteUser data can be anything and will be associated with the user (peer) on ODIN servers. User Data is automatically synchronized with other users in the same ODIN room. This enables you to easily exchange data like names or IDs.
Initial Peer PositionvectorThe initial peer position in Odin’s space. This value is used to optimize audio streams by not streaming audio data to peer’s that are outside of hearing range. Please refer to the Update Peer Position node for more information and to update the position later on.
On ErrordelegateDelegate to handle errors while joining a room. Most of the time, an error will occur when the room token is invalid or the room is full.
On SuccessdelegateCalled when the room has been successfully joined.

Outputs

NameTypeDescription
Execexec
On ResponseexecCalled when the gateway has returned its response. The success output indicates whether the room was successfully joined.
Successbooleantrue if the room has been successfully joined.

Discussion

Once you have joined the room, a sequence of events is created. You can learn more about these events here.

To handle these events create a Bind to .... node and connect that to your Room node created earlier in Construct local room handle node.

Info

If you cannot find the Bind to .... node (for example Bind to Room Joined Event), you need to disable the context filter in the blueprint node selection dialog.

Construct Local Media

Definition

Name
Construct Local Media
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/construct-local-media
Construct Local Media

Creates a media object that will be used in the Add Media To Room node input. Connect an Audio Capture or Odin Audio Capture object to it.

Important

Use the Create Audio Capture or Create Odin Audio Capture node to get access to the microphone on the users device. Make sure that the Audio Capture Plugin is enabled. You’ll find it in the Audio section of the Plugin Manager.

Inputs

NameTypeDescription
Audio CaptureAudio Capture Object ReferenceThe audio capture object reference.

Outputs

NameTypeDescription
Return ValueOdin Capture Media Object ReferenceA reference to the constructed Odin Capture Media object.

Create Odin Audio Capture

Definition

Name
Create Odin Audio Capture
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/create-odin-audio-capture
Create Odin Audio Capture

Creates an Odin Audio Capture object, that can be used to get access to the microphone on the users device. The Odin Audio Capture object adds features to the default Unreal Audio Capture, like enabling capture device switching on supported platforms or improved Push-To-Talk features. Please make sure, that the Audio Capture Plugin is enabled.

Outputs

NameTypeDescription
Return ValueOdin Audio Capture Object ReferenceA reference to the constructed Odin Audio Capture object.

Add Media To Room

Definition

Name
Add Media To Room
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/add-media-to-room
Add Media To Room

Adds a previously generated media object to the room. Once this is done, the users microphone input will be sent to other users so they can hear the audio.

Important

The user must have joined the room before adding media. Use the Join Room node to join the room. Also, you cannot use the same media stream for multiple rooms at once, but you have to create a new one for each room.

Inputs

NameTypeDescription
Execexec
RoomRoomThe room to which the media will be added.
MediaMediaThe media which should be added. Construct Local Media can be used to create a media object.
On ErrordelegateDelegate to handle errors while adding a media to a room.
On SuccessdelegateCalled when the media has been successfully added to the room. See On Media Added Success event for details.

Outputs

NameTypeDescription
Execexec
On ResponseexecCalled when the gateway has returned its response. Use the success output to understand if anything went fine.
Successbooleantrue if the media has been successfully joined.

On Add Media To Room Success

Definition

Name
On Add Media To Room Success
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-add-media-to-room-success
On Add Media To Room Success

This event is triggered in the Add Media To Room function once the media has been added to the room successfully.

Inputs

NameTypeDescription
DelegatedelegateBind to a Add Media To Room On Success delegate node to get this event triggered once the media has been added to the room.

Outputs

NameTypeDescription
Execexec
Media IdintegerThe media id added to the room.

Format Error

Definition

Name
Format Error
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/format-error
Format Error

Takes an ODIN error code and returns an error message a string which can be printed to the log.

Inputs

NameTypeDescription
CodeintegerThe error code.

Outputs

NameTypeDescription
Return ValuestringThe error message for the code.

Generate Access Key

Definition

Name
Generate Access Key
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/generate-access-key
Generate Access Key

Creates an access key that can be used to generate room tokens. These keys are only for development and should not be used in production.

Important

Do not connect this node directly to the Generate Room Token node, as a new access key would be generated during each play session for each users. Instead, print the generated access key into a log and store it in a variable, connecting that variable with the Generate Room Token node.

Outputs

NameTypeDescription
Return ValuestringThe access key for up to 25 peak concurrent users (PCU) per day. Connect to a log function to output the access key and then use that access key as input for the Generate Room Token node.

Add Odin Synth Component

Definition

Name
Add Odin Synth Component
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/add-odin-synth-component
Add Odin Synth Component

Adds the Odin Synth Component to the specified actor.

Inputs

NameTypeDescription
Execexec
TargetActor Object ReferenceThe Actor to which the Odin Synth Component will be added.
Manual AttachmentbooleanWhen Manual Attachment is set, automatic attachment to the target actor is skipped and it is up to the user to attach the resulting component (or set it up as the root) themselves.
Relative TransformTransformThe relative transform of the component to the target actor.

Outputs

NameTypeDescription
Execexec
Return ValueOdin Synth ComponentReturns the Odin Synth Component that will output audio from the media stream assigned by the Odin Assign Synth to Media node.

Odin Assign Synth to Media

Definition

Name
Odin Assign Synth to Media
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/odin-synth-component/odin-assign-synth-to-media
Odin Assign Synth to Media

Assign a media stream coming with the Media Added event to the Odin Synth Component which will generate audio output from the incoming stream.

Inputs

NameTypeDescription
Execexec
TargetOdin Synth ComponentThe Odin Synth Component that you either get from an Actor using the GetComponentByClass node or from the Add Odin Synth Component node.
MediaMedia Object ReferenceThe media stream to be assigned to the Odin Synth Component. You’ll get that from the Media Added event.

Outputs

NameTypeDescription
Execexec

Set Room Position Scale

Definition

Name
Set Room Position Scale
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/set-room-position-scale
Set Room Position Scale

Sets the multiplicative scale for all coordinates used in position updates. Use this as the maximum radius in which a peer can be heard. The scale value is used to optimize audio streams by not streaming audio data to peer’s that are outside of hearing range.

Important

The position scale should be set to the same value for all peers in the ODIN room. The scale value also has to be set individually for each room that will utilize ODIN’s optimization feature.

Inputs

NameTypeDescription
Execexec
TargetRoomThe room for which the scale should be set.
ScalefloatThe value of the scale as float.

Outputs

NameTypeDescription
Execexec

Update Peer Position

Definition

Name
Update Peer Position
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/update-peer-position
Update Peer Position

Updates the position of the own peer in the room. You have to set the scale beforehand via Set Room Position Scale.

Important

Invoking this method too frequently can lead to operational issues where the optimization of audio streams may not function correctly. Limit the frequency of calling Update Peer Position to a maximum of 10 times per second.

Tip

This function is optional and only used for performance reasons and to save bandwidth. This is not needed to make spatial audio work.

Inputs

NameTypeDescription
Execexec
RoomRoomThe room in which the peer’s position shall be set.
PositionvectorThe value of the position.
On ErrordelegateDelegate to handle errors while updating the position.
On SuccessdelegateCalled when the position has been successfully updated.

Outputs

NameTypeDescription
Execexec
On ResponseexecCalled when the server has returned its response. Use the ‘success’ value to check if the position has been successfully set.
Successbooleantrue if the position has been successfully set.

Bind to On Connection State Changed

Definition

Name
Bind to On Connection State Changed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-connection-state-changed
Bind to On Connection State Changed

Listens to on Connection State Changed events from the given Room object and calls the connected event handler of type On Connection Changed.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be checked. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect a On Connection State Changed Event to handle this event.

Outputs

NameTypeDescription
Execexec

On Connection State Changed

Definition

Name
On Connection State Changed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-connection-state-changed
On Connection State Changed

Handles Connection State Changed events which are called when the connection state changed (i.e. a disconnect to the server). Connect a Bind to On Connection State Changed delegate node to handle this event for the specified room.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Onnection State Changed node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateBind to a Bind to On Connection State Changed delegate node to get this event triggered once the room has been joined.

Outputs

NameTypeDescription
Execexec
Connection StateenumThe enum value of the connection state. Possible values are Disconnected, Disconnecting, Connecting, Connected.
RoomRoom Object ReferenceThe Room object reference for which the connection changed event occured.

Bind to On Room Joined

Definition

Name
Bind to On Room Joined
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-room-joined
Bind to On Room Joined

Listens on Room Joined events on the given Room object and calls the connected Room Joined Event handler.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be triggered. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect a Room Joined Event to handle this event.

Outputs

NameTypeDescription
Execexec

On Room Joined

Definition

Name
On Room Joined
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-room-joined
On Room Joined

Handles Room Joined events which are called once the local user has successfully joined a room. Connect a Bind to On Room Joined delegate node to handle this event for the specified room.

Important

The resulting peer id is only valid in the context of this room. This event will only be called for the local user.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Room Joined node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateCall the Bind to On Room Joined node to get this event triggered once the room has been joined.

Outputs

NameTypeDescription
Execexec
Peer IdintegerThe id of the peer that joined the room. This is the self peer id, i.e. the peer id of the local player. This peer id is only valid in the context of this room!
Room User DataArray of byteThe user data stored in the room for the peer as an array of bytes.
RoomOdin Room Object ReferenceThe Odin Room to which the peer joined.

Bind to On Room User Data Changed

Definition

Name
Bind to On Room User Data Changed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-room-user-data-changed
Bind to On Room User Data Changed

Bind to Room User Data Changed events in the given Room.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be triggered. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect an On Room User Data Changed Event to handle this event.

Outputs

NameTypeDescription
Execexec

On Room User Data Changed

Definition

Name
On Room User Data Changed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-room-user-data-changed
On Room User Data Changed

Called whenever the user data of the room changed. Connect a Bind to On Room User Data Changed delegate node to handle this event for the specified room.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Room User Data Changed node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateConnect to the Bind to On Room User Data Changed node to get this event triggered once a peer has left the room.

Outputs

NameTypeDescription
Execexec
User DataArray of byteThe updated user data of the room as an array of bytes.
RoomRoom Object ReferenceThe Room object reference for which the Room User Data was changed.

Bind to On Peer Joined

Definition

Name
Bind to On Peer Joined
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-peer-joined
Bind to On Peer Joined

Listens to Peer Joined events in the given Room object. Peer Joined events will be called whenever a peer joins the room. Will not be called for the local player. Use the On Room Joined event to handle joins from the local player instead.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be triggered. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect a Peer Joined Event to handle this event.

Outputs

NameTypeDescription
Execexec

On Peer Joined

Definition

Name
On Peer Joined
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-peer-joined
On Peer Joined

Called whenever a peer joins the room. Connect a Bind to On Peer Joined delegate node to handle this event for the specified room.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Peer Joined node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateBind to a Bind to On Peer Joined delegate node to get this event triggered once a peer has joined the room.

Outputs

NameTypeDescription
Execexec
Peer IdintegerThe id of the peer that joined the room. This is the self peer id, i.e. the peer id of the local player.
User DataArray of byteThe user data of the peer as an array of bytes
RoomRoom Object ReferenceThe Room object reference for which the event was triggered.

Bind to On Peer Left

Definition

Name
Bind to On Peer Left
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-peer-left
Bind to On Peer Left

Listens on Peer Left events on the given Room object which will be called whenever a peer left the room. Is not called for the local player.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be triggered. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect to an On Peer Left Event to handle Peer Left event calls.

Outputs

NameTypeDescription
Execexec

On Peer Left

Definition

Name
On Peer Left
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-peer-left
On Peer Left

Called whenever a peer leaves the room. Connect to a Bind to On Peer Left node to handle this event for the specified room.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Peer Left node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateConnect to a Bind to On Peer Left delegate node to get this event triggered once a peer has left the room.

Outputs

NameTypeDescription
Execexec
Peer IdintegerThe id of the peer that joined the room.
RoomRoom Object ReferenceThe Room object reference for which the event was triggered.

Bind to On Peer User Data Changed

Definition

Name
Bind to On Peer User Data Changed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-peer-user-data-changed
Bind to On Peer User Data Changed

Listens to Peer User Data Changed events for the given Room object. Peer User Data Changed events will be called whenever a peer updates their user data. Is not called for the local player.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be triggered. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect to a Peer User Data Changed Event to handle this event.

Outputs

NameTypeDescription
Execexec

On Peer User Data Changed

Definition

Name
On Peer User Data Changed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-peer-user-data-changed
On Peer User Data Changed

Called whenever a peer has changed its user data. Connect to a Bind to On Peer User Data Changed node to handle this event for the specified room.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Peer User Data Changed node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateConnect to a Bind to On Peer User Data Changed node to get this event triggered once a peer has left the room.

Outputs

NameTypeDescription
Execexec
Peer IdintegerThe id of the peer that joined the room.
User DataArray of byteThe updated user data of the peer as an array of bytes.
RoomRoom Object ReferenceThe Room object reference for which the event was triggered.

Bind to On Media Added

Definition

Name
Bind to On Media Added
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-media-added
Bind to On Media Added

Listens for On Media Added events in the given Room object. On Media Added events will be called whenever a peer has added a media (i.e. activated the microphone). Is not called for the local player.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be triggered. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect to an On Media Added to handle this event.

Outputs

NameTypeDescription
Execexec

On Media Added

Definition

Name
On Media Added
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-media-added
On Media Added

Called whenever a peer has added a media (i.e. activated the microphone). Connect to a Bind to On Media Added delegate node to handle this event for the specified room. Will not be called for the local player.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Media Added node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateConnect to a Bind to On Media Added delegate node to get this event triggered once a peer has added a media object.

Outputs

NameTypeDescription
Execexec
Peer IdintegerThe id of the peer that added the media.
MediaMedia Object ReferenceAn object reference to the media added to the room for the peer. Assign this media object to an Odin Synth Component for audio to be played in-game.
PropertiesProperties Object ReferenceProperties of the media object.
RoomRoom Object ReferenceThe Room object reference for which the event was triggered.

Bind to On Media Removed

Definition

Name
Bind to On Media Removed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-media-removed
Bind to On Media Removed

Listens to On Media Removed events in the given Room. On Media Removed will be called whenever a peer has removed a media (i.e. muted the microphone). Is not called for the local player.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be triggered. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect to a On Media Removed event to handle this event.

Outputs

NameTypeDescription
Execexec

On Media Removed

Definition

Name
On Media Removed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-media-removed
On Media Removed

Called whenever a peer has removed a media stream. Connect to a Bind to On Media Removed delegate node to handle this event for the specified room.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Media Removed node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateBind to a Bind to On Media Removed delegate node to get this event triggered once a peer has removed a media object.

Outputs

NameTypeDescription
Execexec
Peer IdintegerThe id of the peer that removed the media.
MediaMedia Object ReferenceAn object reference to the media removed from the room.
RoomRoom Object ReferenceThe Room object reference that the media was removed from.

Bind to On Message Received

Definition

Name
Bind to On Message Received
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/delegates/bind-to-on-message-received
Bind to On Message Received

Listens to On Message Received events in the given Room object. On Message Received events will be triggered whenever another peer has sent a message.

Inputs

NameTypeDescription
Execexec
TargetRoom Object ReferenceThe Room for which events will be triggered. Use the Construct local room handle node to create that Room object reference.
EventdelegateConnect to a On Message Received event to handle this event.

Outputs

NameTypeDescription
Execexec

On Message Received

Definition

Name
On Message Received
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/events/on-message-received
On Message Received

Called whenever another peer has sent a message. Connect to a Bind to On Message Received delegate node to handle this event for the specified room.

Tip

There might be issues if you create the event manually. Instead, drop a Bind to On Media Removed node into the blueprint, drag out from Event until you see the red line. Then release the mouse button and in the drop down choose Add Custom Event. Unreal will create the correct event for you then.

Inputs

NameTypeDescription
DelegatedelegateConnect to a Bind to On Message Received delegate node to get this event triggered when another peer sent a message.

Outputs

NameTypeDescription
Execexec
Peer IdintegerThe id of the peer that sent the message.
DataArray of byteThe message payload data as an array of bytes.
RoomRoom Object ReferenceThe Room object reference of the room the message was sent in.

Send Message

Definition

Name
Send Message
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/send-message
Send Message

Sends arbitrary data to a list of target peers to an ODIN room. Every peer connected to the same room will be able to receive the message.

Tip

Use Bind to On Message Received node to receive messages sent from other peers.

Inputs

NameTypeDescription
Execexec
RoomRoomThe room in which the message is sent.
TargetsArray of int64List of targeted peer ids. If not specified, the message will be sent to all other peers in the same room.
DataArray of byteMessage data can be anything. This enables you to easily exchange data between peers directly over the Odin server.
On ErrordelegateDelegate to handle errors when sending a message.
On SuccessdelegateCalled when the message has been successfully sent.

Outputs

NameTypeDescription
Execexec
On ResponseexecCalled when the server has returned its response. Use the success value to check if the message has been successfully sent.
Successbooleantrue if the message has been successfully sent.

Get Capture Devices Available

Definition

Name
Get Capture Devices Available
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/get-capture-devices-available
Get Capture Devices Available

Returns all available capture devices with the device id. IMPORTANT! Use the Async version in case you experience stuttering. The Async version runs asynchronously and uses a callback when the result is available.

Inputs

NameTypeDescription
Execexec
On Result (Async Only)delegateCallback for when the result is available. Used only in the async version.

Outputs

NameTypeDescription
Execexec
Out DevicesArray of objectAll available capture devices. This is the output for both synchronous and asynchronous versions.

Get Current Audio Capture Device

Definition

Name
Get Current Audio Capture Device
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/get-current-audio-capture-device
Get Current Audio Capture Device

Returns info on the current capture device.

Outputs

NameTypeDescription
Current DeviceOdinCaptureDeviceInfoInfo on the current capture device.

Change Capture Device By Id

Definition

Name
Change Capture Device By Id
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/change-capture-device-by-id
Change Capture Device By Id

IMPORTANT! Use the Async version in case you experience stuttering. Updates the capture device and restarts the capture stream of the Audio Capture component. The Async version runs asynchronously and does not block the main thread.

Inputs

NameTypeDescription
Execexec
New Device IdstringThe id of the targeted capture device.
On Change Completed (Async Only)delegateCallback for when the change result is available. Used only in the async version.

Outputs

NameTypeDescription
Execexec
SuccessbooleanWhether or not the capture device was successfully changed. This is for the synchronous version only.

Change Capture Device By Name

Definition

Name
Change Capture Device By Name
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/change-capture-device-by-name
Change Capture Device By Name

IMPORTANT! Use the Async version in case you experience stuttering. Updates the capture device and restarts the capture stream of the Audio Capture component. The Async version runs asynchronously and does not block the main thread.

Inputs

NameTypeDescription
Execexec
Device NamenameThe name of the targeted capture device. Needs to be an exact match.
On Change Completed (Async Only)delegateCallback for when the change result is available. Used only in the async version.

Outputs

NameTypeDescription
Execexec
SuccessbooleanWhether or not the capture device was successfully changed. This is for the synchronous version only.

Restart Capturing

Definition

Name
Restart Capturing
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/restart-capturing
Restart Capturing

Restart the stream, using CurrentSelectedDeviceIndex as the new input.

Inputs

NameTypeDescription
Execexec
Automatically Start CapturebooleanIf true, the capture will automatically start. Defaults to true.

Outputs

NameTypeDescription
Execexec
ReturnbooleanReturns true if the capturing restarts successfully.

Get and Set Is Paused

Definition

Name
Get and Set Is Paused
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/get-and-set-is-paused
Get and Set Is Paused

Get Is Capturing Paused: Returns whether the audio capture is paused. Set Is Capturing Paused: Sets the paused state of the audio capture.

Tip

Use these Nodes, if you’d like to implement Push-To-Talk or Mute Functionality. The Is Paused state is optimized for this use case.

Inputs

NameTypeDescription
Is Capturing PausedbooleanThe new paused state to set. Only used in Set Is Capturing Paused.

Outputs

NameTypeDescription
Is Capturing PausedbooleanThe current paused state. Only used in Get Is Capturing Paused.

On Capture Device Reset

Definition

Name
On Capture Device Reset
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/on-capture-device-reset
On Capture Device Reset

Will be called if ODIN recognizes that the selected capture device does not supply data anymore, i.e., if a microphone was unplugged. ODIN will wait for AllowedTimeWithoutStreamUpdate seconds before trying a stream restart. You can set the AllowedTimeWithoutStreamUpdate parameter on the Odin Audio Capture Object.

Outputs

NameTypeDescription
Capture Device ChangedelegateA dynamic multicast delegate that is called when the capture device needs to be reset.

On Default Device Changed

Definition

Name
On Default Device Changed
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/audio-capture/on-default-device-changed
On Default Device Changed

Will be called if the Default Device is the currently selected device and if the Default Device was switched by the system.

Outputs

NameTypeDescription
Capture Device ChangedelegateA dynamic multicast delegate that is called when the default capture device changes.

Reset Odin Media

Definition

Name
Reset Odin Media
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/odin-synth-component/reset-odin-media
Reset Odin Media

This function can be used to reset the media handle assigned to the targeted ODIN Synth Component instance. Resetting a media handle will restore it to its default configuration. This operation resets the internal Opus encoder/decoder, ensuring a clean state. Additionally, it clears internal buffers, providing a fresh start.

Inputs

NameTypeDescription
Execexec
TargetOdin Synth ComponentThe Odin Synth Component to call this function on.

Outputs

NameTypeDescription
Execexec

Adjust Attenuation

Definition

Name
Adjust Attenuation
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/odin-synth-component/adjust-attenuation
Adjust Attenuation

This function is used to modify the Attenuation Settings on the targeted ODIN Synth instance. It is worth noting that Attenuation Settings are only passed to new Active Sounds on start, so modified Attenuation data should be set before sound playback.

Inputs

NameTypeDescription
Execexec
TargetOdin Synth ComponentThe Odin Synth Component to call this function on.
In Attenuation SettingsFSoundAttenuationSettingsThe attenuation settings to apply to the targeted ODIN Synth instance.

Outputs

NameTypeDescription
Execexec

Get Room Connection Stats

Definition

Name
Get Room Connection Stats
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/get-room-connection-stats
Get Room Connection Stats

Get statistics for a room connection. This function provides detailed information about the connection status and metrics in an ODIN room.

Inputs

NameTypeDescription
Execexec
TargetRoomThe Room object to call this function on.

Outputs

NameTypeDescription
Execexec
Connection StatsOdinConnectionStatsThe statistics for the room connection.

Set Room APM Config

Definition

Name
Set Room APM Config
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/set-room-apm-config
Set Room APM Config

Updates audio processing settings for capture media handles in a specific room. This function allows modification of various audio processing parameters for a room.

Inputs

NameTypeDescription
Execexec
TargetRoomThe room object where the audio processing settings will be updated.
APM ConfigFOdinApmSettingsThe audio processing settings to be applied.

Outputs

NameTypeDescription
Execexec

Set Room APM Stream Delay

Definition

Name
Set Room APM Stream Delay
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/set-room-apm-stream-delay
Set Room APM Stream Delay

Updates the delay estimate in ms for reverse stream used in echo cancellation. This function modifies the delay settings for a specific room.

Inputs

NameTypeDescription
Execexec
TargetRoomThe room object where the APM stream delay will be updated.
Delay In Msint64The delay estimate in milliseconds for the reverse stream used in echo cancellation.

Outputs

NameTypeDescription
Execexec

Destroy Local Room Handle

Definition

Name
Destroy Local Room Handle
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/room/destroy-local-room-handle
Destroy Local Room Handle

Closes the connection to the server and destroys the local room handle. This function is used to properly disconnect and clean up resources associated with a room.

Inputs

NameTypeDescription
Execexec
TargetRoomThe room object whose connection to the server will be closed and handle destroyed.

Outputs

NameTypeDescription
Execexec

Get and Set Volume Multiplier

Definition

Name
Get and Set Volume Multiplier
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/get-and-set-volume-multiplier
Get and Set Volume Multiplier

GetVolumeMultiplier: Retrieves the current volume multiplier of the capture device’s input. SetVolumeMultiplier: Sets the volume multiplier for the capture device’s input.

Important

For security reasons, the volume multiplier is capped to the range [0, MaxVolumeMultiplier]. The maximum volume multiplier defaults to 3.0. To change the maximum volume multiplier, use the Set Max Volume Multiplier function.

Inputs

NameTypeDescription
Execexec
TargetOdinCaptureMediaThe Odin Capture Media object whose volume multiplier is being retrieved or set.
Volume MultiplierfloatThe new volume multiplier to set. Used only in SetVolumeMultiplier.

Outputs

NameTypeDescription
Execexec
Volume MultiplierfloatThe current volume multiplier. Returned only by GetVolumeMultiplier.

Get and Set Max Volume Multiplier

Definition

Name
Get and Set Max Volume Multiplier
Link to documentation
https://www.4players.io/odin/sdk/unreal/blueprint-reference/functions/get-and-set-max-volume-multiplier
Get and Set Max Volume Multiplier

GetMaxVolumeMultiplier: Retrieves the current maximum volume multiplier value. SetMaxVolumeMultiplier: Sets the new maximum volume multiplier value.

Tip

This value will cap the Volume Multiplier value. The default value is 3.0.

Inputs

NameTypeDescription
Execexec
TargetOdinCaptureMediaThe Odin Capture Media object whose max volume multiplier is being retrieved or set.
Max Volume MultiplierfloatThe new max volume multiplier value to set. Used only in SetMaxVolumeMultiplier.

Outputs

NameTypeDescription
Execexec
Max Volume MultiplierfloatThe current maximum volume multiplier. Returned only by GetMaxVolumeMultiplier.
NameDescription
Odin Assign Synth to MediaAssign a media stream coming with the Media Added event to the Odin Synth Component which will generate audio output from the incoming stream.
Reset Odin MediaThis function can be used to reset the media handle assigned to the targeted ODIN Synth Component instance. Resetting a media handle will restore it to its default configuration. This operation resets the internal Opus encoder/decoder, ensuring a clean state. Additionally, it clears internal buffers, providing a fresh start.
Adjust AttenuationThis function is used to modify the Attenuation Settings on the targeted ODIN Synth instance. It is worth noting that Attenuation Settings are only passed to new Active Sounds on start, so modified Attenuation data should be set before sound playback.