================================================================================
  MATILDE TRACKER 1.14
================================================================================

Build Date: 2026-10-09

================================================================================
  OVERVIEW
================================================================================

This version rewrites the SINC resampler, fixes a number of crashes and playback
bugs, and adds a 64-bit build.

Package contents:
  x86\Matilde Tracker.dll   32-bit Buzz
  x64\Matilde Tracker.dll   64-bit Buzz
  README.txt

Copy the DLL that matches your Buzz into Gear\Generators.

================================================================================
  VERSION 1.14 CHANGES (2026-10-09)
================================================================================

1. 64-BIT BUILD
   - New x64 DLL for 64-bit Buzz
   - The C runtime is linked statically, no Visual C++ redistributable needed

2. SINC RESAMPLER REWRITE
   - Stereo samples play in stereo in SINC modes (before, only the left
     channel was used)
   - Looped samples no longer stop at the loop end in SINC modes
   - No more clicks at loop points: interpolation reads across the loop,
     wrapped for forward loops and mirrored for ping-pong loops
   - Kaiser-windowed kernels from precomputed tables instead of sin/cos per
     tap, many times faster
   - When pitching up, the kernel widens to keep aliasing low
   - AVX2/FMA is used for 16-bit and float samples, mono and stereo, when the
     CPU and Windows support it. The DLL itself no longer requires AVX2, so it
     loads on any x86 CPU.

3. CRASH FIXES
   - Crash after many notes with virtual channels or probability (10xx):
     sample slots leaked until the pool ran out
   - Crash when a note was cut between subdivision steps (DC, 18, ED)
   - Crash with an arpeggio after a cut in the first effect slot
   - Memory corruption with sample offset (09xx) past the loop end
   - Hang or memory corruption on waves with a zero-length loop
   - Crash after reducing the number of tracks while notes were playing

4. PLAYBACK FIXES
   - B notes were detuned: the B tuning attribute was never read
   - Effect 23 (cutoff LFO type) acted as tone portamento and the note did not play
   - 15xx random delay dropped the note when the roll was 0, and 15 00
     dropped every note
   - Delayed notes (ED, 18, 15, shuffle) were lost on tracks whose previous
     note had already ended
   - 03 00 with no earlier portamento speed silenced the note
   - 19 1y (sustain pedal down) only worked for 19 10
   - 17xx on a row without a note used a garbage pitch
   - Arpeggio, portamento and 17xx now follow the per-note tuning offsets
   - Stereo samples with the filter on: the right channel was not filtered
   - Stereo fade-out could click on the right channel
   - Reverse playback skipped a sample when wrapping into the loop
   - Stale audio in blocks split at a subdivision step
   - Voices taken over by channel stealing kept being controlled by their old track
   - MIDI note numbers below 24 were played as note-offs or got stuck
   - Opening About twice stacked dialogs
   - With virtual channels, notes started by E9, ED, 18 or 15 now start on
     their step instead of up to one buffer late
   - The Mono build wrote mono data into stereo outputs

================================================================================
  VERSION 1.13 CHANGES (2025-12-10)
================================================================================

1. FIXED v1.10 PROJECT COMPATIBILITY ISSUE
   - Added loop point validation in GetLoopStart() and GetLoopEnd()
   - Prevents out-of-bounds memory reads when v1.10 wavetable data has
     invalid loop points (LoopEnd > numSamples)
   - SINC interpolation (16+ sample lookahead) now safely handles legacy data
   - Eliminates clicks/pops and CPU spikes when loading old projects
   - Fix applies to all filter modes and sample formats

2. CORRECTED NAMING: "SINC 512" → "SINC 256"
   - Renamed "Offline SINC 512 Bounce" to "Offline SINC 256 Bounce"
   - Reflects correct tap count: 257 taps (128 each side + center)
   - Variable names updated throughout codebase for accuracy
   - No functional changes, naming correction only

================================================================================
  VERSION 1.12 CHANGES (2025-10-12)
================================================================================

1. ADDED SINC 32 INTERPOLATION MODE
   - New default interpolation mode with 33 taps (16 each side)
   - Excellent quality with better performance than SINC 64
   - Full AVX2 SIMD optimization with FMA instructions
   - Adaptive anti-aliasing and Hann windowing
   - Zero-padding bounds checking for edge cases

2. REORGANIZED FILTER MODES
   - SINC 32 now at position 3 (new default)
   - SINC 64 moved from position 3 to position 4
   - Filter Mode max value increased from 3 to 4
   - Default remains at position 3 (now SINC 32)

3. FIXED SINC INTERPOLATION ISSUES
   - Eliminated click artifacts at note start
   - SINC now works from sample 0 with proper bounds checking

4. ADDED ROOT-NOTE INTERPOLATION BYPASS OPTIMIZATION
   - Direct sample copy at 1:1 playback (no pitch change)
   - Bypasses interpolation when not needed
   - Significant CPU savings for unmodified sample playback
   - Applies to all filter modes and sample formats

5. REVERSED OFFLINE SINC 256 BOUNCE VALUES
   - New values: 1 = Enabled (default), 0 = Disabled
   - Changed default from 0 to 1 (enabled by default)
   - More intuitive: 1 = ON, 0 = OFF

6. FIXED CRITICAL BUGS
   - Added missing m_iPosition initialization in Reset()
   - Fixed memory management issues
   - Improved numerical stability

================================================================================
  FILTER MODES
================================================================================

0 = Nearest Neighbor  - No interpolation (lo-fi)
1 = Linear            - Fast, smooth (standard)
2 = Spline            - Cubic interpolation (higher quality)
3 = SINC 32           - Excellent quality, 33 taps (DEFAULT)
4 = SINC 64           - Maximum realtime quality, 65 taps
5 = SINC 256          - Offline only, 257 taps (automatic with Offline Bounce)

* Filter mode 5 (SINC 256) automatically used when "Offline SINC 256 Bounce"
  is enabled (default)

================================================================================
  SINC INTERPOLATION TECHNICAL DETAILS
================================================================================

SINC 32:  32 taps (Kaiser beta 6), default for realtime
SINC 64:  64 taps (Kaiser beta 8), highest realtime quality
SINC 256: 256 taps (Kaiser beta 10), offline bounce

At or below the root pitch, coefficients come from a 256-phase polyphase table
with linear interpolation between phases. Above the root pitch the cutoff drops
to 1/speed and the kernel widens by the same factor (up to 4x) to keep the
filter sharp, using tabulated sinc and window functions.

Taps that fall past the end of the sample continue into the loop (wrapped, or
mirrored for ping-pong loops). Past the end of a one-shot sample they read
silence.

AVX2/FMA paths cover 16-bit and float samples, mono and stereo. 24-bit, 32-bit
and 8-bit samples use the scalar path. AVX2 is detected at runtime (CPUID and
OS support), so older CPUs use the scalar code.

================================================================================
  OFFLINE RENDERING BEHAVIOR
================================================================================

Offline SINC 256 Bounce = ENABLED (1, default):
  - Any filter mode + Offline bounce = SINC 256 (maximum quality)
  - Realtime playback = Selected filter mode

Offline SINC 256 Bounce = DISABLED (0):
  - Offline bounce = Selected filter mode
  - Realtime playback = Selected filter mode
  - Consistent quality between realtime and offline

Examples:
  Filter=Linear,   Attribute=Enabled  → Realtime: Linear,   Offline: SINC 256
  Filter=Linear,   Attribute=Disabled → Realtime: Linear,   Offline: Linear
  Filter=SINC 32,  Attribute=Enabled  → Realtime: SINC 32,  Offline: SINC 256
  Filter=SINC 32,  Attribute=Disabled → Realtime: SINC 32,  Offline: SINC 32
  Filter=SINC 64,  Attribute=Enabled  → Realtime: SINC 64,  Offline: SINC 256
  Filter=SINC 64,  Attribute=Disabled → Realtime: SINC 64,  Offline: SINC 64

================================================================================
  SYSTEM REQUIREMENTS
================================================================================

- Windows 10 or later, 32-bit or 64-bit Buzz
- AVX2 is optional: Intel Haswell (2013+) and AMD Excavator (2015+) get the
  faster SINC path, older CPUs use scalar code

================================================================================
  COMPATIBILITY
================================================================================

- Fully backward compatible with Matilde Tracker 1.10 to 1.13
- No changes to saved song format
- v1.13 includes wavetable loop point validation for safe v1.10 compatibility
- Filter mode 3 behavior changed: now SINC 32 instead of SINC 64
  (projects using mode 3 will use SINC 32, slightly faster with similar quality)
- Projects requiring SINC 64 should update filter mode to 4

================================================================================
  CREDITS
================================================================================

Original Matilde Tracker: Carsten Sørensen / https://www.rift.dk
SINC Algorithm & Optimizations: George Reales

For more information, visit: https://forums.jeskola.net/

================================================================================
