Stap 5: RTTL tonen (liedjes)
Enkel google met behulp van de letters RTTL (ex. starwars RTTL) Dit zijn dezelfde gevonden in de code.
Een leuke sketch om aan te tonen het gebruik van de Tone library.
Te mengen de output van de signalen waar de output heengaat een kleine luidspreker (d.w.z. 8 ohm of hoger),
gewoon gebruik van 1K Ohm weerstanden van elke uitgang Pins en binden ze samen op de spreker.
Vergeet niet de andere kant van de luidspreker verbinden met grond!
Kunt u meer RTTTL (RingTone Transfer taal van de tekst) liedjes uit
http://www.Google.com
#include < Tone.h >
Toon tone1;
#define OCTAVE_OFFSET 0
int merkt [] = {0,
NOTE_C4, NOTE_CS4, NOTE_D4, NOTE_DS4, NOTE_E4, NOTE_F4, NOTE_FS4, NOTE_G4, NOTE_GS4, NOTE_A4, NOTE_AS4, NOTE_B4,
NOTE_C5, NOTE_CS5, NOTE_D5, NOTE_DS5, NOTE_E5, NOTE_F5, NOTE_FS5, NOTE_G5, NOTE_GS5, NOTE_A5, NOTE_AS5, NOTE_B5,
NOTE_C6, NOTE_CS6, NOTE_D6, NOTE_DS6, NOTE_E6, NOTE_F6, NOTE_FS6, NOTE_G6, NOTE_GS6, NOTE_A6, NOTE_AS6, NOTE_B6,
NOTE_C7, NOTE_CS7, NOTE_D7, NOTE_DS7, NOTE_E7, NOTE_F7, NOTE_FS7, NOTE_G7, NOTE_GS7, NOTE_A7, NOTE_AS7, NOTE_B7
};
char * nummer = "The Simpsons:d=4,o=5,b=160:c.6,e6,f#6,8a6,g.6,e6,c6,8a,8f#,8f#,8f#,2g,8p,8p,8f#,8f#,8f#,8g,a#.,8c6,8c6,8c6,c6";
char * nummer = "Indiana: d = 4, o = 5, b = 250:e 8 p, 8f, 8 g, 8 p, 1 c, 6, 8 p., d, 8 p, 8e, 1f, p., g, 8 p, 8a, 8b, 8 p, 1f6, p, a, 8 p, 8b, 2 c 6, 2 d 6, 2e6, e, 8 p, 8f, 8 g, 8 p, 1 c 6, p, d6, 8 p, 8e6, 1f.6, g, 8 p, 8 g, e.6, 8 p, d6, 8 p, 8 g, e.6, 8 p, d6, 8 p, 8 g, f.6, 8 p, e6 , 8p, 8d 6, 2c 6";
char *song = "TakeOnMe:d=4,o=4,b=160:8f#5,8f#5,8f#5,8d5,8p,8b,8p,8e5,8p,8e5,8p,8e5,8g#5,8g#5,8a5,8b5,8a5,8a5,8a5,8e5,8p,8d5,8p,8f#5,8p,8f#5,8p,8f#5,8e5,8e5,8f#5,8e5,8f#5,8f#5,8f#5,8d5,8p,8b,8p,8e5,8p,8e5,8p,8e5,8g#5,8g#5,8a5,8b5,8a5,8a5,8a5,8e5,8p , 8d 5, 8p, 8f #5, 8p, 8f #5, 8p, 8f #5, 8e5, 8e5 ";
char * nummer = "Entertainer:d=4,o=5,b=140:8d,8d#,8e,c6,8e,c6,8e,2c.6,8c6,8d6,8d#6,8e6,8c6,8d6,e6,8b,d6,2c6,p,8d,8d#,8e,c6,8e,c6,8e,2c.6,8p,8a,8g,8f#,8a,8c6,e6,8d6,8c6,8a,2d6";
char * nummer = "Muppets:d = 4, o = 5, b = 250:c6, c6, a, b, 8a, b, g, p, c6, c6, a, 8b, 8a, 8 p, g., p, e, e, g, f, 8e, f, 8 c, 6, 8 c, 8 d, e, 8e, 8e, 8 p, 8e, g, 2 p, c6, c6, a, b, 8a, b, g, p, c6, c6, a, 8b, a, g., p e, e, g, f, 8e f, 8 c, 6, 8 c, 8 d, e, 8e, d, 8 d, c ";
char * nummer = "Xfiles:d = 4, o = 5, b = 125:e, b, a, b, d6, 2b., 1 p, e, b, a, b, e6, 2b., 1 p, g6, f #6, e6, d6, e6, 2b., 1 p, g6, f #6, e6, d6, f #6, 2b., 1 p, e, b, a, b, d6, 2b., 1 p, e, b, a, b, e6, 2b, 1 p, e6, 2b.";
char * nummer = "Looney: d = 4, o = 5, b = 140:32 p, c6, 8f6, 8e6, 8 d 6, 8 c, 6, a., 8 c, 6, 8f6, 8e6, 8 d 6, 8 d #6,e.6,8e6,8e6,8c6,8d6,8c6,8e6,8c6,8d6,8a,8c6,8g,8a #, 8a, 8f";
char * nummer = "20thCenFox:d = 16, o = 5, b = 140:b, 8 p, b, b, 2b, p, c6, 32 p, b, 32 p, c6, 32 p, b, 32 p, c6, 32 p, b, 8 p, b, b, b, 32 p, b, 32 p, b, 32 p, b, 32 p, b, 32 p, b, 32 p, b, 32 p, g #, 32 p, a, 32 p, b, 8 p, b, b, 2b, 4 p, 8e, 8 g #, 8b, 1 c# 6, 8f #, 8a, 8 c# 6, 1e6 8a, 8 c# 6, 8e6, 1e6, 8b, 8 g #, 8a, 2b ";
char *song = "Bond:d=4,o=5,b=80:32p,16c#6,32d#6,32d#6,16d#6,8d#6,16c#6,16c#6,16c#6,16c#6,32e6,32e6,16e6,8e6,16d#6,16d#6,16d#6,16c#6,32d#6,32d#6,16d#6,8d#6,16c#6,16c#6,16c#6,16c#6,32e6,32e6,16e6,8e6,16d#6,16d6,16c#6,16c#7,c.7,16g#6,16f#6,g#.6";
char * nummer = "MASH:d = 8, o = 5, b = 140:4a, 4 g, f #, g, p, f #, p, g, p, f #, p, 2e., p, f #, e, 4f #, e, f #, p, e, p, 4 d., p f #, 4e, d, e, p, o, p, e, p, o, p, 2 c#., p, d, c#, 4 d, c#, d, p, e, p, 4f #, p, a, p, 4b, a, b, p, een p b, p, 2a., 4 p, a, b, a, 4b, a, b, p, 2a., a, 4f #, a,b,p,d6,p,4e.6,d6,b,p,a,p, 2b ";
char *song = "StarWars:d=4,o=5,b=45:32p,32f#,32f#,32f#,8b.,8f#.6,32e6,32d#6,32c#6,8b.6,16f#.6,32e6,32d#6,32c#6,8b.6,16f#.6,32e6,32d#6,32e6,8c#.6,32f#,32f#,32f#,8b.,8f#.6,32e6,32d#6,32c#6,8b.6,16f#.6,32e6,32d#6,32c#6,8b.6,16f#.6,32e6,32d#6,32e6,8c#6";
char * nummer = "GoodBad:d = 4, o = 5, b = 56:32 p, 32a #, 32ste #6, 32a #, 32ste #6, 8a #., 16 septies #., 16 g #., d #, 32a #, 32ste #6, 32a #, 32ste #6, 8a #., 16 septies #., 16 g #., c# 6, 32a #, 32ste #6, 32a #, 32ste #6, 8a #., 16 septies #., 32f., 32ste #, c#, 32a #, 32ste #6, 32a #, 32ste #6, 8a #., 16 g #., d #";
char * nummer = "TopGun:d = 4, o = 4, b = 31:32 p 16 c#, 16 g #, g # 16, 32f #, 32f, 32f #, 32f, 16 d #, 16 d #, 32 c#, 32ste #, 16 septies, 32ste #, 32f, 16 septies #, 32f, 32 c#, 16 septies, d #, 16 c#, 16 g #, g # 16, 32f #, 32f, 32f #, 32f, 16 d #, 16 d #, 32 c#, 32ste # 16 septies, 32ste #, 32f, 16 septies #, 32f, 32 c#, g #";
char * nummer = "A-Team: d = 8, o = 5, b = 125:4 d #6, een #, 2d #6, 16 p g #, 4a #, 4 d #., p, 16 g, 16a #, d #6, een #, f6, 2d #6, 16 p c#.6, 16 c 6, 16a #, g #., 2a #";
char *song = "Flinstones:d=4,o=5,b=40:32p,16f6,16a#,16a#6,32g6,16f6,16a#.,16f6,32d#6,32d6,32d6,32d#6,32f6,16a#,16c6,d6,16f6,16a#.,16a#6,32g6,16f6,16a#.,32f6,32f6,32d#6,32d6,32d6,32d#6,32f6,16a#,16c6,a#,16a6,16d.6,16a#6,32a6,32a6,32g6,32f#6,32a6,8g6,16g6,16c.6,32a6,32a6,32g6,32g6,32f6,32e6,32g6,8f6,16f6,16a#. , 16a #6, 32g 6, 16f6, 16a #., 16f6, 32ste #6, 32d 6, 32d 6, 32ste #6, 32f6, 16a #, 16c.6,32d6, 32ste #6, 32f6, 16a #, 16c.6,32d6, 32ste #6, 32f6, 16a #6, 16c 7, 8a #.6";
char * nummer = "gevaar: d = 4, o = 6, b = 125:c, f, c, f5, c, f, 2 c, c, f, c, f, a., 8 g, 8f, 8e, 8 d, 8 c#, c, f, c, f5, c, f, 2 c, f., 8 d, c, een #5, a5, g5, f5, p, d #, g #, d #, g #5, d #, g #, 2d #, d #, g #, d #, g #, c.7, 8a #, g # 8, 8 g, 8f, 8e, d # , g # d #, g #5, d #, g #, 2d #, g #., 8f, d #, c#, c, p, een #5, p, g #.5, d #, g #";"
char * nummer = "Gadget: d = 16, o = 5, b = 50:32d # 32f, 32f #, 32 g #, #, f #, a, f, g #, f #, 32ste #, 32f, 32f #, 32 g #, #, d #6, 4 d 6, 32ste # 32f, 32f #, 32 g #, #, f #, a, f, g #, f #, 8 d #";
char * nummer = "Smurfs:d = 32, o = 5, b = 200:4 c# 6, 16 p, 4f #6, p, 16 c# 6, p, 8 d #6, p, 8b, p, 4 g #, 16 p, 4 c# 6, p, 16a #, p, 8f #, p, 8a #, p, 4 g #, 4 p, g #, p, een #, p, b, p, c6, p, 4 c# 6, 16 p, 4f #6, p, 16 c# 6 p, 8 d #6, p, 8b, p, 4 g #, 16 p, 4 c# 6, p, 16a # , p, 8b, p, 8f, p, 4f #";"
char * nummer = "MahnaMahna:d = 16, o = 6, b = 125:c#, c., b5, 8a #.5, 8f. 4 g #, #, g., 4 d #, 8 p, c#, c, b5, 8a #.5, 8f., g #., 8a #., 4 g, 8 p, c#, c, b5, 8a #.5, 8f. 4 g #, f, g., 8 d #., f, g., 8 d #., f, 8 g, 8 d #., f 8 g, d #, 8 c, een #5, 8 d #., 8 d #., 4 d #, 8 d #.";
char * nummer = "LeisureSuit:d=16,o=6,b=56:f.5,f#.5,g.5,g#5,32a#5,f5,g#.5,a#.5,32f5,g#5,32a#5,g#5,8c#.,a#5,32c#,a5,a#.5,c#.,32a5,a#5,32c#,d#,8e,c#.,f.,f.,f.,f.,f,32e,d#,8d,a#.5,e,32f,e,32f,c#,d#.,c#";
char *song = "smb:d=4,o=5,b=100:16e6,16e6,32p,8e6,16c6,8e6,8g6,8p,8g,8p,8c6,16p,8g,16p,8e,16p,8a,8b,16a#,8a,16g.,16e6,16g6,8a6,16f6,8g6,8e6,16c6,16d6,8b,16p,8c6,16p,8g,16p,8e,16p,8a,8b,16a#,8a,16g.,16e6,16g6,8a6,16f6,8g6,8e6,16c6,16d6,8b,8p,16g6 ,16f#6,16f6,16d#6,16p,16e6,16p,16g#,16a,16c6,16p,16a,16c6,16d6,8p,16g6,16f#6,16f6,16d#6,16p,16e6,16p,16c7,16p,16c7,16c7,p,16g6,16f#6,16f6,16d#6,16p,16e6,16p,16g#,16a,16c6,16p,16a,16c6,16d6,8p,16d#6,8p,16d6,8p,16c6";
char *song = "smb_under:d=4,o=6,b=100:32c,32p,32c7,32p,32a5,32p,32a,32p,32a#5,32p,32a#,2p,32c,32p,32c7,32p,32a5,32p,32a,32p,32a#5,32p,32a#,2p,32f5,32p,32f,32p,32d5,32p,32d,32p,32d#5,32p,32d#,2p,32f5,32p,32f,32p,32d5,32p,32d,32p,32d#5,32p,32d#";
char * nummer = "smbdeath:d=4,o=5,b=90:32c6,32c6,32c6,8p,16b,16f6,16p,16f6,16f.6,16e.6,16d6,16c6,16p,16e,16p,16c";
char * nummer = "ducktales:d = 4, o = 5, b = 112:8e6, 8e6, 16 p, 16 g 6, 8b6, g #6, p, 8e6, 8 d 6, 8 c, 6, 8 d 6, 8e6, 8 d 6, 8 c, 6, 8 d 6, 8e6, 8e6, 16 p, 16 g 6, 8b6, g #6, p, 8e6, 8 d 6, 8 c, 6, 8 d 6, 8e6, 8 d 6, 8 c, 6, 8 g 6, 8e6, 8e6";
char *song = "Zelda1:d=4,o=5,b=125:a#,f.,8a#,16a#,16c6,16d6,16d#6,2f6,8p,8f6,16f.6,16f#6,16g#.6,2a#.6,16a#.6,16g#6,16f#.6,8g#.6,16f#.6,2f6,f6,8d#6,16d#6,16f6,2f#6,8f6,8d#6,8c#6,16c#6,16d#6,2f6,8d#6,8c#6,8c6,16c6,16d6,2e6,g6,8f6,16f,16f,8f,16f,16f,8f,16f,16f,8f,8f,a#,f.,8a# 16a#,16c6,16d6,16d#6,2f6,8p,8f6,16f.6,16f#6,16g#.6,2a#.6,c#7,c7,2a6,f6,2f#.6,a#6,a6,2f6,f6,2f#.6,a#6,a6,2f6,d6,2d#.6,f#6,f6,2c#6,a#,c6,16d6,2e6,g6,8f6,16f,16f,8f,16f,16f,8f,16f,16f,8f,8f ";
char *song = "smario2:d=4,o=5,b=125:8g,16c,8e,8g.,16c,8e,16g,16c,16e,16g,8b,a,8p,16c,8g,16c,8e,8g.,16c,8e,16g,16c#,16e,16g,8b,a,8p,16b,8c6,16b,8c6,8a.,16c6,8b,16a,8g,16f#,8g,8e.,16c,8d,16e,8f,16e,8f,8b.4,16e,8d.,c";
char *song = "smb3lvl1:d=4,o=5,b=80:16g,32c,16g.,16a,32c,16a.,16b,32c,16b,16a.,32g#,16a.,16g,32c,16g.,16a,32c,16a,4b.,32p,16c6,32f,16c.6,16d6,32f,16d.6,16e6,32f,16e6,16d.6,32c#6,16d.6,16c6,32f,16c.6,16d6,32f,16d6,4e.6,32p,16g,32c,16g.,16a,32c,16a.,16b,32c,16b,16a.,32g#,16a.,16c6 , 8c.6,32p,16c6,4c.6 ";
char * nummer = "shinobi:d = 4, o = 5, b = 140:b f #6, d6, b, g, f #, e, 2f #., a, 1f # p, b, f #6, d6, b, g, f #, e, 1f #., 8a, 1b., 8a, 1f #., 8a, 1b., 8a, 1f #.";
char * nummer = "outrun_magic:d = 4, o = 5, b = 160:f6 d #6, 8 g #.6, f6, d #6, 8 c#.6, d #6, c6, 2 g #., c# 6, c6, 8 d #.6, c# 6, c6, 8f., een #, 16c.6, 1a #, f6, d #6, 8 g #.6, f6, d #6, 8 c#.6, d #6, c6, 2 g #., c# 6, c6, 8 d #.6, c# 6, c6, 16 septies., 16 g #., c6, 2a #.";
char *song = "Popeye:d=4,o=5,b=140:16g.,16f.,16g.,16p,32p,16c.,16p,32p,16c.,16p,32p,16e.,16d.,16c.,16d.,16e.,16f.,g,8p,16a,16f,16a,16c6,16b,16a,16g,16a,16g,8e,16g,16g,16g,16g,8a,16b,32c6,32b,32c6,32b,32c6,32b,8c6";
char * nummer = "Wonderboy:d = 4, o = 5, b = 225:f6, d6, f6, 8 d 6, f6, 32 p, 8f6, d6, f6, d6, e6, c6, e6, 8 c, 6, e6, 32 p, 8e6, c6, e6, c6";
char *song = "smwwd1:d=4,o=5,b=125:a,8f.,16c,16d,16f,16p,f,16d,16c,16p,16f,16p,16f,16p,8c6,8a.,g,16c,a,8f.,16c,16d,16f,16p,f,16d,16c,16p,16f,16p,16a#,16a,16g,2f,16p,8a.,8f.,8c,8a.,f,16g#,16f,16c,16p,8g#.,2g,8a.,8f.,8c,8a.,f,16g# , 16 septies, 8c, 2c 6";
char * nummer = "dkong:d = 4, o = 5, b = 160:2 c, 8 d., d #., c., 16b, 16 c 6, 16b, 16 c 6, 16b, 16 c 6, 16b, 16 c 6, 16b, 16 c 6, 16b, 16 c 6, 16b, 2 c 6";
char * nummer = "dkong:d = 4, o = 5, b = 160:2 c, 8 d., d #., c., 16b, 16 c 6, 16b, 16 c 6, 16b, 16 c 6, 16b, 16 c 6, 16b, 16 c 6, 16b, 16 c 6, 16b, 2 c 6";
Geniet van! ;)