opencode-rgbify-plugin 0.1.5 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of opencode-rgbify-plugin might be problematic. Click here for more details.
- package/bridge/ble_bridge.py +5 -1
- package/package.json +1 -1
package/bridge/ble_bridge.py
CHANGED
|
@@ -178,7 +178,11 @@ def _char_freq(ch: str) -> float:
|
|
|
178
178
|
if idx < 0:
|
|
179
179
|
idx = 0
|
|
180
180
|
elif idx > 90:
|
|
181
|
-
|
|
181
|
+
# Non-ASCII chars (CJK, emoji, …) all overflow to slot 90 (100 Hz), so
|
|
182
|
+
# every Chinese char sounded identical. Map the code point into the
|
|
183
|
+
# log-scale table deterministically (skipping the 5000 Hz scream slot)
|
|
184
|
+
# so distinct chars get distinct, audibly-different pitches.
|
|
185
|
+
idx = (ord(ch) - 91) % (len(AURALIZER_FREQ) - 1) + 1
|
|
182
186
|
return AURALIZER_FREQ[idx]
|
|
183
187
|
|
|
184
188
|
|