Commit 86ccba8
committed
feat: Add bandpass filter (150-800 Hz) for breathing/snoring isolation
Based on respiratory sound research:
- Normal breathing: 100-1500 Hz (peak 400-800 Hz)
- Snoring: 20-800 Hz (fundamental 40-100 Hz, peaks at 300-520 Hz)
- Heart sounds to filter: <100 Hz
Filter settings (research-backed 'goldilocks' range):
- Low cutoff: 150 Hz (filters heart sounds)
- High cutoff: 800 Hz (captures breathing + snoring harmonics)
- Q factor: 0.7 (wide enough for natural variation)
- Center frequency: ~346 Hz (geometric mean)
Sources: PMC2990233, PMC8448177, Stevens Institute sleep monitoring1 parent 87c09cf commit 86ccba8
1 file changed
Lines changed: 36 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
87 | 91 | | |
88 | 92 | | |
89 | 93 | | |
90 | 94 | | |
| 95 | + | |
91 | 96 | | |
92 | 97 | | |
93 | 98 | | |
| |||
378 | 383 | | |
379 | 384 | | |
380 | 385 | | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
381 | 394 | | |
382 | 395 | | |
383 | | - | |
| 396 | + | |
384 | 397 | | |
385 | 398 | | |
386 | 399 | | |
| |||
408 | 421 | | |
409 | 422 | | |
410 | 423 | | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
411 | 429 | | |
412 | 430 | | |
413 | 431 | | |
| |||
992 | 1010 | | |
993 | 1011 | | |
994 | 1012 | | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
995 | 1030 | | |
996 | 1031 | | |
997 | 1032 | | |
| |||
0 commit comments