Skip to content

Segmenting a concert from AudioSet tags, and matching it to the setlist - #1

Merged
alexarje merged 3 commits into
mainfrom
panns-segmentation-and-setlist
Sep 12, 2026
Merged

alexarje merged 3 commits into
mainfrom
panns-segmentation-and-setlist

Conversation

@alexarje

Copy link
Copy Markdown
Contributor

Summary

  • musiscape.tagging (extra musiscape[tagging], needs ambiscape with ml.tag_frames, see PANNs picks its device, and tags a whole recording frame by frame ambiscape#12): concert segmentation from PANNs posteriors. segment_concert(y, sr, songs=None, device=None) returns the usual spans (music / applause / voices / quiet / other). The chain: group_scores → decide_frames (weighted, level-gated) → mode_filter → runs_to_spans → enforce_min_duration → absorb_other → snap_to_songs → refine_music_onsets. Wired into concert.map_regions(..., method="panns", device=) and musiscape segment --method panns --device auto.
  • musiscape.setlist: load_setlist (JSON or .docx table), align_setlist(pieces, acts) (name matching on the introductions with thank-you and cue handling, order fallback, not_detected), act_title. musiscape segment --setlist plan.docx writes setlist.json (order-only without transcripts).
  • Guide section in docs/guide/concerts.md, CHANGELOG under Unreleased.

On the IMV H26 semester-start concert (87 min, 9 acts performed of 11 planned, order changed): the heuristic found 7 pieces and read the rock set as applause; the PANNs chain finds 9/9, and the setlist alignment lands all 9 on the right act with the two cancelled acts and the participatory number left unmatched.

Test plan

  • tests/test_tagging.py: each step on synthetic posteriors, onset refinement on a synthetic quiet→tone signal, and segment_concert end to end with a stubbed tagger (no PANNs needed).
  • tests/test_setlist.py: thank-you handling, the reordered/cancelled programme, last-name-wins, title cleaning, .docx and JSON loading (docx generated in the test).
  • Full suite: 127 passed, 1 skipped.
  • Real run on the concert via map_regions(method="panns", device="cuda").

🤖 Generated with Claude Code

https://claude.ai/code/session_01PcjBSXbXjqdj1tmYHoLiKd

alexarje and others added 3 commits September 12, 2026 21:48
`concert.classify_regions` reads a hall from spectral flatness, calibrated on one
camera-mic concert; it hears loud rock as applause and noise music as "other", and
`find_songs` found seven of nine pieces at IMV's semester-start concert. The new
`tagging` module does the same job from PANNs posteriors (ambiscape.ml.tag_frames):
group max over labels, a weighted per-frame decision with a level gate, a majority
filter, run-length spans, per-class minimum durations, `absorb_other` (loud sound
that is neither speech, applause nor silence, beside music, is the piece), snapping
to the song finder, and `refine_music_onsets`, which moves each start back to where
the sound begins so that a click on a piece does not land after the first note.
Same span vocabulary, so the timeline and the exports work unchanged;
`map_regions(method="panns")` and `segment --method panns` expose it. Nine of nine.

`setlist` reads the running order (JSON, or the first table of the kjøreplan .docx)
and aligns the detected pieces to it from the names the host says in the
introductions: thank-yous belong to the act that just finished, a name after "vær så
god" or "ved" is the act coming on, leftovers go by running order or continue the
previous act, and the acts nobody was matched to come back as not detected. On the
same concert that recovered a reordered programme with two cancelled acts.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PcjBSXbXjqdj1tmYHoLiKd
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PcjBSXbXjqdj1tmYHoLiKd
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PcjBSXbXjqdj1tmYHoLiKd
@alexarje
alexarje merged commit 2c32047 into main Sep 12, 2026
@alexarje
alexarje deleted the panns-segmentation-and-setlist branch September 12, 2026 20:55
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.

1 participant