Repository navigation
feat(live)!: assemble a music's BGM and the live sounds as products - #74
Merged
Merged
Conversation
The address table (nnnotes.addresses/3) gains a `builtins` table: the
objects of the APK's built-in files by class ("GraphicsSettings") and
MonoBehaviours by their script's class ("MonoBehaviour:<class>"),
without MonoScripts and with a hierarchy listed by its root only.
AddressIndex.builtin(selector) reads it.
A product stage can name these selectors as roots
(ProductStage.builtins); the request fact "roots" carries them, so the
units of settings assets that the game reads without a catalog key or a
Resources.Load path are exported with the products that use them.
BREAKING CHANGE: link.addresses is at version 3 and writes
nnnotes.addresses/3; the roots fact has a "builtins" list.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cri.audio and cri.movie tell raw files apart by their first bytes (ACB,
AWB, USM). Those bytes were kept in memory only, so after the depot
trimmed its downloads a later plan could not classify a raw file whose
identity it already knew and stopped with the file pending.
The first bytes are now recorded in the depot per content
("magic:<sha256>"); a raw file without the record is read through its
locators, fetching it through the catalog when no local copy is left.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The web audio formats (WEB_AUDIO, the default format), the bit-exact encode into one of them (web_encode) and the MP4 encoder delay reader (mp4_priming) are in nnnotes.formats.encoders, below the pipeline, so product stages encode audio the same way the site does. The site and its command read them from there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two product stages make what a live plays besides its chart, each shared by every live that plays it: - live.music (subject: a music id) writes music.json, the BGM sound with its cue structure, and each layer of the BGM in a web format (parameter `format`, default AAC with its encoder delay; `flac` keeps the decoded file). Its manifest is music/<id>.json. - live.sounds (subject: `default` or `NoteSePatternId=<ids>`) writes sounds.json, the note and live sounds with the category volumes, the ACF's buses, categories and REACT, the note and live sound tables and the timings, and each sound's decoded FLAC. Its roots include the sound settings of the APK's built-in files; it reads the ACF of the APK. Its manifest is sounds/<subject>.json. Product stages gain what these need: cue sheets (the ACB a catalog key loads, held in a bundle or a raw file, with the files cri.audio made of it as inputs and the cri.audio tasks as dependencies), files of the APK (the fact "apk", inputs "apk:<path>"), product files that are content the depot already holds, and `select(keys, env)` with the planning facts. content.liveaudio is a set of functions over master rows, ACB and ACF bytes and the settings' documents, which the live directory export uses as well. BREAKING CHANGE: ProductStage.select takes the planning environment; liveaudio.note_se_settings, acf_info and category_volumes take master rows, ACF bytes and the settings' documents. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What a live plays besides its chart becomes two products, each shared by every live that plays it: the BGM of a music and the sounds of an option set.
Products
music.json(the BGM sound: cue structure, layers) and each BGM layer in a web format; manifestmusic/<id>.json. Parameterformat:aac(default; each layer recordsencoderDelay),opus,vorbis,mp3, orflac(the decoded file as stored). The atomaudio.encodenames the ffmpeg build.defaultorNoteSePatternId=<ids>→sounds.json(note and live sounds, category volumes, the ACF's buses, categories and REACT, note and live sound tables, timings) and each sound's decoded FLAC; manifestsounds/<subject>.json. Its roots include theSoundVolumeSettingsandAppConfigDefaultDataMonoBehaviours of the APK's built-in files; it readsassets/Cri/Sound/Sirius.acfof the APK.Neither keeps objects.
Pipeline
Built-in selectors: the address table (
nnnotes.addresses/3) has abuiltinstable, objects of the APK's built-in files by class (GraphicsSettings) or by a MonoBehaviour's script class (MonoBehaviour:<class>).ProductStage.builtinsnames them as roots, and therootsfact carries them.Cue sheets of a product:
ProductStage.cue_sheetsgives catalog keys whose ACB the product reads. The ACB is held in a bundle (theacbfile of an object of the key) or is a raw file of the catalog thatcri.audiodecoded. Each one adds:acb:<key>;sheetsinput (the filescri.audiomade of each ACB);cri.audiotasks.A product file may be content the depot already holds, recorded without copying its bytes.
APK files:
ProductStage.APKnames files of the APK a stage reads; the factapkgives them as inputsapk:<path>.ProductStage.select(keys, env)takes the planning environment, so a product can select its subjects through master data.content.liveaudiois now functions over master rows, ACB and ACF bytes, and the settings documents; the live directory export uses them too.cri.audio/cri.movierecord the first bytes of a raw file in the depot, so a later plan can classify a raw file whose download was trimmed.The web audio formats, the bit-exact web encode and
mp4_primingare innnnotes.formats.encoders.Breaking changes
link.addressesis at version 3 (nnnotes.addresses/3); therootsfact hasbuiltins.ProductStage.selecttakesenv.liveaudio.note_se_settings,acf_infoandcategory_volumestake master rows, ACF bytes and the settings documents.Tests
tests/helpers/cri.py, whose@UTFwritertest_voicesnow shares) cover:cri.audio;