audio-track-production
它能做什么
这项技能是一套可重复使用的方法,用于制作包含独立分轨、效果和 zip 压缩包的完整音频曲目。它适合需要一组经过检查的音频文件作为成果的人。
适用场景
- ✓当我需要一个母带曲目和多个分轨一起交付的时候。
- ✓当我希望在导出前为每个部分应用音频效果的时候。
- ✓当我需要把最终文件打包为 zip,并对照要求进行检查的时候。
技能链接
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/audio-track-production/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我想根据我的参考歌曲制作一条母带曲目及其分轨,然后打包为 zip 并进行检查。你能做到吗?”
每周 5 个新技能,1 分钟读完。
工作原理
AI 会检查参考文件,根据速度计算时间安排,生成分轨,应用效果,导出文件,将其压缩打包并验证结果。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Audio Track Production Workflow
This skill provides a reusable pattern for executing audio production tasks that require generating a master track and multiple stems, applying effects, and delivering verified outputs in an archive.
Overview
Follow these steps in order to ensure consistent, verifiable audio production outputs:
- Verify reference audio file
- Calculate timing parameters from BPM and duration
- Generate stems with explicit sample type specifications
- Apply audio effects via signal processing
- Export master track and all stems
- Archive deliverables in zip format
- Verify all outputs match specifications
Step 1: Verify Reference File
Before processing, verify the reference audio file is valid and readable:
import soundfile as sf
# Verify reference file exists and is readable
info = sf.info('reference_track.wav')
print(f"Sample rate: {info.samplerate} Hz")
print(f"Duration: {info.frames / info.samplerate:.2f} seconds")
print(f"Channels: {info.channels}")
print(f"Subtype: {info.subtype}")
Step 2: Calculate Timing Parameters
Derive timing for key section transitions from BPM and total duration:
def calculate_section_transitions(bpm, total_duration_sec, sections):
"""Calculate beat-aligned transition points for song sections."""
beats_per_second = bpm / 60.0
total_beats = total_duration_sec * beats_per_second
# Distribute sections proportionally or by specified ratios
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
}
cumulative_time += duration
return section_durations
# Example usage
sections = calculate_section_transitions(
bpm=120,
total_duration_sec=137,
sections={'intro': 16, 'verse': 32, 'chorus': 32, 'bridge': 16, 'outro': 16}
)
Step 3: Generate Stems with Explicit Sample Type
Always specify sample type explicitly when generating stems to ensure bit-depth consistency:
import numpy as np
import soundfile as sf
def generate_stem(name, duration_sec, sample_rate, subtype='FLOAT'):
"""Generate a stem with explicit sample type specification."""
frames = int(duration_sec * sample_rate)
# Generate audio content (replace with actual synthesis/processing)
t = np.linspace(0, duration_sec, frames)
audio_data = np.sin(2 * np.pi * 440 * t) # Example: 440Hz tone
# Ensure proper data type for specified subtype
if subtype == 'FLOAT':
audio_data = audio_data.astype(np.float32)
elif subtype == 'PCM_24':
audio_data = np.clip(audio_data, -1, 1) * (2**23 - 1)
audio_data = audio_data.astype(np.int32)
sf.write(
f'{name}_stem.wav',
audio_data,
sample_rate,
subtype=subtype, # Explicit subtype for 24-bit float or other
format='WAV'
)
return audio_data
# Example: Generate 4 stems at 48kHz, 137s, 24-bit float
sample_rate = 48000
duration = 137
stems = ['guitars', 'synths', 'bridge', 'bass']
for stem_name in stems:
generate_stem(stem_name, duration, sample_rate, subtype='FLOAT')
Step 4: Apply Effects via scipy.signal
Use scipy.signal for applying audio effects and processing:
from scipy import signal
import numpy as np
def apply_lowpass_filter(audio_data, sample_rate, cutoff_freq=5000):
"""Apply a lowpass filter using scipy.signal."""
nyquist = sample_rate / 2
normalized_cutoff = cutoff_freq / nyquist
# Design Butterworth filter
b, a = signal.butter(4, normalized_cutoff, btype='low')
# Apply filter
filtered_data = signal.filtfilt(b, a, audio_data)
return filtered_data
def apply_reverb_simple(audio_data, sample_rate, decay=0.5, delay_samples=1000):
"""Apply simple reverb effect."""
reverbed = np.copy(audio_data)
decay_factor = decay
for i in range(1, 6):
delayed = np.zeros_like(audio_data)
if len(audio_data) > delay_samples * i:
delayed[delay_samples * i:] = audio_data[:-delay_samples * i]
reverbed += delayed * (decay_factor ** i)
return np.clip(reverbed, -1, 1)
# Apply effects to stems
for stem_name in stems:
data, sr = sf.read(f'{stem_name}_stem.wav')
processed = ap
常见问题
开始需要准备什么?
一个参考音频文件,以及曲目的速度和长度。
它包含示例代码吗?
包含。指南提供了用于检查文件和时间安排的 Python 示例代码。
结果会放在哪里?
最终文件会被导出,并打包成一个 zip 压缩包。
详情
作者的原始描述
End-to-end audio production workflow with stems, effects, archiving, and verification
repo: HKUDS/AgentPilot
热度
- GitHub 星标
- 7.8k
- 排名
- #12842
- 许可证
- MIT
- 更新时间
- 2026/11/1
评论
- …
同一仓库的更多技能
agentpilot
7.8k帮你的智能体准备任务并运行 AgentPilot 循环,逐步改进项目:循环会提出修改、测试修改并为其打分。
openspace
7.8k帮你的智能体设置 OpenSpace,这是一个用于存储和获取智能体技能的工具,并通过 MCP 将其连接到你的 AI 应用。
rsi-arena
7.8k帮你的智能体设置并运行标准 AI 基准测试,例如 AIME 和 Terminal-Bench,用来比较不同的改进方法。
experiment-guide
7.8k帮你的智能体规划小型实验、阅读实验结果并记录发现,同时研究如何改进一个程序。