Sndh rework#11
Merged
Merged
Conversation
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.
Changelog
All notable changes to the ym2149-rs project.
2026/01/14 - v0.9.0
Added
MASTER_GAINconstant - Global 2x amplification factor inym2149-commonfor louder output across all backends (core, softsynth, SNDH)FRMStag parsing - Frame-based duration (32-bit per subtune, 0 = endless loop)FLAGtag parsing - Feature flags for hardware requirements (Timer A-D, STE, DSP, LMC1992, blitter, etc.)#!SNtag parsing - Subtune names with word-offset tableSndhFlagsstruct - Typed access to all SNDH v2.2 feature flagsDmaSampleRateenum - STE (6-50kHz) and Falcon (12-49kHz) sample ratesSubsongInfo::subtune_name- Access subtune names from #!SN tagcurrent_frame()- Get current playback frame positiontotal_frames()- Get total frame count from FRMS/TIME metadataprogress()- Get playback progress as 0.0-1.0 fractionseek_to_frame(frame)- Seek to specific frame by fast-forwardingseek_to_time(seconds)- Seek to time position (converted to frames)playback_position()now returns actual progress based on frame metadataseek(position: f32)- Seek to position (0.0-1.0 fraction)duration_seconds()- Get total duration in secondselapsed_seconds()- Get elapsed time based on playback positionseek_to_frame()andseek_to_percentage()now work for SNDHduration_seconds()- Get total song durationhasDurationInfo()- Check if duration is from metadata (vs 5-minute fallback)Ym2149Playback::seek_percentage(position)- Seek to position (0.0-1.0)Ym2149Playback::duration_seconds()- Get total song durationYm2149Playback::has_duration_info()- Check if duration is from metadataYm2149Playback::playback_position()- Get current position (0.0-1.0)ProgressBarContainercomponent for custom seek UI integrationseek()trait method now implemented forYmPlayerGeneric:ChiptunePlayerBase::seek()seek_frame()for direct frame access (O(1) complexity)Documentation
Changed
m68000crate tor68k(based on Musashi):cpu_backendmodule with abstraction layer for CPU emulationCpuMemorytrait for memory access abstractionCpu68ktrait for CPU execution interfaceDefaultCputype alias for easy backend switchingseek_to_frame()for near-instant seeking:Fixed
FLAG~abdy\0\0FRMSwas parsingFRMSas flag characters)has_duration_info()returns false for these files to indicate estimated durationinit_subsong()before potential early returnscurrent_frame()andframe_count()returning 0:AudioStreamState::notify_seek()StreamingDecoderclears local sample buffer when seek is detectedaudio_playerfield inYm2149Playbackholds the audio source's player2025/12/08 - v0.8.0
Added
[p]to toggle playlist,[↑↓]to navigate,[Enter]to select song[↑↓]jumps to next/previous match when searching[Backspace]deletes characters,[Esc]clears search[←→]arrow keys (5% steps, displayed in footer)[,]previous /[.]next (playlist mode)ym2149_common::visualizationmodule - Shared visualization utilities for all frontends:WaveformSynthesizer- Register-based waveform synthesis with per-channel phase accumulatorsSpectrumAnalyzer- Note-aligned spectrum with 16 bins (C1-B8, half-octave resolution)freq_to_bin()- Musical frequency to spectrum bin mappingChanged
.fract())bin = log2(freq / C1) * 2ym2149-corerestructured - Now contains only pure chip emulation:Ym2149Backendtrait moved toym2149-commonsrc/ym2149/*→src/*ChannelStates,channel_period,period_to_frequency) live inym2149-commonym2149::Ym2149,ym2149::PsgBank,ym2149::constants::*Fixed
amplitude > 0 || envelope_enabled.fract()to handle high frequency edge casesprintln!output when TUI mode is activeRefactored
systems.rsym2149_common::visualizationmodule instead of local FFT-based computationSPECTRUM_DECAY,SPECTRUM_BINS,SPECTRUM_BASE_FREQ,BINS_PER_OCTAVE)freq_to_bin()function - now imported from shared libraryOscilloscopeBufferparameter (register-based waveforms don't need audio samples)