Skip to content

Commit 70cd037

Browse files
committed
Use default FATs from manufacturers
1 parent c29a538 commit 70cd037

File tree

4 files changed

+36
-13
lines changed

4 files changed

+36
-13
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [1.1.0] - 2025-10-09
6+
7+
### Changed
8+
9+
- The center frequencies are now initialized with the actual default FATs
10+
for the various manufacturers that I found in the literature,
11+
instead of using a default log space distribution from 200..7500 Hz.
12+
513
## [1.0.0] - 2025-10-01
614

715
### Added

index.html

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,14 @@
1414
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap"
1515
rel="stylesheet"
1616
/>
17-
<link rel="stylesheet" href="main.css" />
17+
<link rel="stylesheet" href="main.css?v=1.1" />
1818
</head>
1919
<body>
2020
<header class="site-header">
2121
<div class="container">
2222
<h1 class="title">Binaural CI Alignment</h1>
2323
<p class="subtitle">
24-
Align the center frequencies of your cochlear implant with your other
25-
ear
24+
Align the center frequencies of your cochlear implant with your other ear
2625
</p>
2726
</div>
2827
</header>
@@ -244,14 +243,14 @@ <h1 class="title">Binaural CI Alignment</h1>
244243

245244
<footer class="site-footer">
246245
<div class="container">
247-
<b>bicial</b> <span id="version">v1.0</span> &mdash;
246+
<b>bicial</b> <span id="version">v1.1</span> &mdash;
248247
a <a href="https://github.com/cito/bicial">GitHub project</a> &copy; 2025
249248
by <a href="https://github.com/cito">Christoph Zwerschke</a> &mdash; see
250249
<a href="#" id="lnkInstructions">info &amp; terms</a>
251250
</div>
252251
</footer>
253252

254-
<script src="cochlea.js"></script>
255-
<script src="main.js"></script>
253+
<script src="cochlea.js?v=1.1"></script>
254+
<script src="main.js?v=1.1"></script>
256255
</body>
257256
</html>

main.js

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,32 @@
2828
const prefix = side === "L" ? KEYS.fLPrefix : KEYS.fRPrefix;
2929
const key = prefix + count;
3030
const raw = localStorage.getItem(key);
31+
let fat;
3132
if (raw) {
3233
try {
33-
const arr = JSON.parse(raw);
34-
if (Array.isArray(arr) && arr.length === Number(count)) return arr;
34+
fat = JSON.parse(raw);
35+
if (Array.isArray(fat) && fat.length === Number(count)) return fat;
3536
} catch {}
3637
}
37-
// default log-spaced 200..7500 Hz
38-
const arr = logSpace(200, 7500, Number(count));
39-
localStorage.setItem(key, JSON.stringify(arr));
40-
return arr;
38+
switch (count) {
39+
case 12: // MED-EL
40+
fat = [120, 235, 384, 579, 836, 1175,
41+
1624, 2222, 3019, 4084, 5507, 7410];
42+
break;
43+
case 16: // Advanced Bionics
44+
fat = [333, 455, 540, 642, 762, 906, 1076, 1278,
45+
1518, 1803, 2142, 2544, 3022, 3590, 4264, 6665];
46+
break;
47+
case 22: // Cochlear (ACE high bin)
48+
fat = [250, 375, 500, 625, 750, 875, 1000, 1125, 1250, 1500, 1750,
49+
2000, 2250, 2625, 3000, 3500, 4000, 4625, 5250, 6000, 6875, 8000];
50+
break;
51+
default: // default log-spaced 200..8000 Hz
52+
fat = logSpace(200, 8000, Number(count));
53+
break;
54+
}
55+
localStorage.setItem(key, JSON.stringify(fat));
56+
return fat;
4157
}
4258
function setF(count, side, arr) {
4359
const prefix = side === "L" ? KEYS.fLPrefix : KEYS.fRPrefix;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "bicial",
3-
"version": "1.0.0",
3+
"version": "1.1.0",
44
"description": "Binaural CI Alignment tool for cochlear implant users",
55
"main": "index.html",
66
"repository": {

0 commit comments

Comments
 (0)