Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Determining the local maximum/minimum in noisy data

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
HomerSexual
Grandmaster Cheater Supreme
Reputation: 5

Joined: 03 Feb 2007
Posts: 1657

PostPosted: Thu Jun 09, 2011 9:13 pm    Post subject: Determining the local maximum/minimum in noisy data Reply with quote

Hello all:

I've been working on a project for a little while now and one of the components of the project requires determining the rhythm of sound input. The way that I plan to go about this, until I determine a better way, is to take the time in between each successive note. However, sound is a wave and goes up and down, and so it is not easy to find the relative peaks.

Screenshot 1:


Uploaded with ImageShack.us

As you can see, the global peaks are very clear to the eye, but I can't find an algorithm to determine them.

Help/ideas?

_________________
Back to top
View user's profile Send private message
Varreon
Advanced Cheater
Reputation: 0

Joined: 13 Jun 2007
Posts: 80

PostPosted: Thu Jun 09, 2011 9:29 pm    Post subject: Reply with quote

Look into the fourier transform.
_________________
Back to top
View user's profile Send private message
HomerSexual
Grandmaster Cheater Supreme
Reputation: 5

Joined: 03 Feb 2007
Posts: 1657

PostPosted: Thu Jun 09, 2011 9:30 pm    Post subject: Reply with quote

A Fourier Transformation will determine the frequency of a sound interval, however, it will not pick out the peak from a set of data.

I plan to use FFT's to determine frequency, but rhythm must be determined using the amplitude of the wave and looking for rapid spikes.

_________________
Back to top
View user's profile Send private message
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Fri Jun 10, 2011 2:52 am    Post subject: Reply with quote

smooth it by a certain factor ? eg. cut out the granularity by half or something
Back to top
View user's profile Send private message
b6oy
Newbie cheater
Reputation: 0

Joined: 21 Sep 2009
Posts: 10

PostPosted: Fri Jun 10, 2011 10:03 am    Post subject: Reply with quote

Simplest way, if your goal is rhythm recognition. Humoments with Bayes classifier and alot of samples.
Back to top
View user's profile Send private message
HomerSexual
Grandmaster Cheater Supreme
Reputation: 5

Joined: 03 Feb 2007
Posts: 1657

PostPosted: Fri Jun 10, 2011 10:32 am    Post subject: Reply with quote

I do not want to use a learning algorithm for determining the rhythm. The way I want to do it for now is to get the time where every new note is plucked (using a bass track so plucked works here) and to determine the time between successive notes.

How would I go about smoothing the data to remove granularity? I can square the data in order to remove negatives while still preserving peaks, but the data is still up/down at that point, but it removes the problem of pos/neg successive data.

Edit:

Here is the data with a square filter



Uploaded with ImageShack.us

_________________
Back to top
View user's profile Send private message
AhMunRa
Grandmaster Cheater Supreme
Reputation: 27

Joined: 06 Aug 2010
Posts: 1117

PostPosted: Fri Jun 10, 2011 2:46 pm    Post subject: Reply with quote

This may give you some ideas, or at least in the right direction.

http://stackoverflow.com/questions/79445/beats-per-minute-from-real-time-audio-input

Of course this is only good if all you want is bpm, if I understand you want the actual rhythm though.

_________________
<Wiccaan> Bah that was supposed to say 'not saying its dead' lol. Fixing >.>
Back to top
View user's profile Send private message
HomerSexual
Grandmaster Cheater Supreme
Reputation: 5

Joined: 03 Feb 2007
Posts: 1657

PostPosted: Fri Jun 10, 2011 6:17 pm    Post subject: Reply with quote

thanks, that's a good starting post! It's not quite what I am looking for, but it's something close that I can probably adapt
_________________
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites