The board catches up with the seed, and the save stops lying about its channels - #49
Closed
Gamah wants to merge 1 commit into
Closed
The board catches up with the seed, and the save stops lying about its channels#49Gamah wants to merge 1 commit into
Gamah wants to merge 1 commit into
Conversation
…s channels The s&box panel was still the panel the old vibe format left behind. The genre strip had no way back out of a genre once one was chosen, "share this" had one button for two different things, the reroll said it rerolled the genre while rerolling the vibe, and the knob matrix was the first thing anybody met. It now says what the seed says. `tag:n[:genre][:vibe]` gives the genre and the vibe a part each, so pinning is per part: `RandomEverySong` splits into `RandomGenreEverySong` and `RandomVibeEverySong`, and `_genrePinned` folds into the first of them rather than sitting beside it. That is what the Random entry on the genre strip and `↺ random each song` under the sliders now write to, and what `StationSeed` reads to build the seed as it stands, next to `CurrentSeed` and its fully-resolved copy. The two are separate copy buttons because neither can be recovered from the other. The matrix moved behind a tinker button and the controls that decide what plays moved out of it, matching the web. Two things the split fixed on the way past. `StartSequence` pinned the current song into the ledger to survive shuffle; a per-part pin applies to every song, so the entry could only shadow the answer `VibeForN`/`GenreForN` already give. And `EffectiveConfig` handed back the live knobs, which with a rolled vibe is not the song playing — the mixer drew knobs you could not hear, and dragging one snapped the other 35 to values nobody chose. The save wrote `channels: 1` for `_curRaw`, which is the interleaved stereo buffer `SoundStream( _sr, MusicGen.Channels )` is fed: every in-game save was stereo PCM under a mono header, i.e. half speed with the channels folded into each other. `Wav.FromSamples` no longer takes a channel count at all. Output is always `MusicGen.Channels`, so the argument could only agree or be silently wrong, and wrong sounds like a mix decision rather than a broken file. Verified by review and the engine suite; the s&box half cannot be compiled here.
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.
PLAN row 98. The s&box panel catches up with
tag:n[:genre][:vibe], and the in-game save stops writing stereo PCM under a mono header.What changed
Pinning is per seed part.
RandomEverySong(one switch over both) becomesRandomGenreEverySong+RandomVibeEverySong, and_genrePinnedfolds into the first rather than sitting beside it — one switch could not express half the seeds the parser accepts.PlaySeedsets each from what the string wrote down;StationSeedreads them back to build the seed as it stands.Panel, matching the web element:
RollGenre(), which had no caller)🎲 Randomize(draws a fresh vibe and pins it — always moves every knob) and↺ Random each song(the unpin, dimmed when there is no pin to drop)🎲 New stationis a fresh random tag at song 0, pins keptTwo bugs the split turned up.
StartSequencepinned the current song into the ledger to survive shuffle — with a per-part pin applying to every song, that entry could only shadowVibeForN/GenreForN. AndEffectiveConfig()returned the live knobs, which under a rolled vibe is not the song playing: the mixer drew knobs you could not hear, and dragging one snapped the other 35 to values nobody chose. It isConfigForN(_curN)now, and so isSetVibe's starting point.The save.
SaveCurrentToFilepassedchannels: 1for_curRaw— the interleaved stereo bufferSoundStream( _sr, MusicGen.Channels )is fed.Wav.FromSamplesno longer takes a channel count at all: output is alwaysMusicGen.Channels, so the argument could only agree with the buffer or be silently wrong, and wrong plays at half speed with the channels folded together, which sounds like a mix decision rather than a broken file.Also
skafinity_stationandskafinity_random genre|vibe|both;skafinity_statusreports which parts are rolling.Testing
test-engine: 556 checks pass, includingWAV is stereo.web/_frameworkre-published (AOT) and re-stamped —Engine/Wav.csandwasm/Exports.csare stamp inputs, so the gate needed it. No audio change: Exports already passed 2.Not in this PR
s&box still has no
shufflein the sense the web now means it (every next song is a whole new station).SeedCodec.RollTagForexists in the engine for it and only the web calls it; givingSkafinityPlayerthe same means the positions-vs-indices rework the web did inaeb9067. Filed as PLAN row 55.