Sound.pitch readwrite


Get or set the sound pitch, number that controls the playback speed of the sound. A value of 1.0 means the sound will play at original speed.

Example

--! luart-extensions import audio local ui = require "ui" require "console" local win = ui.Window("Music player", "single", 320, 200) local file = sys.File("music.mp3") win:status("Playing "..file.name) local sound = audio.Sound(file) sound.pitch = 1.5 -- Change the pitch of the audio sound:play() win:show() while win.visible do ui.update() end