You Are Here:

Community: Developer Discussion Boards

#1 Old Lightbulb Frequency Analysis in J2ME MMAPI - 2006-11-22, 16:35

Join Date: Nov 2006
Posts: 3
Jimmmeh
Offline
Registered User
Hey guys, for my old Series 60 2nd Edition phone I had a great little Guitar Tuning app which could work out the frequency of a note captured live from the phone microphone.

I imagine this used some sort of FFT (Fast Fourier Transform) on the incoming wave data to detect the dominant frequency. I was wondering if it would be possible to re-create in J2ME using the MMAPI.

I know a live stream wouldn't be able to be processed but do you think it would be possible to have a thread capturing 1/4 second bursts, writing to a byte array which could then have the PCM data extracted from it and run through some FFT algorithm? If so does anyone know of a very simple version of that algorithm, written in Java, that only makes use of functions available in J2ME (or one which could be translated easily).

I know J2ME apps are a lot slower than native Symbian C++ but if a native app could perform FFT translations "live" then surely Java would be capable of processing short bursts of samples?

FFT is a bit over my head really and I know there are C++ libraries such as FFTW available but I just want a small, simple algorithm to just let me work out the dominant frequency of the sample sound.

If anyone can help at all I would be extremely greatful as it would be great to have a J2ME guitar tuning app to easily take around. Thanks in advance to anyone who can provide me with any help here!
Reply With Quote

#2 Old Re: Frequency Analysis in J2ME MMAPI - 2006-11-22, 18:44

Join Date: Nov 2006
Posts: 28
redlex
Offline
Registered User
Hi Jimmmeh
I know of no reason why this shouldn't work! As you note, it may be better to analyse a half second sample, rather than attempt live FFT.

As for code, googling pulls up some useful looking stuff, e.g.:

http://www.developer.com/java/other/article.php/3457251
http://www.cs.princeton.edu/introcs/.../FFT.java.html
http://www.dsptutor.freeuk.com/analy...mAnalyser.html
Reply With Quote

#3 Old Re: Frequency Analysis in J2ME MMAPI - 2006-11-22, 19:40

Join Date: Nov 2006
Posts: 3
Jimmmeh
Offline
Registered User
That FFT algorithm looks good but I am not entirely sure how to go from the data in the PCM wav file to the inputs to the algorithm. Like, I am not sure how i need to transform the data in the wav file to be used as an input in the FFT algorithm.

There are lots of articles on FFT but none that explicitly talk about moving from the data in a wav file to a frequency spectrum. Anyone else have any input on that?

Cheers again and thanks very much for your help redlex!
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
j2me mmapi/ rtttl help ASAP shubhamlahoti Mobile Java Media (Graphics & Sounds) 1 2006-04-04 02:28
mmapi and j2me sathy Mobile Java Media (Graphics & Sounds) 2 2005-10-05 11:53
1. Image capturing using MMAPI of J2ME in series 60 adhiyal Mobile Java Media (Graphics & Sounds) 1 2004-10-01 08:26
Image capturing using MMAPI of J2ME in series 60 adhiyal Mobile Java Media (Graphics & Sounds) 1 2004-10-01 08:25
J2ME program freezes up using MMAPI on Win2000 walterzcm Mobile Java General 0 2002-11-21 06:46

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d18645X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE44iscussionQ qdcZtypeQUqfntypeZE44iscussionContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZentertainmentQ qfnZtopicQUqfnTopicZj2meQ qfnZtopicQUqfnTopicZjavaQ qfnZtopicQUqfnTopicZmediaQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE44iscussionQ qfnZtypeQUqfntypeZE44iscussionContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE44iscussionQ qrdfZtypeQUqfntypeZE44iscussionContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ