title: Peak separation with deconvolution in audio signal processing
body: <p>I am trying to develop an algorithm separates instrumental notes in music files. C#, C++ DLL's used. I've spent pretty long time to achieve it. So what I've done so far is:</p>
  
  <ol>
  <li>Perform a specialized FFT on PCM(it gives high resolutions both in time and frequency domain)</li>
  <li>Filterbank calculation on FFT bins to simulate human hearing system(psychoacoustic model)</li>
  <li>Pattern recognition with peak detection to feed input data for some machine learning stuff(currently planning level)</li>
  </ol>
  
  <p>In current progress, I detected peaks with simple method "picking local maximam value". Roughly, detect as peak if f(x-1) &lt; f(x) > f(x+1) where f(x)'s frequency reponse and x is frequency index.</p>
  
  <p>But I got some problems here. If two or more signals present close in frequency domain, this method just detect one peak and all the others are hidden. I searched the web for few days. There were something called 'peak purity', 'peak separation'. To do peak separation, there were several methods. They are actually separating peaks well. Here are few picture I've googled.</p>
  
  <p><a href="https://i.stack.imgur.com/OKxtI.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OKxtI.gif" alt="separation1"></a><br>
  <sub>(source: <a href="http://www.chromatography-online.org/quant/qca_files/image057.gif" rel="nofollow noreferrer">chromatography-online.org</a>)</sub>  </p>
  
  <h2><img src="https://www.beilstein-journals.org/bjnano/content/figures/2190-4286-2-69-5.png?max-width=550&amp;scale=1.2&amp;background=EEEEEE" alt="separation2"></h2>
  
  <p>I think method using 'deconvolution' would be the best for this situation. But I have no idea how to deconvolute my spectrum, separate peaks with deconvolution. As far as I know, deconvolution won't give me multiple components of peaks as seen in above pictures directly. And what filter functions should I use? Since I am lack of math skills, I need pseudo code level help. Glad to see any other advices :)</p>