VJ Master 1.0
Real-time audio analysis and visualisation.
Loading...
Searching...
No Matches
ST_AudioControlSettings.h
1// Copyright (c) 2025 Aaron Trotter (ShaderTech). All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "Engine/DeveloperSettings.h"
7#include "ST_AudioControlSettings.generated.h"
8
10 // ENUMS
12
16UENUM(BlueprintType)
17enum class EMIDIType : uint8
18{
19 Both UMETA(DisplayName = "Both"),
20 Input UMETA(DisplayName = "Input"),
21 Output UMETA(DisplayName = "Output"),
22 None UMETA(DisplayName = "None")
23};
24
28UENUM(BlueprintType)
29enum class ELEDColourFormat : uint8
30{
31 RGB UMETA(DisplayName = "RGB"),
32 RGBA UMETA(DisplayName = "RGBA"),
33 BGRA UMETA(DisplayName = "BGRA")
34};
35
39UENUM(BlueprintType)
40enum class ELEDAlphaMapping : uint8
41{
42 None UMETA(DisplayName = "No Alpha (full transparency)"),
43 Linear UMETA(DisplayName = "Linear (direct multiplication)"),
44 Logarithmic UMETA(DisplayName = "Logarithmic (smooth, uniform)"),
45 Gamma UMETA(DisplayName = "Gamma (corrected for display)")
46};
47
49// STRUCTS
51
55USTRUCT(BlueprintType)
57{
58 GENERATED_BODY()
59
60public:
61 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "MIDI")
62 FIntPoint ControlChangeRange = FIntPoint::ZeroValue;
63
64 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "MIDI")
65 FIntPoint PitchBendRange = FIntPoint::ZeroValue;
66};
67
71USTRUCT(BlueprintType)
73{
74 GENERATED_BODY()
75
76public:
77 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "ShaderTech")
78 UObject* Controller = nullptr;
79
80 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "ShaderTech")
81 FName Name = "";
82
83 bool operator==(const FST_AudioController& Other) const
84 {
85 return Name == Other.Name;
86 }
87
88 bool operator!=(const FST_AudioController& Other) const
89 {
90 return !operator==(Other);
91 }
92};
93
97USTRUCT(BlueprintType)
99{
100 GENERATED_BODY()
101
102public:
103 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "MIDI")
104 EMIDIType MIDIType = EMIDIType::None;
105};
106
110USTRUCT(BlueprintType)
112{
113 GENERATED_BODY()
114};
115
119USTRUCT(BlueprintType)
121{
122 GENERATED_BODY()
123};
124
128USTRUCT(BlueprintType)
130{
131 GENERATED_BODY()
132};
133
137USTRUCT(BlueprintType)
139{
140 GENERATED_BODY()
141
142public:
143 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "UDP", meta = (SessionRestartRequired))
144 ELEDColourFormat ColourFormat = ELEDColourFormat::RGB;
145
146 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "UDP", meta = (SessionRestartRequired))
147 ELEDAlphaMapping AlphaMapping = ELEDAlphaMapping::Logarithmic;
148
149 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "UDP", meta = (SessionRestartRequired, EditCondition = "AlphaMapping == ELEDAlphaMapping::Gamma", Tooltip = "A value of 2.2 matches most screens (sRGB) and ensures correct brightness and color perception."))
150 float GammaFactor = 2.2f;
151};
152
156USTRUCT(BlueprintType)
158{
159 GENERATED_BODY()
160
161public:
162 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "LED", meta = (SessionRestartRequired))
163 FIntPoint LEDResolution = FIntPoint(1, 1);
164
165 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "LED", meta = (SessionRestartRequired))
166 FIntPoint PrevisResolution = FIntPoint(1, 1);
167
168 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "LED")
169 FLEDConfig LEDConfig;
170};
171
175USTRUCT(BlueprintType)
177{
178 GENERATED_BODY()
179
180public:
181 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "DMX")
182 FName Name = "";
183
184 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "DMX")
185 int32 Value = 0;
186};
187
191USTRUCT(BlueprintType)
193{
194 GENERATED_BODY()
195
196public:
197 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "DMX", meta = (SessionRestartRequired))
198 TSoftObjectPtr<class UMaterialInterface> LEDMaterial = nullptr;
199
200 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "DMX")
201 bool bKeepStateOnEndPlay = false;
202
203 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "DMX")
204 TArray<FST_DMXAttribute> DMXAttributes;
205};
206
210USTRUCT(BlueprintType)
212{
213 GENERATED_BODY()
214
215public:
216 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "ArtNet", meta = (SessionRestartRequired))
217 bool bArtNetEnabled = true;
218
219 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "ArtNet", meta = (SessionRestartRequired))
220 FString SocketDescription = "ST_Socket";
221
222 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "ArtNet", meta = (SessionRestartRequired))
223 FString IpAddress = "";
224
225 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "ArtNet", meta = (SessionRestartRequired))
226 int32 Port = 0;
227
228 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "ArtNet", meta = (SessionRestartRequired, Tooltip = "Receive buffer size in bytes (default is 64KB on Windows)."))
229 int32 ReceieveBufferSize = 65536;
230
231 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "ArtNet", meta = (SessionRestartRequired, Tooltip = "Send buffer size in bytes (default is 64KB on Windows)."))
232 int32 SendBufferSize = 65536;
233
234 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "ArtNet", meta = (SessionRestartRequired, Tooltip = "Send Buffer Overhead will be culled when true and fragmented when false."))
235 bool bCullOverhead = false;
236};
237
241USTRUCT(BlueprintType)
243{
244 GENERATED_BODY()
245
246public:
247 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "DMX")
248 FArtNetConfig ArtNetConfig;
249
250 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "DMX")
251 FDMXMatLEDConfig DMXMatLEDConfig;
252};
253
257USTRUCT(BlueprintType)
259{
260 GENERATED_BODY()
261
262public:
263 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "OSC", meta = (SessionRestartRequired))
264 TSoftObjectPtr<class UMaterialInterface> LEDMaterial = nullptr;
265
266 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "OSC", meta = (SessionRestartRequired))
267 FString Address = "/MatLED";
268};
269
273USTRUCT(BlueprintType)
275{
276 GENERATED_BODY()
277
278public:
279 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "OSC")
280 FOSCMatLEDConfig OSCMatLEDConfig;
281
282 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "OSC", meta = (SessionRestartRequired))
283 bool bOSCEnabled = true;
284
285 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "OSC", meta = (SessionRestartRequired))
286 FString SendIpAddress = "127.0.0.1";
287
288 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "OSC", meta = (SessionRestartRequired))
289 int32 SendPort = 8000;
290
291 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "OSC", meta = (SessionRestartRequired))
292 FString SendClientName = "ST_SendOSCClient";
293
294 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "OSC", meta = (SessionRestartRequired))
295 FString ReceiveIpAddress = "127.0.0.1";
296
297 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "OSC", meta = (SessionRestartRequired))
298 int32 ReceivePort = 8000;
299
300 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "OSC", meta = (SessionRestartRequired))
301 FString ReceiveClientName = "ST_ReceiveOSCClient";
302
303 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "UDP", meta = (SessionRestartRequired, Tooltip = "Receive buffer size in bytes (default is 64KB on Windows)."))
304 int32 ReceieveBufferSize = 65536;
305
306 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "UDP", meta = (SessionRestartRequired, Tooltip = "Send buffer size in bytes (default is 64KB on Windows)."))
307 int32 SendBufferSize = 65536;
308
309 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "UDP", meta = (SessionRestartRequired, Tooltip = "Send Buffer Overhead will be culled when true and fragmented when false."))
310 bool bCullOverhead = false;
311};
312
316USTRUCT(BlueprintType)
318{
319 GENERATED_BODY()
320};
321
325USTRUCT(BlueprintType)
327{
328 GENERATED_BODY()
329
330public:
331 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "UDP", meta = (SessionRestartRequired))
332 TSoftObjectPtr<class UMaterialInterface> LEDMaterial = nullptr;
333};
334
338USTRUCT(BlueprintType)
340{
341 GENERATED_BODY()
342
343public:
344 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "UDP", meta = (SessionRestartRequired))
345 bool bUDPEnabled = true;
346
347 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "UDP", meta = (SessionRestartRequired))
348 FString SocketDescription = "ST_Socket";
349
350 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "UDP", meta = (SessionRestartRequired))
351 FString IpAddress = "";
352
353 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "UDP", meta = (SessionRestartRequired))
354 int32 Port = 0;
355
356 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "UDP", meta = (SessionRestartRequired, Tooltip = "Receive buffer size in bytes (default is 64KB on Windows)."))
357 int32 ReceieveBufferSize = 65536;
358
359 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "UDP", meta = (SessionRestartRequired, Tooltip = "Send buffer size in bytes (default is 64KB on Windows)."))
360 int32 SendBufferSize = 65536;
361
362 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "UDP", meta = (SessionRestartRequired, Tooltip = "Send Buffer Overhead will be culled when true and fragmented when false."))
363 bool bCullOverhead = false;
364};
365
369USTRUCT(BlueprintType)
371{
372 GENERATED_BODY()
373
374public:
375 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "UDP")
376 FUDPConfig UDPConfig;
377
378 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "UDP")
379 FSocketRTLEDConfig SocketRTLEDConfig;
380
381 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "UDP")
382 FSocketMatLEDConfig SocketMatLEDConfig;
383};
384
386// SETTINGS CLASS
388
389#if WITH_EDITOR
390DECLARE_MULTICAST_DELEGATE_TwoParams(FOnPostEditChangePropertyDelegate_ACS, UObject*, FPropertyChangedEvent&);
391#endif
392
396UCLASS(Config = ST_VJMaster, DefaultConfig, meta = (DisplayName = "ST Audio Control"))
397class ST_AUDIOCONTROL_API UST_AudioControlSettings : public UDeveloperSettings
398{
399 GENERATED_BODY()
400
401public:
406 UFUNCTION(BlueprintPure, Category = "ShaderTech|AudioControl")
408 {
409 return GetDefault<UST_AudioControlSettings>();
410 }
411
412#if WITH_EDITOR
413 inline static FOnPostEditChangePropertyDelegate_ACS OnPostEditChangeProperty;
414
415 virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) override
416 {
417 Super::PostEditChangeProperty(PropertyChangedEvent);
418 OnPostEditChangeProperty.Broadcast(this, PropertyChangedEvent);
419 }
420#endif
421
422 UPROPERTY(config, EditAnywhere, BlueprintReadOnly, Category = "UDP")
423 FSocketConfig SocketConfig;
424
425 UPROPERTY(config, EditAnywhere, BlueprintReadOnly, Category = "OSC")
426 FOSConfig OSConfig;
427
428 UPROPERTY(config, EditAnywhere, BlueprintReadOnly, Category = "DMX")
429 FDMXConfig DMXConfig;
430
431protected:
433 virtual FName GetCategoryName() const override
434 {
435 return TEXT("ShaderTech");
436 }
437};
Developer Settings for ShaderTech Audio Control System.
Definition ST_AudioControlSettings.h:398
virtual FName GetCategoryName() const override
Returns the settings category in the editor.
Definition ST_AudioControlSettings.h:433
static const UST_AudioControlSettings * GetST_AudioControlSettings()
Retrieves the current ShaderTech Audio Control settings.
Definition ST_AudioControlSettings.h:407
ArtNet communication configuration.
Definition ST_AudioControlSettings.h:212
Base configuration for LED matrix settings.
Definition ST_AudioControlSettings.h:158
Configuration for DMX system.
Definition ST_AudioControlSettings.h:243
LED matrix configuration specific for DMX.
Definition ST_AudioControlSettings.h:193
LED configuration for color formats and alpha mapping.
Definition ST_AudioControlSettings.h:139
Defines MIDI input value ranges.
Definition ST_AudioControlSettings.h:57
FIntPoint ControlChangeRange
Range for MIDI Control Change messages.
Definition ST_AudioControlSettings.h:62
FIntPoint PitchBendRange
Range for MIDI Pitch Bend messages.
Definition ST_AudioControlSettings.h:65
LED matrix configuration specific for OSC.
Definition ST_AudioControlSettings.h:259
Configuration for OSC system.
Definition ST_AudioControlSettings.h:275
Represents a basic audio controller reference.
Definition ST_AudioControlSettings.h:73
UObject * Controller
Controller object reference.
Definition ST_AudioControlSettings.h:78
FName Name
Controller name identifier.
Definition ST_AudioControlSettings.h:81
Attribute/value pair for DMX control.
Definition ST_AudioControlSettings.h:177
Represents a DMX controller.
Definition ST_AudioControlSettings.h:130
Represents a MIDI device controller.
Definition ST_AudioControlSettings.h:99
EMIDIType MIDIType
Type of the MIDI device.
Definition ST_AudioControlSettings.h:104
Represents an OSC (Open Sound Control) controller.
Definition ST_AudioControlSettings.h:112
Represents a Socket-based controller.
Definition ST_AudioControlSettings.h:121
Socket communication configuration.
Definition ST_AudioControlSettings.h:371
LED configuration specific to Socket communication for material LED displays.
Definition ST_AudioControlSettings.h:327
LED configuration specific to Socket communication.
Definition ST_AudioControlSettings.h:318
UDP communication configuration.
Definition ST_AudioControlSettings.h:340