Hi,
I was about to know about the tone generation in J2ME. Regarding that, is it possible to generate a sound with a specific frequency from our mobile thru J2ME or thru any others.
Please help me this.
Reagards
Vineeth K.
Thanks in Advance.
Hi,
I was about to know about the tone generation in J2ME. Regarding that, is it possible to generate a sound with a specific frequency from our mobile thru J2ME or thru any others.
Please help me this.
Reagards
Vineeth K.
Thanks in Advance.
Hello there, vinuk4u!
First some information from via here: http://library.forum.nokia.com/ section J2ME:
and some example code...Figure: MMAPI architecture
...
Manager is a class with only static methods; applications cannot create an instance of it. Manager provides static methods for creating players and querying supported protocols and content types. It also provides a convenient method, playTone, for playing a single tone.
...
Some links:Code:Using MMAPI This section demonstrates how to use the multimedia APIs, but provides only short snippets of sample code. To see working examples, look at the mmademo project that comes with the J2ME Wireless Toolkit. You'll find it in <j2me-toolkit>/wtk20/apps/mmademo. Tone Generation Tone generation is a characterized by frequency and duration. This type of media is important for games and other audio applications, especially on small devices, where it might be the only form of multimedia capability available. The Manager.playTone() method generates tones. Its implementation can be mapped to the hardware's tone generator. You specify the note, duration, and volume: ... try { // play a tone for 4000 milliseconds at volume 100 Manager.playTone()(ToneControl.C4, 4000, 100); } catch(MediaException me) { } ... You can also create a player for synthesizing tone sequences: ... Player player = Manager.createPlayer(Manager.TONE_DEVICE_LOCATOR); ...
Piano MIDlet:
http://www.java2s.com/Code/Java/J2ME/PianoMIDlet.htm
How to take pictures, record videos and play music using MMAPI:
http://wiki.forum.nokia.com/index.ph...ic_using_MMAPI
(also this is good to know:
Sending post dial DTMF with Java ME: http://wiki.forum.nokia.com/index.ph...F_with_Java_ME)
Hope these get you started!
Best Regards,
Last edited by Maveric; 2010-05-31 at 07:39.
[FONT="Comic Sans MS"][COLOR="Blue"][/COLOR][I]Marko Lumivuori
Technical Support
+358 40 8019330
[email]marko.lumivuori@nokia.com[/email][/I][/FONT]
Hello Vineeth K.,
you might want to check this resource on Forum Nokia Java Developer's Library:
Java Developer's Library 3.5 > Developer's Guides > Multimedia > Creating multimedia applications > Using the Mobile Media API > Playing tones and tone sequences
Regards,
r2j7
Hello there,
In addition to r2j7 great link, here is one more full article that handles also
tone / frequency conversion:
http://www.informit.com/articles/article.aspx?p=375708
Best Regards,
[FONT="Comic Sans MS"][COLOR="Blue"][/COLOR][I]Marko Lumivuori
Technical Support
+358 40 8019330
[email]marko.lumivuori@nokia.com[/email][/I][/FONT]
Thanks Maveric, r2j7.
Both of you gave me some details regarding my actual doubt. I try those which you all gave and will inform you about the status of our success.
Thanks
Vineeth K.
Hello vinuk4u!
Glad to know we were able to get you going! Sure, let us know of your advances
and feel free to post more questions.
Best Regards,
[FONT="Comic Sans MS"][COLOR="Blue"][/COLOR][I]Marko Lumivuori
Technical Support
+358 40 8019330
[email]marko.lumivuori@nokia.com[/email][/I][/FONT]