Results 1 to 11 of 11
Like Tree1Likes
  • 1 Post By JosAH

Thread: Sound Frequency

  1. #1
    MemoNick is offline Member
    Join Date
    Nov 2011
    Posts
    11
    Rep Power
    0

    Default Sound Frequency

    I want to create a program which simple listens to a sound and outputs its frequency. What do I need to do?

    Thanks

  2. #2
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    14,051
    Blog Entries
    7
    Rep Power
    23

    Default Re: Sound Frequency

    What does 'listen to a sound' mean to your program? A program doesn't have ears you know ...

    kind regards,

    Jos
    DarrylBurke likes this.
    The only person who got everything done by Friday was Robinson Crusoe.

  3. #3
    MemoNick is offline Member
    Join Date
    Nov 2011
    Posts
    11
    Rep Power
    0

    Default Re: Sound Frequency

    Oh, sorry. I weren't clear enough. I meant that the program outputs the sound's frequency/pitch. It's like inputting an integer and outputting whether it is odd or even. In this case I want the program to output the sound's pitch. Thanks for your input josAH.

  4. #4
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    14,051
    Blog Entries
    7
    Rep Power
    23

    Default Re: Sound Frequency

    Quote Originally Posted by MemoNick View Post
    Oh, sorry. I weren't clear enough. I meant that the program outputs the sound's frequency/pitch. It's like inputting an integer and outputting whether it is odd or even. In this case I want the program to output the sound's pitch. Thanks for your input josAH.
    You didn'y answer my question: how is your program 'aware' of this sound? Can it take amplitude samples from a microphone? Does it have voltage values varying in time? What?

    kind regards,

    Jos
    The only person who got everything done by Friday was Robinson Crusoe.

  5. #5
    MemoNick is offline Member
    Join Date
    Nov 2011
    Posts
    11
    Rep Power
    0

    Default Re: Sound Frequency

    The sound is taken from a file and defined in the program itself. Then it is checked.

  6. #6
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    14,051
    Blog Entries
    7
    Rep Power
    23

    Default Re: Sound Frequency

    Quote Originally Posted by MemoNick View Post
    The sound is taken from a file and defined in the program itself. Then it is checked.
    And what is in that file?

    kind regards,

    Jos
    The only person who got everything done by Friday was Robinson Crusoe.

  7. #7
    MemoNick is offline Member
    Join Date
    Nov 2011
    Posts
    11
    Rep Power
    0

    Default Re: Sound Frequency

    A 2 second sound with constant pitch and amplitude. It's a .mp3 file.
    Last edited by MemoNick; 11-05-2011 at 11:09 PM.

  8. #8
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    14,051
    Blog Entries
    7
    Rep Power
    23

    Default Re: Sound Frequency

    Quote Originally Posted by MemoNick View Post
    A 2 second sound with constant pitch and amplitude. It's a .mp3 file.
    Now we're getting somewhere; have a look here; you have to decode the mp3 file so you have to know the format of its data.

    kind regards,

    Jos
    The only person who got everything done by Friday was Robinson Crusoe.

  9. #9
    MemoNick is offline Member
    Join Date
    Nov 2011
    Posts
    11
    Rep Power
    0

    Default Re: Sound Frequency

    I am really sorry for not giving you the info at the beginning :) I'll study it further tomorrow. Once you decode it, what do you have to access to know the frequency?
    Last edited by MemoNick; 11-05-2011 at 11:26 PM.

  10. #10
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    14,051
    Blog Entries
    7
    Rep Power
    23

    Default Re: Sound Frequency

    I forgot to mention this link, maybe the Java JMF contains APIs that can help you further so that you don't have to figure out everything yourself.

    kind regards,

    Jos
    The only person who got everything done by Friday was Robinson Crusoe.

  11. #11
    MemoNick is offline Member
    Join Date
    Nov 2011
    Posts
    11
    Rep Power
    0

Similar Threads

  1. Problems with sound in java and USB sound card
    By marblecatdog in forum New To Java
    Replies: 1
    Last Post: 04-19-2011, 12:02 PM
  2. how to count frequency of the color?
    By meth in forum New To Java
    Replies: 4
    Last Post: 02-25-2011, 02:32 PM
  3. Sort Frequency
    By ScaryJello in forum New To Java
    Replies: 7
    Last Post: 03-26-2009, 01:47 AM
  4. Word Frequency
    By capu in forum Advanced Java
    Replies: 2
    Last Post: 10-09-2008, 02:03 PM
  5. Frequency Counter
    By justlearning in forum New To Java
    Replies: 0
    Last Post: 05-07-2008, 10:50 PM

Posting Permissions

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