Detecting start and end of waves for further processing

8 views (last 30 days)
I've currently got a program that allows users to record a sample of 3 different beatboxed drum hits (kick, snare and hi hat) and then record a proper beatboxing session of ~10 seconds.
The programs need to compare the frequency content of each beatbox hit in the session with the samples to see if they match up. Here is an example of what the long session looks like:
And here is an example of a recorded sample:
I might be wrong, but I figure that the first thing i need to do is be able to detect the start and end of each hit so that I can compare just that waveform against the samples without any white space.
Is there a way to accomplish this in MATLAB from the editor? I want this to be a standalone program so I'm not using the command window.
If this isn't possible to do, could anyone please suggest a different way of accomplishing my goal?
Many thanks!

Answers (1)

Image Analyst
Image Analyst on 8 Mar 2015
How about just thresholding
% Find out which elements have some strong (non-noise) signal value.
soundIndexes = signal > 0.03; % or whatever value you want.
% Now extract out only the elements with sound in them.
croppedSignal = signal(soundIndexes);
  9 Comments
Image Analyst
Image Analyst on 9 Mar 2015
So you want to recognize if a sound is in your sound library, and if it is, replace the actual sound with the "perfect", or at least standard , sound from your library?
Tom Leverett
Tom Leverett on 10 Mar 2015
Not exactly. I want to recognise if a sound is similar to another that the user records, and if it is, then I want to get the relevant data to generate a MIDI track where the notes have all the right parameters (Starting point, duration and pitch). To visualise, it's basically using this:
to make one of these:
where all of the notes are in the right place and are the right pitch.

Sign in to comment.

Categories

Find more on Measurements and Spatial Audio in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!