self:get_pitch_scale

Client

Retrieves the current pitch scale of the audio-2d instance


Syntax

local result = self:get_pitch_scale()

Parameters

No parameters are accepted by this function

Returns

TypeNameDescription
floatresultCurrent pitch multiplier

Examples

Get the pitch scale of an audio-2d instance
local entity = core.audio_2d.create("sounds/ambient.ogg")

core.engine.print("info", "Pitch scale:", entity:get_pitch_scale())

On this page