Skip to main content

控制音高

warning

音高校正目前仅在渲染时应用。

你可以使用 toneFrequency 属性在渲染期间控制音频的音调。

🌐 You can use the toneFrequency prop to control the pitch of the audio during rendering.

接受介于 0.012 之间的值,其中 1 表示原始音高。小于 1 的值会降低音高,而大于 1 的值会提高音高。

🌐 Values between 0.01 and 2 are accepted, where 1 represents the original pitch. Values less than 1 will decrease the pitch, while values greater than 1 will increase it.

0.5 的 toneFrequency 会将音高降低一半,而 1.5toneFrequency 会将音高提高 50%。

🌐 A toneFrequency of 0.5 would lower the pitch by half, and a toneFrequency of 1.5 would increase the pitch by 50%.

MyComp.tsx
import {Html5Audio, staticFile, AbsoluteFill} from 'remotion'; export const MyComposition = () => { return ( <AbsoluteFill> <div>Hello World!</div> <Html5Audio src={staticFile('audio.mp3')} toneFrequency={0.8} /> </AbsoluteFill> ); };