开发者

AS3 Standing Wave 3 Library Change Pitch

I am trying to figure out how to change the pitch of a sound in Standing Wave 3 actionscript library. I have import开发者_JAVA技巧ed a sound at 440hz(A) and am trying to change it's pitch to say a (C) note.

Any tips greatly appreciated.


Have you had a look at the filters? Particularly the ResamplingFilter. You use is by creating a new ResamplingFilter with 2 parameters. The first one is the source (IAudioSource) and the second parameter is the factor by which the frequency will be change by.

This is what it would look like:

var aNote:IAudioSource = new SoundSource(new ANoteSoundAsset());
var cNote:IAudioSource = new ResamplingFilter(aNote, 1.189);
player.play(cNote);

This would raise pitch of the the note from being A4 to approximately a C5 note.

Useful links:

  • ResamplingFilter reference
  • List of note frequencies
  • Dev guide for the library
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜