Quickstart
Nội dung này hiện chưa có sẵn bằng ngôn ngữ của bạn.
This procedure creates a package with one post-pitch control.
Use scaffold and SDK versions published for the same Amadeus release.
Create the project
Section titled “Create the project”Run the scaffold tool in an empty working directory:
npx create-amadeus-plugin my-pitch-packagecd my-pitch-packagenpm installnpm run buildThe scaffold creates plugin.toml, source files, a build command, and a
type-check command. When prompted, choose TypeScript or JavaScript and one
supported bundler.
Define the package
Section titled “Define the package”Replace the generated entry with a minimal processor:
import { param, plugin } from "@amsvs/api";
plugin("com.example.pitch") .name("Pitch adjustment") .params( { amount: param.number({ default: 0, min: -100, max: 100, step: 1, label: "Shift (cents)", help: "Relative pitch shift. 0 = unchanged.", cacheScope: "f0_and_later", }), }, { label: "Pitch adjustment", stages: ["pitch"] }, ) .hooks({ stage: "post_pitch", postPitch(ctx) { const factor = Math.pow(2, this.params.amount / 1200); for (let frame = 0; frame < ctx.f0.length; frame++) { if (ctx.f0[frame] > 0) ctx.f0[frame] *= factor; } return ctx.f0; }, }) .register();At 0 cents, the hook leaves the contour unchanged. Positive values raise voiced
pitch and negative values lower it; unvoiced frames remain zero. Build the
package after each source change. The output entry must match the entry path
in plugin.toml; otherwise Amadeus cannot load the package.
Install and test
Section titled “Install and test”- In Amadeus, open View → Plugins… and choose Open folder.
- Copy the package directory into the displayed plugin directory.
- Choose Reload, enable the package, and open a project with a voice.
- In Pitch mode, confirm that the parameter group appears, then bake and audition the result.
If the parameter group does not appear, confirm that the package is enabled and that its manifest entry and checksum match the built file. Before distribution, set the package version and SHA-256 checksum. See Publishing.