Piano Keys (Frequency)
5 posters
Andrew Furmanczyk Piano Academy :: Learn How To Play Piano :: Piano Related Discussions :: General Piano Discussion
Page 1 of 1
Piano Keys (Frequency)
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*/
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
- Number of posts : 55
Age : 33
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
Re: Piano Keys (Frequency)
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
Write a program? Youre a programmer?? =)
Write a program? Youre a programmer?? =)
Re: Piano Keys (Frequency)
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
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
- Number of posts : 55
Age : 33
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
Re: Piano Keys (Frequency)
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
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! =)
Re: Piano Keys (Frequency)
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
- Number of posts : 55
Age : 33
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
Re: Piano Keys (Frequency)
Hehe Okay, I really dont understand anything
I know a little html, thats all hehe
I know a little html, thats all hehe
Re: Piano Keys (Frequency)
...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
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
Re: Piano Keys (Frequency)
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
Hehe, but I like it. It is neutral and forumlike!
I think the colors match. It isnt the most colorfull forum, but, hey, thats why Im here
Hehe, but I like it. It is neutral and forumlike!
Re: Piano Keys (Frequency)
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.
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
- Number of posts : 55
Age : 33
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
Re: Piano Keys (Frequency)
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
Its like c++. I knew how to create sounds way back at one point
Re: Piano Keys (Frequency)
It is C++, I did forget to mention that you can only input capital letters it contains a lot of bugs... tell me if you find anything that sounds cool
Filius Nullius- Advanced Pianist
- Number of posts : 55
Age : 33
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
Re: Piano Keys (Frequency)
Filius Nullius wrote:It is C++, I did forget to mention that you can only input capital letters it contains a lot of bugs... tell me if you find anything that sounds cool
I thought it was! Havnt playd around with that for ages But, it was my buddy that could make programs with it. I just taged along
Re: Piano Keys (Frequency)
theoretically you can play any song... so I tried the thing I had closest to the computer
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
- 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
- Number of posts : 55
Age : 33
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
Re: Piano Keys (Frequency)
You can hear it is fur elise, even though the darker tones where strange!"
Re: Piano Keys (Frequency)
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
- Number of posts : 55
Age : 33
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
Re: Piano Keys (Frequency)
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?
Re: Piano Keys (Frequency)
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?
I was thinking 61?
any ideas on where to find sound files?
Filius Nullius- Advanced Pianist
- Number of posts : 55
Age : 33
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
Re: Piano Keys (Frequency)
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
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
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!
Re: Piano Keys (Frequency)
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
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
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
- Number of posts : 55
Age : 33
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
Re: Piano Keys (Frequency)
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.
Similar topics
» How much keys is enough?
» Franks Performances - Inkl;Schneeflöckchen Weißröckchen etc
» Can't find any piano teachers here: What should I practice on a piano?
» Digital Piano -> what PC program ?-> better piano voice
» it it useful to get 61 keys
» Franks Performances - Inkl;Schneeflöckchen Weißröckchen etc
» Can't find any piano teachers here: What should I practice on a piano?
» Digital Piano -> what PC program ?-> better piano voice
» it it useful to get 61 keys
Andrew Furmanczyk Piano Academy :: Learn How To Play Piano :: Piano Related Discussions :: General Piano Discussion
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
Sat Oct 26, 2013 3:15 am by RNewcome
» What's Happened...?
Sun Mar 24, 2013 10:57 pm by Rayman
» Thomas's Performances - NEW Liszt Moments Musicaux D.01 - Page 39
Thu Jun 21, 2012 4:16 pm by Thomandy
» latin rhythms on piano
Wed Jun 06, 2012 7:49 am by jazzylady
» What is the deal with time signatures with a bottom number of 16?
Wed May 23, 2012 8:13 am by Matthieu Stepec
» Piano Dog's Lick of The Week
Sun May 20, 2012 2:17 pm by kentaku_sama
» How to span notes
Wed May 09, 2012 9:55 pm by Matthieu Stepec
» Great sight reading exercises
Tue May 08, 2012 6:11 am by Matthieu Stepec
» Hey guys! How's it going?
Sun Jan 29, 2012 10:43 am by surehit123