Andrew Furmanczyk Piano Academy :: Learn How To Play Piano
Enjoy your time with the music community! Log in now to start posting!

~Andrew Furmanczyk

Join the forum, it's quick and easy

Andrew Furmanczyk Piano Academy :: Learn How To Play Piano
Enjoy your time with the music community! Log in now to start posting!

~Andrew Furmanczyk
Andrew Furmanczyk Piano Academy :: Learn How To Play Piano
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Piano Keys (Frequency)

5 posters

Go down

Piano Keys (Frequency) Empty Piano Keys (Frequency)

Post by Filius Nullius Thu May 22, 2008 11:53 pm

I found an interesting Wiki entry that lists all of the frequencys for each of the 88 keys on the piano;

Link: http://en.wikipedia.org/wiki/Piano_key_frequencies


/* I'm going to write a program to beep the notes in system tones should be relativly useless*/

Filius Nullius
Advanced Pianist
Advanced Pianist

Male Number of posts : 55
Age : 32
Location : North Carolina
Job/hobbies : Web design and Scripting
Length of time playing piano : Started on Join Date.
Guru Points : 0
Registration date : 2008-05-18

Back to top Go down

Piano Keys (Frequency) Empty Re: Piano Keys (Frequency)

Post by Thomandy Thu May 22, 2008 11:57 pm

Yeah. I have actually posted the same pic, well cut and paste info in another topic. But I left out the frequencys couse it was about keynames. Its a great list Smile

Write a program? Youre a programmer?? =)
Thomandy
Thomandy
Moderator
Moderator

Male Number of posts : 2616
Age : 39
Location : Norway
Job/hobbies : Bachelor in Social Childcare
Length of time playing piano : 1 year
Guru Points : 46
Registration date : 2008-04-10

https://www.youtube.com/thomandy

Back to top Go down

Piano Keys (Frequency) Empty Re: Piano Keys (Frequency)

Post by Filius Nullius Fri May 23, 2008 1:26 am

thomandy wrote:Yeah. I have actually posted the same pic, well cut and paste info in another topic. But I left out the frequencys couse it was about keynames. Its a great list Smile

Write a program? Youre a programmer?? =)



I guess you could say I am, although most of my serious work is web scripting/design {PHP JS Ajax etc..}.

Filius Nullius
Advanced Pianist
Advanced Pianist

Male Number of posts : 55
Age : 32
Location : North Carolina
Job/hobbies : Web design and Scripting
Length of time playing piano : Started on Join Date.
Guru Points : 0
Registration date : 2008-05-18

Back to top Go down

Piano Keys (Frequency) Empty Re: Piano Keys (Frequency)

Post by Thomandy Fri May 23, 2008 1:40 am

Filius Nullius wrote:
thomandy wrote:Yeah. I have actually posted the same pic, well cut and paste info in another topic. But I left out the frequencys couse it was about keynames. Its a great list Smile

Write a program? Youre a programmer?? =)



I guess you could say I am, although most of my serious work is web scripting/design {PHP JS Ajax etc..}.

Ah! =)
Thomandy
Thomandy
Moderator
Moderator

Male Number of posts : 2616
Age : 39
Location : Norway
Job/hobbies : Bachelor in Social Childcare
Length of time playing piano : 1 year
Guru Points : 46
Registration date : 2008-04-10

https://www.youtube.com/thomandy

Back to top Go down

Piano Keys (Frequency) Empty Re: Piano Keys (Frequency)

Post by Filius Nullius Fri May 23, 2008 2:14 am

Heres what I came up with if you want to see it;
Code:

#include <iostream>
#include <windows.h>
using namespace std;


// meh structure
struct Keys {
  char * name;
  float freq;
};

// http://en.wikipedia.org/wiki/Piano_key_frequencies
Keys note[88] = {{"A0",  27.5000},{"A#0", 29.1353},{"B0", 30.8677},{"C1",  32.7032},{"C#1", 34.6479},{"D1",  36.7081},
                {"D#1", 38.8909},{"E1",  41.2035},{"F1", 43.6536},{"F#1", 46.2493},{"G1",  48.9995},{"G#1", 51.9130},
                {"A1",  55.0000},{"A#1", 58.2705},{"B1", 61.7354},{"C2",  65.4064},{"C#2", 69.2957},{"D2",  73.4162},
                {"D#2", 77.7817},{"E2",  82.4069},{"F2", 87.3071},{"F#2", 92.4986},{"G2",  97.9989},{"G#2", 103.826},
                {"A2",  110.000},{"A#2", 116.541},{"B2", 123.471},{"C3",  130.813},{"C#3", 138.591},{"D3",  146.832},
                {"D#3", 146.832},{"E3",  164.814},{"F3", 174.614},{"F#3", 184.997},{"G3",  195.998},{"G#3", 207.652},
                {"A3",  220.000},{"A#3", 233.082},{"B3", 246.942},{"C4",  261.626},{"C#4", 277.183},{"D4",  293.665},
                {"D#4", 311.127},{"E4",  329.628},{"F4", 349.228},{"F#4", 369.994},{"G4",  391.995},{"G#4", 415.305},
                {"A4",  440.000},{"A#4", 466.164},{"B4", 492.883},{"C5",  523.251},{"C#5", 554.365},{"D5",  587.330},
                {"D#5", 622.254},{"E5",  659.255},{"F5", 698.456},{"F#5", 739.989},{"G5",  783.991},{"G#5", 830.609},
                {"A5",  880.000},{"A#5", 932.328},{"B5", 987.767},{"C6",  1046.50},{"C#6", 1108.73},{"D6",  1174.66},
                {"D#6", 1244.51},{"E6",  1318.51},{"F6", 1396.91},{"F#6", 1479.98},{"G6",  1567.98},{"G#6", 1661.22},
                {"A6",  1760.00},{"A#6", 1864.66},{"B6", 1975.53},{"C7",  2093.00},{"C#7", 2217.46},{"D7",  2349.32},
                {"D#7", 2489.02},{"E7",  2637.02},{"F7", 2793.83},{"F#7", 2959.96},{"G7",  3135.96},{"G#7", 3322.44},
                {"A7",  3520.00},{"A#7", 3729.31},{"B7", 3951.07},{"C8",  4186.01}};

int main()
{
    while(1) {
    char buffer[4];
    cout << "Enter The Notes you want, each new series on a newline" << endl;
   
   
    while(cin >> buffer) {
   
            for(int x=0;x<=88;x++){
           
            if(strcmp(buffer, note[x].name) == 0){
              Beep((DWORD)note[x].freq, 350);
              break;
       
            }
             
          }
 
           
             
        } 
 
        }             
 
           
      }
           
     
       
 

Filius Nullius
Advanced Pianist
Advanced Pianist

Male Number of posts : 55
Age : 32
Location : North Carolina
Job/hobbies : Web design and Scripting
Length of time playing piano : Started on Join Date.
Guru Points : 0
Registration date : 2008-05-18

Back to top Go down

Piano Keys (Frequency) Empty Re: Piano Keys (Frequency)

Post by Thomandy Fri May 23, 2008 2:39 am

Hehe Razz Okay, I really dont understand anything Wink
I know a little html, thats all Razz hehe
Thomandy
Thomandy
Moderator
Moderator

Male Number of posts : 2616
Age : 39
Location : Norway
Job/hobbies : Bachelor in Social Childcare
Length of time playing piano : 1 year
Guru Points : 46
Registration date : 2008-04-10

https://www.youtube.com/thomandy

Back to top Go down

Piano Keys (Frequency) Empty Re: Piano Keys (Frequency)

Post by Admin Andrew Fri May 23, 2008 4:37 am

Shocked ...I just look at that and scratch my head...

Btw how does my website stack up? What do you think of the layout?

The only thing i picked were the colours! It's sort of like going to the hard ware store, and getting someone to build you a house, but you get to pick the colours for the rooms Razz
Admin Andrew
Admin Andrew
Admin
Admin

Male Number of posts : 1277
Age : 37
Location : Prince George, British Columbia, Canada
Job/hobbies : Piano teacher, pianist
Length of time playing piano : Started in 1992; 17 years of playing.
Guru Points : 12
Registration date : 2008-02-22

http://www.howtoplaypiano.ca

Back to top Go down

Piano Keys (Frequency) Empty Re: Piano Keys (Frequency)

Post by Thomandy Fri May 23, 2008 5:00 am

Know it wasnt me you asked, so Ill answer about the colors! =)

I think the colors match. It isnt the most colorfull forum, but, hey, thats why Im here WinkWinkWink

Hehe, but I like it. It is neutral and forumlike! Very Happy
Thomandy
Thomandy
Moderator
Moderator

Male Number of posts : 2616
Age : 39
Location : Norway
Job/hobbies : Bachelor in Social Childcare
Length of time playing piano : 1 year
Guru Points : 46
Registration date : 2008-04-10

https://www.youtube.com/thomandy

Back to top Go down

Piano Keys (Frequency) Empty Re: Piano Keys (Frequency)

Post by Filius Nullius Fri May 23, 2008 8:36 pm

The Colors look good for the lineup between the forum and the site overall a pretty well developed site (although there are a few things I might change) but nothing worth talking about.


I'm going to upload a .exe of this program it's pretty cool to mess around with, today at school I put twenty D7's in and annoyed my teacher.


LINK: http://www.fileshack.us/get_file.php?id=945912&file=main.exe

How it works: if you go to the piano key frequency page above you will see that the keys are listed like A1 A2 C1 C2 etc..
just enter as many notes as you want the program to play on one line with a space between them
ex: "A1 B1 C1 E1"

sharps are also supported "C#1"

its not perfect... so if you enter a note that isn't in the form of "XI or X#I" where X is the note and I is the number it will probably crash.

Filius Nullius
Advanced Pianist
Advanced Pianist

Male Number of posts : 55
Age : 32
Location : North Carolina
Job/hobbies : Web design and Scripting
Length of time playing piano : Started on Join Date.
Guru Points : 0
Registration date : 2008-05-18

Back to top Go down

Piano Keys (Frequency) Empty Re: Piano Keys (Frequency)

Post by Thomandy Fri May 23, 2008 9:06 pm

Hehe. Cool, when I wrote f1 it crached. Only big letters then =)
Its like c++. I knew how to create sounds way back at one point Razz
Thomandy
Thomandy
Moderator
Moderator

Male Number of posts : 2616
Age : 39
Location : Norway
Job/hobbies : Bachelor in Social Childcare
Length of time playing piano : 1 year
Guru Points : 46
Registration date : 2008-04-10

https://www.youtube.com/thomandy

Back to top Go down

Piano Keys (Frequency) Empty Re: Piano Keys (Frequency)

Post by Filius Nullius Fri May 23, 2008 9:22 pm

It is C++, I did forget to mention that you can only input capital letters Embarassed it contains a lot of bugs... tell me if you find anything that sounds cool

Filius Nullius
Advanced Pianist
Advanced Pianist

Male Number of posts : 55
Age : 32
Location : North Carolina
Job/hobbies : Web design and Scripting
Length of time playing piano : Started on Join Date.
Guru Points : 0
Registration date : 2008-05-18

Back to top Go down

Piano Keys (Frequency) Empty Re: Piano Keys (Frequency)

Post by Thomandy Fri May 23, 2008 9:34 pm

Filius Nullius wrote:It is C++, I did forget to mention that you can only input capital letters Embarassed it contains a lot of bugs... tell me if you find anything that sounds cool

I thought it was! Smile Havnt playd around with that for ages Smile But, it was my buddy that could make programs with it. I just taged along
Thomandy
Thomandy
Moderator
Moderator

Male Number of posts : 2616
Age : 39
Location : Norway
Job/hobbies : Bachelor in Social Childcare
Length of time playing piano : 1 year
Guru Points : 46
Registration date : 2008-04-10

https://www.youtube.com/thomandy

Back to top Go down

Piano Keys (Frequency) Empty Re: Piano Keys (Frequency)

Post by Filius Nullius Fri May 23, 2008 9:39 pm

theoretically you can play any song... so I tried the thing I had closest to the computer

Code:
E4 D#4 E4 D#4 E4 B3 D4 C4 A3 A1 E2 A2 C4 A3 A1 E2 A2 C4 E4 A4 E1 E2 G#2 E4 G#4 B4 A1 E2 A2

that's what the first part to "Fur Elise" would look like, (I think) I'm pretty sure everthing is supposed to be raised a number but it sounded funny in system tones.


For your information:
To easily paste into any \"CMD/Command line like Application\" right click at the top of the window (on the line where the 'X' is located) and in the menu go to Edit->Paste


Last edited by Filius Nullius on Fri May 23, 2008 9:55 pm; edited 2 times in total

Filius Nullius
Advanced Pianist
Advanced Pianist

Male Number of posts : 55
Age : 32
Location : North Carolina
Job/hobbies : Web design and Scripting
Length of time playing piano : Started on Join Date.
Guru Points : 0
Registration date : 2008-05-18

Back to top Go down

Piano Keys (Frequency) Empty Re: Piano Keys (Frequency)

Post by Thomandy Fri May 23, 2008 9:48 pm

You can hear it is fur elise, even though the darker tones where strange!" Very Happy
Thomandy
Thomandy
Moderator
Moderator

Male Number of posts : 2616
Age : 39
Location : Norway
Job/hobbies : Bachelor in Social Childcare
Length of time playing piano : 1 year
Guru Points : 46
Registration date : 2008-04-10

https://www.youtube.com/thomandy

Back to top Go down

Piano Keys (Frequency) Empty Re: Piano Keys (Frequency)

Post by Filius Nullius Mon May 26, 2008 1:40 am

I'm going to make a virtual piano soon, like the java applets you see on some tutorial sites; although I'll probably do mine in Flash maybe java if I wait long enough.

Filius Nullius
Advanced Pianist
Advanced Pianist

Male Number of posts : 55
Age : 32
Location : North Carolina
Job/hobbies : Web design and Scripting
Length of time playing piano : Started on Join Date.
Guru Points : 0
Registration date : 2008-05-18

Back to top Go down

Piano Keys (Frequency) Empty Re: Piano Keys (Frequency)

Post by Admin Andrew Mon May 26, 2008 2:08 am

Filius Nullius wrote:I'm going to make a virtual piano soon, like the java applets you see on some tutorial sites; although I'll probably do mine in Flash maybe java if I wait long enough.

OMG!!!!... REALLY!?

I have a favor to ask of you...if i give you full credit would you allow me to put it on my website for people to play around on?
Admin Andrew
Admin Andrew
Admin
Admin

Male Number of posts : 1277
Age : 37
Location : Prince George, British Columbia, Canada
Job/hobbies : Piano teacher, pianist
Length of time playing piano : Started in 1992; 17 years of playing.
Guru Points : 12
Registration date : 2008-02-22

http://www.howtoplaypiano.ca

Back to top Go down

Piano Keys (Frequency) Empty Re: Piano Keys (Frequency)

Post by Filius Nullius Mon May 26, 2008 11:35 pm

If and when I create one you can have full access to it to do whatever you want... that being said the problem I'm running into is finding sound files for each of the keys, the severity of the problem depends on how many keys you want on the piano

I was thinking 61?


any ideas on where to find sound files?

Filius Nullius
Advanced Pianist
Advanced Pianist

Male Number of posts : 55
Age : 32
Location : North Carolina
Job/hobbies : Web design and Scripting
Length of time playing piano : Started on Join Date.
Guru Points : 0
Registration date : 2008-05-18

Back to top Go down

Piano Keys (Frequency) Empty Re: Piano Keys (Frequency)

Post by wamaral Sun Jul 13, 2008 5:37 am

Filius Nullius wrote:Heres what I came up with if you want to see it;
Code:

// http://en.wikipedia.org/wiki/Piano_key_frequencies
Keys note[88] = {{"A0",  27.5000},{"A#0", 29.1353},{"B0", 30.8677},{"C1",  32.7032},{"C#1", 34.6479},{"D1",  36.7081},
                {"D#1", 38.8909},{"E1",  41.2035},{"F1", 43.6536},{"F#1", 46.2493},{"G1",  48.9995},{"G#1", 51.9130},
                {"A1",  55.0000},{"A#1", 58.2705},{"B1", 61.7354},{"C2",  65.4064},{"C#2", 69.2957},{"D2",  73.4162},
                {"D#2", 77.7817},{"E2",  82.4069},{"F2", 87.3071},{"F#2", 92.4986},{"G2",  97.9989},{"G#2", 103.826},
                {"A2",  110.000},{"A#2", 116.541},{"B2", 123.471},{"C3",  130.813},{"C#3", 138.591},{"D3",  146.832},
                {"D#3", 146.832},{"E3",  164.814},{"F3", 174.614},{"F#3", 184.997},{"G3",  195.998},{"G#3", 207.652},
                {"A3",  220.000},{"A#3", 233.082},{"B3", 246.942},{"C4",  261.626},{"C#4", 277.183},{"D4",  293.665},
                {"D#4", 311.127},{"E4",  329.628},{"F4", 349.228},{"F#4", 369.994},{"G4",  391.995},{"G#4", 415.305},
                {"A4",  440.000},{"A#4", 466.164},{"B4", 492.883},{"C5",  523.251},{"C#5", 554.365},{"D5",  587.330},
                {"D#5", 622.254},{"E5",  659.255},{"F5", 698.456},{"F#5", 739.989},{"G5",  783.991},{"G#5", 830.609},
                {"A5",  880.000},{"A#5", 932.328},{"B5", 987.767},{"C6",  1046.50},{"C#6", 1108.73},{"D6",  1174.66},
                {"D#6", 1244.51},{"E6",  1318.51},{"F6", 1396.91},{"F#6", 1479.98},{"G6",  1567.98},{"G#6", 1661.22},
                {"A6",  1760.00},{"A#6", 1864.66},{"B6", 1975.53},{"C7",  2093.00},{"C#7", 2217.46},{"D7",  2349.32},
                {"D#7", 2489.02},{"E7",  2637.02},{"F7", 2793.83},{"F#7", 2959.96},{"G7",  3135.96},{"G#7", 3322.44},
                {"A7",  3520.00},{"A#7", 3729.31},{"B7", 3951.07},{"C8",  4186.01}};
 

Actually, you don't need a whole lookup table.
On an equal-tempered instrument, like the piano, the frequency interval between two consecutive notes (a semitone) is based on the 12th root of 2.
That means, once you have a base frequency (A4 or even A0), you can get the next semitone frequency by multiplying the frequency by the 12th root of 2. To get up a whole tone, multiply by the 12th root of 2 squared, and so on...

So yeah, a little less typing Wink
Oh, and here's to save you the calculations, the 12th root of 2 is approximately 1.0594630943593...

that being said the problem I'm running into is finding sound files for each of the keys, the severity of the problem depends on how many keys you want on the piano
...
any ideas on where to find sound files?

Well, you can try some software synthesizing, since an applet would not require a decent sound quality. It can be done in java, and if you hack enough, even in actionscript (flash), and if you're not in such a hurry, flash player 10 is currently in beta 2, should be released soon, and it will provide a better sound api.

Anyway, you can always sample your own instrument Wink

I'm a software developer myself, proficient mainly in actionscript, and also in php, perl, C, java, ruby, javascript, and some others that I can't remember now... So if you are still interested, drop a note and I can help you with that project

See ya!
wamaral
wamaral
Advanced Pianist
Advanced Pianist

Male Number of posts : 59
Age : 41
Location : São Paulo, Brazil
Length of time playing piano : Since March 2008
Guru Points : 0
Registration date : 2008-03-06

http://wamaral.org

Back to top Go down

Piano Keys (Frequency) Empty Re: Piano Keys (Frequency)

Post by Filius Nullius Sat Sep 06, 2008 12:03 am

wamaral wrote:
Filius Nullius wrote:Heres what I came up with if you want to see it;
Code:

// http://en.wikipedia.org/wiki/Piano_key_frequencies
Keys note[88] = {{"A0",  27.5000},{"A#0", 29.1353},{"B0", 30.8677},{"C1",  32.7032},{"C#1", 34.6479},{"D1",  36.7081},
                {"D#1", 38.8909},{"E1",  41.2035},{"F1", 43.6536},{"F#1", 46.2493},{"G1",  48.9995},{"G#1", 51.9130},
                {"A1",  55.0000},{"A#1", 58.2705},{"B1", 61.7354},{"C2",  65.4064},{"C#2", 69.2957},{"D2",  73.4162},
                {"D#2", 77.7817},{"E2",  82.4069},{"F2", 87.3071},{"F#2", 92.4986},{"G2",  97.9989},{"G#2", 103.826},
                {"A2",  110.000},{"A#2", 116.541},{"B2", 123.471},{"C3",  130.813},{"C#3", 138.591},{"D3",  146.832},
                {"D#3", 146.832},{"E3",  164.814},{"F3", 174.614},{"F#3", 184.997},{"G3",  195.998},{"G#3", 207.652},
                {"A3",  220.000},{"A#3", 233.082},{"B3", 246.942},{"C4",  261.626},{"C#4", 277.183},{"D4",  293.665},
                {"D#4", 311.127},{"E4",  329.628},{"F4", 349.228},{"F#4", 369.994},{"G4",  391.995},{"G#4", 415.305},
                {"A4",  440.000},{"A#4", 466.164},{"B4", 492.883},{"C5",  523.251},{"C#5", 554.365},{"D5",  587.330},
                {"D#5", 622.254},{"E5",  659.255},{"F5", 698.456},{"F#5", 739.989},{"G5",  783.991},{"G#5", 830.609},
                {"A5",  880.000},{"A#5", 932.328},{"B5", 987.767},{"C6",  1046.50},{"C#6", 1108.73},{"D6",  1174.66},
                {"D#6", 1244.51},{"E6",  1318.51},{"F6", 1396.91},{"F#6", 1479.98},{"G6",  1567.98},{"G#6", 1661.22},
                {"A6",  1760.00},{"A#6", 1864.66},{"B6", 1975.53},{"C7",  2093.00},{"C#7", 2217.46},{"D7",  2349.32},
                {"D#7", 2489.02},{"E7",  2637.02},{"F7", 2793.83},{"F#7", 2959.96},{"G7",  3135.96},{"G#7", 3322.44},
                {"A7",  3520.00},{"A#7", 3729.31},{"B7", 3951.07},{"C8",  4186.01}};
 

Actually, you don't need a whole lookup table.
On an equal-tempered instrument, like the piano, the frequency interval between two consecutive notes (a semitone) is based on the 12th root of 2.
That means, once you have a base frequency (A4 or even A0), you can get the next semitone frequency by multiplying the frequency by the 12th root of 2. To get up a whole tone, multiply by the 12th root of 2 squared, and so on...

So yeah, a little less typing Wink
Oh, and here's to save you the calculations, the 12th root of 2 is approximately 1.0594630943593...

that being said the problem I'm running into is finding sound files for each of the keys, the severity of the problem depends on how many keys you want on the piano
...
any ideas on where to find sound files?

Well, you can try some software synthesizing, since an applet would not require a decent sound quality. It can be done in java, and if you hack enough, even in actionscript (flash), and if you're not in such a hurry, flash player 10 is currently in beta 2, should be released soon, and it will provide a better sound api.

Anyway, you can always sample your own instrument Wink

I'm a software developer myself, proficient mainly in actionscript, and also in php, perl, C, java, ruby, javascript, and some others that I can't remember now... So if you are still interested, drop a note and I can help you with that project

See ya!


Thank you Sir! , I had recently re-dreamed of this project and someone else suggested something along the same lines as what you have said; I'm currently completing an introduction to java course and I might like to make this my final project if one is so required.

Filius Nullius
Advanced Pianist
Advanced Pianist

Male Number of posts : 55
Age : 32
Location : North Carolina
Job/hobbies : Web design and Scripting
Length of time playing piano : Started on Join Date.
Guru Points : 0
Registration date : 2008-05-18

Back to top Go down

Piano Keys (Frequency) Empty Re: Piano Keys (Frequency)

Post by Jordan Sun Sep 07, 2008 3:39 pm

Filius Nullius, great job on this! I used to program for fun way back in 2003-2004 in Visual Basic but I procrastinated and gave up on that hobby quite a while ago. You seem to know your stuff, great program! If you can code that virtual piano it would be great. Cheers.
Jordan
Jordan
Moderator
Moderator

Male Number of posts : 244
Age : 32
Location : Toronto, Canada
Job/hobbies : Music, piano
Length of time playing piano : I've been playing on and off since I was 8 years old
Guru Points : 0
Registration date : 2008-02-23

http://www.howtoplaypiano.ca

Back to top Go down

Piano Keys (Frequency) Empty Re: Piano Keys (Frequency)

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum