Skip to content

Sononymph v1.11: fix Windows similarity search and Sononym-update breakage - #175

Merged
emuell merged 2 commits into
renoise:masterfrom
esaruoho:sononymph-windows-fixes
Sep 7, 2026
Merged

Sononymph v1.11: fix Windows similarity search and Sononym-update breakage#175
emuell merged 2 commits into
renoise:masterfrom
esaruoho:sononymph-windows-fixes

Conversation

@esaruoho

@esaruoho esaruoho commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #171. All four issues here were reported by a Windows user on the Renoise forum after they updated Sononym and came back to the tool.

Similarity search was refused by Sononym on Windows

Sending a sample from Renoise answered with Sononym's own dialog:

Indexing error — Reason: Unable to resolve location
The specified location could not be resolved. Please ensure that the location is available when starting the crawler task.

do_search passes the temporary .flac through cFilesystem.unixslashes(), so on Windows Sononym is handed C:/Users/.../Renoise_TmpFile-0-79.flac, which its crawler cannot resolve. Added App.native_path() and applied it to the argument in do_search and do_browse. Paths stay unix-style internally; only what we hand to the executable is converted.

The file argument was also passed unquoted, so a user or temp folder containing a space broke the launch. Both arguments are quoted now, and the duplicated path_to_exe / tmp_path locals are gone.

"Detect" applied nothing when several Sononym versions were installed

With one version found, Detect calls set_path_to_config() directly and works. With two or more it only populated the dropdown and relied on the popup's notifier — but a popup does not fire its notifier when the picked index is already the current one, and the popup starts at index 1. So picking the newest version, which is the entry a user wants, silently applied nothing: the field looked filled while ConfigPath kept its old value and the status stayed "invalid paths".

Detect now applies versions[1] immediately and keeps the dropdown for choosing an older version.

"Open Path" crashed the tool's notifier

.\Sononymph/App.lua:1521: attempt to concatenate local 'directory_path' (a nil value)
stack traceback:
	.\Sononymph/App.lua:1521: in function 'OpenConfigPath'
	.\Sononymph/AppUI.lua:453: in function <.\Sononymph/AppUI.lua:452>

config_path:match("(.*/)") returns nil for an empty ConfigPath and for a hand-typed C:\...\query.json. Both are now reported in the status bar instead. While in there: the Linux branch assigned its command to os_name instead of command, so Open Path threw on Linux too.

A Sononym update silently broke the configuration

Sononym keeps query.json in a version-named folder, so .../Sononym/1.6.2/query.json becomes .../Sononym/1.6.14/query.json the moment Sononym updates itself. The tool was left pointing at a file that no longer exists and reported only "invalid paths", with nothing pointing at the Sononym update as the cause — this is what the reporter hit, and it will happen to every user on every Sononym update.

check_paths now notices the stored file is gone, adopts the newest version find_sononym_versions() can see, and names it in the status bar. Guarded against re-entry, since writing the preference fires the notifier that calls check_paths.

Preferences are written when set

set_path_to_exe / set_path_to_config only updated the document in memory. They now write it out, so a configured path survives an unclean shutdown.


Version bumped to 1.11 in manifest.xml and main.lua, changelog updated.

Testing. The same changes are running in Paketti's copy of Sononymph (esaruoho/paketti@0a9c98c), verified against a live Renoise 3.5.4 on macOS: find_sononym_versions() returns five installed versions sorted newest-first, and check_paths() with a planted dead 1.6.5 path heals to 1.6.2 with paths_are_valid = true and no re-entry. The Windows separator fix is the reporter's diagnosis from Sononym's own error message and is not yet confirmed on a Windows machine — I would like the reporter to try this build before you merge, and I will report back.

🤖 Generated with Claude Code

…akage

Reported on the Renoise forum: after updating Sononym, the tool reported
"invalid paths" after Detect, "Open Path" crashed the notifier, and a
similarity search from Renoise was refused by Sononym itself.

- do_search / do_browse: convert the argument handed to the Sononym
  executable to native separators. On Windows we passed the temp file as
  "C:/Users/.../Renoise_TmpFile.flac" and Sononym answered "Indexing
  error - Unable to resolve location". Adds App.native_path().
- do_search: quote the file argument (a user or temp folder containing a
  space broke the launch) and drop duplicated locals.
- AppUI Detect: with 2+ Sononym versions installed the button only filled
  the dropdown and relied on its notifier, which does not fire when the
  picked index is already the current one - and it starts at index 1. So
  picking the newest version applied nothing and left ConfigPath unset.
  Apply the newest immediately, keep the dropdown for older versions.
- OpenConfigPath: guard an unset ConfigPath and accept windows separators
  (this is the reported "attempt to concatenate local 'directory_path'
  (a nil value)"), and fix the Linux branch assigning its command to
  os_name instead of command.
- check_paths: self-heal a stale ConfigPath. Sononym stores query.json in
  a version-named folder, so every Sononym update leaves the tool pointing
  at a file that no longer exists. Adopt the newest detected version.
- Persist AppPath / ConfigPath when they are set.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WzMBd9wYDRk4Pu341ggkSv

@emuell emuell left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments. All no show-steppers, but improvements.

Comment thread Tools/com.renoise.Sononymph.xrnx/App.lua Outdated
Comment thread Tools/com.renoise.Sononymph.xrnx/App.lua Outdated
Comment thread Tools/com.renoise.Sononymph.xrnx/App.lua Outdated
esaruoho added a commit to esaruoho/paketti that referenced this pull request Sep 7, 2026
Review feedback from emuell on renoise/tools#175:

- Renoise persists tool preferences on its own, so App:save_preferences()
  and its three call sites are gone.
- OpenConfigPath now checks that the config folder actually exists and
  reports that, instead of a message about the path shape, and opens the
  folder with renoise.app():open_path() rather than a hand-rolled
  per-platform shell command. That also removes the broken Linux branch.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WzMBd9wYDRk4Pu341ggkSv
- Renoise persists tool preferences by itself, so App:save_preferences()
  and its three call sites are removed.
- OpenConfigPath checks that the config folder exists and says so when it
  does not, instead of reporting the path shape, and opens the folder with
  renoise.app():open_path() rather than a per-platform shell command. This
  also removes the Linux branch that assigned to os_name instead of command.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WzMBd9wYDRk4Pu341ggkSv
@esaruoho

esaruoho commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

All three addressed in e5b9bb1:

  • Manual preference saving — removed, App:save_preferences() and its three call sites are gone.
  • Open Path status message — it now checks io.exists(directory_path) and reports that the folder does not exist, instead of describing the path shape.
  • renoise.app():open_path() — replaces the per-platform shell command, which also removes the broken Linux branch.

The changelog entry for 1.11 was updated to match, and the same two changes are in Paketti's copy of Sononymph (esaruoho/paketti@40874459) so the two do not drift apart.

Still outstanding from my side: the Windows separator fix in do_search is diagnosed from Sononym's own Unable to resolve location error and has not been confirmed on a Windows machine yet. I will report back once the reporter has tried this build.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WzMBd9wYDRk4Pu341ggkSv

@emuell
emuell merged commit 8a0773a into renoise:master Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants