在音乐文件中区分乐器 [英] Distinguishing instruments in a music file

查看:76
本文介绍了在音乐文件中区分乐器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

给出一个音乐文件,是否可以拆分正在演奏的每种乐器? IE.假设我有someSong.mp3,而那首歌中有人声,吉他,贝斯和鼓.我想获得4条音轨"-每个不同的乐器一个.

Given a music file, is it possible to split out each instrument that is being played? I.e. let's say I have someSong.mp3, and in that song there's vocals, guitar, bass and drums. I'd want to get 4 "tracks" - one for each distinct instrument.

我猜想,鉴于乐器可以重叠,几乎不可能做到这一点,而且很难区分重叠的声音,更不用说乐器了.

I'm guessing that it's almost impossible to do this, given that instruments can overlap, and it's notoriously difficult to distinguish overlapping voices let alone instruments.

但是,这里有一个库,一个算法或某种方式,我很想知道如何做.

However is there is a library, or an algorithm, or SOME way of doing this, I'd be curious to hear how.

推荐答案

我的本​​科项目涉及将音符从WAV文件转录为MIDI文件.我们仅处理一种乐器的简单情况,一次可能会演奏多个音符(例如,一架钢琴).在开始研究之前,我们对该主题的研究表明,即使 this (即只有一种乐器)也被认为是微不足道的.基本上,问题是:

My undergraduate project dealt with transcribing notes from a WAV file to a MIDI file. We handled only the simple case of one instrument, possibly playing more than one note at a time (a piano, for instance). Our research into the subject before we started showed that even this (i.e. only one instrument) is considered non-trivial. Basically, the problem is:

  • 找到在任何给定时间播放的频率.可以通过一次对一个小窗口进行DFT/FFT来完成.
  • 使用试探法来猜测哪些频率是同一音符的和声,而哪些频率属于不同的音符.如果您知道正在演奏的乐器,这 可能很容易,但是在一般情况下很难做到这一点,因为每个和声的幅度因乐器而异.例如,您可能与一台仪器相距两个八度一个八度的C,或者您可能与另一台仪器相隔一个八度.
  • 在知道每次演奏的音符之后,您必须猜测音符何时中断.您可以有一个长音符或一系列短音符.根据您用于初始DFT的窗口的大小,您在这里可能会有不同的结果.
  • find what frequencies are playing at any given time. This can be done by a DFT/FFT of small windows one at a time.
  • Use some heuristic to guess which frequencies are harmonies of the same note, and which belong to different notes. This may be easy if you know what instrument is playing, but it's hard in the general case, because the magnitudes of each harmony differ by instrument. For instance, you might have two Cs one octave apart from one instrument, or you might have one C but from a different instrument.
  • after you know what notes are playing at each time, you have to guess when you have breaks in the notes. You could have one long note or a series of short notes. Depending on the size of the windows you used for the initial DFT, you could have different results here.

现在,如果您一次拥有一个以上的乐器,并且没有两个乐器同时演奏相同的音符或和声,那么您可能可以通过一些启发式方法将它们区分开根据和声的大小或它们正在演奏的音符序列.很有可能有时会有两种乐器演奏相同的音符.那么,您实际上没有任何办法来确定是否存在(a)一种乐器弹奏音符,(b)两种乐器以相同的音量演奏,(c)一种乐器演奏的柔和而另一种乐器演奏的大声,或者(d)任何一种它们的组合.

Now, if you have more than one instrument at a time, and no two are playing the same notes or harmonies thereof at one time, you might be able to tell the instruments apart using some heuristic on the magnitudes of the harmonies or on the sequences of notes they're playing. Most likely there will be times when two instruments are playing the same note. Then you don't really have any way to decide if there is (a) one instrument playing the note, (b) two instruments playing at the same volume, (c) one playing soft and the other playing loud or (d) any combination thereof.

无论如何,这是要解决的问题的简短列表.在一般情况下,我不知道有什么算法可以解决这个问题.我认为这个问题尚未解决.

Anyway, that's the short list of problems to solve. I don't know of any algorithm that solves this in the general case. I don't think this problem has been solved yet.

编辑:我的项目演示文稿可以在

My project presentation can be found at http://www-sipl.technion.ac.il/new/Archive/Special_Events/sipl2004/Projects_PowerPoint/WAV-to-MIDI.pdf

这篇关于在音乐文件中区分乐器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆