CommunityCoding & Developmentgithub.com

2409324124/yakui-studio

Create procedural 8-bit/chip-style soundtracks from reference audio or original motifs, featuring real stem separation, polyphonic and monophonic transcription candidates, manual revision, event-score arrangement, and looped audio export. Suitable for editable source-driven game BGM and adaptive listening.

What is yakui-studio?

This skill enables an AI agent to produce chip-style, programmatic music compositions for game BGM or adaptive listening. It supports two workflows: transforming a reference audio track by separating real stems (using Demucs and Basic Pitch/pYIN) into polyphonic and monophonic transcription candidates for manual revision, or starting from scratch with original motifs without transcription. The process culminates in an event-based score that drives a waveform synthesizer (PolyBLEP waves, LFSR noise drums, etc.) for preview and loop master exports. It runs on Claude Code or similar code-driven AI agents (Python 3.10+, NumPy, FFmpeg required) and is designed for users who want editable, source-code-driven productions rather than black-box audio generation.

Works with✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/2409324124/yakui-studio/tree/HEAD/skills/procedural-chiptune

Installed? Explore more Coding & Development skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

Procedural Chip Soundtrack

Separate composition information from sound engine: reference audio → on-demand real stems → transcription candidates & revision → arrangement event score → waveform synthesis → preview/loop master. Supports original music without references; skip transcription in that case.

Determine Musical Goals First

Prioritize user-provided reference, duration, style, and approved tracks. Choose reasonable first drafts for non-critical missing details without re-asking for answered preferences. Save new versions to independent track directories, preserving approved originals. Creation itself does not imply authorization to access websites, games, or publish npm.

For reference adaptation, first read Reference Analysis & Trade-offs. When needing to preserve lead/response details in the mix, then read Real Stems & Transcription, using Demucs + Basic Pitch ONNX/pYIN; basic NumPy mode does not auto-pull these heavy dependencies. When using the Yakui Studio workbench for revision and import, read the co-installed Yakui Studio. For understanding methodology sources only, read Yakui Cases; case tempos, chords, and section lengths are not default rules for new pieces.

Reference Audio Analysis

Report analysis results only after obtaining an actual decodable audio file. BPM or note tables in user text need verification; webpage descriptions, song titles, and online video links are not evidence of having heard the audio. When only a URL is provided, use currently available normal media access methods; if access fails, state what is missing rather than fabricating transcription results. Reference recordings are not automatically mixed into tracks or source packages.

Basic tools:

python scripts/analyze_reference.py reference.wav --start 0 --seconds 30 --out analysis-intro.json

Paths are relative to this skill; absolute paths may be used. Requires Python 3.10+, NumPy, and FFmpeg (on PATH or via FFMPEG) for reference decoding and MP3 export.

  • Compare beat candidates at the beginning and main sections at least, noting half-speed/double-speed; confirm before passing --bpm to align note candidates.
  • half_beat_candidates indicates harmonic salience in the mix, not an automatically recognized independent melody. The largest peak may belong to bass overtones, drums, or another part.
  • Annotate observations, low-confidence candidates, and arrangement choices; preserve ambiguity for high-pitch responses that cannot be reliably extracted, and explicitly mark original responses.
  • For detail-first adaptation, first separate real stems, saving model labels per actual sources; then use polyphonic transcription to retain simultaneous notes, and monophonic F0 for contrasting clear melody sections. Melody/response are musical roles; frequency filtering or Demucs' other output cannot be automatically relabeled as independent role stems.
  • Keep raw timestamps, pitch bends, confidence/activation values, and revision reasons in analysis files; quantization only adds derived fields. Check octaves, short ornaments, repeated unisons, and simultaneous notes against the spectral plane and representative actual phrases; do not treat model output directly as the original song's accurate score.

Create an Editable Track

python scripts/init_track.py /absolute/new-track --title "Track title" --bpm 95 --bars 24

It copies an independent arrangement template, synthesizer, and build entry point, without overwriting existing directories. Output includes track.json, arrange.py, render_score.py, build.py, and a dependency list. The template motif is only an original example; must be modified per current musical goals; do not render every piece as the template with a changed BPM.

Execute in the track directory:

python -m pip install -r requirements.txt
python build.py --mp3 --three-pass

Start with representative phrases/sections, then expand to target length; when the user has already approved detailed arrangement, follow that arrangement directly without setting additional approval thresholds.

  • Quarter note beats as event time units; duration computed from BPM, bar count, and time signature; when close to a specified number of seconds, explain beat constraints instead of speeding up the entire audio to artificially fit.
  • Arrange melody, response, bass, harmony, arpeggio, and drums separately. Increase density in climaxes through range, rhythm, and harmony, leaving pan and level space for the melody.
  • Use verified synthesizers: PolyBLEP pulse waves, finite harmonic triangle waves, LFSR noise drums, short envelopes, and beat-synced delays. Tune timbres per track; expanding chip parts does not mean strictly simulating FC/NES channel limitations.
  • Reference analysis and transcription can serve other styles; when the user specifies post-rock or other styles, retain verified melodies and choose a suitable actual instrument/renderer. Chip templates will not automatically become real guitar or post-rock timbres; do not use template relabeling to fake a new style.
  • 8-bit by default refers to timbre/arrangement; output retains 44.1 kHz, 16-bit stereo quality unless the user explicitly requests bit-depth degradation.

When direct score editing or timbre adjustment is needed, read Event Score Format. render_score.py score.json --out audio --mp3 --three-pass can skip the arranger and render any compatible score.

Preview & Delivery

audio/ outputs preview.wav, loop.wav, optional MP3, climax clip, and render-report.json. Preview may fade out; loop master does not apply overall fade, with tail wrap-around to start. --three-pass generates three-pass seam previews.

Verify duration, finite values, clipping, section levels, and abrupt changes near loop points; digital checks cannot replace listening. When actual hearing capability is unavailable, deliver playable files for the user to audition, without claiming to have heard them yourself. Listen for theme, response, climax density, lead clarity, and loop seams; do not claim style match simply because music files exist.

Embed full preview and representative climax clip using absolute path audio files; include arrangement/synthesis source code, score, and brief section descriptions. When the user requests lightweight terminal playback, port the local synthesizer using the same event score and timbre parameters to avoid embedding full PCM or requiring the user to install Python; do not automatically modify the viewer or release workflow just to create a preview.

Individual skills in this repo

This repo contains 1 individual skill — each has its own dedicated page.

Related Skills