Navigation
API > API/Plugins > API/Plugins/TechAudioToolsMetaSound
Viewmodel for converting a float-type MetaSound Literal between Source, Normalized, and Display values.
Source values refer to the units or range expected by the MetaSound Literal. Display values refer to a configurable conversion of the Source value. For instance, a "Volume" input might expect a linear gain value in the MetaSound, but users may wish to display the value as decibels.
The Normalized value is to be used for UI elements such as sliders and knobs.
The Literal variable belonging to this viewmodel is expected to be bound to the Literal variable of a MetaSoundInputViewModel using a two-way binding for bidirectional updates. Doing so will ensure all updates to the input in the MetaSound Editor are reflected in your widget and vice versa.
This viewmodel should most likely use the Create Instance setting, along with the Expose Instance in Editor option. This allows designers to easily configure units and range settings in the Details panel of instances of the owning widget.
| Name | UMetaSoundLiteralViewModel_Float |
| Type | class |
| Header File | /Engine/Plugins/Experimental/TechAudioTools/Source/TechAudioToolsMetaSound/Public/ViewModels/MetaSoundLiteralViewModel.h |
| Include Path | #include "ViewModels/MetaSoundLiteralViewModel.h" |
Syntax
UCLASS (BlueprintType, EditInlineNew, DefaultToInstanced, CollapseCategories,
DisplayName="MetaSound Literal Float Viewmodel")
class UMetaSoundLiteralViewModel_Float : public UMVVMViewModelBase
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UMVVMViewModelBase → UMetaSoundLiteralViewModel_Float
Implements Interfaces
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UMetaSoundLiteralViewModel_Float
(
const FObjectInitializer& ObjectInitializer |
ViewModels/MetaSoundLiteralViewModel.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bIsUpdating | bool | ViewModels/MetaSoundLiteralViewModel.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
float GetDisplayRangeMax() |
Returns the range maximum of the DisplayRange. | ViewModels/MetaSoundLiteralViewModel.h |
|
float GetDisplayRangeMin() |
Returns the range minimum of the DisplayRange. | ViewModels/MetaSoundLiteralViewModel.h |
|
ETechAudioToolsFloatUnit GetDisplayUnits() |
Returns the units associated with the DisplayValue. | ViewModels/MetaSoundLiteralViewModel.h |
|
float GetDisplayValue() |
ViewModels/MetaSoundLiteralViewModel.h | ||
const FMetasoundFrontendLiteral & GetLiteral() |
ViewModels/MetaSoundLiteralViewModel.h | ||
float GetNormalizedValue() |
ViewModels/MetaSoundLiteralViewModel.h | ||
float GetSourceRangeMax() |
Returns the range maximum of the SourceRange. | ViewModels/MetaSoundLiteralViewModel.h |
|
float GetSourceRangeMin() |
Returns the range minimum of the SourceRange. | ViewModels/MetaSoundLiteralViewModel.h |
|
ETechAudioToolsFloatUnit GetSourceUnits() |
Returns the units associated with the SourceValue. | ViewModels/MetaSoundLiteralViewModel.h |
|
float GetSourceValue() |
ViewModels/MetaSoundLiteralViewModel.h | ||
bool IsShowingDisplayValues() |
ViewModels/MetaSoundLiteralViewModel.h | ||
void SetDisplayValue
(
float InDisplayValue |
ViewModels/MetaSoundLiteralViewModel.h | ||
void SetLiteral
(
const FMetasoundFrontendLiteral& InLiteral |
ViewModels/MetaSoundLiteralViewModel.h | ||
void SetNormalizedValue
(
float InNormalizedValue |
ViewModels/MetaSoundLiteralViewModel.h | ||
void SetShowDisplayValues
(
bool bInIsShowingDisplayValues |
ViewModels/MetaSoundLiteralViewModel.h | ||
void SetSourceValue
(
float InSourceValue |
ViewModels/MetaSoundLiteralViewModel.h |
See Also
- UTechAudioToolsFloatMapping for unit conversion and range mapping logic.