Skip to content

Bangs v0.2.2

Choose a tag to compare

@gxlself gxlself released this 20 Sep 10:35
· 40 commits to main since this release

刘海里多了一张待办清单,歌词换了整条链路:两个曲库、带翻译、能认出被翻译过的歌名。

改了什么

歌词 —— 这一版由 @RayZh0ng 的 #1 打底:QQ 音乐和网易云两个来源,按正在播放的播放器决定先问谁,失败会重试,缓存记住词是从哪儿来的,网易云的逐字 YRC 和中文翻译都读得出来,展开后原文和翻译各占一行(托盘里可以关掉翻译)。

在这之上补了匹配:

  • 按时长认录音。差 10 秒以上的判为另一个版本,翻唱和现场版不会再顶掉原唱——《小宇》曾经匹到 269 秒的翻唱,而你放的是 228 秒的张震岳。
  • 曲库把歌名翻译了也能认。Apple Music 把《西湖》给成 “West Lake”、把《爸爸妈妈》给成 “Mama & Papa”,一个字都对不上;搜索本身是认得的,所以排在前列又时长吻合的结果就按它说的算。
  • 繁体标题先折叠成简体再比对(《當時的月亮》↔《当时的月亮》),用的是系统自带的转写。
  • 罗马音歌手名(赵雷 → “Lei Zhao”)会把正主挤出结果,多加一次纯标题查询兜底,只认标题完全一致的。
  • 拿到的是纯音乐占位符或只有作词作曲时换下一个候选;没有翻译且歌词不是中文时,继续问下一个曲库,直到找到带翻译的那份。
  • 暂停时进度不再往回跳——播放器报的位置比声音停住的地方早一点,歌词会跟着闪一下。

待办 —— 面板顶栏新增「待办」:输入框里回车记一条,做完点一下,字逐个散开飘走、行随之折起,不留已完成。刚记下的那条会在收起态的刘海旁待五分钟(正在放歌时不抢歌词)。这是刘海唯一会用到键盘的地方,也只在输入框聚焦时才借。

剪贴板 —— 点图片现在是真的复制(PNG 和 TIFF 两种类型一起写),不再直接弹 Paste;文件仍交给 Paste。

托盘 —— 「显示器」子菜单里的显示器条目会成批消失、只剩「跟随主显示器」,0.1.3 就有的老毛病:菜单在后台线程被重建,而显示器名字只有主线程问得到。

安装

macOS 的包用 Developer ID 签了名并经过 Apple 公证,下载下来双击就能开。Windows 安装包没有签名,SmartScreen 会拦一次:更多信息 → 仍要运行。设置、暂存架和剪贴板历史都保留,直接装新包覆盖即可。

官网:https://gxlself.github.io/bangs/


A to-do list moves into the notch, and the lyrics pipeline was rebuilt end to end: two catalogues, translations, and songs whose titles were translated are now recognised.

What's new

Lyrics — this release builds on #1 by @RayZh0ng: two sources, QQ Music and NetEase, with the player that's playing deciding which one to ask first; failed lookups are retried; the cache remembers where the lyrics came from; NetEase's word-timed YRC and its Chinese translations are both read; and the expanded panel gives the original and the translation a line each (translations can be turned off in the tray).

On top of that, matching was improved:

  • Recordings are told apart by length. Anything more than 10 seconds off counts as a different version, so covers and live takes no longer push out the original — 《小宇》 once matched a 269-second cover while you were playing Chang Chen-yue's 228-second recording.
  • Titles the catalogue translated are recognised. Apple Music gives 《西湖》 as "West Lake" and 《爸爸妈妈》 as "Mama & Papa" — not a single character in common. The search itself knows better, so a top-ranked result whose length matches is taken at its word.
  • Traditional-character titles are folded into Simplified before comparing (《當時的月亮》 ↔ 《当时的月亮》), using the system's built-in transliteration.
  • Romanised artist names (赵雷 → "Lei Zhao") push the right song out of the results, so an extra title-only search serves as a fallback, accepting exact title matches only.
  • When a result is an instrumental placeholder or nothing but credits, the next candidate is tried; when there's no translation and the lyrics aren't in Chinese, the next catalogue is asked until one with a translation turns up.
  • Progress no longer jumps back when you pause — players report a position slightly before where the sound actually stopped, and the lyrics used to flicker with it.

To-do — a new To-do tab in the panel's top bar: press Return in the field to add a line, and click it once it's done — its letters scatter and drift away as the row folds up, and nothing completed is kept. The newest line waits beside the collapsed notch for five minutes (not while music is playing, so it doesn't displace the lyrics). This is the only place the notch uses the keyboard, and only while the field is focused.

Clipboard — clicking an image now really copies it (written as both PNG and TIFF) instead of just opening Paste; files are still handed over to Paste.

Tray — the displays in the Display submenu would vanish all at once, leaving only "Follow the main display", an old bug going back to 0.1.3: the menu was being rebuilt on a background thread, and display names can only be asked for on the main thread.

Install

The macOS build is signed with a Developer ID and notarized by Apple, so it opens with a double-click. The Windows installer is unsigned, so SmartScreen stops it once: More info → Run anyway. Settings, the shelf and clipboard history are all kept — just install the new package over the old one.

Website: https://gxlself.github.io/bangs/