pixi-vn-sound

Controls music, sound effects, and voice playback through Tone.js audio channels in Pixi'VN games.

145|9|Updated Feb 14, 2024
One-click install
npx skills add https://github.com/DRincs-Productions/pixi-vn --skill pixi-vn-sound-drincs-productions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pixi-vn-sound
Source: https://github.com/DRincs-Productions/pixi-vn/tree/main/skills/sound
Command: npx skills add https://github.com/DRincs-Productions/pixi-vn --skill pixi-vn-sound-drincs-productions

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires tone, @drincs/pixi-vn.

What problem does it solve? Managing game audio in a Pixi'VN project requires coordinating music, sound effects, and voice lines across separate volume controls, fade transitions, and save-safe playback states, which is error-prone when done ad hoc with raw Tone.js. ## Core Features & Use Cases - Channel-based playback: Create named audio channels (music, sfx, voice) with independent volume, mute, pan, and background persistence across narration steps. - Playback control: Play, pause, resume, and stop media instances by alias, with fade-in/fade-out options and transient one-shot sounds that never leak into save files. - Tone.js filter integration: Attach reverb, delay, distortion, and other Tone.js audio nodes per-sound or per-channel at creation time. - Use Case: Build a settings screen with separate music and SFX volume sliders persisted to localStorage, where background music keeps playing across dialogue steps while UI click sounds play as untracked one-shots. ## Quick Start Set up background music and sound effect channels after Game.init, then play a looping theme song with a two-second fade-in on the music channel.

Frequently Asked Questions about pixi-vn-sound

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I play background music in a Pixi'VN game?

Create a channel with sound.channels.add("music", { background: true }) after Game.init, then call sound.play("theme-song", { channel: "music", loop: true }). The background flag keeps music playing across narration steps instead of being auto-stopped.

How to play a one-shot sound effect with Tone.js in Pixi'VN?

Use sound.unsaved.playTransient("click-sound", { volume: 0.5 }) for fire-and-forget effects. It returns a raw Tone.Player, is not tracked in the sound registry, and disposes itself automatically when finished.

Does Pixi'VN sound support volume fades and fade-out on stop?

Yes, play() accepts fadeIn and fadeOut options in seconds. The fadeOut value is remembered on the media and applied both when playback ends naturally and when you call stop() later.

Why is my channel volume value distorting the audio in Pixi'VN?

Channel volume and sound.volumeAll are linear values in the 0 to 1 range, so setting them to something like 90 causes clipping. Only a media instance's volume is a Tone.js decibel Param, where values like -6 are appropriate.

Can I add Tone.js audio filters to sounds in Pixi'VN?

Yes, pass Tone.js nodes like new Tone.Reverb() in play()'s filters option, or attach them per-channel at creation or via channel.chain(). Filters can only be set at creation time, not added or removed afterward.