feat: continuous osc latent navigation - #45
Open
ucodia wants to merge 5 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
OSC-bound parameters can now navigate the latent seed space continuously instead of jumping between integer seeds. The
seedbinding accepts fractional values, a newseed ybinding exposes the second grid axis, and the seed-mode UI shows the absolute X/Y coordinates (the same values OSC writes) instead of fractional offsets. The renderer needed no changes: it already bilinearly blends the 4 seeds around a fractional coordinate.Details:
osc_handlernow casts with an explicit type per binding instead of the runtime type of the target, which is what truncated OSC values to integers (latent.xstarted as int and was reset to int by the seed box).OscMenu.set_paramsbackfills state-dict keys missing from older presets, so presets saved before theseed ykey existed load cleanly (and any future key addition is preset-safe).Usage: bind a fader to
seedwith a mapping expression likex*20for a smooth sweep through 20 seeds, or an XY pad toseed+seed yfor 2D roaming.Type of change
How was this tested?
Verified by automated tests and static checks:
tests/test_osc_menu.py,tests/test_latent_widget_osc.py): float storage through the handlers, type stability after int assignment, exact OSC menu key sets, end-to-end delivery through the menu wrapper including a mapping expression (x*20), and preset backfill round-tripped through pickle. Full suite: 26 passed.uv run zensical buildpasses for the docs change.viz.args.seedsflows into the existing bilinear seed blending inwidgets/renderer.pyunchanged; fractional, negative, and large values all resolve to valid seeds.Still needs manual GUI verification (cannot be driven headlessly):
seedwith mappingx*5, sweep 0 to 1: image morphs continuously, no jumps at integer boundaries.seedandseed y: smooth 2D roaming.seed yappears in the OSC menu with defaults.docs/assets/live-module-latent-space-01.png(still shows the old fractional boxes).Checklist
<type>: <subject>)docs/orREADME.mdis updated if user-visible behavior changedrelease.py(no new runtime files)Co-authored with an AI coding tool.
Generated with AI assistance