본문으로 건너뛰기
Skillpedia
오디오 및 음성7.8k · #12838

adaptive-stem-alignment

하는 일

이 스킬은 각 조각을 확인하며 분리된 스템으로 마스터 오디오 트랙을 만드는 작업 흐름입니다. 음악 프로듀서나 AI 도구로 오디오를 만드는 사람을 위한 것입니다.

사용하는 경우

  • ✓길이가 맞아야 하는 여러 스템으로 완전한 트랙을 만들 때.
  • ✓스템의 길이가 달라서 연장하거나 맞춰야 할 때.
  • ✓최종 믹스를 내보내기 전에 모든 오디오 파일을 확인하고 싶은 경우.

스킬 링크

https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/audio-track-production-enhanced-enhanced-b8f537/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/audio-track-production-enhanced-enhanced-b8f537/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“드럼, 베이스, 보컬 스템이 모두 기준 길이에 맞는 곡을 만들고 싶습니다. 안내해 주실 수 있나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

AI는 템포와 길이로부터 타이밍을 계산하고, 기준 파일을 확인하고, 스템을 하나씩 만들고, 길이 차이를 고친 다음에야 믹스하고 내보냅니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Adaptive Stem Alignment Workflow

This skill provides a resilient pattern for audio production that emphasizes incremental verification, fail-fast principles, and adaptive duration handling. Each major step produces verified outputs before proceeding, with explicit strategies for handling stems of different durations.

Overview

Follow these steps in strict order. Each step must complete successfully and pass verification before proceeding to the next:

  1. Early timing calculation - Derive section transitions from BPM and duration first
  2. Verify reference audio - Validate input file properties and establish target duration
  3. Generate and verify each stem individually - One stem at a time with immediate verification
  4. Generate drum stem separately - Dedicated drum extension with rhythm patterns
  5. Align stem durations - Handle duration mismatches with adaptive extension strategies
  6. Apply effects with verification - Process each stem and verify output
  7. Export master track - Mix all verified stems
  8. Archive and final verification - Package deliverables with comprehensive checks

Key Differences from Standard Workflow

  • Incremental verification: Verify each stem immediately after generation, not just at the end
  • Fail-fast approach: Stop and report errors at each step rather than accumulating failures
  • Early timing: Calculate section transitions before any audio generation
  • Separated drums: Drum stem generation is a distinct step with rhythm-specific processing
  • Memory-efficient: Process stems individually to avoid large array operations that cause sandbox failures
  • Adaptive duration handling: Explicit strategies for mismatched stem durations (zero-padding, looping, crossfade extension)
  • Pre-mix alignment: Verify all stems match target duration before mixing

Step 1: Calculate Timing Parameters (Early)

Calculate all timing parameters before generating any audio. This ensures consistent timing across all stems:

def calculate_section_transitions(bpm, total_duration_sec, sections):
    """Calculate beat-aligned transition points for song sections."""
    beats_per_second = bpm / 60.0
    
    section_durations = {}
    cumulative_time = 0
    
    for section_name, beat_count in sections.items():
        duration = beat_count / beats_per_second
        section_durations[section_name] = {
            'start': cumulative_time,
            'end': cumulative_time + duration,
            'beats': beat_count,
            'start_beat': cumulative_time * beats_per_second
        }
        cumulative_time += duration
    
    return section_durations

# Configuration
BPM = 120
DURATION = 137
SECTIONS = {'intro': 16, 'verse': 32, 'chorus': 32, 'bridge': 16, 'outro': 16}

timing = calculate_section_transitions(BPM, DURATION, SECTIONS)
print("Timing calculated:")
for section, data in timing.items():
    print(f"  {section}: {data['start']:.2f}s - {data['end']:.2f}s ({data['beats']} beats)")

Step 2: Verify Reference Audio

Validate the reference file exists and has expected properties:

import soundfile as sf
import os

def verify_reference_file(filepath, expected_sample_rate=None, min_duration=None):
    """Verify reference audio file and return info dict."""
    if not os.path.exists(filepath):
        raise FileNotFoundError(f"Reference file not found: {filepath}")
    
    info = sf.info(filepath)
    errors = []
    
    if expected_sample_rate and info.samplerate != expected_sample_rate:
        errors.append(f"Sample rate mismatch: expected {expected_sample_rate}, got {info.samplerate}")
    
    if min_duration and info.duration < min_duration:
        errors.append(f"Duration too short: expected >= {min_duration}s, got {info.duration}s")
    
    if errors:
        raise ValueError(f"Reference file validation failed: {'; '.join(errors)}")
    
    print(f"Reference verified: {info.duration:.2f}s @ {info.samplerate}Hz, {info.channels}ch, {info.subtype}")
    return {
        'sample_rate': info.samplerate,
        'duration': info.duration,
        'channels': info.channels,
        'subtype': info.subtype
    }

# Verify reference
ref_info = verify_reference_file('reference.wav', expected_sample_rate=48000, min_duration=130)
TARGET_DURATION = ref_info['duration']  # Use reference duration as target

Step 3: Generate and Verify Each Stem Individually

Generate one stem at a time, verify it imm

자주 묻는 질문

스템이란 무엇인가요?

드럼이나 보컬처럼 곡을 이루는 분리된 오디오 부분입니다.

왜 스템을 따로 확인하나요?

일찍 확인하면 섞기 전에 오류를 잡아서, 다시 작업하는 비용을 줄일 수 있습니다.

어떤 도구를 쓰나요?

예제는 Python 오디오 라이브러리를 사용하므로, 컴퓨터에 그것이 준비되어 있어야 합니다.

상세 정보

작성자의 원본 설명

Incremental audio production with duration mismatch handling, adaptive stem extension, and pre-mix alignment verification

repo: HKUDS/AgentPilot

인기도

GitHub 스타
7.8k
순위
#12838
라이선스
MIT
업데이트
2026. 11. 1.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬