|
-
February 10th, 2006, 06:24 PM
#4
Originally posted here by janosa
the equivalent is a single beep. putting the conversion in a for statement it does it 5000000 times right? wrong again! if youll look in the brackets of the for statement it has the command 'k--;' which tells java to subtract 1 from integer k (the integer running the for statement) every time it runs through the for statement. so in essence it will sit and beep unendingly.
Ahhh... I see. Seems like a roundabout way of doing it.
You could really cut your code down by doing this:
while(true)
System.out.println((char) + 7);
Of course you need all your brackets and every other call needed to run it, but still.
Anyway, none of that answers your question on changing the pitch. I'm sure there is a way to do it, possibly by creating a .wav file that it calls over and over again. However, the reasoning for doing it just doesn't click with me and I don't really want to work on finding a solution for such a useless cause.
Good luck in your studies!
-Deeboe
If you know the enemy and know yourself, you need not fear the result of a hundred battles. If you know yourself but not the enemy, for every victory gained you will also suffer a defeat. If you know neither the enemy nor yourself, you will succumb in every battle.
- Sun Tzu, The Art of War
http://tazforum.**********.com/
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|