Skip to content

Read GAM's music profile and use it to choose soundtracks - #21

Merged
davior merged 1 commit into
mainfrom
claude/admiring-planck-ggdijx
Oct 26, 2026
Merged

davior merged 1 commit into
mainfrom
claude/admiring-planck-ggdijx

Conversation

@davior

@davior davior commented Oct 26, 2026

Copy link
Copy Markdown
Owner

This is step 2 of finding soundtracks by how they sound, after davior/gam#46 gave GAM's audio assets a music profile. Until now the assistant chose music by its title.

Changes

  • GamAssetRead.music (GamMusic) holds genres, moods, instruments, bpm, key, vocals and energy, mapped from GAM's flat music_* fields. It is null both when GAM knows nothing about a track and when GAM is older than gam#46, so this works against either version of GAM.
  • Assistant: search_assets and get_asset now include each track's profile. Empty parts are left out, and vocals reads as "instrumental" / "yes", or is left out when not known. The system prompt gets a short "Choosing music" section:
    • search by sound ("tense ambient", "slow piano"), not by the video's subject;
    • prefer instrumental tracks under narration;
    • match energy and mood to the section, and change track when the mood changes;
    • tracks that share a bpm and key crossfade cleanly;
    • a track with no profile is known only by its name.
  • Sound picker (FootageSearch): shows a one-line summary such as "Ambient, Tense · 92 BPM · Am · Low energy · Instrumental", under each hit and under the selected track.
  • docs/plan-of-attack.md: records this as GAM-6.

Testing

  • pytest -q: 704 passed. New tests cover the client mapping (a full profile, an empty one, an older GAM) and the assistant's compact output.
  • npm run format:check, npm run lint, npm test (185 passed, including the picker summary) and npm run build are all clean.

Generated by Claude Code

GAM now records what a track sounds like (davior/gam#46). GVC picks it up:

- GamAssetRead.music: genres, moods, instruments, bpm, key, vocals,
  energy. Null when GAM knows nothing about the track or predates it.
- The assistant's search_assets and get_asset carry the profile, with
  empty parts left out, and the prompt says how to use it: search by
  sound, prefer instrumental under narration, match energy and mood to
  the section, and crossfade tracks that share bpm and key.
- The Sound picker shows a one-line summary under each track.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DCL4jm6ogZBBhnjEfBBaXU
@davior
davior marked this pull request as ready for review October 26, 2026 10:28
@davior
davior merged commit 1938362 into main Oct 26, 2026
3 checks passed
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