// constants won't change const int RELAY_PIN = 13; // the Arduino pin, which connects to the IN pin of relay int pinBuzzer = 12; int C__ = 261/4; int Cs__= 277/4; int D__ = 293/4 ; int Ds__= 311/4; int E__ = 329/4 ; int F__ = 349/4 ; int Fs__= 369/4; int G__ = 391/4 ; int Gs__= 415/4; int A__ = 440/4 ; int As__= 466/4; int B__ = 493/4 ; int C_ = 261/2; int Cs_= 277/2; int D_ = 293/2 ; int Ds_= 311/2; int E_ = 329/2 ; int F_ = 349/2 ; int Fs_= 369/2; int G_ = 391/2 ; int Gs_= 415/2; int A_ = 440/2 ; int As_= 466/2; int B_ = 493/2 ; int Sil = 5; int C = 261; int Cs= 277; int D = 293 ; int Ds= 311; int E = 329 ; int F = 349 ; int Fs= 369; int G = 391 ; int Gs= 415; int A = 440 ; int As= 466; int B = 493 ; int C2 =524; int Cs2 =555; int D2 =588; int Ds2 =623; int E2 =660; int F2 =699; int Fs2 =740; int G2 =784; int Gs2 =831; int A_2 = 880; int As2 =933; int B2 =988; int C3 =1047; int Cs3 =555*2; int D3 =588*2; int Ds3 =623*2; int E3 =660*2; int F3 =699*2; int Fs3 =740*2; int G3 =784*2; int Gs3 =831*2; int A_3 = 880*2; int As3 =933*2; int B3 =988*2; int C4 =1047*2; int Cs4 =555*4; int D4 =588*4; int Ds4 =623*4; int E4 =660*4; int F4 =699*4; int Fs4 =740*4; int G4 =784*4; int Gs4 =831*4; int A_4 = 880*4; int As4 =933*4; int B4 =988*4; int semi = 84/2; int fusa = semi/2; // int semi = 60; int corch = 2*semi; int sem3 = corch/3; int negra = corch*2; //int np = corch*3; int blanca = negra*2; int redonda = blanca*2; int rep = 3*negra; int bnp = 3*negra+3*corch; int retardo = 100; int r = redonda; int b = blanca; int n = negra; int c = corch; int s = semi; int f = fusa; int bp = blanca+n; int np = negra+c; int cp = corch+s; void nota(int nota, int duracion){ tone(pinBuzzer,nota, duracion); delay(duracion); noTone(pinBuzzer); delay(duracion); } void setup() { // initialize digital pin as an output. pinMode(RELAY_PIN, OUTPUT); delay(500); } void loop() { nota(D ,n); Intro(); TontoElQueNoEntienda(); QueUnaHembraGitana(); TendrasATuhombre(); PeroACambioQuiero(); LunaQuiereSerMadre(); Ahahahah(); Intro(); nota(D3,r); delay(1000); } //C D F G void Intro(){ // [1] nota(A_3,n); nota(G3 ,n); // [2] nota(D ,n); nota(E3,n); nota(D3 ,n); // [3] nota(D ,n); nota(F3,n); nota(G3 ,n); // [4] nota(D ,n); nota(E3,n); nota(D3 ,n); // __________________-- // [5] nota(D ,n); nota(A_3,n); nota(G3 ,n); // [6] nota(A_ ,n); nota(E3,n); nota(D3 ,n); // [7] nota(As_ ,n); nota(F3,n); nota(G3 ,n); // [8] nota(A_ ,n); nota(E3,n); nota(D3 ,n); // __________________-- } void TontoElQueNoEntienda(){ // [9] nota(D_,n); nota(D2,c); nota(E2,c); nota(F2,c); nota(A_2,c); // [10] nota(E2,b); nota(D2,n); // [11] nota(D_,n); nota(A ,n); nota(As,n); // [12] nota(Cs_,n); nota(A ,n); nota(G,n); // [13] nota(D_,n); nota(D2,c); nota(E2,c); nota(F2,c); nota(A_2,c); // [14] nota(E2,b); nota(D2,n); // [15] nota(D_,n); nota(A ,n); nota(As,n); // [16] nota(Cs_,n); nota(A ,n); nota(G,n); } void QueUnaHembraGitana(){ // [17] nota(F_,n); nota(F2,c); nota(G2,c); nota(A_2,c); nota(D3,c); // [18] nota(A_2,n); nota(G2,b); // [19] nota(D_,n); nota(D2,c); nota(E2,c); nota(F2,c); nota(A_2,c); // [20] nota(E2,b); nota(D2,n); // [21] nota(As,b); nota(D2,n); // [22] nota(F2,n); nota(E2,n); nota(C2,n); // [23] nota(D2,n); nota(A_3,n); nota(G3,n); // [24] nota(D,n); nota(E3,n); nota(D3,n); // [25] nota(D_,n); nota(F2,c); nota(G2,c); nota(A_2,c); nota(D3,c); // [26] nota(A_2,n); nota(G2,b); // [27] nota(D_,n); nota(D2,c); nota(E2,c); nota(F2,c); nota(A_2,c); // [28] nota(E2,b); nota(D2,n); // [29] nota(As,b); nota(D2,n); // [30] nota(F2,n); nota(E2,n); nota(C2,n); // [31] nota(D2,n); nota(A_3,n); nota(G3,n); // [32] nota(D,n); nota(E3,n); nota(D3,n); // [33] nota(D_,n); nota(F3,n); nota(G3,n); // [34] nota(D,n); nota(E3,n); nota(D3,n); // [35] nota(D_,n); nota(A_3,n); nota(G3,n); // [36] nota(A__,n); nota(E3,n); nota(D3,n); // [37] nota(As__,n); nota(F3,n); nota(G3,n); // [38] nota(A__,n); nota(E3,n); nota(D3,n); } void TendrasATuhombre(){ // [39] nota(D_,n); nota(D2,c); nota(E2,c); nota(F2,c); nota(A_2,c); // [40] nota(E2,b); nota(D2,n); // [41] nota(D_,n); nota(D2 ,n); nota(E2,n); // [42] nota(Cs_,n); nota(F2 ,n); nota(G2,n); // [43] nota(D_,n); nota(D2,c); nota(E2,c); nota(F2,c); nota(A_2,c); // [44] nota(E2,b); nota(D2,n); // [45] nota(D_,n); nota(D2 ,n); nota(E2,n); // [46] nota(Cs_,n); nota(F2 ,n); nota(G2,n); } void PeroACambioQuiero(){ // [47] nota(F_,n); nota(F2,c); nota(G2,c); nota(A_2,c); nota(D3,c); // [48] nota(A_2,n); nota(G2,b); // [49] nota(D_,n); nota(D2,c); nota(E2,c); nota(F2,c); nota(A_2,c); // [50] nota(E2,b); nota(D2,n); // [51] nota(As,b); nota(D2,n); // [52] nota(F2,n); nota(E2,n); nota(C2,n); // [53] nota(D2,n); nota(A_3,n); nota(G3,n); // [54] nota(D,n); nota(E3,n); nota(D3,n); // [55] nota(D_,n); nota(F2,c); nota(G2,c); nota(A_2,c); nota(D3,c); // [56] nota(A_2,n); nota(G2,b); // [57] nota(D_,n); nota(D2,c); nota(E2,c); nota(F2,c); nota(A_2,c); // [58] nota(E2,b); nota(D2,n); // [59] nota(As,b); nota(D2,n); // [60] nota(F2,n); nota(E2,n); nota(C2,n); // [61] nota(D2,n); nota(A_3,n); nota(G3,n); // [62] nota(D,n); nota(E3,n); nota(D3,n); // [63] nota(D_,n); nota(A_3,n); nota(G3,n); // [64] nota(E_,n); nota(B3,n); nota(C4,n); } void LunaQuiereSerMadre(){ // [65] nota(A_3,n); nota(Sil,n); nota(A_2,c); nota(A_2,c); // [66] nota(G2,n); nota(E2,n); nota(G2,n); // [67] nota(A_2,b); nota(B2,c); nota(A_2,c); // [68] nota(Gs2,n); nota(A_2,b); // [69] nota(A_2,n); nota(Sil,n); nota(A_2,c); nota(B2,c); // [70] nota(C3,n); nota(B2,n); nota(A_2,n); // [71] nota(E2,b); nota(A_2,c); nota(E2,c); // [72] nota(D2,n); nota(C2,n); nota(D2,n); // [73] nota(E2,b); nota(A_2,c); nota(A_2,c); // [74] nota(G2,n); nota(E2,n); nota(G2,n); // [75] nota(A_2,n); nota(A,n); nota(B2,c); nota(A_2,c); // [76] nota(Gs2 ,n); nota(A_2 ,b); // [77] nota(A_2 ,n); nota(A,n); nota(A_2,c); nota(B2,c); // [78] nota(C3,n); nota(B2,n); nota(A_2,n); // [79] nota(E2,b); nota(A_2,c); nota(E2,c); // [80] nota(D2,n); nota(C2,n); nota(D2,n); } void Ahahahah(){ // [81] nota(E2,n); nota(C,c); nota(A_,c); nota(C,c); nota(E,c); // [82] nota(D2,b); nota(C2,c); nota(D2,c); // [83] nota(E2,n); nota(C,c); nota(A_,c); nota(C,c); nota(E,c); // [84] nota(D2,b); nota(C2,c); nota(D2,c); // [85] nota(E2,b); nota(E,n); // [86] nota(D_,n); nota(D,n); nota(D_,n); // [87] nota(C_,n); nota(C,n); nota(C_,n); // [88] nota(B__,n); nota(B_,n); nota(B__,n); // [89] nota(As__,n); nota(As,c); nota(C2,c); nota(D2,c); nota(E2,c); // [90] nota(F2,b); nota(E2,c); nota(F2,s); nota(E2,s); // [91] nota(D2,n); }