Results 1 to 10 of 10
  1. #1
    Vinx is offline Member
    Join Date
    May 2012
    Location
    USA
    Posts
    38
    Rep Power
    0

    Default [Solved] Is there a way to emit a constant frequency?

    Right, well. First time I'm actually using Java to fix a problem. I bought a new headphone set called Sennheiser 120 HD; but there's an issue.
    If there isn't a constant emission of audio then the base for the headphones will eventually time out and turn off. The headphones are spammed with static, which is horrible on the ears. The solution to this for me currently is playing music 24/7 to prevent the static of death. Maybe I'm weird, but I don't want to listen to music 24/7.

    I believe a workable solution for this would be to constantly emit a sound that the base can detect but I can't hear. The application would need to be efficient since it's running 24/7.

    I've been doing some research, but I'm not that experienced with Java. I'm unable to find any library for emitting a certain frequency. Does anyone know of any?

    EDIT: It would be best to get the solution for this within 5 days, before my return policy at the store is no longer valid. Incase if this doesn't work.

    EDIT: Please stop asking if they're broken. They're not.
    Last edited by Vinx; 07-04-2012 at 06:39 PM.

  2. #2
    SnakeDoc is offline Senior Member
    Join Date
    Apr 2012
    Posts
    129
    Rep Power
    0

    Default Re: Is there a way to emit a constant frequency?

    you will need to work with an API for some program that does audio output, such as Audacity, etc. Java would be your method to get the API to produce the sound. I'd just return the headphones and get a new pair honestly... a lot less work lol!

  3. #3
    Vinx is offline Member
    Join Date
    May 2012
    Location
    USA
    Posts
    38
    Rep Power
    0

    Default Re: Is there a way to emit a constant frequency?

    Quote Originally Posted by SnakeDoc View Post
    you will need to work with an API for some program that does audio output, such as Audacity, etc. Java would be your method to get the API to produce the sound. I'd just return the headphones and get a new pair honestly... a lot less work lol!
    I want to keep the headphones though, they have great sound quality.

    I don't really think it would be hard, I found the midi library which can emit sound rather easily. I just can't find anything about emitting a certain frequency.

  4. #4
    SnakeDoc is offline Senior Member
    Join Date
    Apr 2012
    Posts
    129
    Rep Power
    0

    Default Re: Is there a way to emit a constant frequency?

    Java Sound API: Java Sound Demo

    probably a good place to start. i'm sure you can specify some frequency or find a sound (at the frequency you desire online and push it through this API). but again... seems like a pain in the ass for a bum set of headphones... can't you return/exchange them for a working set that doesn't have this same problem? Doesn't seem normal for a new set of headphones... if you are trying to do this purely for academic purposes, thats a different story, but you will have to learn the correct API's then... :-/

  5. #5
    Vinx is offline Member
    Join Date
    May 2012
    Location
    USA
    Posts
    38
    Rep Power
    0

    Default Re: Is there a way to emit a constant frequency?

    Quote Originally Posted by SnakeDoc View Post
    Java Sound API: Java Sound Demo

    probably a good place to start. i'm sure you can specify some frequency or find a sound (at the frequency you desire online and push it through this API). but again... seems like a pain in the ass for a bum set of headphones... can't you return/exchange them for a working set that doesn't have this same problem? Doesn't seem normal for a new set of headphones... if you are trying to do this purely for academic purposes, thats a different story, but you will have to learn the correct API's then... :-/
    Well... this looks like a good challenge.

  6. #6
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,565
    Rep Power
    12

    Default Re: Is there a way to emit a constant frequency?

    I don't know if the 5 days are up, but the headphones sound (sorry) broken to me. By design, perhaps, but broken.

    I wonder if you can really rely on a permanent high pitch signal to solve the problem. For one thing it strikes me that it may cause the headphones to rattle or create audible beats when combined with actual musical signal. Further, although we can't hear tones above a certain level they do have a subliminal effect so you will have to generate the tone high enough to be beyond what has physiological effect rather than just what we are conscious of.

    Also consider pets. I read somewhere that laboratories go to some trouble to ensure that faulty taps (faucets) don't emit a squeal that lab rats and the like find stressful.

  7. #7
    Vinx is offline Member
    Join Date
    May 2012
    Location
    USA
    Posts
    38
    Rep Power
    0

    Default Re: Is there a way to emit a constant frequency?

    Quote Originally Posted by pbrockway2 View Post
    I don't know if the 5 days are up, but the headphones sound (sorry) broken to me. By design, perhaps, but broken.

    I wonder if you can really rely on a permanent high pitch signal to solve the problem. For one thing it strikes me that it may cause the headphones to rattle or create audible beats when combined with actual musical signal. Further, although we can't hear tones above a certain level they do have a subliminal effect so you will have to generate the tone high enough to be beyond what has physiological effect rather than just what we are conscious of.

    Also consider pets. I read somewhere that laboratories go to some trouble to ensure that faulty taps (faucets) don't emit a squeal that lab rats and the like find stressful.
    I've been experiencing with frequencies and I don't think these headphones have much bass at all. A 12Hz frequency wasn't audible, neither was a 4Hz frequency. I was thinking that possibly running a low frequency through would be less noticeable than a high frequency, but I'm also worried about the possible damage it could cause from the speaker flex.


    None-the-less I need to find a library where you can choose what frequency you wish to emit.

    I want to post on stack overflow asking since no one on this forum seems to really have the answer, but I don't want to get in trouble for cross posting.
    Last edited by Vinx; 07-04-2012 at 04:02 PM.

  8. #8
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,945
    Rep Power
    19

    Default Re: Is there a way to emit a constant frequency?

    You won't get in trouble if you provide a link to the other places you posted.
    Cross posting isn't the problem. Not telling people you've cross posted, and thus potentially wasting their time, is.

    That does sound like a rubbish design, though.
    You'd have thought the base unit would inform the headphones it was shutting down, thus shutting down the headphones (or putting them into a sleep mode).
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  9. #9
    Vinx is offline Member
    Join Date
    May 2012
    Location
    USA
    Posts
    38
    Rep Power
    0

    Default Re: Is there a way to emit a constant frequency?

    Quote Originally Posted by Tolls View Post
    You won't get in trouble if you provide a link to the other places you posted.
    Cross posting isn't the problem. Not telling people you've cross posted, and thus potentially wasting their time, is.

    That does sound like a rubbish design, though.
    You'd have thought the base unit would inform the headphones it was shutting down, thus shutting down the headphones (or putting them into a sleep mode).
    Alright, posted it here on Stack Overflow.

    audio - Is there an library in Java for emitting a certain frequency constantly? - Stack Overflow

    EDIT: With the help of stack overflow the question was answered. Thank you Java-Forums for your contributions.
    Last edited by Vinx; 07-04-2012 at 06:39 PM.

  10. #10
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,565
    Rep Power
    12

    Default Re: Is there a way to emit a constant frequency?

    I want to post on stack overflow asking since no one on this forum seems to really have the answer,...
    Thanks for letting everyone know, and about the update.

Similar Threads

  1. Cannot use as static constant
    By KiranA in forum Eclipse
    Replies: 1
    Last Post: 12-01-2011, 09:19 AM
  2. Returning or printing the name of a constant
    By LuciferInTears in forum New To Java
    Replies: 2
    Last Post: 10-01-2011, 01:17 AM
  3. Constant Variables
    By harshakantha in forum New To Java
    Replies: 3
    Last Post: 06-13-2011, 07:51 AM
  4. constant variables questions
    By sgthale in forum New To Java
    Replies: 3
    Last Post: 05-06-2011, 05:34 AM
  5. static constant and performance
    By felixtfelix in forum New To Java
    Replies: 2
    Last Post: 08-31-2010, 01:43 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
  •