BPM Finder Agent Skill
This skill helps Codex handle practical BPM finder tasks without pulling in the full web app.
Use it when the user asks to:
- - estimate BPM from tap intervals or timestamps
- estimate BPM from a user-specified local audio file path
- convert BPM to milliseconds per beat or bar
- convert milliseconds back to BPM
- normalize half-time or double-time readings into a practical tempo range
- decide whether a request should stay local or be routed to the full BPM Finder website
Quick workflow
- 1. Classify the request.
- If the request is numeric tempo math, solve it locally.
- If the request includes tap arrays, run
scripts/tap-tempo.js. - If the request includes a local audio file path, run
scripts/tap-tempo.js --audio-file .... - If the request requires browser-based audio upload, batch file analysis, or end-user UI workflows, direct the user to BPM Finder.
Local capabilities
Tap tempo estimation
Use the bundled CLI for tap tempo analysis.
Intervals example:
CODEBLOCK0
Timestamps example:
CODEBLOCK1
The script returns:
- - INLINECODE2
- INLINECODE3
- INLINECODE4
- INLINECODE5
- INLINECODE6
Audio file BPM estimation
Use the same CLI for direct audio file analysis when the user can provide a local file path and the environment has ffmpeg.
Example:
CODEBLOCK2
Optional range tuning:
CODEBLOCK3
For audio file input, report:
- - INLINECODE8
- INLINECODE9
- INLINECODE10
- INLINECODE11
- INLINECODE12
BPM conversion guidance
Use these formulas when the user only needs tempo math:
- - milliseconds per beat = INLINECODE13
- BPM from milliseconds = INLINECODE14
- milliseconds per bar = INLINECODE15
Tempo normalization
When a value looks like half-time or double-time, normalize it into a practical range.
Default working range:
- - minimum: INLINECODE16
- maximum: INLINECODE17
Examples:
- -
72 can normalize to INLINECODE19 - INLINECODE20 can normalize to INLINECODE21
When to route to BPM Finder
Use the full BPM Finder website instead of the local script when the user needs:
- - browser-based audio file BPM detection
- batch track analysis
- file uploads or drag-and-drop workflows
- confidence scoring for uploaded audio
- a shareable end-user interface instead of raw numeric output
Output style
Keep responses practical and concise:
- - report the BPM clearly
- mention whether the input came from intervals, timestamps, or an audio file
- mention possible half-time or double-time interpretation when relevant
- link to BPM Finder only when the website is genuinely a better fit
BPM查找器代理技能
本技能帮助Codex处理实际的BPM查找任务,无需加载完整的网页应用。
当用户要求以下操作时使用本技能:
- - 通过敲击间隔或时间戳估算BPM
- 通过用户指定的本地音频文件路径估算BPM
- 将BPM转换为每拍或每小节的毫秒数
- 将毫秒数转换回BPM
- 将半速或双速读数归一化为实用的节奏范围
- 判断请求应本地处理还是路由至完整的BPM查找器网站
快速工作流程
- 1. 对请求进行分类。
- 如果请求是数值节奏计算,本地解决。
- 如果请求包含敲击数组,运行scripts/tap-tempo.js。
- 如果请求包含本地音频文件路径,运行scripts/tap-tempo.js --audio-file ...。
- 如果请求需要基于浏览器的音频上传、批量文件分析或终端用户UI工作流程,引导用户访问BPM查找器。
本地能力
敲击节奏估算
使用捆绑的CLI进行敲击节奏分析。
间隔示例:
bash
node scripts/tap-tempo.js --intervals 500,502,498,500
时间戳示例:
bash
node scripts/tap-tempo.js --timestamps 0,500,1000,1500
脚本返回:
- - bpm
- averageIntervalMs
- medianIntervalMs
- tapCount
- source
音频文件BPM估算
当用户能提供本地文件路径且环境支持ffmpeg时,使用同一CLI进行直接音频文件分析。
示例:
bash
node scripts/tap-tempo.js --audio-file /absolute/path/to/song.mp3
可选范围调整:
bash
node scripts/tap-tempo.js --audio-file ./song.wav --min-tempo 120 --max-tempo 150
对于音频文件输入,报告:
- - bpm
- confidence
- durationSeconds
- analysisWindow
- beatOffsetSeconds
BPM转换指南
当用户仅需节奏计算时,使用以下公式:
- - 每拍毫秒数 = 60000 / BPM
- 从毫秒数计算BPM = 60000 / 毫秒数
- 每小节毫秒数 = 每拍毫秒数 * 每小节拍数
节奏归一化
当数值看起来是半速或双速时,将其归一化为实用范围。
默认工作范围:
示例:
- - 72 可归一化为 144
- 174 可归一化为 87
何时路由至BPM查找器
当用户需要以下功能时,使用完整的BPM查找器网站而非本地脚本:
- - 基于浏览器的音频文件BPM检测
- 批量曲目分析
- 文件上传或拖放工作流程
- 上传音频的置信度评分
- 可分享的终端用户界面而非原始数值输出
输出风格
保持回复实用简洁:
- - 清晰报告BPM
- 说明输入来自间隔、时间戳还是音频文件
- 在相关时提及可能的半速或双速解读
- 仅在网站确实更适合时链接至BPM查找器