UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
MidiNoteQuantizer.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6
7namespace Audio
8{
9 namespace EMusicalScale
10 {
11 // Any additions to this Enum should also be added to MetasoundMidiNoteQuantizerNode.cpp
12 // in the "#pragma region Metasound Enums" area to show up as options in that Node
63 }
64
66 {
67 public:
68 // ctor
70
72
73 private:
74 TArray<float> ScaleDegrees;
75 TArray<float> ChordTones;
76 };
77
79 {
80 public:
82 static SIGNALPROCESSING_API float QuantizeMidiNote(const float InNote, const float InRoot, const TArrayView<float> InScaleDegrees, const float InSemitoneScaleRange = 12.0f);
83
84 private:
85 static float QuantizeValueToScaleDegree(const float InValue, const TArrayView<float> InScaleDegrees, const float InSemitoneScaleRange = 12.0f);
86
87 public:
88 // Statically-defined scale/chord tone definitions.
90
91 }; // class FMidNoteQuantizer
92} // namespace Audio
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
Definition MidiNoteQuantizer.h:79
static SIGNALPROCESSING_API TMap< EMusicalScale::Scale, ScaleDegreeSet > ScaleDegreeSetMap
Definition MidiNoteQuantizer.h:89
static SIGNALPROCESSING_API float QuantizeMidiNote(const float InNote, const float InRoot, EMusicalScale::Scale InScale, bool bChordTonesOnlyIfApplicable=false)
Definition MidiNoteQuantizer.cpp:40
Definition ArrayView.h:139
Definition Array.h:670
Definition UnrealString.h.inl:34
Scale
Definition MidiNoteQuantizer.h:14
@ Augmented
Definition MidiNoteQuantizer.h:49
@ Dominant7th_Mixolydian
Definition MidiNoteQuantizer.h:20
@ MelodicMinor
Definition MidiNoteQuantizer.h:43
@ Bebop_Minor
Definition MidiNoteQuantizer.h:36
@ Diminished_BeginWithHalfStep
Definition MidiNoteQuantizer.h:53
@ Bebop_MinorNumber2
Definition MidiNoteQuantizer.h:37
@ Chromatic
Definition MidiNoteQuantizer.h:25
@ Blues
Definition MidiNoteQuantizer.h:32
@ LydianDominant
Definition MidiNoteQuantizer.h:48
@ HalfDiminished_LocrianNumber2
Definition MidiNoteQuantizer.h:55
@ Spanish_or_Jewish
Definition MidiNoteQuantizer.h:58
@ Diminished
Definition MidiNoteQuantizer.h:52
@ SixthModeOfHarmonicMinor
Definition MidiNoteQuantizer.h:44
@ Bebop_Major
Definition MidiNoteQuantizer.h:35
@ Minor_Dorian
Definition MidiNoteQuantizer.h:17
@ Bebop_Dominant
Definition MidiNoteQuantizer.h:38
@ Phrygian
Definition MidiNoteQuantizer.h:18
@ Lydian
Definition MidiNoteQuantizer.h:19
@ WholeTone
Definition MidiNoteQuantizer.h:26
@ HarmonicMajor
Definition MidiNoteQuantizer.h:41
@ Diminished_BeginWithWholeStep
Definition MidiNoteQuantizer.h:54
@ NaturalMinor_Aeolian
Definition MidiNoteQuantizer.h:21
@ MajorPentatonic
Definition MidiNoteQuantizer.h:30
@ HarmonicMinor
Definition MidiNoteQuantizer.h:42
@ MinorPentatonic
Definition MidiNoteQuantizer.h:31
@ LydianAugmented
Definition MidiNoteQuantizer.h:47
@ HalfDiminished_Locrian
Definition MidiNoteQuantizer.h:22
@ Count
Definition MidiNoteQuantizer.h:61
@ Major
Definition MidiNoteQuantizer.h:16
@ DiminishedWholeTone
Definition MidiNoteQuantizer.h:27
@ Hindu
Definition MidiNoteQuantizer.h:59
NO_LOGGING.
Definition AudioMixerPlatformAndroid.cpp:53
Definition MidiNoteQuantizer.h:66
SIGNALPROCESSING_API TArrayView< float > GetScaleDegreeSet(bool bChordTonesOnlyIfApplicable=false)
Definition MidiNoteQuantizer.cpp:30