Add TAYM export with timer effects and sample playback - #47
Closed
ruguevara wants to merge 5 commits into
Closed
Conversation
Implement TAYM container codec, model, spec, validation, and timer-table builder; refactor the TMR encoder onto shared ay-timer-effects helpers. Wire taym/psg export into the menu, progress modal, and export formats, with CLI entry points and test coverage.
SID PWM is emitted by the driver as TIMER_PWM_MODE_BY_DUTY_INDEX, where the period alternates by step-index parity (matching the C engine), with the waveform holding volume levels. The export path treated SID as BY_STEP_VALUE, so it captured pwm=false and selected the period from the waveform value. Since SID PWM waveform values are nonzero, only highPeriod was ever used and the duty sweep was lost, producing a fixed high-frequency 50% pulse instead of the swept low-pitched tone. Detect SID PWM via BY_DUTY_INDEX, switch sidStepPeriod to index-parity selection, and drop the pwm=true workaround in both export paths.
Export PCM samples as a per-channel timer driving the 0x80 sample-amplitude target paired with the channel volume register; shared unquantized lane, per-frame volume via inline action, exact rate via abs-rate-hz mode. Add physically-linear SID-volume combine (DAC-domain) in ayumi via a precomputed sid_volume_code table; bump AYUMI_STRUCT_SIZE accordingly.
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.
Summary
.taymdownloads and.taymfiles inside ZIP exports.0x80virtual target and AY/YM-aware DAC volume mapping.Fresh-main integration
origin/main.taym-timers.ts; the export-side timer-table builder now has the distincttaym-export-timers.tsboundary.public/ayandpublic/trackerpaths and use Node-safe export modules.Validation
pnpm check— 0 errors, 0 warnings.pnpm btp-to-taym src/demo/man.btp /private/tmp/bitphase-pr-smoke.taym— completed successfully.importTaymBuffer— 1 song, 0 warnings.samples-1ch.btpthrough the UI-default capture/build path — one 9,800-byte sample lane instead of per-frame rotated duplicates.taym2aymax.py— its 126-entry event stream is byte-identical to the known-good absolute-rate export.The complete test run reached 999 passing tests; six unrelated keyboard-shortcut tests fail in Node because
localStorageis unavailable.