aspose file tools*
The moose likes Java in General and the fly likes beep with time and frequency Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "beep with time and frequency" Watch "beep with time and frequency" New topic
Author

beep with time and frequency

Rafael Afonso
Ranch Hand

Joined: Jul 16, 2002
Posts: 63
Hello:
In java.awt.Toolkit we have the beep() mehtod to emit an audio beep. I would know if there is a similar method to etmit a beep in a certain frequency (in Hertz) for a certain time (in seconds or milliseconds). It will be like:

Thanks,


=================================<br /> Rafael U. C. Afonso<br /> <a href="http://www.javafree.com.br" target="_blank" rel="nofollow">www.javafree.com.br</a><br />=================================<br /><i>Where is debug?<br />debug is on the table</i>
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

There is an Article on JDC Tech Tips.
It's not that simple, but on the other hand, not too complicated, and explained in Detail:
http://java.sun.com/jdc/JDCTechTips/2003/tt0805.html


http://home.arcor.de/hirnstrom/bewerbung
Rafael Afonso
Ranch Hand

Joined: Jul 16, 2002
Posts: 63
Stephan:
Thanks, but I do not want anything relationed to Java Media or Multimedia. I want a simpler thing. I remember that in Turbo Pascal (or Turbo C) there is a function similar what I want. But I do not remember what its name and I do not find it anywhere in Internet. Does someone know?
Thanks,
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24184
    
  34

In any event, there's no such function in the Java API. If you need to play particular sounds, you have no choice but to use the Java Media API.


[Jess in Action][AskingGoodQuestions]
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

Well - it's really not complicated (even me, who knows nothing about midi, ogg, mp3, au and wav solved it).
The alternative 1 would be to implement it in c/c++ and call a native interface - more complicated in my opinion and not portable, but with the benefit that it will run on computers without soundcard
And the second: implement as well in a different language, but make it executable, and call Runtime...
Both suffer from the fact, that there is no volume - control to the user.
If the users have a very old jvm, it could be an argument.
Rafael Afonso
Ranch Hand

Joined: Jul 16, 2002
Posts: 63
Hello:
That is the question: I don't want use card sound. So, it seems that I would need JNI to create a *.DLL or *.SO. Is there a library in C or Pascal that can do it?
Thanks,
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: beep with time and frequency