-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
4282 lines (3894 loc) · 178 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html>
<head>
<!-- QUI SOTTO TUTTI I LINK -->
<!-- link per attivare le animazioni W3 -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Nunito:wght@600&display=swap" rel="stylesheet">
<!-- QUI SOTTO TUTTI I CSS -->
<!-- Carico il file style.css con i CSS -->
<link href="style.css" rel="stylesheet" type="text/css">
<link href="style2.css" rel="stylesheet" type="text/css">
<link href="style3.css" rel="stylesheet" type="text/css">
<style>
/* eventuali altri CSS possono essere inseriti qui*/
</style>
</head>
<body class="w3-animate-opacity"> <!-- HTML e JAVASCRIPT -->
<!-- QUI SOTTO TUTTO L'HTML -->
<div id="sfondo">
<div id="traslazione"> <!-- per scalare la pagina -->
<div id="container" class="w3-animate-opacity" >
<img id="panel" src="zMedia/layout.png" style="position:absolute;">
<div id="schermo">
<div id="painting">
<canvas id ="sample" width ="500px" height ="300px" class="dissolve"></canvas>
</div>
</div>
<div id="tutorialdiv" class="schermo2 dissolve">
<div id="x1">
<h1> Close </h1>
</div>
<p> TUTORIAL <br><br> </p>
<h5>
The keyboard has different functionalities, first of all you can play in two different ways: <br>
• use your mouse! <br>
• use your pc keyboard! <br>
If you pay attention, in the lower left corner there are two buttons, NOTE and FREQ. <br>
• If you press NOTE you’ll be able to view the name of the note you are playing and its associated color. <br>
• If you press FREQ you can see the swing of the pure tone related to the note you are just playing.
</h5>
</div>
<div id="examplediv" class="schermo2 dissolve">
<div id="x2">
<h1> Close </h1>
</div>
<p> EXAMPLE <br><br> </p>
<h6>
A triad is a chord with three notes that can be set as thirds because their pitches work together. <br>
If you want an example of Major Triad, press the corresponding button and choose a note and play it. The keyboard allows you to listen the third and the fifth notes associated to the one you’re playing. <br>
• Press Major Triad and, after, press the note C. The triad played is called Cmajor. <br>
• Press Minor Triad and, after, press the note E. The triad played is called Eminor. <br>
• Press Diminished Triad and, after, press the note A. The triad played is called Adim. <br>
• Press Augmented Triad and, after, press the note D. The triad played is called Daug. <br>
Now, try to play each one by yourself.
</h6>
</div>
<div id="contactsdiv" class="schermo2 dissolve">
<div id="x3">
<h1> Close </h1>
</div>
<p> Contacts <br><br> </p>
<h5 style="text-align: right; left:1200px">
Creators: <br>
Sartori Matteo -- [email protected] <br>
Renzi Annafelicia -- [email protected] <br>
Risitano Giuseppe -- [email protected] <br><br>
For any inquiry feel free to contact us @ [email protected]
</h5>
</div>
<span id="triadi">
<button id="TriadeM" class="TRIADE">Major Triad</button>
<button id="TriadeMin" class="TRIADE">Minor Triad</button>
<button id="TriadeDim" class="TRIADE">Diminished Triad</button>
<button id="TriadeAug" class="TRIADE">Augmented Triad</button>
</span>
<div id="tastiera" style="position: absolute; left: 445px; top:1255px"></div>
<!-- tasto NOTE-->
<img id="tasto1" src="zMedia/tasto1.png">
<img id="tasto1premuto" src="zMedia/tasto1premuto.png" class="dissolve">
<!-- tasto FREQ-->
<img id="tasto2" src="zMedia/tasto2.png">
<img id="tasto2premuto" src="zMedia/tasto2premuto.png" class="dissolve">
<!-- creo elemento nota colorato // ID: NotaLuce-->
<!-- qui verranno inserite le note animate con gli script sotto -->
<!-- per la modalità "Note" -->
<div id="divanimazioneNota">
</div>
</div>
</div> <!-- div per traslare la tastiera -->
</div>
<!-- QUI SOTTO TUTTI GLI SCRIPT -->
<!-- Script per creare i tasti bianchi e neri -->
<script>
let tastiera = document.getElementById("tastiera");
let aleft=0;
let bleft=-25;
let i=0;
let neri=[0,1,2,3,0,5,6,0,8,9,10,0,12,13,0,15,16,17,0,19,20,0,22,23,24,0];
//creo i tasti bianchi
for(i=0;i<25;i++){
let tastobianco = document.createElement("div");
tastobianco.innerHTML = '<img id="whiteKey' + (i+1) + '" src="https://i.ibb.co/d5MYHqx/tasto-bianco-doppio.png" style="position: absolute; left: ' + aleft +'px;" class="w3-animate-opacity white">';
tastiera.append(tastobianco);
aleft=aleft+94;
}
//creo i tasti neri
for(i=0;i<25;i++){
if(neri[i]>0) {
let tastonero = document.createElement("div");
tastonero.innerHTML = '<img id="blackKey' + i + '" src="https://i.ibb.co/hHr2Vzj/tasto-nero-doppio.png" style="position: absolute; left: ' + bleft +'px;z-index=1;" class="w3-animate-opacity black">'; //VERIFICARE RIGA onmousedown="neroPremuto()"
tastiera.append(tastonero);
}
bleft=bleft+94;
}
</script>
<!-- script per "premere" i tasti bianchi -->
<script>
whites=document.querySelectorAll(".white");
whites.forEach(x=> x.onmousedown = function(){
this.classList.remove("white");
this.classList.add("whitepressed");
});
whites.forEach(x=> x.onmouseup = function(){
this.classList.remove("whitepressed");
this.classList.add("white");
});
</script>
<!-- script per "premere" i tasti neri -->
<script>
blacks=document.querySelectorAll(".black");
blacks.forEach(x=> x.onmousedown = function(){
this.classList.remove("black");
this.classList.add("blackpressed");
});
blacks.forEach(x=> x.onmouseup = function(){
this.classList.remove("blackpressed");
this.classList.add("black");
});
</script>
<!-- script per fading note -->
<script>
let note = document.querySelectorAll(".nota");
function dissolveNote(){
note.forEach(x=>x.classList.add("dissolve"));
}
window.setTimeout("dissolveNote()",3900);
</script>
<!-- script per attivare/disattivare la modalità note -->
<script>
//quando apro la pagina è nero
let premutoNote=0;
let tasto1 = document.getElementById("tasto1");
let tasto1premuto = document.getElementById("tasto1premuto");
tasto1.onclick = function(){
premutoNote=1;
tasto1premuto.classList.toggle("dissolve");
};
tasto1premuto.onclick = function(){
premutoNote=0;
tasto1premuto.classList.toggle("dissolve");
};
</script>
<!-- script per attivare/disattivare la modalità freq (e il canvas)-->
<script>
//quando apro la pagina è nero
let premutoFreq=0;
let tasto2 = document.getElementById("tasto2");
let tasto2premuto = document.getElementById("tasto2premuto");
let canvasPlot = document.getElementById("sample");
tasto2.onclick = function(){
premutoFreq=1;
tasto2premuto.classList.toggle("dissolve");
canvasPlot.classList.toggle("dissolve");
};
tasto2premuto.onclick = function(){
premutoFreq=0;
tasto2premuto.classList.toggle("dissolve");
canvasPlot.classList.toggle("dissolve");
};
</script>
<!-- script per visualizzarte le sinusoidi sul canvas -->
<script>
function FreqNote(b) {
function Axes(ctx,axes) {
var width = ctx.canvas.width;
var height = ctx.canvas.height;
var xMin = 0;
ctx.beginPath();
ctx.strokeStyle = "rgb(128,128,128)";
// X-Axis
ctx.moveTo(xMin, height/2);
ctx.lineTo(width, height/2);
// Y-Axis
ctx.moveTo(width/2, 0);
ctx.lineTo(width/2, height);
// Starting line
ctx.moveTo(0, 0);
ctx.lineTo(0, height);
ctx.stroke();
}
function drawPoint(ctx, y) {
var radius = 3;
ctx.beginPath();
// Hold x constant at 4 so the point only moves up and down.
ctx.arc(4, y, radius, 0, 2 * Math.PI, false);
ctx.fillStyle = 'red';
ctx.fill();
ctx.lineWidth = 1;
ctx.stroke();
}
function sineWave(ctx, xOffset, yOffset, frequency) {
var width = ctx.canvas.width;
var height = ctx.canvas.height;
ctx.beginPath();
ctx.lineWidth = 2;
ctx.strokeStyle = "rgb(66,44,255)";
// console.log("Drawing point...");
// drawPoint(ctx, yOffset+step);
var x = 4;
var y = 0;
var amplitude = 40;
//ctx.moveTo(x, y);
ctx.moveTo(x, 50);
while (x < width) {
y = height/2 + amplitude * Math.sin((x+xOffset)*frequency);
ctx.lineTo(x, y);
x++;
// console.log("x="+x+" y="+y);
}
ctx.stroke();
ctx.save();
console.log("Drawing point at y=" + y);
drawPoint(ctx, y);
ctx.stroke();
ctx.restore();
}
function draw() {
var canvas = document.getElementById("sample");
var context = canvas.getContext("2d");
context.clearRect(0, 0, 500, 500);
Axes(context);
context.save();
sineWave(context, step, 50, b);
context.restore();
step += 4;
window.requestAnimationFrame(draw);
}
function init() {
window.requestAnimationFrame(draw);
}
var step = -4;
init();
}
</script>
<!-- script per interagire con la tastiera (ANIMAZIONI NOTE) -->
<script>
let animazioneNota = document.getElementById("divanimazioneNota");
const sustain = 400;
function playNote(n) {
c = new AudioContext();
c.createOscillator();
var d = c.createOscillator();
threshold = c.createGain();
d.connect(threshold);
threshold.connect(c.destination);
const freq = Math.pow(2, (n)/12)*440;
d.start();
threshold.gain.setValueAtTime(0, c.currentTime);
threshold.gain.linearRampToValueAtTime(1, c.currentTime+0.2);
threshold.gain.linearRampToValueAtTime(0, c.currentTime+0.8);
d.frequency.value = freq;
/*setTimeout (function(){
d.stop();
}, sustain);*/
return freq;
}
/* definisco le funzioni che faranno suonare le note riferendomi al modello generale playNote*/
/* mappa */
function lf_play() {
let contenitoreNota = document.createElement("div");
var f = playNote(-16);
if(premutoNote!=0) {
let nota = document.createElement("div");
nota.innerHTML = `
<div id="animazioneNota" >
<main class="NotaLuce">
<div class="dank-ass-loader">
<div class="row">
<div class="arrow Fgreen up outer outer-18"></div>
<div class="arrow Fgreen down outer outer-17"></div>
<div class="arrow Fgreen up outer outer-16"></div>
<div class="arrow Fgreen down outer outer-15"></div>
<div class="arrow Fgreen up outer outer-14"></div>
</div>
<div class="row">
<div class="arrow Fgreen up outer outer-1"></div>
<div class="arrow Fgreen down outer outer-2"></div>
<div class="arrow Fgreen up inner inner-6"></div>
<div class="arrow Fgreen down inner inner-5"></div>
<div class="arrow Fgreen up inner inner-4"></div>
<div class="arrow Fgreen down outer outer-13"></div>
<div class="arrow Fgreen up outer outer-12"></div>
</div>
<div class="row">
<div class="arrow Fgreen down outer outer-3"></div>
<div class="arrow Fgreen up outer outer-4"></div>
<div class="arrow Fgreen down inner inner-1"></div>
<div class="arrow Fgreen up inner inner-2"></div>
<div class="arrow Fgreen down inner inner-3"></div>
<div class="arrow Fgreen up outer outer-11"></div>
<div class="arrow Fgreen down outer outer-10"></div>
</div>
<div class="row">
<div class="arrow Fgreen down outer outer-5"></div>
<div class="arrow Fgreen up outer outer-6"></div>
<div class="arrow Fgreen down outer outer-7"></div>
<div class="arrow Fgreen up outer outer-8"></div>
<div class="arrow Fgreen down outer outer-9"></div>
</div>
</div>
<h1 class="nomeNota">F</h1>
</main>
</div> `;
contenitoreNota.append(nota);
animazioneNota.append(contenitoreNota);
/* partono 4 secondi al termine dei quali l'elemento note scompare*/
/* set time out e set attribute => displaynone o fading*/
setTimeout(function(){ contenitoreNota.remove();},5000);
}
let tastopremuto = document.getElementById("whiteKey1");
tastopremuto.classList.remove("white");
tastopremuto.classList.add("whitepressed");
setInterval(function(){
tastopremuto.classList.remove("whitepressed");
tastopremuto.classList.add("white");
},700);
if(premutoFreq!=0){
FreqNote(f);
};
if ( premutoTM == 1) {
TriadeMaggiore(f);
premutoTM = 0;
}
else if(premutoTMin == 1)
{TriadeMinore(f);
premutoTMin = 0;
}
else if(premutoTD == 1)
{TriadeDiminuita(f);
premutoTD = 0;}
else if(premutoTA == 1)
{TriadeAumentata(f);
premutoTA = 0;}
}
function lgb_play() {
let contenitoreNota = document.createElement("div");
var gb = playNote(-15);
if(premutoNote!=0) {
let nota = document.createElement("div");
nota.innerHTML = `
<div id="animazioneNota" >
<main class="NotaLuce">
<div class="dank-ass-loader">
<div class="row">
<div class="arrow Gb up outer outer-18"></div>
<div class="arrow Gb down outer outer-17"></div>
<div class="arrow Gb up outer outer-16"></div>
<div class="arrow Gb down outer outer-15"></div>
<div class="arrow Gb up outer outer-14"></div>
</div>
<div class="row">
<div class="arrow Gb up outer outer-1"></div>
<div class="arrow Gb down outer outer-2"></div>
<div class="arrow Gb up inner inner-6"></div>
<div class="arrow Gb down inner inner-5"></div>
<div class="arrow Gb up inner inner-4"></div>
<div class="arrow Gb down outer outer-13"></div>
<div class="arrow Gb up outer outer-12"></div>
</div>
<div class="row">
<div class="arrow Gb down outer outer-3"></div>
<div class="arrow Gb up outer outer-4"></div>
<div class="arrow Gb down inner inner-1"></div>
<div class="arrow Gb up inner inner-2"></div>
<div class="arrow Gb down inner inner-3"></div>
<div class="arrow Gb up outer outer-11"></div>
<div class="arrow Gb down outer outer-10"></div>
</div>
<div class="row">
<div class="arrow Gb down outer outer-5"></div>
<div class="arrow Gb up outer outer-6"></div>
<div class="arrow Gb down outer outer-7"></div>
<div class="arrow Gb up outer outer-8"></div>
<div class="arrow Gb down outer outer-9"></div>
</div>
</div>
<h1 class="nomeNota">G<sup>b</sup></h1>
</main>
</div> `;
contenitoreNota.append(nota);
animazioneNota.append(contenitoreNota);
/* partono 4 secondi al termine dei quali l'elemento note scompare*/
/* set time out e set attribute => displaynone o fading*/
setTimeout(function(){ contenitoreNota.remove();},5000);
}
let tastopremuto = document.getElementById("blackKey1");
tastopremuto.classList.remove("black");
tastopremuto.classList.add("blackpressed");
setInterval(function(){
tastopremuto.classList.remove("blackpressed");
tastopremuto.classList.add("black");
},700);
if(premutoFreq!=0){
FreqNote(gb);
};
if ( premutoTM == 1) {
TriadeMaggiore(gb);
premutoTM = 0;
}
else if(premutoTMin == 1)
{TriadeMinore(gb);
premutoTMin = 0;
}
else if(premutoTD == 1)
{TriadeDiminuita(gb);
premutoTD = 0;}
else if(premutoTA == 1)
{TriadeAumentata(gb);
premutoTA = 0;}
}
function lg_play() {
let contenitoreNota = document.createElement("div");
var g = playNote(-14);
if(premutoNote!=0) {
let nota = document.createElement("div");
nota.innerHTML = `
<div id="animazioneNota" >
<main class="NotaLuce">
<div class="dank-ass-loader">
<div class="row">
<div class="arrow Gblue up outer outer-18"></div>
<div class="arrow Gblue down outer outer-17"></div>
<div class="arrow Gblue up outer outer-16"></div>
<div class="arrow Gblue down outer outer-15"></div>
<div class="arrow Gblue up outer outer-14"></div>
</div>
<div class="row">
<div class="arrow Gblue up outer outer-1"></div>
<div class="arrow Gblue down outer outer-2"></div>
<div class="arrow Gblue up inner inner-6"></div>
<div class="arrow Gblue down inner inner-5"></div>
<div class="arrow Gblue up inner inner-4"></div>
<div class="arrow Gblue down outer outer-13"></div>
<div class="arrow Gblue up outer outer-12"></div>
</div>
<div class="row">
<div class="arrow Gblue down outer outer-3"></div>
<div class="arrow Gblue up outer outer-4"></div>
<div class="arrow Gblue down inner inner-1"></div>
<div class="arrow Gblue up inner inner-2"></div>
<div class="arrow Gblue down inner inner-3"></div>
<div class="arrow Gblue up outer outer-11"></div>
<div class="arrow Gblue down outer outer-10"></div>
</div>
<div class="row">
<div class="arrow Gblue down outer outer-5"></div>
<div class="arrow Gblue up outer outer-6"></div>
<div class="arrow Gblue down outer outer-7"></div>
<div class="arrow Gblue up outer outer-8"></div>
<div class="arrow Gblue down outer outer-9"></div>
</div>
</div>
<h1 class="nomeNota">G</h1>
</main>
</div> `;
contenitoreNota.append(nota);
animazioneNota.append(contenitoreNota);
/* partono 4 secondi al termine dei quali l'elemento note scompare*/
/* set time out e set attribute => displaynone o fading*/
setTimeout(function(){ contenitoreNota.remove();},5000);
}
let tastopremuto = document.getElementById("whiteKey2");
tastopremuto.classList.remove("white");
tastopremuto.classList.add("whitepressed");
setInterval(function(){
tastopremuto.classList.remove("whitepressed");
tastopremuto.classList.add("white");
},700);
if(premutoFreq!=0){
FreqNote(g);
};
if ( premutoTM == 1) {
TriadeMaggiore(g);
premutoTM = 0;
}
else if(premutoTMin == 1)
{TriadeMinore(g);
premutoTMin = 0;
}
else if(premutoTD == 1)
{TriadeDiminuita(g);
premutoTD = 0;}
else if(premutoTA == 1)
{TriadeAumentata(g);
premutoTA = 0;}
}
function lab_play() {
let contenitoreNota = document.createElement("div");
var ab = playNote(-13);
if(premutoNote!=0) {
let nota = document.createElement("div");
nota.innerHTML = `
<div id="animazioneNota" >
<main class="NotaLuce">
<div class="dank-ass-loader">
<div class="row">
<div class="arrow Ab up outer outer-18"></div>
<div class="arrow Ab down outer outer-17"></div>
<div class="arrow Ab up outer outer-16"></div>
<div class="arrow Ab down outer outer-15"></div>
<div class="arrow Ab up outer outer-14"></div>
</div>
<div class="row">
<div class="arrow Ab up outer outer-1"></div>
<div class="arrow Ab down outer outer-2"></div>
<div class="arrow Ab up inner inner-6"></div>
<div class="arrow Ab down inner inner-5"></div>
<div class="arrow Ab up inner inner-4"></div>
<div class="arrow Ab down outer outer-13"></div>
<div class="arrow Ab up outer outer-12"></div>
</div>
<div class="row">
<div class="arrow Ab down outer outer-3"></div>
<div class="arrow Ab up outer outer-4"></div>
<div class="arrow Ab down inner inner-1"></div>
<div class="arrow Ab up inner inner-2"></div>
<div class="arrow Ab down inner inner-3"></div>
<div class="arrow Ab up outer outer-11"></div>
<div class="arrow Ab down outer outer-10"></div>
</div>
<div class="row">
<div class="arrow Ab down outer outer-5"></div>
<div class="arrow Ab up outer outer-6"></div>
<div class="arrow Ab down outer outer-7"></div>
<div class="arrow Ab up outer outer-8"></div>
<div class="arrow Ab down outer outer-9"></div>
</div>
</div>
<h1 class="nomeNota">A<sup>b</sup></h1>
</main>
</div> `;
contenitoreNota.append(nota);
animazioneNota.append(contenitoreNota);
/* partono 4 secondi al termine dei quali l'elemento note scompare*/
/* set time out e set attribute => displaynone o fading*/
setTimeout(function(){ contenitoreNota.remove();},5000);
}
let tastopremuto = document.getElementById("blackKey2");
tastopremuto.classList.remove("black");
tastopremuto.classList.add("blackpressed");
setInterval(function(){
tastopremuto.classList.remove("blackpressed");
tastopremuto.classList.add("black");
},700);
if(premutoFreq!=0){
FreqNote(ab);
};
if ( premutoTM == 1) {
TriadeMaggiore(ab);
premutoTM = 0;
}
else if(premutoTMin == 1)
{TriadeMinore(ab);
premutoTMin = 0;
}
else if(premutoTD == 1)
{TriadeDiminuita(ab);
premutoTD = 0;}
else if(premutoTA == 1)
{TriadeAumentata(ab);
premutoTA = 0;}
}
function la_play() {
let contenitoreNota = document.createElement("div");
var a = playNote(-12);
if(premutoNote!=0) {
let nota = document.createElement("div");
nota.innerHTML = `
<div id="animazioneNota" >
<main class="NotaLuce">
<div class="dank-ass-loader">
<div class="row">
<div class="arrow Aviolet Ared up outer outer-18"></div>
<div class="arrow Aviolet Aviolet Ared down outer outer-17"></div>
<div class="arrow Aviolet Ared up outer outer-16"></div>
<div class="arrow Aviolet Ared down outer outer-15"></div>
<div class="arrow Aviolet Ared up outer outer-14"></div>
</div>
<div class="row">
<div class="arrow Aviolet Ared up outer outer-1"></div>
<div class="arrow Aviolet Ared down outer outer-2"></div>
<div class="arrow Aviolet Ared up inner inner-6"></div>
<div class="arrow Aviolet Ared down inner inner-5"></div>
<div class="arrow Aviolet Ared up inner inner-4"></div>
<div class="arrow Aviolet Ared down outer outer-13"></div>
<div class="arrow Aviolet Ared up outer outer-12"></div>
</div>
<div class="row">
<div class="arrow Aviolet Ared down outer outer-3"></div>
<div class="arrow Aviolet Ared up outer outer-4"></div>
<div class="arrow Aviolet Ared down inner inner-1"></div>
<div class="arrow Aviolet Ared up inner inner-2"></div>
<div class="arrow Aviolet Ared down inner inner-3"></div>
<div class="arrow Aviolet Ared up outer outer-11"></div>
<div class="arrow Aviolet Ared down outer outer-10"></div>
</div>
<div class="row">
<div class="arrow Aviolet Ared down outer outer-5"></div>
<div class="arrow Aviolet Ared up outer outer-6"></div>
<div class="arrow Aviolet Ared down outer outer-7"></div>
<div class="arrow Aviolet Ared up outer outer-8"></div>
<div class="arrow Aviolet Ared down outer outer-9"></div>
</div>
</div>
<h1 class="nomeNota">A</h1>
</main>
</div> `;
contenitoreNota.append(nota);
animazioneNota.append(contenitoreNota);
/* partono 4 secondi al termine dei quali l'elemento note scompare*/
/* set time out e set attribute => displaynone o fading*/
setTimeout(function(){ contenitoreNota.remove();},5000);
}
let tastopremuto = document.getElementById("whiteKey3");
tastopremuto.classList.remove("white");
tastopremuto.classList.add("whitepressed");
setInterval(function(){
tastopremuto.classList.remove("whitepressed");
tastopremuto.classList.add("white");
},700);
if(premutoFreq!=0){
FreqNote(a);
};
if ( premutoTM == 1) {
TriadeMaggiore(a);
premutoTM = 0;
}
else if(premutoTMin == 1)
{TriadeMinore(a);
premutoTMin = 0;
}
else if(premutoTD == 1)
{TriadeDiminuita(a);
premutoTD = 0;}
else if(premutoTA == 1)
{TriadeAumentata(a);
premutoTA = 0;}
}
function lbb_play() {
let contenitoreNota = document.createElement("div");
var bb= playNote(-11);
if(premutoNote!=0) {
let nota = document.createElement("div");
nota.innerHTML = `
<div id="animazioneNota" >
<main class="NotaLuce">
<div class="dank-ass-loader">
<div class="row">
<div class="arrow Bb up outer outer-18"></div>
<div class="arrow Bb down outer outer-17"></div>
<div class="arrow Bb up outer outer-16"></div>
<div class="arrow Bb down outer outer-15"></div>
<div class="arrow Bb up outer outer-14"></div>
</div>
<div class="row">
<div class="arrow Bb up outer outer-1"></div>
<div class="arrow Bb down outer outer-2"></div>
<div class="arrow Bb up inner inner-6"></div>
<div class="arrow Bb down inner inner-5"></div>
<div class="arrow Bb up inner inner-4"></div>
<div class="arrow Bb down outer outer-13"></div>
<div class="arrow Bb up outer outer-12"></div>
</div>
<div class="row">
<div class="arrow Bb down outer outer-3"></div>
<div class="arrow Bb up outer outer-4"></div>
<div class="arrow Bb down inner inner-1"></div>
<div class="arrow Bb up inner inner-2"></div>
<div class="arrow Bb down inner inner-3"></div>
<div class="arrow Bb up outer outer-11"></div>
<div class="arrow Bb down outer outer-10"></div>
</div>
<div class="row">
<div class="arrow Bb down outer outer-5"></div>
<div class="arrow Bb up outer outer-6"></div>
<div class="arrow Bb down outer outer-7"></div>
<div class="arrow Bb up outer outer-8"></div>
<div class="arrow Bb down outer outer-9"></div>
</div>
</div>
<h1 class="nomeNota">B<sup>b</sup></h1>
</main>
</div> `;
contenitoreNota.append(nota);
animazioneNota.append(contenitoreNota);
/* partono 4 secondi al termine dei quali l'elemento note scompare*/
/* set time out e set attribute => displaynone o fading*/
setTimeout(function(){ contenitoreNota.remove();},5000);
}
let tastopremuto = document.getElementById("blackKey3");
tastopremuto.classList.remove("black");
tastopremuto.classList.add("blackpressed");
setInterval(function(){
tastopremuto.classList.remove("blackpressed");
tastopremuto.classList.add("black");
},700);
if(premutoFreq!=0){
FreqNote(bb);
};
if ( premutoTM == 1) {
TriadeMaggiore(bb);
premutoTM = 0;
}
else if(premutoTMin == 1)
{TriadeMinore(bb);
premutoTMin = 0;
}
else if(premutoTD == 1)
{TriadeDiminuita(bb);
premutoTD = 0;}
else if(premutoTA == 1)
{TriadeAumentata(bb);
premutoTA = 0;}
}
function lb_play() {
let contenitoreNota = document.createElement("div");
var b= playNote(-10);
if(premutoNote!=0) {
let nota = document.createElement("div");
nota.innerHTML = `
<div id="animazioneNota" >
<main class="NotaLuce">
<div class="dank-ass-loader">
<div class="row">
<div class="arrow Bpink up outer outer-18"></div>
<div class="arrow Bpink down outer outer-17"></div>
<div class="arrow Bpink up outer outer-16"></div>
<div class="arrow Bpink down outer outer-15"></div>
<div class="arrow Bpink up outer outer-14"></div>
</div>
<div class="row">
<div class="arrow Bpink up outer outer-1"></div>
<div class="arrow Bpink down outer outer-2"></div>
<div class="arrow Bpink up inner inner-6"></div>
<div class="arrow Bpink down inner inner-5"></div>
<div class="arrow Bpink up inner inner-4"></div>
<div class="arrow Bpink down outer outer-13"></div>
<div class="arrow Bpink up outer outer-12"></div>
</div>
<div class="row">
<div class="arrow Bpink down outer outer-3"></div>
<div class="arrow Bpink up outer outer-4"></div>
<div class="arrow Bpink down inner inner-1"></div>
<div class="arrow Bpink up inner inner-2"></div>
<div class="arrow Bpink down inner inner-3"></div>
<div class="arrow Bpink up outer outer-11"></div>
<div class="arrow Bpink down outer outer-10"></div>
</div>
<div class="row">
<div class="arrow Bpink down outer outer-5"></div>
<div class="arrow Bpink up outer outer-6"></div>
<div class="arrow Bpink down outer outer-7"></div>
<div class="arrow Bpink up outer outer-8"></div>
<div class="arrow Bpink down outer outer-9"></div>
</div>
</div>
<h1 class="nomeNota">B</h1>
</main>
</div> `;
contenitoreNota.append(nota);
animazioneNota.append(contenitoreNota);
/* partono 4 secondi al termine dei quali l'elemento note scompare*/
/* set time out e set attribute => displaynone o fading*/
setTimeout(function(){ contenitoreNota.remove();},5000);
}
let tastopremuto = document.getElementById("whiteKey4");
tastopremuto.classList.remove("white");
tastopremuto.classList.add("whitepressed");
setInterval(function(){
tastopremuto.classList.remove("whitepressed");
tastopremuto.classList.add("white");
},700);
if(premutoFreq!=0){
FreqNote(b);
};if ( premutoTM == 1) {
TriadeMaggiore(b);
premutoTM = 0;
}
else if(premutoTMin == 1)
{TriadeMinore(b);
premutoTMin = 0;
}
else if(premutoTD == 1)
{TriadeDiminuita(b);
premutoTD = 0;}
else if(premutoTA == 1)
{TriadeAumentata(b);
premutoTA = 0;}
}
function c_play() {
let contenitoreNota = document.createElement("div");
var c = playNote(-9);
if(premutoNote!=0) {
let nota = document.createElement("div");
nota.innerHTML = `
<div id="animazioneNota" >
<main class="NotaLuce">
<div class="dank-ass-loader">
<div class="row">
<div class="arrow Cred up outer outer-18"></div>
<div class="arrow Cred down outer outer-17"></div>
<div class="arrow Cred up outer outer-16"></div>
<div class="arrow Cred down outer outer-15"></div>
<div class="arrow Cred up outer outer-14"></div>
</div>
<div class="row">
<div class="arrow Cred up outer outer-1"></div>
<div class="arrow Cred down outer outer-2"></div>
<div class="arrow Cred up inner inner-6"></div>
<div class="arrow Cred down inner inner-5"></div>
<div class="arrow Cred up inner inner-4"></div>
<div class="arrow Cred down outer outer-13"></div>
<div class="arrow Cred up outer outer-12"></div>
</div>
<div class="row">
<div class="arrow Cred down outer outer-3"></div>
<div class="arrow Cred up outer outer-4"></div>
<div class="arrow Cred down inner inner-1"></div>
<div class="arrow Cred up inner inner-2"></div>
<div class="arrow Cred down inner inner-3"></div>
<div class="arrow Cred up outer outer-11"></div>
<div class="arrow Cred down outer outer-10"></div>
</div>
<div class="row">
<div class="arrow Cred down outer outer-5"></div>
<div class="arrow Cred up outer outer-6"></div>
<div class="arrow Cred down outer outer-7"></div>
<div class="arrow Cred up outer outer-8"></div>
<div class="arrow Cred down outer outer-9"></div>
</div>
</div>
<h1 class="nomeNota">C</h1>
</main>
</div> `;
contenitoreNota.append(nota);
animazioneNota.append(contenitoreNota);
/* partono 4 secondi al termine dei quali l'elemento note scompare*/
/* set time out e set attribute => displaynone o fading*/
setTimeout(function(){ contenitoreNota.remove();},5000);
}
let tastopremuto = document.getElementById("whiteKey5");
tastopremuto.classList.remove("white");
tastopremuto.classList.add("whitepressed");
setInterval(function(){
tastopremuto.classList.remove("whitepressed");
tastopremuto.classList.add("white");
},700);
if(premutoFreq!=0){
FreqNote(c);
};
if ( premutoTM == 1) {
TriadeMaggiore(c);
premutoTM = 0;
}
else if(premutoTMin == 1)
{TriadeMinore(c);
premutoTMin = 0;
}
else if(premutoTD == 1)
{TriadeDiminuita(c);
premutoTD = 0;}
else if(premutoTA == 1)
{TriadeAumentata(c);