Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 frequencies (sound command) I'm LOST!
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
cutiegirl_14_16




PostPosted: Mon Apr 21, 2003 8:34 pm   Post subject: frequencies (sound command) I'm LOST!

how do u use the sound command?
I put sound (261.63,4) to play C for 4 seconds because I thought that you put sound (frequency,duration:int)

can somebody tell me what I'm doing wrong plz!
thanx!
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Mon Apr 21, 2003 8:52 pm   Post subject: (No subject)

not quite. First both parameters are integers, so its 261, not 261.63.

second of all, the duration is in milliseconds (same as delay) so 4 seconds would be 4000, not 4.

code:

sound(261,4000)
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Prince




PostPosted: Mon Apr 21, 2003 9:34 pm   Post subject: (No subject)

is there a max frequency that u could get out of this? it seems pretty cool (hey i learned sumthin new today Very Happy)
Prince




PostPosted: Mon Apr 21, 2003 9:37 pm   Post subject: (No subject)

nvm, i think i found the answer (i think its 20000)
Tony




PostPosted: Mon Apr 21, 2003 10:29 pm   Post subject: (No subject)

i think its bad for your ears if you listen to it. You should stick to 1-1000 range, not higher. But up to you really.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: