mirror of
https://github.com/kennethreitz/pytheory.git
synced 2026-07-21 18:19:30 +00:00
c793e6147c
Two quick wins: - Score.ring_out([seconds]) appends trailing silence so reverb/delay tails ring out instead of being clipped at the last beat (resolves #60). Length auto-sizes to the longest effect tail across all parts (new play.effects_tail_seconds helper + _IR_DURATIONS table); pass an explicit duration to override. Opt-in via a new Score._tail_beats that total_beats adds after content, so seamless loops are unaffected. - .claude SessionStart hook installs libportaudio2 + runs `uv sync` so the audio test suite works in Claude Code on the web (sounddevice's Linux wheels don't bundle PortAudio; without it the package fails to import and nearly every test errors). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014ijpMiuST8kXnBoB5pSu8t
22 lines
762 B
Bash
Executable File
22 lines
762 B
Bash
Executable File
#!/bin/bash
|
|
# SessionStart hook: install system + Python deps so the audio test suite
|
|
# runs in Claude Code on the web. pytheory depends on `sounddevice`, whose
|
|
# Linux wheels don't bundle PortAudio — without libportaudio2 the package
|
|
# fails to import and ~every test errors with "PortAudio library not found".
|
|
set -euo pipefail
|
|
|
|
# Only needed in the remote (web) environment.
|
|
if [ "${CLAUDE_CODE_REMOTE:-}" != "true" ]; then
|
|
exit 0
|
|
fi
|
|
|
|
# System library for sounddevice (mirrors the CI workflow's install step).
|
|
if ! ldconfig -p 2>/dev/null | grep -q 'libportaudio\.so\.2'; then
|
|
sudo apt-get update -qq
|
|
sudo apt-get install -y -qq libportaudio2
|
|
fi
|
|
|
|
# Python dependencies (cached after first run; `sync` is incremental).
|
|
cd "$CLAUDE_PROJECT_DIR"
|
|
uv sync
|