Communitygithub.com

sandeshrajbhandari/hyperframes-instruct

用于 HyperFrames 合成中已放置音频的混音指令集:淡入淡出、交叉淡化、轨道增益/音量、音量自动控制、闪避、语音旁白闪避、效果链(EQ、压缩器、限制器、门限、饱和、延迟、混响、合唱、移相器、比特压缩),以及子混音总线(`<hf-audio-group>`)。不用于音频源搜索或生成。

hyperframes-instruct 是什么?

该技能(Skill)专为 HyperFrames 平台下的音频混音任务设计,由 sandeshrajbhandari 提供。它专注于处理已放置在合成中的音频片段,提供精细的混音控制,包括淡入淡出、交叉淡化、轨道增益/音量、音量与效果参数的自动控制、闪避(特别是语音旁白闪避,即 Voiceover Carve),以及全面的效果链(EQ、压缩器、限制器、噪声门、饱和器、延迟、混响、合唱、移相器、比特压缩)。其核心设计理念是将混音视为一组“关系”而非简单的处理器堆叠。它通过在音频/视频元素上使用 `data-fx-chain`、`data-automation` 和 `data-fx-carve` 属性来承载所有效果与自动控制信息,并且预览和渲染使用同一 Web Audio 图,确保所见即所得,无需二次调整。该技能与 `/hyperframes-core`(处理片段时序和轨道布局)以及 `/media-use`(处理音频源搜索和生成)明确分工,形成互补。支持的平台包括 Cursor、Claude Code、Codex 等支持 HyperFrames 的 AI 代理工具。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/sandeshrajbhandari/hyperframes-instruct/tree/HEAD/.agents/skills/hyperframes-audio

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

插件安装: 在运行设置或刷新命令之前,如果此技能是 HyperFrames 插件的一部分,请遵循 插件执行规则。独立安装则保留以下更新说明。

HyperFrames 音频

混音是一系列关系,而非处理器的堆叠。两条各自听起来不错的轨道放在一起可能无法入耳,而解决方法几乎从来不是“把音量调低”——而是要找出它们在争抢什么,并将其赋予真正需要的那一方。此处的每个工具都是为了表达某一种关系而存在。

效果通过 data-fx-chain 存在于元素之上。预览和渲染运行着相同的 Web Audio 图——在实时上下文中是工作室,在离线上下文中则是其已经驱动的浏览器内部的引擎。每个效果只有一种实现,因此你拖拽时听到的,就是最终写入的内容。你永远无需调整两次。

片段时序归属于 /hyperframes-core:音频/视频的修剪和素材范围使用 data-start、data-duration 和 data-media-start,交叉淡化通过重叠不同轨道上的片段实现。本技能负责已放置轨道的淡入/淡出、交叉淡化包络、轨道增益/音量、音量与效果自动控制、闪避/语音旁白闪避,以及效果链。/media-use 负责素材搜索、生成和预处理。

恒定的 data-playback-rate(0.1..10)在匹配的音频/视频元素使用相同的时间、素材偏移和速率时,对于画面和音高校正的声音来说是渲染安全的。速度斜坡是 data-automation 中的一个 rate 通道(请参阅 docs/reference/speed-ramps);它优先级高于恒定值,并在预览和渲染中保持音高。HyperFrames 不提供自动波形同步或漂移校正。 对于可复制的剪切/交叉淡化/重定时方案,请使用 /hyperframes-core → references/creator-editing-recipes.md。

三个属性承载一切,它们位于音频/视频元素本身——或者,对于前两个属性,位于 <hf-audio-group> 总线上(请参阅“一个总线用于多条轨道”):

属性承载内容
data-fx-chain效果,按信号处理顺序排列
data-automation该轨道音量或其效果参数的包络
data-fx-carve闪避自身的设置,以便后续重新推导

内置的效果家族包括:增益、均衡器(高通、低通、峰化、搁架)、压缩器、限制器、噪声门、饱和器、延迟、混响、合唱、移相器和比特压缩。

每种效果的精确 JSON 以及通道必须满足的规则:references/attributes.md。 所有效果及其参数、范围和单位:references/fx-registry.md。 如何排查无法听到的音频文件的问题:references/diagnosis.md。 预设、命名任务和单旋钮方案,以及症状对应修复表:references/presets.md — 在手动构建效果链之前请先阅读该文档,因为预设或命名任务通常已经直接指出了问题。

各部分如何协同工作

两个创作界面写入这些属性;两个运行时通过相同的构建器读取它们。这种共享的中间层正是预览能够预测渲染结果的原因。

flowchart TB
  voice["语音轨道<br/>媒体文件"]
  bed["音乐背景<br/>媒体文件"]

  subgraph AUTHOR["创作层 —— 唯一写入属性的部分"]
    panel["工作室<br/>语音旁白闪避控制"]
    script["scripts/carve.mjs<br/>检测配对"]
    analysis["core/audioCarve.ts<br/>carveProfile · analyseCarveBands<br/>analyseCarveDuck · analyseCarveDynamics"]
    panel --> analysis
    script --> analysis
  end

  voice --> analysis
  bed --> analysis

  subgraph ATTRS["写入背景音乐元素"]
    carveAttr["data-fx-carve<br/>音频源 · 强度"]
    chainAttr["data-fx-chain<br/>峰化 EQ xN + 增益,带有 fromCarve 标记"]
    autoAttr["data-automation<br/>每个被闪避参数对应一个通道"]
  end

  analysis --> carveAttr
  analysis --> chainAttr
  analysis --> autoAttr

  subgraph SHARED["同一实现,由两者读取"]
    build["audioFxGraph.ts · buildFxChain"]
    sched["audioFxAutomation.ts · scheduleChainAutomation"]
  end

  chainAttr --> build
  autoAttr --> sched

  build --> preview["预览<br/>实时 AudioContext<br/>attachElementFxChain"]
  sched --> preview
  build --> render["渲染<br/>在无头浏览器中的 OfflineAudioContext<br/>applyAudioFxChain"]
  sched --> render

  preview --> heard["拖拽时你所听到的"]
  render --> wav["处理后的 WAV 文件<br/>+ chainTailSeconds 确保混音尾部通过"]
  wav --> mix["引擎 · audioMixer<br/>音量通道在此处烘焙到 PCM,而不是在图结构中"]
  mix --> out["最终的混音输出"]

  edit["在播放中编辑属性"] -.->|MutationObserver| preview

闪避自身的设置永远不会在播放时被读取——由它产生的效果链和通道才是实际播放的内容。data-fx-carve 的存在是为了让你可以更改某个已有闪避的强度,而无需从滤波器反向推导出来。

在被闪避的背景音乐内部,信号首先经过陷波,然后是电平匹配,最后是你自行添加的任何效果——这也就是为什么你添加的限制器仍然可以充当最终的限幅器:

flowchart LR
  src["解码后的背景音乐"] --> p1["峰化 EQ<br/>400 Hz"]
  p1 --> p2["峰化 EQ<br/>1 kHz"]
  p2 --> p3["峰化 EQ<br/>1.6 kHz"]
  p3 --> g["增益<br/>电平匹配"]
  g --> hand["你自己的效果<br/>例如 限制器"]
  hand --> dest["轨道增益,然后输出"]

  l1["通道 fx.n1.gain"] -.->|"语音在<br/>该频段的<br/>电平包络"| p1
  l4["通道 fx.n4.gain"] -.->|"背景音乐<br/>整体闪避程度"| g

首先,找出问题所在

下表从“听起来声音发闷”开始——这假设已经有人听过并指出了这个问题。如果给你一个文件并说“修复它”,而你没有听到任何描述,也无法亲自听,那么你就必须通过测量来判断。有一条规则统领全局:

一个未知的单一语音的绝对频谱无法被诊断。 共振峰变化范围是 ±10 dB,基频范围是 85–255 Hz,句末电平会下降 5–6 dB。 单独看,每一个都像是缺陷,但实际上都是说话者的正常特征。

因此,进行比较,并且是同文件内部的比较:如果有干净的原始文件,就用它来比较;否则,利用语音停顿之间的间隙——任何在间隙中可听的内容都是叠加的,而间隙的频谱反映的是声道特性而非语音本身。与公开的平均频谱或合成参考语音进行比较是行不通的:两名说话者之间的差异通常比大多数缺陷还要大,而本指南所依据的评估中的两个错误答案正是源于此。

当没有原始文件也没有可用的静音部分时,静态的调性缺陷实际上是欠定问题。请如实说明,并提供所有可能的分析结果,而不是仅挑选一个并据此构建效果链。

命令、陷阱和实际案例:references/diagnosis.md。在诊断一个无人描述过的文件之前,请务必先阅读它。

从症状入手

一旦你确定了频段和类型,就准确描述音频的问题所在。大多数有问题的音频都可以归入以下一两个类别,并且每个类别都有内置的解决方案:

听起来像使用
嗡嗡声或低沉的隆隆声rumble-cut,或在 80 Hz 处使用 highpass
声音发闷、胸腔共鸣过重Tame Boominess 任务 (200 Hz)
声音含糊,像隔着一层纸板Reduce Mud 任务 (250 Hz)
听不清话语Add Clarity 任务 (3 kHz),或闪避背景音乐
刺耳、听起来很累Soften Harshness 任务 (3.2 kHz)
有些词比其他词响得多Evenness 压缩器,或 Even Out Levels
句子之间的环境噪声room-gate
语音和音乐相互干扰Voiceover carve — 不是对任何一个做 EQ
听起来很干,不像在空间中room-tight 或 room-natural
听起来“业余”voice-clean,它按顺序包含了上述四个步骤

完整分类、每个预设包含的内容、频段词汇以及明确不涵盖的内容(去咝声、降噪、音色匹配):请参阅 references/presets.md。

先减法后加法,先滤波后电平,先关系后特性,最后才是音色与动态上限。每一步都会改变下一步的输入——在高速滤波器之前设置的压缩器会把能量浪费在抑制隆隆声上。

根据问题选择效果家族,而非只看名称

滤波器(highpass、lowpass、peaking、lowshelf、highshelf)决定一个轨道允许占用哪些频率范围。这是解决两个音频源冲突的首要工具,因为冲突发生在频段上:一个背景音乐和一个人声都想占据 1–3 kHz,从背景音乐中移除这个频段对音乐的影响远小于简单调低整个轨道的音量对混音的破坏。对人声使用高通滤波器是处理隆隆声的标准方法;低通滤波器则可用于故意制造暗淡或含混的效果。

动态处理器(gain、compressor、limiter、gate)决定轨道电平随时间变化的行为。压缩器缩小响与轻之间的差距,从而使轻的部分得以提升。限制器是一个限幅器——它不塑造声音,只保证不超过阈值。噪声门移除低于阈值的声音,这就是如何在短语之间消除房间背景噪声的方法。gain 是一个简单的电平调整级,也是自动控制通道在轨道需要让出空间时所承载的效果。

非线性效果(saturate、bitcrush)改变波形的形状,从而增加原本不存在的谐波。当轨道需要特色或质感而非校正时,可以使用它们——请记住,它们是生成性的:它会使贫瘠的素材变得更丰满,而非更干净。

时间效果(delay、reverb、chorus、phaser)将轨道置于一个空间或赋予其宽度。它们是最容易破坏混音的效果,因为一个尾音或一个失谐的复制版本会占据人声所需的空间。请将它们用于应该“位于”其他元素后方的对象,并保持湿声比例比你独立听时感觉合适的更低。

效果链是串行的:每个效果处理前一个效果输出的结果。因此,校正式滤波应放在早期,特性处理在中间,限制器放在最后,这样它才能真正起到限幅的作用。

语音旁白闪避

它解决的问题。 背景音乐在人声下方使得人声难以听清。本能反应是将整个背景音乐闪避降低,这虽然有效,但会完全牺牲背景音乐的力度——音乐在整段旁白中都显得软弱无力。但人声并不需要整个频谱。它只需要它实际占用的几个频段。闪避(Carve)只对这些频段进行衰减,而背景音乐保留了它的低频和高频,因此它仍然是音乐,同时人声仍然清晰可辨。

这是一种关系,而非一个效果。 设置位于背景音乐上——即被处理的轨道——并且它指定了要监听的人声,就像侧链压缩器一样:你选择音量会降低的轨道,并确定让它降低的信号源。永远不要将闪避放在人声轨道上。 人声对自己进行闪避是一个错误,而非微妙的混音选择。

针对所有人声,而非其中之一。 sources 是一个列表,因为一个背景音乐通常贯穿整个序列——一个旁白、一段采访回答、另一位主持人。在测量任何内容之前,它们会被求和到背景音乐自己的时钟上(mixCarveSources),因此一次分析覆盖了所有内容:频段来自所有语音,包络线在任何语音出现的地方上升。在背景音乐播放期间从未播放过的人声则不会被考虑;它们不会掩盖背景。

对多个片段 ID 进行闪避是错误的。应将片段分组,然后对组进行闪避。 这是一条不变规则,而非建议。逐一列出片段 ID 必须完全正确,并且只有在下次编辑之前才有效——后面新增的第四个旁白片段将在闪避的感知范围之外播放,背景音乐将无法静默地为其闪避。如果改用组名,则在分析时解析成员关系,因此稍后添加到组中的片段会自动被覆盖,而无需修改 sources:

<!-- 将旁白分组,然后让背景音乐闪避该组 -->
<audio id="vo-intro" data-audio-group="voiceover" …></audio>
<audio id="vo-middle" data-audio-group="voiceover" …></audio>
<audio id="vo-outro" data-audio-group="voiceover" …></audio>

<audio id="music" data-fx-carve='{"enabled":true,"sources":["voiceover"],"strength":0.8}' …></audio>

一个 sources 列表包含两个或多个普通片段 ID 而非一个组名,会被 audio_carve_ungrouped_sources 代码检查规则捕获——它仍然可以工作,但这是一个当添加片段时会静默失效的版本。

保持闪避组为人声专用组:不应包含背景音乐、音效或音乐。 sources 中的组 ID 会在每次分析时解析为所有当前成员,因此你命名的组就是你之后要处理的组——而不是当初写入时测量过的那些轨道。两种可能出错的情况:

  • 背景音乐位于自己的源组中。 它被提交给自己作为人声,并针对自己的内容进行闪避——这在重新分析一次后就会触发“永远不要针对自身进行闪避”规则。
  • 音效或音乐片段位于人声组中。 它会在下一次分析时进入侧链,背景音乐开始对“嗖”声进行闪避,即使当初写入属性的那次运行从未测量过它。

这两种情况在闪避写入的那一刻都是不可见的:分析会汇总它检测到的人声,而不会经过组解析的往返,因此第一次分析是绝对正确的,只有下一次会是错误的。因此,为每个角色分配各自的组——music 用于背景音乐,voiceover 用于旁白,sfx 用于音效——并确保 sources 中指定的组只包含人声。

carve.mjs 在遇到上述任何一种情况时会拒绝写入组形式,而是记录片段 ID,并在标准错误输出中指出是哪个成员阻止了操作。然后 audio_carve_ungrouped_sources 规则会指向该布局……

…[因翻译而截断]

Individual skills in this repo

This repo contains 11 individual skills — each has its own dedicated page.

sandeshrajbhandari/hyperframes-instruct

Author or edit a custom HyperFrames composition when no specialized workflow fits, or when BRIEF.md sets flow: companion. Use for longer or multi-scene pieces, brand and sizzle reels, montages, static loops, static title cards, footage remixes, and freeform builds. Use motion-graphics instead for a short unnarrated motion-first unit, including an animated title. Route fresh creation through hyperframes before using this skill.

sandeshrajbhandari/hyperframes-instruct

All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.

sandeshrajbhandari/hyperframes-instruct

Use the HyperFrames CLI development loop: init, add, catalog, capture, lint, check, snapshot, compare, grade-compare, preview, play, present, beats, keyframes, single or batch render, publish, cloud, cloudrun, feedback, lambda, doctor, browser, info, upgrade, skills, compositions, timeline, history, clean, docs, benchmark, telemetry, transcribe, auth, tts, and remove-background. Also use when diagnosing build or render failures. validate, inspect, and layout are deprecated aliases; use check. Covers local, HeyGen-hosted cloud, AWS Lambda, and Google Cloud Run rendering.

sandeshrajbhandari/hyperframes-instruct

The HyperFrames composition contract — build one renderable project. Use for composition structure, the `data-*` timing attributes, `class="clip"`, tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.

sandeshrajbhandari/hyperframes-instruct

Non-animation creative direction for HyperFrames videos. Use for design spec (frame.md / design.md) handling, palettes, typography, narration, beat planning, audio-reactive visuals, composition patterns, and brand / style decisions. For atomic motion patterns and scene blueprints, use `hyperframes-animation`.

sandeshrajbhandari/hyperframes-instruct

Use when a HyperFrames composition needs a punch-in, punch-out, zoom, reframe, Ken Burns treatment, camera move, visual match/whip handoff, or other seek-safe 2D/3D keyframes; also for GSAP, CSS keyframes, Anime.js, WAAPI, FLIP, paths, masks, SVG morph/draw, text trails, 3D depth, or `hyperframes keyframes` diagnostics. Don't use for broad scene strategy, brand design, media sourcing, captions, or general video planning.

sandeshrajbhandari/hyperframes-instruct

Search, install, and wire registry blocks and components into HyperFrames compositions. Use BEFORE hand-building any named visual — whenever a brief, a user, or a storyboard names a look, effect, treatment, or transition such as CRT scanlines, glitch, chromatic aberration, film grain, a shimmer sweep, a chart, a code or terminal window, a map, or a confetti burst — because roughly 400 hosted items already cover many of them and the search ranks all of them with nothing installed, no project, and no account. Also use when running hyperframes add or hyperframes catalog, installing one item or every block matching a tag, wiring an installed item into index.html, or working with hyperframes.json. Covers discovery, install locations, block sub-composition wiring, component snippet merging, and authoring a new block or component to contribute upstream (idea → scaffold → validate → PR).

sandeshrajbhandari/hyperframes-instruct

Mandatory entry point: read this first for any request to make, create, edit, animate, or render a video, animation, or motion graphic, including a promo, explainer, captioned clip, title card, overlay, slideshow or interactive deck, Remotion port, or any HyperFrames HTML composition. Also use it to inspect, diagnose, validate, preview, publish, or batch-render an existing HyperFrames project. Inputs may be a website URL, GitHub PR, Figma design or URL, text or brief, existing footage, or music. It resumes project state, captures intent when applicable, selects and installs the owning workflow, and routes domain capabilities. HyperFrames is the default output framework unless the user explicitly chooses another framework for the deliverable or asks only to record a browser session.

sandeshrajbhandari/hyperframes-instruct

Use when working with a person on a HyperFrames project in Studio: first, whether their message asks for a change at all (questions, loose ideas and "don't change anything" get an answer and a plan, not an edit); for a new film, the plan, storyboard and build order that the HyperFrames launch films follow; and how the timeline should be laid out so it reads well (one caption track, one element kind per track, every scene a sub-composition) and where captions and key content may sit (safe zones). Don't use for how to perform an individual edit (split, trim, retime, volume, copy, swap): that is `creator-editing-recipes.md` in `/hyperframes-core`.

sandeshrajbhandari/hyperframes-instruct

Agent Media OS, the single skill for every media need in a HyperFrames project. Resolve BGM, SFX, image, icon, brand logo, voice, color grade, or LUT into a frozen local file or paste-ready block + ledger record (one verb, `resolve`); generate via TTS / music / image models when the catalog misses; produce voiceover, transcription, captions, and background removal through one shared audio engine; operate on media (cut / reframe / transform); and reuse assets across projects. Also use for vague feedback that real footage looks dark, flat, boring, should feel retro/camcorder/print/ASCII, needs privacy, or needs a media reveal.

sandeshrajbhandari/hyperframes-instruct

A short, design-led motion graphic where motion is the message — kinetic typography, stat count-up, chart/data-viz hit, logo sting / brand lockup, lower-third / callout / social overlay, animated map (highlight regions, connect places, zoom to a location), animated tweet / news-article / headline, webpage / UI animation (scroll, cursor, callouts), or fusing a real image's geometry into a chart. Usually under 10s (up to ~30s), no narration or live-action subject; renders to MP4 or transparent overlay. Longer / narrated / multi-scene → /general-video. Unclear → /hyperframes.

相关技能