|
Page 1 of 1
|
[ 12 posts ] |
|
Author |
Message |
roboRed
Expert
Joined: Fri Nov 02, 2012 12:07 am Posts: 163 Location: California, USA
|
 NXT tone Values
Hi I was wondering, what is the range of the integer for the function "PlayTone" 1000? 500? 100? Help please! 
_________________ string Robored = "Awesome" ~~Neil Balch~~
|
Fri Aug 02, 2013 2:24 pm |
|
 |
NeXT-Generation
Senior Roboticist
Joined: Wed Sep 28, 2011 10:13 pm Posts: 630 Location: If I told you, I'd have to kill you.
|
 Re: NXT tone Values
I don't know the software's range right this second, but IIRC the speaker can only do up to ~20kHz, so that's probably were you'd wanna top out.
_________________A.K.A. inxt-generation Self-proclaimed genius, and future world dominator. My Brickshelf Folder"Don't they teach recreational mathematics anymore?" - The Tenth Doctor Bow down to Nikola Tesla, King of the Geek Gods.
|
Fri Aug 02, 2013 4:13 pm |
|
 |
roboRed
Expert
Joined: Fri Nov 02, 2012 12:07 am Posts: 163 Location: California, USA
|
 Re: NXT tone Values
Thanks, But what integer range is accepted for the parameters  ?
_________________ string Robored = "Awesome" ~~Neil Balch~~
|
Fri Aug 02, 2013 8:11 pm |
|
 |
Ernest3.14
Professor
Joined: Sat May 18, 2013 1:24 pm Posts: 271 Location: Olympia, WA
|
 Re: NXT tone Values
The range of an int... According to this page, "A whole number ranging from -32,768 to 32,767." That said, I have this for no reason at all, and it might serve you some use:  |  |  |  | Code: // These frequencies are all in hertz, rounded to the nearest int. typedef enum NoteFrequency { NOTE_REST = 0,
NOTE_C3 = 131, NOTE_C4 = 262, NOTE_C5 = 523, NOTE_D3 = 147, NOTE_D4 = 294, NOTE_D5 = 587, NOTE_E3 = 165, NOTE_E4 = 330, NOTE_E5 = 659, NOTE_F3 = 175, NOTE_F4 = 349, NOTE_F5 = 698, NOTE_G3 = 196, NOTE_G4 = 392, NOTE_G5 = 784, NOTE_A3 = 220, NOTE_A4 = 440, NOTE_A5 = 880, NOTE_B3 = 247, NOTE_B4 = 494, NOTE_B5 = 988,
NOTE_C3s = 139, NOTE_C4s = 277, NOTE_C5s = 554, NOTE_D3s = 156, NOTE_D4s = 311, NOTE_D5s = 622, NOTE_E3s = 175, NOTE_E4s = 349, NOTE_E5s = 698, NOTE_F3s = 185, NOTE_F4s = 370, NOTE_F5s = 740, NOTE_G3s = 208, NOTE_G4s = 415, NOTE_G5s = 831, NOTE_A3s = 233, NOTE_A4s = 466, NOTE_A5s = 932, NOTE_B3s = 262, NOTE_B4s = 523, NOTE_B5s = 1047,
NOTE_C3f = 123, NOTE_C4f = 247, NOTE_C5f = 494, NOTE_D3f = 139, NOTE_D4f = 277, NOTE_D5f = 554, NOTE_E3f = 156, NOTE_E4f = 311, NOTE_E5f = 622, NOTE_F3f = 165, NOTE_F4f = 330, NOTE_F5f = 659, NOTE_G3f = 185, NOTE_G4f = 370, NOTE_G5f = 740, NOTE_A3f = 208, NOTE_A4f = 415, NOTE_A5f = 831, NOTE_B3f = 233, NOTE_B4f = 466, NOTE_B5f = 932, };
|  |  |  |  |
_________________FTC Team 6424, the 'Oly Cow - Chief programmer. FRC Team 4450, Olympia Robotics Federation (ORF). and also quadrotors. Quadrotors!
|
Fri Aug 02, 2013 8:39 pm |
|
 |
roboRed
Expert
Joined: Fri Nov 02, 2012 12:07 am Posts: 163 Location: California, USA
|
 Re: NXT tone Values
ok. But what I mean is what is the maximum value that will receive a unique tone.
_________________ string Robored = "Awesome" ~~Neil Balch~~
|
Fri Aug 02, 2013 8:45 pm |
|
 |
Ernest3.14
Professor
Joined: Sat May 18, 2013 1:24 pm Posts: 271 Location: Olympia, WA
|
 Re: NXT tone Values
32,676? Although, your ears may not be able to hear the difference, and the NXT might not be able to go that high.
EDIT: 100th post!!! meh
_________________FTC Team 6424, the 'Oly Cow - Chief programmer. FRC Team 4450, Olympia Robotics Federation (ORF). and also quadrotors. Quadrotors!
|
Fri Aug 02, 2013 11:00 pm |
|
 |
roboRed
Expert
Joined: Fri Nov 02, 2012 12:07 am Posts: 163 Location: California, USA
|
 Re: NXT tone Values
Fine. I can feel we are getting closer, and thanks to you all, but I will refine the definition of my question even more. The maximum integer value that the human ear can even the slightest difference in.
_________________ string Robored = "Awesome" ~~Neil Balch~~
|
Fri Aug 02, 2013 11:26 pm |
|
 |
Ernest3.14
Professor
Joined: Sat May 18, 2013 1:24 pm Posts: 271 Location: Olympia, WA
|
 Re: NXT tone Values
So 20,000 is as high as you want to go, as NeXT-Generation said.
_________________FTC Team 6424, the 'Oly Cow - Chief programmer. FRC Team 4450, Olympia Robotics Federation (ORF). and also quadrotors. Quadrotors!
|
Fri Aug 02, 2013 11:31 pm |
|
 |
NeXT-Generation
Senior Roboticist
Joined: Wed Sep 28, 2011 10:13 pm Posts: 630 Location: If I told you, I'd have to kill you.
|
 Re: NXT tone Values
 |  |  |  | Quote: In a human, sound waves funnel into the ear via the external ear canal and hit the eardrum (tympanic membrane). Consequently, the compression and rarefaction of the wave set this thin membrane in motion, causing the middle ear bones (the ossicles: malleus, incus and stapes) to move. The vibrations of the ossicular chain displace the basilar fluid in the cochlea, causing the hairs within it, called stereocilia, to vibrate. Hairs line the cochlea from base to apex, and the part stimulated and the intensity of stimulation gives an indication of the nature of the sound. Information gathered from the hair cells is sent via the auditory nerve for processing in the brain. The number of sound pressure level vibrations (sonic waves) per second denotes the frequency. Infrasonic (below hearing), sonic (aural), and ultrasonic (above hearing) frequencies are measured in Hertz (Hz); one Hertz is one cycle wave (or singular pressure wave in audionics) per second. Humans have a maximum aural range that begins as low as 12 Hz under ideal laboratory conditions,[3] to 20 kHz[note 1] in most children and some adults. The range shrinks during life, usually beginning at around age of eight with the upper frequency limit being reduced. Women typically experience a lesser degree of hearing loss than men, with a later onset. Men have approximately 5 to 10 dB greater loss in the upper frequencies by age 40.[4][5] Inaudible infrasonic sound waves can be felt by humans through physical body vibration in the range of 4 to 16 Hz. |  |  |  |  |
EDIT: nvm...
_________________A.K.A. inxt-generation Self-proclaimed genius, and future world dominator. My Brickshelf Folder"Don't they teach recreational mathematics anymore?" - The Tenth Doctor Bow down to Nikola Tesla, King of the Geek Gods.
|
Fri Aug 02, 2013 11:32 pm |
|
 |
Ernest3.14
Professor
Joined: Sat May 18, 2013 1:24 pm Posts: 271 Location: Olympia, WA
|
 Re: NXT tone Values
OFF-TOPIC: You can get the sound waves to resonate with the fluids in your eyeballs, and distort vision and cause blindness and stuff.
_________________FTC Team 6424, the 'Oly Cow - Chief programmer. FRC Team 4450, Olympia Robotics Federation (ORF). and also quadrotors. Quadrotors!
|
Fri Aug 02, 2013 11:37 pm |
|
 |
roboRed
Expert
Joined: Fri Nov 02, 2012 12:07 am Posts: 163 Location: California, USA
|
 Re: NXT tone Values
Cool and Wierd! 
_________________ string Robored = "Awesome" ~~Neil Balch~~
|
Fri Aug 02, 2013 11:39 pm |
|
 |
roboRed
Expert
Joined: Fri Nov 02, 2012 12:07 am Posts: 163 Location: California, USA
|
 Re: NXT tone Values
_________________ string Robored = "Awesome" ~~Neil Balch~~
|
Fri Aug 02, 2013 11:39 pm |
|
|
|
Page 1 of 1
|
[ 12 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 2 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|