unreal.SoundUtilitiesBPFunctionLibrary
¶
- class unreal.SoundUtilitiesBPFunctionLibrary(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
BlueprintFunctionLibrary
Sound Utilities Blueprint Function Library A library of Sound related functions for use in Blueprints
C++ Source:
Plugin: SoundUtilities
Module: SoundUtilities
File: SoundUtilities.h
- classmethod convert_linear_to_decibels(linear, floor) float ¶
Converts linear scale volume to decibels
- classmethod get_beat_tempo(beats_per_minute=120.000000, beat_multiplier=1, divisions_of_whole_note=4) float ¶
Calculates a beat time in seconds from the given BPM, beat multiplier and divisions of a whole note.
- classmethod get_frequency_from_midi_pitch(midi_note) float ¶
Calculates Frequency values based on MIDI Pitch input
- Parameters:
midi_note (int32) – The MIDI note to calculate the frequency of
- Returns:
The frequency in Hz that corresponds to the MIDI input
- Return type:
- classmethod get_frequency_multiplier_from_semitones(pitch_semitones) float ¶
Returns the frequency multiplier to scale a base frequency given the input semitones
- classmethod get_gain_from_midi_velocity(velocity) float ¶
Given a velocity value [0,127], return the linear gain
- Parameters:
velocity (int32) – The MIDI velocity value to calculate the gain of
- Returns:
The gain corresponding to the MIDI value
- Return type:
- classmethod get_linear_frequency_clamped(value, domain, range) float ¶
Returns the linear frequency of the input value. Maps log domain and range values to linear output (good for linear slider representation/visualization of log frequency). Reverse of GetLogFrequencyClamped.
- Parameters:
- Returns:
The linear frequency of the given logarithmic input
- Return type:
- classmethod get_log_frequency_clamped(value, domain, range) float ¶
Returns the log frequency of the input value. Maps linear domain and range values to log output (good for linear slider controlling frequency)
- Parameters:
- Returns:
The log frequency of the given input
- Return type:
- classmethod get_midi_pitch_from_frequency(frequency) int32 ¶
Calculates MIDI Pitch values based on frequency input
- Parameters:
frequency (float) – The frequency in Hz to convert into MIDI
- Returns:
The MIDI note closest to the inputted frequency
- Return type:
int32
- classmethod get_pitch_scale_from_midi_pitch(base_midi_note, target_midi_note) float ¶
Calculates Pitch Scalar based on starting frequency and desired MIDI Pitch output
- Parameters:
base_midi_note (int32) – The MIDI note corresponding to the starting frequency
target_midi_note (int32) – The MIDI note corresponding to the desired final frequency
- Returns:
The amount to scale the pitch of the base note by, in order for its pitch to match the target MIDI note
- Return type: