使用Unity3d制作VST(Make a VST with Unity3d)

编程入门 行业动态 更新时间:2024-10-27 19:23:48
使用Unity3d制作VST(Make a VST with Unity3d)

是否可以使用Unity3d构建VST?

看起来有可能统一建立音频应用程序。

但我想知道一个DLL是否可以作为一个统一的应用程序? 是否有可能以某种方式将VST SDK与最终版本集成?

Is it possible to build a VST with Unity3d?

It does seem possible to build Audio applications in unity.

But Im wondering whether a DLL can be built as a unityapp? Is it possible to integrate the VST sdk somehow with the final build?

最满意答案

Unity可以在大多数架构上使用本机插件。 看来VST是一个本地的Windows DLL,你可以用DllImport运行这些。

在Unity中,所有音频都存储在音频剪辑中 ,您可以使用创建 , 设置和获取修改其数据。 您还可以将脚本挂接到编辑器中的音频导入,以便使用AssetPostprocessor.OnPostprocessAudio加载时更改它。

所以你必须使用VST滤波器来做一些AudioClip到AudioClip滤波器。

Unity的一个建议 - 精确计时很困难,因为一切都与主循环相关联,并且它随着显示器刷新频率运行(理想情况下)。 如果你想要更多的实时,你需要把自己的线程放在后台 - 它确实与网络上的常见建议相反,只记得在Unity中几乎没有线程安全,所以要更新游戏状态或AudioClips,你需要在游戏循环中做到这一点。

Unity can use native plugins on most architectures. It seems VST is a native windows dll, you can run these with DllImport.

In Unity all audio is stored in AudioClips, you can modify their data using Create, Set and Get. You can also hook your script to audio importing in the editor, so you change it on load with AssetPostprocessor.OnPostprocessAudio.

So you would have to do some kind of a AudioClip to AudioClip filter using VST filters.

One advice with Unity - precise timing is hard as everything is tied to the main gameloop and it runs (ideally) with the frequency of your monitor refresh. If you want some more real time, you need to put your own threads in the background - it does work contrary to common advice on the web, just remember that almost nothing is thread safe in Unity, so to update the game state or AudioClips, you need to do that back in the game loop.

更多推荐

本文发布于:2023-07-18 11:37:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1159797.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Unity3d   VST

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!