Search

Home

2025

2024

Worklog

LETSGO Game

Janky ass notes-to-sound mapping

Date
August 21, 2024
Hours
1
Tags
UnrealCodeC++LETSGO

I’ve decided to build this data structure out as naively as possible, the theory being “Get absolute dogshit technically working, then iterate the shittiness out.”

As such:

The idea is to take an array of 48 sound cues manually connected through a Mapping Blueprint like this:

	UPROPERTY(BlueprintReadWrite, EditDefaultsOnly)
	UMetaSoundSource* C1_Music_Note;
	
	UPROPERTY(BlueprintReadWrite, EditDefaultsOnly)
	UMetaSoundSource* CSharp1_Music_Note;
	
	UPROPERTY(BlueprintReadWrite, EditDefaultsOnly)
	UMetaSoundSource* D1_Music_Note;
	
	//... For four octaves multiplied by 12 notes

And turn each one into a data structure like this:

USTRUCT()
struct FCheeseKeyData {
	GENERATED_BODY()

	UPROPERTY()
	int Octave; 
	
	UPROPERTY()
	TEnumAsByte<ELetsGoMusicNotes> Note;

	UPROPERTY()
	UMetaSoundSource* Sound;

	FCheeseKeyData();
}

It’s janky, I need a better solution. But I figure it’s going to be easier to refactor this jank than it is to try and pontificates Gods own true data structure.

Time will tell if this is true.