在 Flash 10 中模拟发动机噪音

发布于 2024-08-03 18:59:45 字数 678 浏览 2 评论 0原文

我正在使用 Flash 开发一款“复古”摩托车游戏,类似于 Mega Drive 上的 Road rash 系列,在长时间使用 Flash 的声音采样功能后,我无法找到“正确”的方法产生噪音。

我一直在尝试基本上改变正弦波上与转速一致的频率,因此随着转速的增加,频率也会增加 - 它有点工作,但听起来不像真正的发动机(我已经骑自行车有一段时间了我每天骑自行车去上班,所以我“知道”它听起来应该是什么样的:-p)。

我并不是太追求真实的声音,只是听起来“还不错”的东西,或者足够好,以至于大多数玩游戏的人都不会注意到,并且很高兴声音实际上与转速和速度有关,而不是仅仅与转速和速度有关。平板mp3。

我似乎无法在谷歌上搜索,因为我找不到合适的词,“引擎”只是用游戏引擎之类的东西稀释了所有结果。

我发现的大多数文章也建议使用采样 - 但这有两个主要问题:

  • 即使我有一辆自行车并且可以记录声音;记录转速样本 - 比如说 15,如果我以 1000 次间隔进行采样(我的 gsxr 转速一直到 16k :-p),那么我还必须在不同的负载下对每个样本进行采样,即 0 英里/小时、10 英里/小时、20 英里/小时、30 英里/小时,40英里/小时,因为发动机噪音根据负载而变化很大 - 总共有多达 80 个样本 - 尽管我不确定是否可以在转速样本之上以某种方式模拟负载?
  • 所有这些样本加起来必须下载字节才能玩。

I'm working on a "retro" motorbike game in flash, similar to the Road rash series on the mega drive and after having a long play with the sound sampling capabilities of flash I can't manage to find the "right" way to generate the noise.

I've been trying to basically change the frequency on a sine wave in line with the revs, so as the revs increase so does the frequency - it sorta works but sounds nothing like a real engine (I've been a biker for a while and I ride to work on my bike every day so I "know" what it should sound like :-p).

I'm not so much after a realistic sound, just somthing that sounds "okay", or good enough that most people playing the game wouldn't notice and be happy that the sound actually relates to the revs and speed as apposed to just a flat mp3.

I can't seem to search on google as I can't find the right words, "engine" just dilutes all of the results with game engines and what not.

The majority of articles I find also suggest using sampling - but there are 2 major issues with this:

  • Even though I have a bike and could record the sounds; recording samples of the rpm - say 15 if I do samples at 1000 intervals (my gsxr revs all the way to 16k :-p) I'd then have to also sample each one at various loads, i.e. 0mph, 10mph, 20mph, 30mph, 40mph as the engine noise varies greatly depending on load - which totals a whopping 80 samples - although I'm not sure if the load can be simulated somehow on top of the rpm samples?
  • All those samples add up to bytes that have to be downloaded before you can play.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

叶落知秋 2024-08-10 18:59:45

我发现的一种方法是使用采样引擎声音和合成音调的混合。获取几个不同转速下的发动机样本,并将其用于基础。根据当前 RPM 混合两个样本,例如,如果是 1650 RPM,则播放以 70% 音量在 1500 RPM 采集的样本,并以 30% 音量播放 2000 RPM 样本。根据油门修改整体音量。像您所做的那样,根据 RPM 添加正弦波音调。

该技术在论文 驾驶模拟声音引擎的设计 (PDF),这是关于合成引擎(和其他与驾驶相关的声音)的驾驶模拟器。我通过搜索声音合成“引擎声音”(用引号引起来的“引擎声音”找到了它。电机音效合成 对一般电机声音的合成进行了一些讨论,并提供了 纯数据环境。

One way I've found uses a mix of sampled engine sounds and synthesized tones. Get samples of an engine at a couple of different RPMs and use those for the base. Mix two samples based on the current RPM, e.g. if it's 1650 RPM, play a sample taken at 1500 RPM at 70% volume and a 2000 RPM sample at 30% volume. Modify the overall volume based on the throttle. Add a sine wave tone based on the RPM like you've done.

The technique is described in the paper Design of a Driving Simulation Sound Engine (PDF), which is about synthesizing engine (and other driving-related sounds) for a driving simulator. I found it by searching for sound synthesis "engine sound" (with "engine sound" in quotes. Motor sound effect synthesis has some discussion of synthesizing motor sounds in general, with instructions for the Pure Data environment.

心碎无痕… 2024-08-10 18:59:45

Sonoflash 有一个基于代码的声音库(有些是免费的),并且可能有适合您的东西,或者至少是一个起点。例如,他们的“机器螺旋桨”。

Sonoflash have a library of code-based sounds (some for free), and may have something appropriate for you, or at least a starting point. Their 'machine propeller', for example.

微凉徒眸意 2024-08-10 18:59:45

我也尝试过Sonoflash,真的很好!

http://www.sonoflash.com/sounds/#EngineLight

这可能是一种声音你正在寻找。

I've tried Sonoflash as well, it's really good!

http://www.sonoflash.com/sounds/#EngineLight

This might be a sound you are looking out for.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文