首页 \ 问答 \ 使用软件合成器制作实时音频应用程序(Making a real-time audio application with software synthesizers)

使用软件合成器制作实时音频应用程序(Making a real-time audio application with software synthesizers)

我正在研究制作一些使键盘功能像钢琴一样的软件(例如,用户按下'W'键并且扬声器播放D音符)。 我可能会使用OpenAL。 我理解数字音频的基础知识,但是在按键时播放实时音频会带来一些我无法解决问题的问题。

问题在于:假设我有10个音频缓冲区,每个缓冲区都有一秒钟的音频数据。 如果我必须在通过扬声器播放之前填充缓冲区,那么我会在播放前一两秒填充缓冲区。 这意味着每当用户尝试播放音符时,按下琴键和正在播放的音符之间将有一到两秒的延迟。

你如何解决这个问题? 你是否只是让缓冲区尽可能小,并尽可能地填充它们? 有一些我不知道的技巧吗?


I'm looking into making some software that makes the keyboard function like a piano (e.g., the user presses the 'W' key and the speakers play a D note). I'll probably be using OpenAL. I understand the basics of digital audio, but playing real-time audio in response to key presses poses some problems I'm having trouble solving.

Here is the problem: Let's say I have 10 audio buffers, and each buffer holds one second of audio data. If I have to fill buffers before they are played through the speakers, then I would would be filling buffers one or two seconds before they are played. That means that whenever the user tries to play a note, there will be a one or two second delay between pressing the key and the note being played.

How do you get around this problem? Do you just make the buffers as small as possible, and fill them as late as possible? Is there some trick that I am missing?


原文:https://stackoverflow.com/questions/1392725
更新时间:2023-06-20 07:06

最满意答案

是。 我最近使用Google Analytics for Ionic3应用。 我最初失踪的一件重要事情是在Google Analytics中为mobile app创建帐户。 如果您使用网站帐户,则不会从移动设备触发GA事件。

您可以将此 Cordova插件用于GA。

按照提供的步骤为bwlow创建移动应用程序的GA帐户。

1.从侧栏转到“管理”面板。 从侧栏进入管理面板

2.创建新帐户

建立新帐户

3.选择账户类型作为移动应用程序 选择账户类型为移动应用程序


Yes. I recently used Google Analytics for Ionic3 app. One important thing I was missing initially was to create account for mobile app in Google Analytics. If you use website account, GA events will not be fired from mobile devices.

You can use this Cordova plugin for GA.

Follow steps mentined bwlow to create GA account for mobile app.

1. Go to Admin panel from side bar. Go to Admin panel from side bar

2. Create new account

Create new account

3. Select account type as Mobile App Select account type as Mobile App

相关问答

更多

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。