×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Dec 2008
    Location
    Cochin, Kerala, India
    Posts
    84

    Specific frequency sound

    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.

  2. #2
    Super Contributor
    Join Date
    May 2008
    Location
    Helsinki, Finland
    Posts
    1,098

    Re: Specific frequency sound

    Hello there, vinuk4u!


    First some information from via here: http://library.forum.nokia.com/ section J2ME:

    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.
    ...
    and some example code...

    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);
        ...
    Some links:

    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]

  3. #3
    Nokia Developer Expert
    Join Date
    Aug 2007
    Posts
    1,595

    Re: Specific frequency sound

    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
    [URL="http://library.forum.nokia.com/java"][B] >>> Java Developer's Library <<<[/B][/URL]
    [URL="https://www.developer.nokia.com/Resources/Support/Technical_support.xhtml"] [B]>>> Technical Support for Java ME development <<<[/B][/URL]
    [URL="https://publish.ovi.com/info/"][B]>>> Nokia Publish: reach millions of Nokia users worldwide through Nokia Store <<<[/B][/URL]

  4. #4
    Super Contributor
    Join Date
    May 2008
    Location
    Helsinki, Finland
    Posts
    1,098

    Re: Specific frequency sound

    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]

  5. #5
    Registered User
    Join Date
    Dec 2008
    Location
    Cochin, Kerala, India
    Posts
    84

    Thumbs up Re: Specific frequency sound

    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.

  6. #6
    Super Contributor
    Join Date
    May 2008
    Location
    Helsinki, Finland
    Posts
    1,098

    Re: Specific frequency sound

    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]

Similar Threads

  1. Play continuous sound with varying frequency
    By -chris- in forum Symbian Media (Closed)
    Replies: 4
    Last Post: 2009-01-30, 09:33
  2. Max and min Frequency - Sound
    By grodata in forum General Development Questions
    Replies: 0
    Last Post: 2005-12-06, 09:11
  3. MIDI Sound problem (J2ME / Series 60)
    By JPapke in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2004-10-29, 08:17
  4. sound bug (possibly) on 6610
    By alex_crowther in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2004-02-05, 11:44

Posting Permissions

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