AS3 加法音调合成。播放多个生成的声音
受到 Andre michelle 的启发,我正在 AS3 中构建一个色调矩阵。 我设法创建了矩阵并生成了不同的声音。听起来不太好,但我已经到了 我遇到的一个大问题是,当设置多个点播放时,听起来很糟糕。我在 google 上搜索了很多,找到了加法合成方法,但不知道如何将其应用到 as3。 有人知道如何一起播放多种声音吗?有什么提示吗?
我的演示位于 www.inklink.co.at/tonematrix
Inspired by Andre michelle, I`m building a tone matrix in AS3.
I managed to create the matrix and generate the different sounds. They don´t sound that good, but I´m getting there
One big problem I have is when more than one dot is set to play, it sounds just horrible. I googled a lot and found the additive synthesis method but don´t have a clue how to apply it to as3.
anybody out there knows how to play multiple sounds together? any hint?
my demo is at www.inklink.co.at/tonematrix
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
哦,常见的是,声音太可怕了……
检查过维基吗?这并不难理解...即使您不太了解数学...您应该知道 - 音乐编程并不容易。
所以:
让我们首先定义一些东西:
harmonics 是我们将在其中存储各个谐波的数组。每个子项将是另一个数组,包含[“振幅”](技术上是音量)、[“频率”]和[“波长”](周期)。我们还需要一个函数,可以在给定振幅、波长和偏移(从波的开始处)的情况下给出波的相位。对于方波,例如:
如果需要,您可以添加其他类型,甚至自定义矢量波。
现在是更困难的部分。
这一切都只是从维基百科转换而来(弱:D),我可能在其中某处犯了一个错误......但我认为你应该明白......如果没有,请尝试自己从维基百科转换AS,正如我所说,这并不难。
我还以某种方式忽略了奈奎斯特频率......
Oh common the sound was horrible...
Checked wiki? It is not that hard to understand... Even if you don't know that much of mathematics... Which you should - PROGRAMMING music is not easy.
So:
Let's first define something:
harmonics is the array in which we will store individual harmonics. Each child will be another array, containing ["amplitude"] (technically the volume), ["frequency"] and ["wavelength"] (period). We also need a function that can give us the phase of the wave given the amplitude, wavelength and offset (from the beginning of the wave). For square wave something like:
You might add other types, or even custom vector waves if you want.
Now for the harder part.
This is all just converted (weakly :D) from the Wikipedia, I may have done a mistake somewhere in there... But I think you should get the idea... And if not, try to convert the AS from Wikipedia yourself, as I said, it is not so hard.
I also somehow ignored the Nyquist frequency...
我已经尝试过你的演示,并认为它实际上听起来不错。你说这听起来不太好是什么意思?缺少什么?我的主要兴趣领域是音乐,我没有发现任何问题,只是有点令人沮丧,因为在创建序列后,我觉得需要添加新的声音!如果我能够录制我正在玩的东西,我会把它发送给你。
不过,进入加法合成看起来并不是一件容易的事。你想把它推到什么程度,你想创建某种形式的合成器吗?
I have tried your demo and thought it sounded pretty good actually. What do you mean it doesn't sound that good? What's missing? My main area of interest is music and I haven't found anything wrong , only it's a little frustrating , because after creating a sequence, I feel the need to add new sounds! Had I been able to record what I was playing with, I would have sent it to you.
Going into additive synthesis doesn't look like a light undertaking though. How far do you want to push it, would you want to create some form of synthesizer?