danceflow-stemlab 1.13.0__tar.gz → 1.13.2__tar.gz

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.
Files changed (285) hide show
  1. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/AGENTS.md +2 -1
  2. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/PKG-INFO +10 -2
  3. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/README.md +9 -1
  4. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/mcp-registry/server.json +2 -2
  5. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/plugins/stemlab/.codex-plugin/plugin.json +1 -1
  6. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/plugins/stemlab/plugin.json +1 -1
  7. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/danceflow_stemlab.egg-info/PKG-INFO +10 -2
  8. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/danceflow_stemlab.egg-info/SOURCES.txt +2 -0
  9. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/__init__.py +1 -1
  10. danceflow_stemlab-1.13.2/src/stemlab/analysis/motion_loop_seams.py +127 -0
  11. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/analysis/rig_motion.py +273 -88
  12. danceflow_stemlab-1.13.2/tests/test_motion_loop_seams.py +54 -0
  13. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_rig_motion_analysis.py +69 -0
  14. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/.agents/plugins/marketplace.json +0 -0
  15. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/.github/dancerudiments-recording-ref +0 -0
  16. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/.github/workflows/arcadians-demo.yml +0 -0
  17. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/.github/workflows/arcadians-pages.yml +0 -0
  18. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/.github/workflows/arcadians-timeline.yml +0 -0
  19. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/.github/workflows/codex-plugin.yml +0 -0
  20. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/.github/workflows/recordings.yml +0 -0
  21. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/.github/workflows/release.yml +0 -0
  22. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/CONTRIBUTING.md +0 -0
  23. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/LICENSE +0 -0
  24. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/MANIFEST.in +0 -0
  25. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/docs/arcadians-release-demo.md +0 -0
  26. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/docs/arcadians-timeline.md +0 -0
  27. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/docs/beat-inputs.md +0 -0
  28. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/docs/beat-offsets.md +0 -0
  29. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/docs/branding/README.md +0 -0
  30. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/docs/branding/logo-monochrome.svg +0 -0
  31. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/docs/branding/logo.png +0 -0
  32. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/docs/branding/logo.svg +0 -0
  33. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/docs/codex-plugin.md +0 -0
  34. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/docs/codex-publishing.md +0 -0
  35. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/docs/cue-alignment.md +0 -0
  36. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/docs/evidence-models.md +0 -0
  37. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/docs/midi.md +0 -0
  38. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/docs/recording-pairs.md +0 -0
  39. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/docs/released-viewers.md +0 -0
  40. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/docs/rudiment-recordings.md +0 -0
  41. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/docs/screenshots/beat-offsets-truth.png +0 -0
  42. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/docs/screenshots/fourier-bands-arcadians.png +0 -0
  43. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/docs/screenshots/recording-comparison.png +0 -0
  44. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/docs/viewer-controls.md +0 -0
  45. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/examples/recordings/generate_demo.py +0 -0
  46. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/examples/recordings/generate_frequency_demo.py +0 -0
  47. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/examples/the-truth-is-a-virus/README.md +0 -0
  48. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/examples/the-truth-is-a-virus/analysis.json +0 -0
  49. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/examples/the-truth-is-a-virus/beats/beat_this.json +0 -0
  50. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/examples/the-truth-is-a-virus/beats/beatnet.json +0 -0
  51. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/examples/the-truth-is-a-virus/beats/consensus.json +0 -0
  52. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/examples/the-truth-is-a-virus/canonical.json +0 -0
  53. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/examples/the-truth-is-a-virus/evidence.json +0 -0
  54. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/examples/the-truth-is-a-virus/lyric-audition.json +0 -0
  55. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/examples/the-truth-is-a-virus/master.mp3 +0 -0
  56. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/plugins/stemlab/.mcp.json +0 -0
  57. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/plugins/stemlab/README.md +0 -0
  58. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/plugins/stemlab/branding/logo-monochrome.svg +0 -0
  59. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/plugins/stemlab/branding/logo.png +0 -0
  60. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/plugins/stemlab/branding/logo.svg +0 -0
  61. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/plugins/stemlab/mcp.json +0 -0
  62. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/plugins/stemlab/skills/stemlab/SKILL.md +0 -0
  63. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/plugins/stemlab/skills/stemlab/references/tools.md +0 -0
  64. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/pyproject.toml +0 -0
  65. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/scripts/Release-DanceFlow.ps1 +0 -0
  66. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/scripts/arcadians_http.py +0 -0
  67. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/scripts/assemble_arcadians_site.py +0 -0
  68. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/scripts/beat_offset_browser_checks.py +0 -0
  69. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/scripts/benchmark_evidence_corpus.py +0 -0
  70. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/scripts/build_arcadians_demo.py +0 -0
  71. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/scripts/build_arcadians_pair_demos.py +0 -0
  72. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/scripts/build_arcadians_timeline.py +0 -0
  73. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/scripts/build_beat_example.py +0 -0
  74. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/scripts/build_codex_plugin.py +0 -0
  75. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/scripts/capture_loop_workflow.py +0 -0
  76. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/scripts/check_arcadians_audio.py +0 -0
  77. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/scripts/check_arcadians_timeline.py +0 -0
  78. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/scripts/check_codex_timeline.py +0 -0
  79. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/scripts/check_semantic_runtime.py +0 -0
  80. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/scripts/check_torchaudio_decode.py +0 -0
  81. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/scripts/check_viewer_build.py +0 -0
  82. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/scripts/configure_viewer_build.py +0 -0
  83. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/scripts/loop_demo.py +0 -0
  84. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/scripts/prepare_codex_marketplace.py +0 -0
  85. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/scripts/publish_arcadians_pages.py +0 -0
  86. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/scripts/publish_mcp_registry.py +0 -0
  87. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/scripts/release_suite.py +0 -0
  88. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/scripts/smoke_midi.py +0 -0
  89. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/scripts/timeline_display_checks.py +0 -0
  90. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/scripts/viewer_releases.py +0 -0
  91. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/setup.cfg +0 -0
  92. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/danceflow_stemlab.egg-info/dependency_links.txt +0 -0
  93. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/danceflow_stemlab.egg-info/entry_points.txt +0 -0
  94. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/danceflow_stemlab.egg-info/requires.txt +0 -0
  95. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/danceflow_stemlab.egg-info/top_level.txt +0 -0
  96. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/__main__.py +0 -0
  97. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/analysis/__init__.py +0 -0
  98. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/analysis/beat_evaluation.py +0 -0
  99. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/analysis/beat_evidence.py +0 -0
  100. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/analysis/beat_offsets.py +0 -0
  101. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/analysis/evidence/__init__.py +0 -0
  102. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/analysis/evidence/adapters.py +0 -0
  103. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/analysis/evidence/registry.py +0 -0
  104. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/analysis/evidence/runner.py +0 -0
  105. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/analysis/evidence/worker.py +0 -0
  106. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/analysis/frequency_bands.py +0 -0
  107. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/analysis/harmony.py +0 -0
  108. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/analysis/loops.py +0 -0
  109. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/analysis/lyrics.py +0 -0
  110. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/analysis/midi/__init__.py +0 -0
  111. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/analysis/midi/adapters.py +0 -0
  112. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/analysis/midi/artifacts.py +0 -0
  113. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/analysis/midi/registry.py +0 -0
  114. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/analysis/midi/runner.py +0 -0
  115. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/analysis/midi/worker.py +0 -0
  116. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/analysis/motion_alignment.py +0 -0
  117. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/analysis/phrase_loops.py +0 -0
  118. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/analysis/registry.py +0 -0
  119. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/analysis/rhythm.py +0 -0
  120. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/analysis/rig_motion_package.py +0 -0
  121. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/analysis/rig_world_evidence.py +0 -0
  122. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/analysis/rudiment_batch.py +0 -0
  123. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/analysis/rudiment_matches.py +0 -0
  124. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/analysis/rudiment_pairs.py +0 -0
  125. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/analysis/rudiment_recordings.py +0 -0
  126. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/analysis/runner.py +0 -0
  127. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/analysis/semantic_audio.py +0 -0
  128. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/analysis/semantic_text.py +0 -0
  129. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/analysis/song_map.py +0 -0
  130. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/analysis/sonic.py +0 -0
  131. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/analysis/structure.py +0 -0
  132. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/analysis/tempo_regimes.py +0 -0
  133. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/analysis/transcription.py +0 -0
  134. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/audio.py +0 -0
  135. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/beat_comparison_cli.py +0 -0
  136. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/beat_map.py +0 -0
  137. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/beat_offset_cli.py +0 -0
  138. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/beats/__init__.py +0 -0
  139. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/beats/base.py +0 -0
  140. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/beats/beatnet.py +0 -0
  141. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/beats/beatthis.py +0 -0
  142. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/beats/beattransformer.py +0 -0
  143. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/beats/common.py +0 -0
  144. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/beats/inputs.py +0 -0
  145. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/bootstrap.py +0 -0
  146. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/branding.py +0 -0
  147. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/canonical.py +0 -0
  148. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/cli.py +0 -0
  149. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/clip_cli.py +0 -0
  150. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/clip_match.py +0 -0
  151. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/codex/__init__.py +0 -0
  152. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/codex/__main__.py +0 -0
  153. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/codex/bridge.py +0 -0
  154. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/codex/jobs.py +0 -0
  155. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/codex/paths.py +0 -0
  156. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/codex/server.py +0 -0
  157. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/codex/tasks.py +0 -0
  158. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/codex/timeline.py +0 -0
  159. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/codex/worker.py +0 -0
  160. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/cue_cli.py +0 -0
  161. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/cues.py +0 -0
  162. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/lyric_acoustic.py +0 -0
  163. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/lyric_batch.py +0 -0
  164. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/lyric_lrc.py +0 -0
  165. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/lyric_parts.py +0 -0
  166. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/lyric_quality.py +0 -0
  167. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/manifest.py +0 -0
  168. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/models.py +0 -0
  169. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/motion_alignment_cli.py +0 -0
  170. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/pipeline.py +0 -0
  171. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/recording_cli.py +0 -0
  172. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/rig_motion_cli.py +0 -0
  173. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/separators/__init__.py +0 -0
  174. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/separators/base.py +0 -0
  175. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/separators/bsroformer.py +0 -0
  176. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/separators/common.py +0 -0
  177. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/separators/demucs.py +0 -0
  178. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/separators/openunmix.py +0 -0
  179. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/separators/scnet.py +0 -0
  180. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/server.py +0 -0
  181. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/sonic_visualiser.py +0 -0
  182. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/spectrogram.py +0 -0
  183. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/spectrogram_repair.py +0 -0
  184. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/speech.py +0 -0
  185. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/static_timeline.py +0 -0
  186. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/timing_edits.py +0 -0
  187. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/types.py +0 -0
  188. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/util.py +0 -0
  189. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/vamp.py +0 -0
  190. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/vamp_runtime.py +0 -0
  191. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/web/app.js +0 -0
  192. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/web/arcadians-cover.jpg +0 -0
  193. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/web/arcadians-reference.json +0 -0
  194. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/web/index.html +0 -0
  195. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/web/static-timeline.js +0 -0
  196. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/web/style.css +0 -0
  197. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/web/timeline.css +0 -0
  198. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/webui.py +0 -0
  199. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/src/stemlab/word_alignment.py +0 -0
  200. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_analysis_registry.py +0 -0
  201. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_arcadians_fixture.py +0 -0
  202. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_arcadians_fourier_demo.py +0 -0
  203. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_arcadians_http.py +0 -0
  204. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_arcadians_pages_publish.py +0 -0
  205. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_arcadians_pair_demos.py +0 -0
  206. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_arcadians_release_demo.py +0 -0
  207. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_arcadians_rudiments.py +0 -0
  208. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_arcadians_runtime.py +0 -0
  209. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_arcadians_timeline.py +0 -0
  210. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_audio_normalization.py +0 -0
  211. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_bar_phase.py +0 -0
  212. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_beat_consensus.py +0 -0
  213. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_beat_evaluation.py +0 -0
  214. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_beat_evidence.py +0 -0
  215. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_beat_evidence_regressions.py +0 -0
  216. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_beat_inputs.py +0 -0
  217. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_beat_map.py +0 -0
  218. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_beat_offsets.py +0 -0
  219. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_beat_reference.py +0 -0
  220. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_beat_subframe_precision.py +0 -0
  221. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_beat_this_bootstrap.py +0 -0
  222. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_beatnet_bootstrap.py +0 -0
  223. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_beatnet_compat.py +0 -0
  224. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_branding.py +0 -0
  225. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_bsroformer_adapter.py +0 -0
  226. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_canonical.py +0 -0
  227. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_canonical_extended.py +0 -0
  228. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_clip_match.py +0 -0
  229. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_codex_bridge.py +0 -0
  230. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_codex_jobs.py +0 -0
  231. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_codex_package.py +0 -0
  232. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_codex_protocol.py +0 -0
  233. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_codex_release.py +0 -0
  234. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_codex_timeline.py +0 -0
  235. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_cue_integration.py +0 -0
  236. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_cues.py +0 -0
  237. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_deep_harmony.py +0 -0
  238. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_deep_lyrics.py +0 -0
  239. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_deep_sonic_rhythm.py +0 -0
  240. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_distribution_identity.py +0 -0
  241. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_docker_contract.py +0 -0
  242. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_evidence_models.py +0 -0
  243. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_example_beat_benchmark.py +0 -0
  244. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_frequency_bands.py +0 -0
  245. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_loop_integration.py +0 -0
  246. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_loops.py +0 -0
  247. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_lyric_lrc.py +0 -0
  248. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_lyric_parts.py +0 -0
  249. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_lyric_quality.py +0 -0
  250. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_manifest.py +0 -0
  251. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_midi_adapters.py +0 -0
  252. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_midi_extraction.py +0 -0
  253. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_midi_integration.py +0 -0
  254. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_midi_registry.py +0 -0
  255. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_missing_detection_fit.py +0 -0
  256. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_models.py +0 -0
  257. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_motion_alignment.py +0 -0
  258. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_onefile_build.py +0 -0
  259. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_phrase_loops.py +0 -0
  260. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_pytest_temp_root.py +0 -0
  261. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_release_suite.py +0 -0
  262. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_repository_hygiene.py +0 -0
  263. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_rig_motion_package.py +0 -0
  264. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_rig_world_evidence.py +0 -0
  265. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_rudiment_matches.py +0 -0
  266. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_rudiment_pairs.py +0 -0
  267. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_rudiment_recordings.py +0 -0
  268. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_server.py +0 -0
  269. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_song_map.py +0 -0
  270. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_sonic_visualiser.py +0 -0
  271. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_sonic_visualiser_workspace.py +0 -0
  272. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_spectrogram.py +0 -0
  273. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_speech_input_modes.py +0 -0
  274. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_speech_repetition.py +0 -0
  275. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_star_lights_reference.py +0 -0
  276. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_static_timeline.py +0 -0
  277. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_timing_edits.py +0 -0
  278. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_vamp.py +0 -0
  279. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_vamp_runtime.py +0 -0
  280. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_viewer_controls.py +0 -0
  281. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_viewer_releases.py +0 -0
  282. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_waveform_recordings.py +0 -0
  283. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_web_frontend.py +0 -0
  284. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_windows_reproducibility.py +0 -0
  285. {danceflow_stemlab-1.13.0 → danceflow_stemlab-1.13.2}/tests/test_word_alignment.py +0 -0
@@ -55,7 +55,8 @@
55
55
  - The `motion-evidence` CI job builds and installs the actual wheel without
56
56
  audio/model dependencies, checks isolated imports and runs
57
57
  `test_rig_motion_analysis.py`, `test_rig_motion_package.py`,
58
- `test_rig_world_evidence.py` and `test_motion_alignment.py` on Python 3.10/3.12.
58
+ `test_rig_world_evidence.py`, `test_motion_alignment.py` and
59
+ `test_motion_loop_seams.py` on Python 3.10/3.12.
59
60
  This is a source/wheel regression gate, not real choreography, audio listening,
60
61
  companion-release publication or Pages acceptance.
61
62
  - Preserve original capture/source hashes, source seconds, independent-family
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: danceflow-stemlab
3
- Version: 1.13.0
3
+ Version: 1.13.2
4
4
  Summary: Local music analysis for stems, timing, beats, harmony, lyrics, MIDI and loopable sections for Shorts. https://kieransimkin.co.uk/
5
5
  Author: Kieran Simkin
6
6
  Maintainer: Kieran Simkin
@@ -205,7 +205,15 @@ checks. It can export an explicitly **unverified** source beat map for the
205
205
  existing DanceRudiments 64-pip compiler. This is not verified musical beat 1,
206
206
  audio synchronization, or automatic looping/mesh-seam repair. No model downloads
207
207
  or native sampler are involved. The optional DanceRudiments authoring loader
208
- validates all motion-package chunk hashes. See [rig-motion analysis](docs/rig-motion-analysis.md).
208
+ validates all motion-package chunk hashes. Tempo ranking uses periodicity and spectral support to distinguish plausible
209
+ half- and double-time pulses. See [rig-motion analysis](docs/rig-motion-analysis.md).
210
+
211
+ Python callers with an independently aligned beat grid can also use
212
+ `stemlab.analysis.motion_loop_seams.rank_aligned_motion_loops` to rank hard-cut
213
+ recording loops of a fixed beat count. It reuses the pose, velocity and root
214
+ gates, can reject large PCM join steps, and accepts optional full-body and
215
+ lower-body camera measurements. It keeps both endpoints within a bounded
216
+ shared shift from the supplied beats. See [beat-constrained seam ranking](docs/rig-motion-analysis.md#beat-constrained-seam-ranking).
209
217
 
210
218
  For original captures, `--world-motion world-motion-evidence.json` consumes the
211
219
  source-hash-bound world-space/foot-contact sidecar produced by DanceRudiments.
@@ -77,7 +77,15 @@ checks. It can export an explicitly **unverified** source beat map for the
77
77
  existing DanceRudiments 64-pip compiler. This is not verified musical beat 1,
78
78
  audio synchronization, or automatic looping/mesh-seam repair. No model downloads
79
79
  or native sampler are involved. The optional DanceRudiments authoring loader
80
- validates all motion-package chunk hashes. See [rig-motion analysis](docs/rig-motion-analysis.md).
80
+ validates all motion-package chunk hashes. Tempo ranking uses periodicity and spectral support to distinguish plausible
81
+ half- and double-time pulses. See [rig-motion analysis](docs/rig-motion-analysis.md).
82
+
83
+ Python callers with an independently aligned beat grid can also use
84
+ `stemlab.analysis.motion_loop_seams.rank_aligned_motion_loops` to rank hard-cut
85
+ recording loops of a fixed beat count. It reuses the pose, velocity and root
86
+ gates, can reject large PCM join steps, and accepts optional full-body and
87
+ lower-body camera measurements. It keeps both endpoints within a bounded
88
+ shared shift from the supplied beats. See [beat-constrained seam ranking](docs/rig-motion-analysis.md#beat-constrained-seam-ranking).
81
89
 
82
90
  For original captures, `--world-motion world-motion-evidence.json` consumes the
83
91
  source-hash-bound world-space/foot-contact sidecar produced by DanceRudiments.
@@ -3,7 +3,7 @@
3
3
  "name": "io.github.kieransimkin/stemlab",
4
4
  "title": "StemLab \u2014 timing and loops for Shorts",
5
5
  "description": "Music and stem analysis, timing and loopable Shorts. https://kieransimkin.co.uk/",
6
- "version": "1.13.0",
6
+ "version": "1.13.2",
7
7
  "websiteUrl": "https://kieransimkin.co.uk/my-songs/",
8
8
  "repository": {
9
9
  "url": "https://github.com/kieransimkin/stemlab",
@@ -13,7 +13,7 @@
13
13
  {
14
14
  "registryType": "pypi",
15
15
  "identifier": "danceflow-stemlab",
16
- "version": "1.13.0",
16
+ "version": "1.13.2",
17
17
  "runtimeHint": "uvx",
18
18
  "runtimeArguments": [
19
19
  {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stemlab",
3
- "version": "1.13.0",
3
+ "version": "1.13.2",
4
4
  "description": "Local music analysis for stems, timing, beats, harmony, lyrics, MIDI and loopable sections for Shorts. https://kieransimkin.co.uk/",
5
5
  "skills": "./skills/",
6
6
  "mcpServers": "./.mcp.json",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
3
3
  "name": "stemlab",
4
- "version": "1.13.0",
4
+ "version": "1.13.2",
5
5
  "description": "Local music analysis for stems, timing, beats, harmony, lyrics, MIDI and loopable sections for Shorts. https://kieransimkin.co.uk/",
6
6
  "author": {
7
7
  "name": "Kieran Simkin",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: danceflow-stemlab
3
- Version: 1.13.0
3
+ Version: 1.13.2
4
4
  Summary: Local music analysis for stems, timing, beats, harmony, lyrics, MIDI and loopable sections for Shorts. https://kieransimkin.co.uk/
5
5
  Author: Kieran Simkin
6
6
  Maintainer: Kieran Simkin
@@ -205,7 +205,15 @@ checks. It can export an explicitly **unverified** source beat map for the
205
205
  existing DanceRudiments 64-pip compiler. This is not verified musical beat 1,
206
206
  audio synchronization, or automatic looping/mesh-seam repair. No model downloads
207
207
  or native sampler are involved. The optional DanceRudiments authoring loader
208
- validates all motion-package chunk hashes. See [rig-motion analysis](docs/rig-motion-analysis.md).
208
+ validates all motion-package chunk hashes. Tempo ranking uses periodicity and spectral support to distinguish plausible
209
+ half- and double-time pulses. See [rig-motion analysis](docs/rig-motion-analysis.md).
210
+
211
+ Python callers with an independently aligned beat grid can also use
212
+ `stemlab.analysis.motion_loop_seams.rank_aligned_motion_loops` to rank hard-cut
213
+ recording loops of a fixed beat count. It reuses the pose, velocity and root
214
+ gates, can reject large PCM join steps, and accepts optional full-body and
215
+ lower-body camera measurements. It keeps both endpoints within a bounded
216
+ shared shift from the supplied beats. See [beat-constrained seam ranking](docs/rig-motion-analysis.md#beat-constrained-seam-ranking).
209
217
 
210
218
  For original captures, `--world-motion world-motion-evidence.json` consumes the
211
219
  source-hash-bound world-space/foot-contact sidecar produced by DanceRudiments.
@@ -133,6 +133,7 @@ src/stemlab/analysis/harmony.py
133
133
  src/stemlab/analysis/loops.py
134
134
  src/stemlab/analysis/lyrics.py
135
135
  src/stemlab/analysis/motion_alignment.py
136
+ src/stemlab/analysis/motion_loop_seams.py
136
137
  src/stemlab/analysis/phrase_loops.py
137
138
  src/stemlab/analysis/registry.py
138
139
  src/stemlab/analysis/rhythm.py
@@ -250,6 +251,7 @@ tests/test_midi_registry.py
250
251
  tests/test_missing_detection_fit.py
251
252
  tests/test_models.py
252
253
  tests/test_motion_alignment.py
254
+ tests/test_motion_loop_seams.py
253
255
  tests/test_onefile_build.py
254
256
  tests/test_phrase_loops.py
255
257
  tests/test_pytest_temp_root.py
@@ -7,4 +7,4 @@ Created by Kieran Simkin — https://kieransimkin.co.uk/
7
7
  Music catalogue — https://kieransimkin.co.uk/my-songs/
8
8
  """
9
9
 
10
- __version__ = "1.13.0"
10
+ __version__ = "1.13.2"
@@ -0,0 +1,127 @@
1
+ """Rank beat-constrained motion cuts using aligned seam evidence."""
2
+ from collections.abc import Callable
3
+
4
+ import numpy as np
5
+
6
+ from . import rig_motion
7
+
8
+
9
+ def measure_pcm_join(pcm: np.ndarray, sample_rate: int, start: float, end: float) -> dict:
10
+ """Measure a hard wrap in normalized PCM on a zero-origin sample clock."""
11
+ first, stop = round(start * sample_rate), round(end * sample_rate)
12
+ width = max(2, round(.05 * sample_rate))
13
+ if not 0 <= first < stop <= len(pcm) or stop - first < 2 * width:
14
+ raise ValueError("PCM does not cover both interior loop neighborhoods")
15
+ head = np.asarray(pcm[first:first + width], dtype=float)
16
+ tail = np.asarray(pcm[stop - width:stop], dtype=float)
17
+ step = float(np.max(np.abs(head[0] - tail[-1])))
18
+ slope = float(np.quantile(np.abs(np.concatenate((np.diff(head, axis=0),
19
+ np.diff(tail, axis=0)))), .99))
20
+ head_rms = float(np.sqrt(np.mean(head ** 2)))
21
+ tail_rms = float(np.sqrt(np.mean(tail ** 2)))
22
+ return {
23
+ "step_peak": step,
24
+ "local_p99_slope": slope,
25
+ "step_to_local_slope": step / max(slope, 1e-9),
26
+ "level_change": abs(head_rms - tail_rms) / max(head_rms, tail_rms, .025),
27
+ "possible_click": bool(step >= .03 and step >= 2 * max(slope, 1e-9)),
28
+ }
29
+
30
+
31
+ def rank_aligned_motion_loops(
32
+ times,
33
+ values,
34
+ channels,
35
+ beat_seconds,
36
+ *,
37
+ beat_count: int,
38
+ pcm=None,
39
+ sample_rate: int | None = None,
40
+ view_seam: Callable[[float, float], tuple[float, float]] | None = None,
41
+ max_shift_seconds: float = .015,
42
+ max_results: int = 8,
43
+ ) -> list[dict]:
44
+ """Rank raw cuts of one beat count on a caller-supplied, aligned clock.
45
+
46
+ Both endpoints move by the same bounded offset. Optional normalized PCM
47
+ evidence rejects abrupt joins. A fixed-view observer may provide full-body
48
+ and lower-body mismatch in [0, 1]. Its observations are camera evidence.
49
+ """
50
+ times = np.asarray(times, dtype=float)
51
+ values = np.asarray(values, dtype=float)
52
+ beats = np.asarray(beat_seconds, dtype=float)
53
+ if (times.ndim != 1 or len(times) < 16 or values.shape != (len(times), len(channels))
54
+ or len(times) > 200_000 or values.size > rig_motion.MAX_VALUES
55
+ or not np.isfinite(times).all() or not np.isfinite(values).all()
56
+ or np.any(np.diff(times) <= 0)):
57
+ raise ValueError("Expected finite, increasing motion samples and matching channels")
58
+ if (beats.ndim != 1 or not np.isfinite(beats).all() or np.any(np.diff(beats) <= 0)
59
+ or not 1 <= beat_count <= 32 or not 1 <= max_results <= 50
60
+ or not 0 <= max_shift_seconds <= .03):
61
+ raise ValueError("Expected a bounded, increasing beat grid and loop search")
62
+ if (pcm is None) != (sample_rate is None):
63
+ raise ValueError("PCM and its native sample rate must be supplied together")
64
+ if pcm is not None:
65
+ pcm = np.asarray(pcm)
66
+ if (pcm.ndim not in (1, 2) or (pcm.ndim == 2 and pcm.shape[1] == 0)
67
+ or not 8000 <= sample_rate <= 192000 or not np.isfinite(pcm).all()):
68
+ raise ValueError("Expected finite normalized PCM and a supported sample rate")
69
+ _, active, _ = rig_motion._signals(times, values, channels)
70
+ groups = rig_motion._groups_at(values, channels, active)
71
+ if not groups or len(beats) <= beat_count:
72
+ return []
73
+
74
+ spacing = np.diff(times)
75
+ missing = spacing > 3 * np.median(spacing)
76
+ gap_start, gap_end = times[:-1][missing], times[1:][missing]
77
+ shifts = np.linspace(-max_shift_seconds, max_shift_seconds, 13) if max_shift_seconds else [0.]
78
+ best_by_anchor = []
79
+ for anchor, nominal_end in zip(beats[:-beat_count], beats[beat_count:]):
80
+ span = float(nominal_end - anchor)
81
+ if span < .2:
82
+ continue
83
+ starts = anchor + shifts
84
+ best = None
85
+ for start, end, pose, velocity, drift in rig_motion._seam_batches(
86
+ times, values, channels, groups, starts, span):
87
+ if (pose > .32 or velocity > .6 or drift > .02
88
+ or np.any((gap_end > start - .04) & (gap_start < end + .04))):
89
+ continue
90
+ audio = None
91
+ if pcm is not None:
92
+ if round(start * sample_rate) < 0 or round(end * sample_rate) > len(pcm):
93
+ continue
94
+ audio = measure_pcm_join(pcm, sample_rate, start, end)
95
+ if audio["possible_click"]:
96
+ continue
97
+ body, lower = view_seam(start, end) if view_seam else (None, None)
98
+ if view_seam and not all(0 <= v <= 1 for v in (body, lower)):
99
+ raise ValueError("Expected normalized fixed-view mismatch")
100
+ repeat = None
101
+ if not np.any((gap_end > end) & (gap_start < end + span)):
102
+ repeat = rig_motion._repeat_cost(times, values, groups, start, end)
103
+ shift = float(start - anchor)
104
+ cost = .34 * pose / .32 + .16 * velocity / .6 + .10 * drift / .02
105
+ if repeat is not None:
106
+ cost += .045 * min(repeat / .25, 2)
107
+ if body is not None:
108
+ cost += .25 * body + .32 * lower
109
+ if audio is not None:
110
+ cost += (.10 * audio["level_change"]
111
+ + .075 * min(audio["step_to_local_slope"] / 2, 1)
112
+ + .08 * min(audio["step_peak"] / .25, 1))
113
+ if max_shift_seconds:
114
+ cost += .012 * abs(shift) / max_shift_seconds
115
+ candidate = dict(
116
+ start_seconds=start, end_seconds=end, beats=beat_count,
117
+ nominal_start_seconds=float(anchor), nominal_end_seconds=float(nominal_end),
118
+ beat_shift_seconds=shift, pose_mismatch=pose, velocity_mismatch=velocity,
119
+ root_drift_relative=drift, repeated_phrase_mismatch=repeat,
120
+ body_view_mismatch=body, lower_body_view_mismatch=lower, audio_seam=audio,
121
+ cost=cost, requires_review=True,
122
+ )
123
+ if best is None or candidate["cost"] < best["cost"]:
124
+ best = candidate
125
+ if best is not None:
126
+ best_by_anchor.append(best)
127
+ return sorted(best_by_anchor, key=lambda cut: cut["cost"])[:max_results]