开发者

How to simulate guitar strings/chords with Flash's sound synthesizer?

I've just developed a function to ring frequencies, but I can't make it sound like a guitar string; I can only change it's frequency. Is there some way to change other pa开发者_如何转开发rameters of a generated sound?

function sineGenerateSound(event:SampleDataEvent):void
        {

            for (var i:int=0; i<4092; i++)
            {

                var n:Number = Math.sin((i + event.position) * Math.PI / (44100 / (freq*2) )) * volume;

                event.data.writeFloat(n);
                // sound crackles and pops;
                event.data.writeFloat(n);
            }

        }


I would recommend SiON, as a good synthesis library, which includes a Guitar Synthesis module which you may find useful, as always YMMV.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜