自动合成声音 - php 或类似的东西 - GD 声音库?

发布于 2024-07-15 02:41:31 字数 278 浏览 7 评论 0原文

我正在寻找一种方法来完成以下任务:用户在闪存中编写一些鼓循环,并且能够以某种方式下载或保存循环的 mp3。

我认为该模式可以在服务器端进行合成。 然后,该文件的链接将发送给用户。

我曾想过可能会有类似 imageGD 或 imageMagick 之类的声音产品?

另外,闪存是否可以生成用户可以即时保存的内容? 这也可以,但我不知道闪存中有任何这样的功能。

我想在处理过程中可以做一些事情,但我对此完全不熟悉。

这种事怎么可能完成呢?

I am looking for a way to accomplish the following: A user programs some drum loops in flash and is somehow able to download or save an mp3 of the loop.

I thought that the pattern could be composted on the server side. Then a link to the file is sent to the user.

I had thought there might be something like imageGD or imageMagick for sound out there?

Also, if it is possible for flash to generate something that the user could save on the fly? That would work too, but I am unaware of any such functionality in flash.

I suppose something could be done in processing, but I am totally unfamiliar with that.

How might this sort of thing might be accomplished?

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

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

发布评论

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

评论(3

优雅的叶子 2024-07-22 02:41:31

看看 SoX

SoX 是一个跨平台(Windows、Linux、MacOS X 等)命令行实用程序,可以将各种格式的计算机音频文件转换为其他格式。 它还可以对这些声音文件应用各种效果,而且,作为额外的好处,SoX 可以在大多数平台上播放和录制音频文件。

Take a look at SoX.

SoX is a cross-platform (Windows, Linux, MacOS X, etc.) command line utility that can convert various formats of computer audio files in to other formats. It can also apply various effects to these sound files, and, as an added bonus, SoX can play and record audio files on most platforms.

同尘 2024-07-22 02:41:31

如果您可以控制服务器环境,我想您可以使用 ffmpeg 来完成这项工作。

在您的 PHP 代码中:

exec(escapeshellcmd("/path/to/ffmpeg -i /path/to/audiofile1.mp3 -i /path/to/audiofile2.mp3 -itsoffset 10 -i /path/to/audiofile3.mp3 -itsoffset 20 -acodec mp3 /path/to/outputfile.mp3"),$output,$status);

请注意,-itsoffset 是您希望放置音频文件的偏移量(以秒为单位)。因此,如果您想要对时间进行非常精细的控制,那么这并不理想,但我不知道您是否需要它。

If you have control over your server environment, I suppose you could use ffmpeg to do the job.

In your PHP code:

exec(escapeshellcmd("/path/to/ffmpeg -i /path/to/audiofile1.mp3 -i /path/to/audiofile2.mp3 -itsoffset 10 -i /path/to/audiofile3.mp3 -itsoffset 20 -acodec mp3 /path/to/outputfile.mp3"),$output,$status);

Notice that -itsoffset is the offset in seconds you want the audio file to be placed in. So this is not ideal if you want very minute control over the timing, but I don't know if you need that.

音盲 2024-07-22 02:41:31

查看这个 MP3 类

我正在将它用于今天刚刚部署的项目。

它可以读取 MP3、提取其中的一部分、合并文件等,但它不会重叠声音。

如果您已经拥有这些声音片段(鼓、吉他等)并且不需要重叠,那么这似乎就是您正在寻找的。

Check out this MP3 class.

I'm using it for a project that was deployed just today.

It can read MP3's, extract a part of them, and merge files, among other things, except it doesn't overlap sounds.

Provided you already have those sound pieces (drums, guitar, etc) and that you don't need overlapping, it seems this is what you're looking for.

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