frequency Main Theme

Any discussion related to the Star Wars trilogies or their various spawn. Keep all Battlefront-series-related discussion out.

Moderator: Moderators

Master of the Force
User avatar
Posts: 4530
Joined: Sat Sep 19, 2009 11:37 am
Location: Mos Espa (germany)
Projects :: Republic Commando Side Mod

frequency Main Theme

Postby Anakin » Sat Dec 20, 2014 5:47 am

Hi,

is there someone how knows the frequency of the Star Wars main theme??
I'm working on a small c++ programm and wanted to add a little easteregg. But i can only play beeps with different frequences.

I hope you can helpe me :D

==EDIT==

i played a little bit around with the beep frequences, but there is still a small misstake in there. If you want listen in and maybe you can tell me where the misstake is

Hidden/Spoiler:
Code: Select all
void throne_room()
{

   double K((1000/230)*2);
   double Db4(277.183);
   double F4(349.228);
   double Ab4(415.305);
   double B4(493.883);
   double C5(523.251);
   double Db5(554.365);
   double Gb4(369.994);
   double A4(440);

   Beep(Db4,85*K);
   Beep(Db4,15*K);
   Beep(Db4,15*K);
   Beep(Db4,85*K);
   Beep(Db4,15*K);
   Beep(Db4,15*K);

   Beep(Db4,60*K);
   Beep(Db4,60*K);
   Beep(Db4,30*K);
   Beep(Db4,30*K);
   Beep(Db4,20*K);
   Beep(Db4,20*K);
   Beep(Db4,20*K);

   Beep(F4,85*K);
   Beep(F4,15*K);
   Beep(F4,15*K);
   Beep(F4,85*K);
   Beep(F4,15*K);
   Beep(F4,15*K);

   Beep(F4,60*K);
   Beep(F4,60*K);
   Beep(F4,30*K);
   Beep(F4,30*K);
   Beep(F4,20*K);
   Beep(F4,20*K);
   Beep(F4,20*K);

   Beep(Ab4,85*K);
   Beep(Ab4,15*K);
   Beep(Ab4,15*K);
   Beep(Ab4,85*K);
   Beep(Ab4,15*K);
   Beep(Ab4,15*K);

   Beep(Ab4,60*K);
   Beep(Ab4,60*K);
   Beep(Ab4,30*K);
   Beep(Ab4,30*K);
   Beep(Ab4,20*K);
   Beep(Ab4,20*K);
   Beep(Ab4,20*K);

   Beep(B4,170*K);
   Beep(B4,20*K);
   Beep(B4,20*K);
   Beep(B4,20*K);

   Beep(C5,170*K);
   Beep(C5,20*K);
   Beep(C5,20*K);
   Beep(C5,20*K);

   Beep(Db5, 60*K);
   Beep(Db5, 20*K);
   Beep(Db5, 20*K);
   Beep(Db5, 20*K);
   Beep(Db5, 30*K);
   Sleep(25*(1000/230));
   Beep(Db4, 40*K);
   Beep(Db4, 15*K);

   Beep(Gb4, 115*K);
   Beep(Ab4, 80*K);
   Beep(A4, 20*K);
   Beep(B4, 20*K);

   Beep(A4, 115*K);
   Beep(Db4, 60*K);
   Sleep(30*(1000/230));
   Beep(Db4, 30*K);

   Beep(Gb4, 85*K);
   Beep(Ab4, 30*K);
   Beep(A4, 30*K);
   Beep(Db4, 30*K);
   Beep(A4, 20*K);
   Beep(Gb4, 20*K);
   Beep(Db5, 20*K);

   Beep(B4, 170*K);
   Beep(Db4, 40*K);
   Beep(Db4, 15*K);

   Beep(Gb4, 100*K);
   Beep(Ab4, 15*K);
   Beep(A4, 40*K);
   Beep(Gb4, 15*K);
   Beep(Db5, 40*K);
   Beep(A4, 15*K);

   Beep(Db5, 115);
   Beep(Db4, 60*K);
   Beep(A4, 20*K);
   Beep(Ab4, 20*K);
   Beep(Db4, 20*K);

   Beep(Db5, 75*K);
   Beep(A4, 20*K);
   Beep(Db4, 20*K);
   Beep(Db4, 55*K);
   Beep(Db4, 40*K);
   Beep(Db4, 15*K);

   Beep(Gb4, 115*K);
   Sleep(60*(1000/230));
   Beep(Db4, 40*K);
   Beep(Db4, 20*K);

   Beep(Gb4, 115*K);
   Beep(Ab4, 75*K);
   Beep(A4, 20*K);
   Beep(B4, 20*K);

   Beep(A4, 115*K);
   Beep(Db4, 60*K);
   Sleep(30*(1000/230));
   Beep(Db4, 30*K);

   Beep(Gb4, 85*K);
   Beep(Ab4, 30*K);
   Beep(A4, 30*K);
   Beep(Db4, 30*K);
   Beep(A4, 20*K);
   Beep(Gb4, 20*K);
   Beep(Db5, 20*K);

   Beep(B4, 170*K);
   Beep(Db4, 40*K);
   Beep(Db4, 15*K);

   Beep(Gb4, 100*K);
   Beep(Ab4, 15*K);
   Beep(A4, 40*K);
   Beep(Gb4, 15*K);
   Beep(Db5, 40*K);
   Beep(A4, 15*K);

   Beep(Db5, 115);
   Beep(Db4, 60*K);
   Beep(A4, 20*K);
   Beep(Ab4, 20*K);
   Beep(Db4, 20*K);

   Beep(Db5, 75*K);
   Beep(A4, 20*K);
   Beep(Db4, 20*K);
   Beep(Db4, 55*K);
   Beep(Db4, 40*K);
   Beep(Db4, 15*K);

   Beep(Gb4, 115*K);
   Sleep(60*(1000/230));
   Beep(Db4, 40*K);
   Beep(Db4, 20*K);




}

Rebel Colonel
User avatar
Posts: 567
Joined: Sun Mar 13, 2011 3:11 pm
Location: The rings of Saturn...
Projects :: [Coming of the Sentinels]
Games I'm Playing :: SWBF2 Minecraft Halo
xbox live or psn: PC pwns all!

Re: frequency Main Theme

Postby willinator » Sun Dec 21, 2014 12:20 pm

The way to do this is with the known frequencies of musical notes, found here. Then, you look at sheet music of a given song (like this sheet music for the star wars main theme), and plot the frequencies with durations corresponding to the length of each note.

Master of the Force
User avatar
Posts: 4530
Joined: Sat Sep 19, 2009 11:37 am
Location: Mos Espa (germany)
Projects :: Republic Commando Side Mod

Re: frequency Main Theme

Postby Anakin » Sun Dec 21, 2014 1:16 pm

i'm not good in music, so i can't realy do something with the note sheet :D But i found an youtube video where you can see what key on the piano is pressed how long. so i got this working now :D

Return to Star Wars General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest