-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshofar_html_system.html
More file actions
2671 lines (2358 loc) · 131 KB
/
Copy pathshofar_html_system.html
File metadata and controls
2671 lines (2358 loc) · 131 KB
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 lang="he" dir="rtl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>מערכת תקיעות שופר מתקדמת</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Noto Sans Hebrew', 'David Libre', 'SBL Hebrew', 'Times New Roman', serif;
font-weight: 500;
background: linear-gradient(to bottom right, rgb(239 246 255), rgb(250 245 255), rgb(255 251 235));
min-height: 100vh;
padding: 1rem;
direction: rtl;
}
.container {
max-width: 1200px;
margin: 0 auto;
}
.header {
text-align: center;
margin-bottom: 2rem;
}
.title {
font-size: 2.5rem;
font-weight: bold;
color: rgb(30 41 59);
margin-bottom: 0.5rem;
}
.subtitle {
font-size: 1.125rem;
color: rgb(71 85 105);
}
.alert {
margin-top: 1rem;
padding: 0.75rem;
border-radius: 0.5rem;
border-width: 1px;
}
.alert-warning {
background-color: rgb(254 249 195);
border-color: rgb(252 211 77);
color: rgb(146 64 14);
}
.alert-success {
background-color: rgb(220 252 231);
border-color: rgb(34 197 94);
color: rgb(21 128 61);
}
.alert-info {
background-color: rgb(219 234 254);
border-color: rgb(59 130 246);
color: rgb(30 64 175);
}
.tabs {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 0.5rem;
margin-bottom: 1.5rem;
}
.tab-button {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.5rem 1rem;
border-radius: 0.5rem;
border: none;
cursor: pointer;
transition: all 0.2s;
font-family: inherit;
}
.tab-button.active {
background-color: rgb(37 99 235);
color: white;
box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}
.tab-button:not(.active) {
background-color: rgba(255, 255, 255, 0.7);
color: rgb(51 65 85);
}
.tab-button:not(.active):hover {
background-color: white;
box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}
.content {
background-color: rgba(255, 255, 255, 0.8);
backdrop-filter: blur(8px);
border-radius: 0.75rem;
padding: 1.5rem;
box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}
.content h2 {
font-size: 1.5rem;
font-weight: bold;
color: rgb(30 41 59);
margin-bottom: 1.5rem;
text-align: center;
}
.form-group {
margin-bottom: 1.5rem;
}
.form-label {
display: block;
font-size: 0.875rem;
font-weight: 500;
color: rgb(51 65 85);
margin-bottom: 0.5rem;
}
.form-select {
width: 100%;
padding: 0.75rem;
border: 1px solid rgb(203 213 225);
border-radius: 0.5rem;
font-family: inherit;
background: white;
}
.form-select:focus {
outline: none;
border-color: rgb(59 130 246);
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.buttons-grid {
display: flex;
flex-wrap: wrap;
gap: 1rem;
justify-content: center;
margin-bottom: 1.5rem;
}
.button {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.75rem 1.5rem;
border-radius: 0.5rem;
border: none;
cursor: pointer;
font-family: inherit;
font-weight: 500;
transition: all 0.2s;
text-decoration: none;
}
.button:disabled {
opacity: 0.6;
cursor: not-allowed;
}
.button-primary {
background: linear-gradient(to right, rgb(59 130 246), rgb(147 51 234));
color: white;
}
.button-primary:hover:not(:disabled) {
box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
transform: scale(1.05);
}
.button-primary.playing {
background: rgb(245 158 11);
animation: pulse 2s infinite;
}
.button-sequence {
padding: 1rem 2rem;
border-radius: 0.75rem;
font-size: 1.125rem;
font-weight: bold;
background: linear-gradient(to right, rgb(34 197 94), rgb(59 130 246));
color: white;
}
.button-sequence:hover:not(:disabled) {
box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
transform: scale(1.05);
}
.button-sequence.playing {
background: rgb(239 68 68);
animation: pulse 2s infinite;
}
.button-coach {
padding: 0.75rem 1.5rem;
border-radius: 0.75rem;
font-size: 1rem;
font-weight: bold;
background: linear-gradient(to right, rgb(245 158 11), rgb(251 146 60));
color: white;
margin-left: 0.5rem;
transition: all 0.2s;
}
.button-coach:hover {
box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
transform: scale(1.05);
}
.button-coach.active {
background: linear-gradient(to right, rgb(220 38 38), rgb(239 68 68));
transform: scale(1.05);
}
.button-record {
padding: 1rem 2rem;
border-radius: 0.75rem;
font-size: 1.125rem;
font-weight: bold;
}
.button-record:not(.recording) {
background: linear-gradient(to right, rgb(239 68 68), rgb(236 72 153));
color: white;
}
.button-record.recording {
background: rgb(239 68 68);
color: white;
animation: pulse 2s infinite;
}
.sequence-display {
margin-top: 1.5rem;
padding: 1rem;
background-color: rgb(241 245 249);
border-radius: 0.5rem;
}
.sequence-display h3 {
font-weight: bold;
color: rgb(30 41 59);
margin-bottom: 0.5rem;
}
.sequence-tags {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
}
.sequence-tag {
padding: 0.25rem 0.75rem;
background-color: rgb(219 234 254);
color: rgb(30 64 175);
border-radius: 9999px;
font-size: 0.875rem;
}
.debug-info {
margin-top: 1rem;
font-size: 0.75rem;
color: rgb(107 114 128);
text-align: center;
}
.debug-info div {
margin: 0.25rem 0;
}
.status-indicator {
margin-top: 1rem;
text-align: center;
}
.status-loading {
color: rgb(217 119 6);
font-weight: 600;
}
.status-partial {
color: rgb(59 130 246);
}
.status-ready {
color: rgb(34 197 94);
font-weight: 600;
}
.canvas-container {
margin-bottom: 1.5rem;
}
.canvas {
width: 100%;
height: 8rem;
background-color: rgb(15 23 42);
border-radius: 0.5rem;
}
.recording-time {
text-align: center;
margin-bottom: 1rem;
}
.recording-indicator {
display: inline-flex;
align-items: center;
gap: 0.5rem;
padding: 0.5rem 1rem;
background-color: rgb(254 226 226);
color: rgb(153 27 27);
border-radius: 0.5rem;
}
.analyzing-indicator {
display: inline-flex;
align-items: center;
gap: 0.5rem;
padding: 0.5rem 1rem;
background-color: rgb(219 234 254);
color: rgb(30 64 175);
border-radius: 0.5rem;
}
.spinner {
animation: spin 1s linear infinite;
}
.pulse-dot {
animation: pulse 2s infinite;
}
.hidden {
display: none !important;
}
.settings-panel {
position: fixed;
bottom: 1rem;
right: 1rem;
background-color: rgba(255, 255, 255, 0.9);
backdrop-filter: blur(8px);
border-radius: 0.5rem;
box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
padding: 1rem;
}
.settings-row {
display: flex;
align-items: center;
gap: 1rem;
}
.volume-control {
display: flex;
align-items: center;
gap: 0.5rem;
}
.volume-slider {
width: 4rem;
}
.lang-control {
display: flex;
align-items: center;
gap: 0.5rem;
}
.lang-select {
font-size: 0.875rem;
border: 1px solid rgb(203 213 225);
border-radius: 0.25rem;
padding: 0.25rem 0.5rem;
}
@keyframes pulse {
0%, 100% {
opacity: 1;
}
50% {
opacity: 0.5;
}
}
@keyframes spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
.grid-2 {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 1rem;
}
.grid-4 {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
gap: 1rem;
}
@media (max-width: 768px) {
.title {
font-size: 1.875rem;
}
.buttons-grid {
flex-direction: column;
align-items: center;
}
.button {
width: 100%;
max-width: 300px;
justify-content: center;
}
.settings-panel {
position: relative;
bottom: auto;
right: auto;
margin-top: 2rem;
width: 100%;
}
}
</style>
</head>
<body>
<div class="container">
<!-- כותרת ראשית -->
<div class="header">
<h1 class="title">מערכת תקיעות שופר מתקדמת</h1>
<p class="subtitle">ניתוח אמיתי של תקיעות שופר עם קבצי MP3 אמיתיים של שופר</p>
<!-- הודעות מערכת -->
<div id="systemAlert" class="alert alert-warning hidden">
💡 לחץ על כל כפתור כדי להפעיל את מערכת האודיו
</div>
<div id="successAlert" class="alert alert-success hidden">
✅ מערכת האודיו פעילה ומוכנה לשימוש!
<div id="audioSourceInfo" style="margin-top: 0.5rem; font-size: 0.9rem;"></div>
</div>
<div class="alert alert-info" style="margin-top: 1rem;">
<strong>💡 מידע על מקור האודיו:</strong><br>
המערכת תנסה לטעון קבצי MP3 אמיתיים של שופר. אם זה לא מצליח (כמו בקובץ מקומי), היא תשתמש בצלילים סינתטיים איכותיים.<br>
<small>🎯 כדי להשתמש בקבצי MP3 אמיתיים, יש להריץ את הקובץ משרת אינטרנט (לא מקובץ מקומי).</small>
</div>
</div>
<!-- תפריט טאבים -->
<div class="tabs">
<button class="tab-button active" data-tab="practice">
<span>▶️</span> תרגול
</button>
<button class="tab-button" data-tab="record">
<span>🎤</span> הקלטה אמיתית
</button>
<button class="tab-button" data-tab="analysis">
<span>📊</span> ניתוח ספקטרלי
</button>
<button class="tab-button" data-tab="results">
<span>🏆</span> תוצאות
</button>
<button class="tab-button" data-tab="guide">
<span>📚</span> מדריך
</button>
</div>
<!-- תוכן עיקרי -->
<div class="content">
<!-- טאב תרגול -->
<div id="tab-practice" class="tab-content">
<h2>תרגול</h2>
<!-- בחירת רצף -->
<div class="form-group">
<label class="form-label">בחר רצף תקיעות:</label>
<select id="sequenceSelect" class="form-select">
<option value="תשרת">תקיעה-שברים-תרועה-תקיעה</option>
<option value="תשת">תקיעה-שברים-תקיעה</option>
<option value="תרת">תקיעה-תרועה-תקיעה</option>
</select>
</div>
<!-- כפתורי תקיעות בודדות -->
<div class="buttons-grid">
<button class="button button-primary" data-sound="תקיעה">
תקיעה
</button>
<button class="button button-primary" data-sound="שברים">
שברים
</button>
<button class="button button-primary" data-sound="תרועה">
תרועה
</button>
<button class="button button-primary" data-sound="תקיעה גדולה">
תקיעה גדולה
</button>
</div>
<!-- נגינת רצף -->
<div style="text-align: center;">
<button id="playSequenceBtn" class="button button-sequence">
▶️ נגן רצף
</button>
<button id="coachModeBtn" class="button button-coach" onclick="toggleCoachMode()">
🎯 מצב מאמן
</button>
</div>
<!-- הצגת רצף נוכחי -->
<div id="sequenceDisplay" class="sequence-display">
<h3>רצף נוכחי: תקיעה-שברים-תרועה-תקיעה</h3>
<div class="sequence-tags">
<span class="sequence-tag">תקיעה</span>
<span class="sequence-tag">שברים (×3)</span>
<span class="sequence-tag">תרועה (×9)</span>
<span class="sequence-tag">תקיעה גדולה</span>
</div>
<div style="margin-top: 1rem; padding: 0.75rem; background-color: rgb(239 246 255); border-radius: 0.25rem; border: 1px solid rgb(147 197 253);">
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem;">
<span style="font-weight: 600; color: rgb(30 64 175);">רמת קושי:</span>
<span id="difficultyDisplay" style="padding: 0.25rem 0.5rem; background-color: rgb(59 130 246); color: white; border-radius: 9999px; font-size: 0.75rem;">בינוני</span>
</div>
<div id="durationDisplay" style="font-size: 0.875rem; color: rgb(29 78 216); line-height: 1.4;">
משך מומלץ: 15 שניות • חובה בכל בתי הכנסת
</div>
<!-- התקדמות משתמש -->
<div id="progressDisplay" style="margin-top: 1rem; padding: 0.5rem; background-color: rgb(254 249 195); border-radius: 0.25rem; border: 1px solid rgb(252 211 77);">
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem;">
<span style="font-weight: 600; color: rgb(146 64 14);">התקדמות:</span>
<span id="masteryDisplay" style="font-size: 0.875rem; color: rgb(146 64 14);">0% שליטה</span>
</div>
<div style="width: 100%; height: 0.5rem; background-color: rgb(254 243 199); border-radius: 9999px; overflow: hidden;">
<div id="progressBar" style="width: 0%; height: 100%; background: linear-gradient(to right, rgb(34 197 94), rgb(16 185 129)); transition: width 0.3s ease;"></div>
</div>
<div id="bestScoreDisplay" style="font-size: 0.75rem; color: rgb(146 64 14); margin-top: 0.25rem; display: none;">שיא: 0%</div>
</div>
</div>
</div>
<!-- מידע דיבג -->
<div class="debug-info">
<div>AudioContext: <span id="audioContextStatus">לא זמין</span></div>
<div>Buffers: <span id="buffersStatus">0/4</span></div>
<div>Volume: <span id="volumeStatus">70%</span></div>
<div class="status-indicator">
<div id="loadingStatus" class="status-loading">טוען צלילים... אנא המתן רגע</div>
<div id="partialStatus" class="status-partial hidden">נטענו <span id="partialCount">0</span> מתוך 4 צלילים</div>
<div id="readyStatus" class="status-ready hidden">✓ כל הצלילים מוכנים לנגינה!</div>
</div>
</div>
</div>
<!-- טאב הקלטה -->
<div id="tab-record" class="tab-content hidden">
<h2>הקלטה אמיתית</h2>
<!-- כפתור הקלטה -->
<div style="text-align: center; margin-bottom: 1.5rem;">
<button id="recordBtn" class="button button-record">
🎤 התחל הקלטה
</button>
</div>
<!-- זמן הקלטה -->
<div id="recordingTime" class="recording-time hidden">
<div class="recording-indicator">
<span class="pulse-dot">🔴</span>
<span id="timeDisplay">0:00</span>
<span>מקליט...</span>
</div>
</div>
<!-- וויזואליזציה -->
<div class="canvas-container">
<canvas id="visualizer" class="canvas" width="800" height="200"></canvas>
</div>
<!-- סטטוס ניתוח -->
<div id="analyzingStatus" class="hidden" style="text-align: center; margin-bottom: 1rem;">
<div class="analyzing-indicator">
<span class="spinner">⚡</span>
<span>מנתח תקיעות...</span>
</div>
</div>
<!-- תוצאות ניתוח -->
<div id="analysisResults" class="hidden">
<h3 style="font-weight: bold; color: rgb(30 41 59); margin-bottom: 0.5rem;">
תוצאות ניתוח אחרונות:
</h3>
<div id="resultsContainer"></div>
</div>
</div>
<!-- טאב ניתוח -->
<div id="tab-analysis" class="tab-content hidden">
<h2>ניתוח ספקטרלי</h2>
<div class="grid-2">
<!-- מאפייני תקיעות -->
<div style="padding: 1rem; background-color: rgb(241 245 249); border-radius: 0.5rem;">
<h3 style="font-weight: bold; color: rgb(30 41 59); margin-bottom: 0.75rem;">
מאפייני תקיעות שופר
</h3>
<div style="display: flex; flex-direction: column; gap: 0.75rem; font-size: 0.875rem;">
<div style="padding: 0.5rem; background-color: white; border-radius: 0.25rem;">
<span style="font-weight: 600; color: rgb(37 99 235);">תקיעה:</span>
<div style="color: rgb(71 85 105);">צליל רציף וארוך, תדר יסודי ~415 Hz</div>
</div>
<div style="padding: 0.5rem; background-color: white; border-radius: 0.25rem;">
<span style="font-weight: 600; color: rgb(34 197 94);">שברים:</span>
<div style="color: rgb(71 85 105);">3 צלילים קצרים, תדר נמוך יותר ~380 Hz</div>
</div>
<div style="padding: 0.5rem; background-color: white; border-radius: 0.25rem;">
<span style="font-weight: 600; color: rgb(147 51 234);">תרועה:</span>
<div style="color: rgb(71 85 105);">9 צלילים קצרים מאוד, תדר גבוה ~450 Hz</div>
</div>
<div style="padding: 0.5rem; background-color: white; border-radius: 0.25rem;">
<span style="font-weight: 600; color: rgb(239 68 68);">תקיעה גדולה:</span>
<div style="color: rgb(71 85 105);">תקיעה ארוכה במיוחד, מתחזקת לסוף</div>
</div>
</div>
</div>
<!-- ספקטרום תדרים -->
<div style="padding: 1rem; background-color: rgb(241 245 249); border-radius: 0.5rem;">
<h3 style="font-weight: bold; color: rgb(30 41 59); margin-bottom: 0.75rem;">
ספקטרום תדרים
</h3>
<div style="display: flex; flex-direction: column; gap: 0.5rem;">
<div style="display: flex; align-items: center; gap: 0.75rem;">
<div style="width: 1rem; height: 1rem; border-radius: 0.25rem; background-color: rgb(59 130 246);"></div>
<span style="font-size: 0.875rem;">תדר יסודי: 300-500 Hz</span>
</div>
<div style="display: flex; align-items: center; gap: 0.75rem;">
<div style="width: 1rem; height: 1rem; border-radius: 0.25rem; background-color: rgb(34 197 94);"></div>
<span style="font-size: 0.875rem;">הרמוניה שנייה: 600-1000 Hz</span>
</div>
<div style="display: flex; align-items: center; gap: 0.75rem;">
<div style="width: 1rem; height: 1rem; border-radius: 0.25rem; background-color: rgb(147 51 234);"></div>
<span style="font-size: 0.875rem;">הרמוניה שלישית: 900-1500 Hz</span>
</div>
<div style="display: flex; align-items: center; gap: 0.75rem;">
<div style="width: 1rem; height: 1rem; border-radius: 0.25rem; background-color: rgb(107 114 128);"></div>
<span style="font-size: 0.875rem;">רעש טבעי: 50-200 Hz</span>
</div>
</div>
</div>
</div>
<!-- הסבר טכני -->
<div style="margin-top: 1.5rem; padding: 1rem; background-color: rgb(239 246 255); border-radius: 0.5rem; border: 1px solid rgb(147 197 253);">
<h4 style="font-weight: bold; color: rgb(30 64 175); margin-bottom: 0.5rem;">
איך פועל הניתוח?
</h4>
<p style="color: rgb(29 78 216); font-size: 0.875rem; line-height: 1.6;">
המערכת מבצעת ניתוח FFT (Fast Fourier Transform) על ההקלטה כדי לזהות את התדרים השולטים.
לכל סוג תקיעה יש חתימה ספקטרלית ייחודית המבוססת על תדר היסוד, ההרמוניות והמאפיינים הזמניים.
האלגוריתם משווה את התוצאות למאגר נתונים של תקיעות מוכרות ומחשב רמת ביטחון לכל זיהוי.
</p>
</div>
<!-- זמני תקיעה לפי ההלכה -->
<div style="margin-top: 1.5rem; padding: 1rem; background-color: rgb(255 251 235); border-radius: 0.5rem; border: 1px solid rgb(252 211 77);">
<h4 style="font-weight: bold; color: rgb(146 64 14); margin-bottom: 0.5rem;">
⏰ זמני תקיעה לפי ההלכה
</h4>
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; font-size: 0.875rem;">
<div style="color: rgb(120 53 15);">
<h5 style="font-weight: bold; margin-bottom: 0.25rem;">ראש השנה:</h5>
<ul style="line-height: 1.4;">
<li>• שחרית: מהנץ החמה</li>
<li>• מוסף: זמן עיקרי</li>
<li>• מנחה: לפני תפילה</li>
<li>• ערבית: אין תוקעין</li>
</ul>
</div>
<div style="color: rgb(120 53 15);">
<h5 style="font-weight: bold; margin-bottom: 0.25rem;">יום כיפור:</h5>
<ul style="line-height: 1.4;">
<li>• מוצאי יום כיפור</li>
<li>• אחרי תפילת ערבית</li>
<li>• תקיעה אחת בלבד</li>
</ul>
</div>
<div style="color: rgb(120 53 15);">
<h5 style="font-weight: bold; margin-bottom: 0.25rem;">שבת:</h5>
<ul style="line-height: 1.4;">
<li>• אין תוקעין בשבת</li>
<li>• חוץ מבבית כנסת</li>
<li>• רק לצורך הציבור</li>
</ul>
</div>
</div>
</div>
</div>
<!-- טאב תוצאות -->
<div id="tab-results" class="tab-content hidden">
<h2>תוצאות</h2>
<!-- מידע מערכת -->
<div style="margin-bottom: 1.5rem; padding: 1rem; background-color: rgb(241 245 249); border-radius: 0.5rem;">
<h3 style="font-weight: bold; color: rgb(30 41 59); margin-bottom: 0.75rem;">מצב מערכת</h3>
<div class="grid-4" style="font-size: 0.875rem;">
<div style="padding: 0.5rem; background-color: white; border-radius: 0.25rem;">
<span style="font-weight: 600;">AudioContext:</span>
<span id="systemAudioContext" style="margin-right: 0.5rem;">לא זמין</span>
</div>
<div style="padding: 0.5rem; background-color: white; border-radius: 0.25rem;">
<span style="font-weight: 600;">צלילים:</span>
<span id="systemBuffers" style="margin-right: 0.5rem;">0/4</span>
</div>
<div style="padding: 0.5rem; background-color: white; border-radius: 0.25rem;">
<span style="font-weight: 600;">עוצמה:</span>
<span id="systemVolume" style="margin-right: 0.5rem;">70%</span>
</div>
<div style="padding: 0.5rem; background-color: white; border-radius: 0.25rem;">
<span style="font-weight: 600;">שפה:</span>
<span>עברית</span>
</div>
</div>
</div>
<!-- בדיקות מערכת -->
<div style="margin-bottom: 1.5rem; padding: 1rem; background-color: rgb(239 246 255); border-radius: 0.5rem; border: 1px solid rgb(147 197 253);">
<h3 style="font-weight: bold; color: rgb(30 64 175); margin-bottom: 0.75rem;">בדיקות מערכת</h3>
<div style="display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.875rem;">
<div style="display: flex; justify-content: space-between;">
<span>Web Audio API נתמך:</span>
<span id="audioApiSupport">בודק...</span>
</div>
<div style="display: flex; justify-content: space-between;">
<span>מיקרופון זמין:</span>
<span id="micSupport">בודק...</span>
</div>
<div style="display: flex; justify-content: space-between;">
<span>localStorage זמין:</span>
<span id="storageSupport">בודק...</span>
</div>
</div>
</div>
<!-- סטטיסטיקות -->
<div class="grid-4" style="margin-bottom: 1.5rem;">
<div style="padding: 1rem; background-color: rgb(219 234 254); border-radius: 0.5rem; text-align: center;">
<div style="font-size: 1.5rem; font-weight: bold; color: rgb(37 99 235);" id="totalPractices">0</div>
<div style="font-size: 0.875rem; color: rgb(30 64 175);">סה״כ תרגולים</div>
</div>
<div style="padding: 1rem; background-color: rgb(220 252 231); border-radius: 0.5rem; text-align: center;">
<div style="font-size: 1.5rem; font-weight: bold; color: rgb(34 197 94);" id="correctSequences">0</div>
<div style="font-size: 0.875rem; color: rgb(21 128 61);">רצפים נכונים</div>
</div>
<div style="padding: 1rem; background-color: rgb(243 232 255); border-radius: 0.5rem; text-align: center;">
<div style="font-size: 1.5rem; font-weight: bold; color: rgb(147 51 234);" id="currentStreak">0</div>
<div style="font-size: 0.875rem; color: rgb(107 33 168);">רצף נוכחי</div>
</div>
<div style="padding: 1rem; background-color: rgb(255 251 235); border-radius: 0.5rem; text-align: center;">
<div style="font-size: 1.5rem; font-weight: bold; color: rgb(245 158 11);" id="bestAccuracy">0%</div>
<div style="font-size: 0.875rem; color: rgb(146 64 14);">דיוק מיטבי</div>
</div>
</div>
<!-- כפתורי פעולה -->
<div style="display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center;">
<button id="activateAudioBtn" class="button" style="background-color: rgb(59 130 246); color: white;">
⚡ הפעל מערכת אודיו
</button>
<button id="showDebugBtn" class="button" style="background-color: rgb(147 51 234); color: white;">
📊 הצג מידע דיבג
</button>
<button id="resetDataBtn" class="button" style="background-color: rgb(239 68 68); color: white;">
🔄 איפוס נתונים
</button>
</div>
</div>
<!-- טאב מדריך -->
<div id="tab-guide" class="tab-content hidden">
<h2>מדריך</h2>
<!-- הסבר על השופר -->
<div style="margin-bottom: 1.5rem; padding: 1rem; background-color: rgb(255 251 235); border-radius: 0.5rem; border: 1px solid rgb(252 211 77);">
<h3 style="font-weight: bold; color: rgb(146 64 14); margin-bottom: 0.75rem;">
מה זה שופר?
</h3>
<p style="color: rgb(120 53 15); line-height: 1.6;">
השופר הוא כלי נגינה עתיק העשוי מקרן של בעל חיים כשר, בדרך כלל איל.
הוא משמש במסורת היהודית בחגים ובטקסים דתיים, במיוחד בראש השנה ובמוצאי יום כיפור.
לשופר ארבעה סוגי תקיעות עיקריים, כל אחד עם משמעות ומאפיינים מיוחדים.
</p>
<div style="margin-top: 1rem; padding: 0.75rem; background-color: rgb(254 243 199); border-radius: 0.25rem;">
<h4 style="font-weight: bold; color: rgb(146 64 14); margin-bottom: 0.5rem;">הלכות יסוד:</h4>
<ul style="color: rgb(120 53 15); font-size: 0.875rem; line-height: 1.5;">
<li>• מצווה מן התורה בראש השנה</li>
<li>• צריך לכוון למצווה</li>
<li>• השומע כיוצא ידי חובה</li>
<li>• מברכים לפני התקיעות</li>
<li>• יש לתקוע 100 תקיעות ביום ראש השנה</li>
</ul>
</div>
</div>
<!-- סוגי התקיעות -->
<div class="grid-2" style="margin-bottom: 1.5rem;">
<div style="padding: 1rem; background-color: rgb(239 246 255); border-radius: 0.5rem; border: 1px solid rgb(147 197 253);">
<h4 style="font-weight: bold; color: rgb(30 64 175); margin-bottom: 0.5rem;">תקיעה</h4>
<p style="color: rgb(29 78 216); font-size: 0.875rem; margin-bottom: 0.5rem;">
צליל ארוך ורציף, מסמל קריאה לתשובה ויראת שמים
</p>
<div style="font-size: 0.75rem; color: rgb(37 99 235);">
משך: 3-4 שניות
</div>
</div>
<div style="padding: 1rem; background-color: rgb(240 253 244); border-radius: 0.5rem; border: 1px solid rgb(34 197 94);">
<h4 style="font-weight: bold; color: rgb(21 128 61); margin-bottom: 0.5rem;">שברים</h4>
<p style="color: rgb(22 101 52); font-size: 0.875rem; margin-bottom: 0.5rem;">
שלושה צלילים קצרים, מבטאים שברון לב ובכי
</p>
<div style="font-size: 0.75rem; color: rgb(34 197 94);">
משך: 3 צלילים של 0.6 שניות
</div>
</div>
<div style="padding: 1rem; background-color: rgb(250 245 255); border-radius: 0.5rem; border: 1px solid rgb(196 181 253);">
<h4 style="font-weight: bold; color: rgb(107 33 168); margin-bottom: 0.5rem;">תרועה</h4>
<p style="color: rgb(88 28 135); font-size: 0.875rem; margin-bottom: 0.5rem;">
תשעה צלילים קצרים מאוד, מסמלים זעקה ותרועת מלחמה
</p>
<div style="font-size: 0.75rem; color: rgb(147 51 234);">
משך: 9 צלילים של 0.15 שניות
</div>
</div>
<div style="padding: 1rem; background-color: rgb(254 242 242); border-radius: 0.5rem; border: 1px solid rgb(252 165 165);">
<h4 style="font-weight: bold; color: rgb(153 27 27); margin-bottom: 0.5rem;">תקיעה גדולה</h4>
<p style="color: rgb(127 29 29); font-size: 0.875rem; margin-bottom: 0.5rem;">
תקיעה ארוכה במיוחד, מסמלת גאולה ותקווה
</p>
<div style="font-size: 0.75rem; color: rgb(239 68 68);">
משך: 5+ שניות
</div>
</div>
</div>
<!-- רצפי התקיעות -->
<div style="padding: 1rem; background-color: rgb(241 245 249); border-radius: 0.5rem; margin-bottom: 1.5rem;">
<h3 style="font-weight: bold; color: rgb(30 41 59); margin-bottom: 0.75rem;">
רצפי התקיעות המסורתיים
</h3>
<div style="display: flex; flex-direction: column; gap: 0.75rem;">
<div style="padding: 0.75rem; background-color: white; border-radius: 0.25rem; border: 1px solid rgb(203 213 225);">
<div style="font-weight: 600; color: rgb(30 41 59); margin-bottom: 0.25rem;">
תשרת: תקיעה-שברים-תרועה-תקיעה
</div>
<div style="display: flex; flex-wrap: wrap; gap: 0.5rem;">
<span style="padding: 0.25rem 0.5rem; background-color: rgb(219 234 254); color: rgb(30 64 175); border-radius: 9999px; font-size: 0.875rem;">תקיעה</span>
<span style="padding: 0.25rem 0.5rem; background-color: rgb(219 234 254); color: rgb(30 64 175); border-radius: 9999px; font-size: 0.875rem;">שברים (×3)</span>
<span style="padding: 0.25rem 0.5rem; background-color: rgb(219 234 254); color: rgb(30 64 175); border-radius: 9999px; font-size: 0.875rem;">תרועה (×9)</span>
<span style="padding: 0.25rem 0.5rem; background-color: rgb(219 234 254); color: rgb(30 64 175); border-radius: 9999px; font-size: 0.875rem;">תקיעה גדולה</span>
</div>
</div>
<div style="padding: 0.75rem; background-color: white; border-radius: 0.25rem; border: 1px solid rgb(203 213 225);">
<div style="font-weight: 600; color: rgb(30 41 59); margin-bottom: 0.25rem;">
תשת: תקיעה-שברים-תקיעה
</div>
<div style="display: flex; flex-wrap: wrap; gap: 0.5rem;">
<span style="padding: 0.25rem 0.5rem; background-color: rgb(220 252 231); color: rgb(21 128 61); border-radius: 9999px; font-size: 0.875rem;">תקיעה</span>
<span style="padding: 0.25rem 0.5rem; background-color: rgb(220 252 231); color: rgb(21 128 61); border-radius: 9999px; font-size: 0.875rem;">שברים (×3)</span>
<span style="padding: 0.25rem 0.5rem; background-color: rgb(220 252 231); color: rgb(21 128 61); border-radius: 9999px; font-size: 0.875rem;">תקיעה גדולה</span>
</div>
</div>
<div style="padding: 0.75rem; background-color: white; border-radius: 0.25rem; border: 1px solid rgb(203 213 225);">
<div style="font-weight: 600; color: rgb(30 41 59); margin-bottom: 0.25rem;">
תרת: תקיעה-תרועה-תקיעה
</div>
<div style="display: flex; flex-wrap: wrap; gap: 0.5rem;">
<span style="padding: 0.25rem 0.5rem; background-color: rgb(243 232 255); color: rgb(107 33 168); border-radius: 9999px; font-size: 0.875rem;">תקיעה</span>
<span style="padding: 0.25rem 0.5rem; background-color: rgb(243 232 255); color: rgb(107 33 168); border-radius: 9999px; font-size: 0.875rem;">תרועה (×9)</span>
<span style="padding: 0.25rem 0.5rem; background-color: rgb(243 232 255); color: rgb(107 33 168); border-radius: 9999px; font-size: 0.875rem;">תקיעה גדולה</span>
</div>
</div>
</div>
</div>
<!-- פסולי תקיעה -->
<div style="margin-bottom: 1.5rem; padding: 1rem; background-color: rgb(254 242 242); border-radius: 0.5rem; border: 1px solid rgb(252 165 165);">
<h3 style="font-weight: bold; color: rgb(153 27 27); margin-bottom: 0.75rem;">
❌ פסולי תקיעה
</h3>
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem;">
<div>
<h4 style="font-weight: bold; color: rgb(153 27 27); margin-bottom: 0.5rem;">פסולי קול:</h4>
<ul style="color: rgb(127 29 29); font-size: 0.875rem; line-height: 1.5;">
<li>• תקיעה קצרה מדי</li>
<li>• שברים מחוברים</li>
<li>• תרועות איטיות מדי</li>
<li>• קול נשבר או חלק</li>
<li>• הפסקה ארוכה מדי</li>
</ul>
</div>
<div>
<h4 style="font-weight: bold; color: rgb(153 27 27); margin-bottom: 0.5rem;">פסולי רצף:</h4>
<ul style="color: rgb(127 29 29); font-size: 0.875rem; line-height: 1.5;">
<li>• שינוי סדר הקולות</li>
<li>• חזרה על קול</li>
<li>• חיבור בין רצפים</li>
<li>• הפסקה באמצע רצף</li>
<li>• שינוי מהירות</li>
</ul>
</div>
</div>
</div>
<!-- טיפים לשימוש -->
<div style="padding: 1rem; background-color: rgb(240 253 244); border-radius: 0.5rem; border: 1px solid rgb(34 197 94);">
<h3 style="font-weight: bold; color: rgb(21 128 61); margin-bottom: 0.75rem;">
טיפים לשימוש במערכת
</h3>
<ul style="list-style-type: disc; list-style-position: inside; color: rgb(22 101 52); display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.875rem;">
<li>התחל בתרגול עם תקיעות בודדות לפני מעבר לרצפים</li>
<li>השתמש באוזניות לקליטה מיטבית של קבצי ה-MP3 האמיתיים של השופר</li>
<li>בזמן הקלטה, החזק את המיקרופון במרחק קבוע מהשופר</li>
<li>הקלט במקום שקט לתוצאות ניתוח מדויקות יותר</li>
<li>השווה את ההקלטות שלך לקבצי ה-MP3 האמיתיים של השופר במערכת</li>
<li>תרגל באופן קבוע לשיפור הטכניקה</li>
<li>עבד על נשימה עמוקה מהבטן</li>
<li>החזק את השופר יציב ונוח</li>
<li>התחל בקול נמוך ועלה בהדרגה</li>
<li>שמור על קצב קבוע</li>
</ul>
</div>
<!-- ברכות התקיעה -->
<div style="margin-top: 1.5rem; padding: 1rem; background-color: rgb(220 252 231); border-radius: 0.5rem; border: 1px solid rgb(34 197 94);">
<h3 style="font-weight: bold; color: rgb(21 128 61); margin-bottom: 0.75rem;">
🙏 ברכות התקיעה
</h3>
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; font-size: 0.875rem;">
<div style="color: rgb(22 101 52);">
<h4 style="font-weight: bold; margin-bottom: 0.5rem;">ברכה ראשונה:</h4>
<div style="background-color: white; padding: 0.75rem; border-radius: 0.25rem; border: 1px solid rgb(34 197 94);">
<p style="font-weight: 600; margin-bottom: 0.5rem;">ברוך אתה ה' אלוהינו מלך העולם</p>
<p style="font-size: 0.875rem; line-height: 1.4;">אשר קדשנו במצוותיו וציוונו לשמוע קול שופר</p>
</div>
</div>
<div style="color: rgb(22 101 52);">
<h4 style="font-weight: bold; margin-bottom: 0.5rem;">הלכות ברכה:</h4>
<ul style="line-height: 1.5;">
<li>• מברכים לפני התקיעות</li>
<li>• עומדים בשעת הברכה</li>
<li>• מכוונים לברך</li>
<li>• עונים אמן</li>
<li>• אין להפסיק בין ברכה לתקיעה</li>
</ul>
</div>
</div>
</div>
<!-- מקורות הלכתיים -->
<div style="margin-top: 1.5rem; padding: 1rem; background-color: rgb(241 245 249); border-radius: 0.5rem; border: 1px solid rgb(203 213 225);">
<h3 style="font-weight: bold; color: rgb(51 65 85); margin-bottom: 0.75rem;">
📚 מקורות עיקריים
</h3>
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; font-size: 0.875rem;">
<div style="color: rgb(71 85 105);">
<h4 style="font-weight: bold; margin-bottom: 0.5rem;">משנה וגמרא:</h4>