From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Audio signal wavelet transform to process and recognize instruments in it

Hi guys!

 

I just recently got a signal processing task about "instruments recognition in a specific audio file", but I have never done audio processing in LabView yet. 

 

The concepst is should create is the following: 

 

There is a couple base audio files containing one or more instruments sounds combined like "songs", and I need to recognize at least 3 initially fixed instruments in it (like piano, sax, violin etc...). I have the database of individual instruments audio files to make the samples to find in the inspected "song". The way I was ordered to solve it was Wavelet transformaiton. Unfortunatelly i have never used this tool yet.

The program I can think of is to someway transform the examined audio file to a processable dataset, where I can find and match the sample data in it, what was initially transformed as well like individual instruments.

 

The math thing in matching is the smallest problem for me, I am looking for some help to maintain the transformation of audio files to procassable data like Fourier components in a time domain where I can find patterns.

 

Can somene help me out, who nows more about signal processing than me? I would appreciate that so much. I was looking for sample projects like this but unfortunatelly I cound not find one of them, sorry if this topic is not the most suitable for this message.

 

Have a nice day folks!

0 Kudos
Message 1 of 5
(2,137 Views)

Do you have the advanced signal processing toolkit?

 

(Of course you can built your own from simple components, but that would require significantly more effort)

0 Kudos
Message 2 of 5
(2,064 Views)

Yes, I recently installed it, that is not a problem for me, and I found the wavelet tools in it (but I do not know how to use it yet properly yet).

 

Good news that the task I expressed above just got even more simple, because I overcomplicated a bit.

 

What I need to do is the following:

 

  • I have 3 different instrument sounds (like a couple seconds, different tones in it). These are my references like instruments.
  • I need to transform the .wav reference sounds to matrixes with wavelet tools to be able to compare them to the actual examined .wav file, what can be the same as the references.
  • Basically the program should tell me which one of the 3 references matches the .wav file I examine. No need to use a random song to find the patterns in it, I can use the 3 references to compare them to themselves.
  • So the output of the program is telling me that this is the "piano" or "violin" or "sax" from the 3 member database I created initially.
  • The whole purpose of this program is the way I need to solve it. Wavelet transformation is something like a 3D matrix where the axes are time, freq, and amplitude, like black and white pictures. Similar to image processing. That is my job to produce matrixes from .wav files, to be able to compare them.

Any example or tip of how to use this toolkit would help me a lot. I have no experience in this part of labview at all unfortunatelly.

 

Have a nice day!

0 Kudos
Message 3 of 5
(2,050 Views)

Do you have a link to a publication explaining what you want to do? Study the theory in detail and look for technical terms, then see if the any functions of the toolkit use similar lingo. This is not really a LabVIEW problem. Figure out the math first.

 

Each instrument can play a wide range of frequencies, so you need to have a metric that independent of the base frequency. Most likely, different instruments greatly differ in the higher harmonics.

 

So you have a couple of seconds sampled for each. Is the sound relatively constant over that time?

0 Kudos
Message 4 of 5
(2,043 Views)

Sure, let me make this clear.

 

I figured it out how to make the matrix so far, I was looking for spectogram to create 2D matrix with values in it(not wavelet tool my bad).

The thesis is real simple:

 

Audio signal from file > Spectogram (2D array) > 2D matrix > Math to creat 0-255 values in the matrix instead of magnitude > Create image (grayscale bitmap) > Pattern match on image ( Compare to images in database (3 instruments)) > If matches tell what instrument image it matches > Done

 

I have 3 sounds, thats all. Comparing them to each other. The purpose is image processing. I have all the toolkits to create the project.

 

Where I need the help is how can I convert the matrix to bitmap, after calculate the values into 0-255 range.

0 Kudos
Message 5 of 5
(2,010 Views)