NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

STAR WARS İMPARATORLUK MÜZİĞİ
int ledPin = 10;
//led for visualization (use 10 for built-in led)

int speakerPin = 11;
//speaker connected to one of the PWM ports

#define c 261
#define d 294
#define e 329
#define f 349
#define g 391
#define gS 415
#define a 440
#define aS 455
#define b 466
#define cH 523
#define cSH 554
#define dH 587
#define dSH 622
#define eH 659
#define fH 698
#define fSH 740
#define gH 784
#define gSH 830
#define aH 880
//frequencies for the tones we're going to use
//used http://home.mit.bme.hu/~bako/tonecalc/tonecalc.htm to get these

void setup()
{
pinMode(ledPin, OUTPUT);
// sets the ledPin to be an output
pinMode(speakerPin, OUTPUT);
//sets the speakerPin to be an output
}

void loop() // run over and over again
{
march();
}

void beep (unsigned char speakerPin, int frequencyInHertz, long timeInMilliseconds)
{
digitalWrite(ledPin, HIGH);
//use led to visualize the notes being played

int x;
long delayAmount = (long)(1000000/frequencyInHertz);
long loopTime = (long)((timeInMilliseconds*1000)/(delayAmount*2));
for (x=0;x<loopTime;x++)
{
digitalWrite(speakerPin,HIGH);
delayMicroseconds(delayAmount);
digitalWrite(speakerPin,LOW);
delayMicroseconds(delayAmount);
}

digitalWrite(ledPin, LOW);
//set led back to low

delay(20);
//a little delay to make all notes sound separate
}

void march()
{
//for the sheet music see:
//http://www.musicnotes.com/sheetmusic/mtd.asp?ppn=MN0016254
//this is just a translation of said sheet music to frequencies / time in ms
//used 500 ms for a quart note

beep(speakerPin, a, 500);
beep(speakerPin, a, 500);
beep(speakerPin, a, 500);
beep(speakerPin, f, 350);
beep(speakerPin, cH, 150);

beep(speakerPin, a, 500);
beep(speakerPin, f, 350);
beep(speakerPin, cH, 150);
beep(speakerPin, a, 1000);
//first bit

beep(speakerPin, eH, 500);
beep(speakerPin, eH, 500);
beep(speakerPin, eH, 500);
beep(speakerPin, fH, 350);
beep(speakerPin, cH, 150);

beep(speakerPin, gS, 500);
beep(speakerPin, f, 350);
beep(speakerPin, cH, 150);
beep(speakerPin, a, 1000);
//second bit...

beep(speakerPin, aH, 500);
beep(speakerPin, a, 350);
beep(speakerPin, a, 150);
beep(speakerPin, aH, 500);
beep(speakerPin, gSH, 250);
beep(speakerPin, gH, 250);

beep(speakerPin, fSH, 125);
beep(speakerPin, fH, 125);
beep(speakerPin, fSH, 250);
delay(250);
beep(speakerPin, aS, 250);
beep(speakerPin, dSH, 500);
beep(speakerPin, dH, 250);
beep(speakerPin, cSH, 250);
//start of the interesting bit

beep(speakerPin, cH, 125);
beep(speakerPin, b, 125);
beep(speakerPin, cH, 250);
delay(250);
beep(speakerPin, f, 125);
beep(speakerPin, gS, 500);
beep(speakerPin, f, 375);
beep(speakerPin, a, 125);

beep(speakerPin, cH, 500);
beep(speakerPin, a, 375);
beep(speakerPin, cH, 125);
beep(speakerPin, eH, 1000);
//more interesting stuff (this doesn't quite get it right somehow)

beep(speakerPin, aH, 500);
beep(speakerPin, a, 350);
beep(speakerPin, a, 150);
beep(speakerPin, aH, 500);
beep(speakerPin, gSH, 250);
beep(speakerPin, gH, 250);

beep(speakerPin, fSH, 125);
beep(speakerPin, fH, 125);
beep(speakerPin, fSH, 250);
delay(250);
beep(speakerPin, aS, 250);
beep(speakerPin, dSH, 500);
beep(speakerPin, dH, 250);
beep(speakerPin, cSH, 250);
//repeat... repeat

beep(speakerPin, cH, 125);
beep(speakerPin, b, 125);
beep(speakerPin, cH, 250);
delay(250);
beep(speakerPin, f, 250);
beep(speakerPin, gS, 500);
beep(speakerPin, f, 375);
beep(speakerPin, cH, 125);

beep(speakerPin, a, 500);
beep(speakerPin, f, 375);
beep(speakerPin, c, 125);
beep(speakerPin, a, 1000);
//and we're done ó/
}
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.