View unanswered posts | View active topics It is currently Sun Dec 17, 2017 2:14 am

 Page 1 of 1 [ 12 posts ]
 Print view Previous topic | Next topic
NXT tone Values
Author Message
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?

_________________
string Robored = "Awesome"
~~Neil Balch~~

Fri Aug 02, 2013 2:24 pm
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
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
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).

Fri Aug 02, 2013 8:39 pm
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
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).

Fri Aug 02, 2013 11:00 pm
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
Professor

Joined: Sat May 18, 2013 1:24 pm
Posts: 271
Location: Olympia, WA
Re: NXT tone Values
 Wikipedia wrote:For humans, hearing is normally limited to frequencies between about 20 Hz and 20,000 Hz (20 kHz), although these limits are not definite. The upper limit generally decreases with age.

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).

Fri Aug 02, 2013 11:31 pm
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
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).

Fri Aug 02, 2013 11:37 pm
Expert

Joined: Fri Nov 02, 2012 12:07 am
Posts: 163
Location: California, USA
Re: NXT tone Values
 Ernest3.14 wrote:OFF-TOPIC: You can get the sound waves to resonate with the fluids in your eyeballs, and distort vision and cause blindness and stuff.

Cool and Wierd!

_________________
string Robored = "Awesome"
~~Neil Balch~~

Fri Aug 02, 2013 11:39 pm
Expert

Joined: Fri Nov 02, 2012 12:07 am
Posts: 163
Location: California, USA
Re: NXT tone Values
Ernest3.14 wrote:
 Wikipedia wrote:For humans, hearing is normally limited to frequencies between about 20 Hz and 20,000 Hz (20 kHz), although these limits are not definite. The upper limit generally decreases with age.

So 20,000 is as high as you want to go, as NeXT-Generation said.

Thanks.

_________________
string Robored = "Awesome"
~~Neil Balch~~

Fri Aug 02, 2013 11:39 pm
Display posts from previous:  Sort by
 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 forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum

Search for:
 Jump to:  Select a forum ------------------ ROBOTC Applications    ROBOTC for LEGO MINDSTORMS       Third-party sensors    ROBOTC for CORTEX & PIC    ROBOTC for VEX IQ    ROBOTC for Arduino    Robot Virtual Worlds    Multi-Robot Communications    Issues and Bugs Competitions & Partners    Mini Urban Challenge    CS2N Robot Virtual Worlds Competitions       VEX Skyrise Competition 2014-2015       VEX Toss Up 2013-2014       FTC Block Party! 2013-2014    Competitions using VEX - BEST, TSA, VEX, and RoboFest!    FTC Programming    RoboCup Junior and Other ROBOT Competitions Virtual Brick Robotics Discussions    General Discussions    Project Discussions Off-Topic ROBOTC Forum & ROBOTC.net Suggestions/Feedback    ROBOTC Forums Suggestions/Comments    ROBOTC.net Suggestions/Comments       NXT Programming: Tips for Beginning with ROBOTC       VEX Programming: Tips for Beginning with ROBOTC    2013 Robotics Summer Of Learning       VEX Toss Up Programming Challenge       FTC Ring It Up! Programming Challenge    International Forums       Spanish Forums          ROBOTC for MINDSTORMS          ROBOTC for VEX       French Forums          ROBOTC pour Mindstorms          ROBOTC pour IFI VEX       Japanese Forums （日本語のフォーラム）       German Forums    2015 Spring Carnival Event    PLTW (Project Lead The Way)    Robotics Merit Badge    2014 Robotics Academy Summer of Learning