设计与多媒体

soundtrack

iart-ai/javascr…n-skills

This skill should be used when the user asks to "add music to the animation", "make the music in code", "synthesize a soundtrack", "compose background music that fits the cuts", "sync the music to the video", "check if the audio lines up with the picture", or "the music is too sudden / startling". Covers a code-synthesized score that lives inside the animation page (Web Audio API, rendered offline to WAV), AI-generated or user-supplied music, and an automatic check that cuts land on the beat without a startling jump in loudness.

  • 621 次安装
  • 35 星标
  • 收录于

安装命令

npx skills add https://github.com/iart-ai/javascript-animation-skills --skill soundtrack

SKILL.md

Soundtrack

Write the sound for this film

A film's sound is written for that film: its own instruments, rhythm and harmony in Web Audio, from nothing, in window.SCORE = ac => { … } (oscillators, noise, filters, envelopes, delays: whatever the piece calls for). Drums, a groove or a music-box bed are written the same way, for this film: no two films should sound alike because they share a template. templates/groove.js and templates/score.js are two ready-made scores, used only when the user asks for them; each file documents its options.

render.mjs (from the javascript-animation skill) renders window.SCORE offline with OfflineAudioContext, writes <out>.wav and muxes it into the MP4; the page's live preview plays the same score when clicked.

Don't ask the user to choose a music source up front. At delivery, mention in one line that AI-generated music or their own track also work.

How the music follows the picture

Soundtrack

Write the sound for this film

A film's sound is written for that film: its own instruments, rhythm and harmony in Web Audio, from nothing, in window.SCORE = ac => { … } (oscillators, noise, filters, envelopes, delays: whatever the piece calls for). Drums, a groove or a music-box bed are written the same way, for this film: no two films should sound alike because they share a template. templates/groove.js and templates/score.js are two ready-made scores, used only when the user asks for them; each file documents its options.

render.mjs (from the javascript-animation skill) renders window.SCORE offline with OfflineAudioContext, writes <out>.wav and muxes it into the MP4; the page's live preview plays the same score when clicked.

Don't ask the user to choose a music source up front. At delivery, mention in one line that AI-generated music or their own track also work.

How the music follows the picture