根据开始位置确定音符持续时间
我有一个关于如何确定给定音符开始位置的音符持续时间的问题。
例如,我有一个振幅值数组(包含短值)和另一个相同大小的数组,如果检测到音符开始,则包含 1,如果没有检测到,则包含 0。所以基本上,每个 1 之间的距离将用于确定持续时间。
我该怎么做?我知道我必须使用音频数据的采样率和其他属性,但是有我可以使用的特定公式吗?
谢谢你!
I have a question regarding how to determine the Duration of notes given their Onset Locations.
So for example, I have an array of amplitude values (containing short) and another array of the same size, that contains a 1 if a note onset is detected, and a 0 if not. So basically, the distance between each 1 will be used to determine the duration.
How can I do this? I know that I have to use the Sample Rate and other attributes of the audio data, but is there a particular formula that I can use?
Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
因此,您从一个 ONSETS 列表开始,您真正要寻找的是一个 OFFSETS 列表。
起始检测的方法有很多(这里有一篇论文) https://adamhess.github.io /Onset_Detection_Nov302011.pdf
许多相同的方法可以应用于偏移检测:
因为起始点由 INCREASE 标记在光谱含量中,您可以测量光谱含量的减少。
(有关光谱差异函数的更多详细信息,请参阅上面列出的论文的第 7 页,您可以应用它的修改版(如上)_
So you are starting with a list of ONSETS, what you are really looking for is a list of OFFSETS.
There are many methods for onset detection (here is a paper on it) https://adamhess.github.io/Onset_Detection_Nov302011.pdf
many of the same methods can be applied to Offset Detection:
Since the onset is marked by an INCREASE in spectral content you can measure a decrease in Spectral content.
(look at page 7 of the paper listed above for more detail about spectrial difference function, you can apply a modified (as above) version of it_
好吧,如果您的采样率(以 Hz 为单位)为 fs,则两个节点之间的时间等于
1/fs * <两个节点之间的零数>
非常简单:-)
问候
Well, if your samplerate in Hz is fs, then the time between two nodes is equal to
1/fs * <number of zeros between the two node-ones>
Very simple :-)
Regards