<feed xmlns='http://www.w3.org/2005/Atom'>
<title>demo.git/tools/editor, branch main</title>
<subtitle>Vide-coded 64k demo system</subtitle>
<id>https://git.taar-o.com/demo.git/atom?h=main</id>
<link rel='self' href='https://git.taar-o.com/demo.git/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.taar-o.com/demo.git/'/>
<updated>2026-02-06T21:53:29Z</updated>
<entry>
<title>feat(spectral_editor): Add cursor-centered zoom and pan with mouse wheel</title>
<updated>2026-02-06T21:53:29Z</updated>
<author>
<name>skal</name>
<email>pascal.massimino@gmail.com</email>
</author>
<published>2026-02-06T21:53:29Z</published>
<link rel='alternate' type='text/html' href='https://git.taar-o.com/demo.git/commit/?id=0c98c830b382d66c420524ff395e12164a566dd8'/>
<id>urn:sha1:0c98c830b382d66c420524ff395e12164a566dd8</id>
<content type='text'>
Implemented zoom and pan system for the spectral editor:

Core Features:
- Viewport offset system (viewportOffsetX, viewportOffsetY) for panning
- Three wheel interaction modes:
  * Ctrl/Cmd + wheel: Cursor-centered zoom (both axes)
  * Shift + wheel: Horizontal pan
  * Normal wheel: Vertical pan
- Zoom range: 0.5-20.0x horizontal, 0.1-5.0x vertical
- Zoom factor: 0.9/1.1 per wheel notch (10% change)

Technical Implementation:
- Calculate data position under cursor before zoom
- Apply zoom to pixelsPerFrame and pixelsPerBin
- Adjust viewport offsets to keep cursor position stable
- Clamp offsets to valid ranges (0 to max content size)
- Updated all coordinate conversion functions (screenToSpectrogram, spectrogramToScreen)
- Updated playhead rendering with visibility check
- Reset viewport offsets on file load

Algorithm (cursor-centered zoom):
1. Calculate frame and frequency under cursor: pos = (screen + offset) / scale
2. Apply zoom: scale *= zoomFactor
3. Adjust offset: offset = pos * scale - screen
4. Clamp offset to [0, maxOffset]

This matches the zoom behavior of the timeline editor, adapted for 2D spectrogram display.

handoff(Claude): Spectral editor zoom implementation complete
</content>
</entry>
<entry>
<title>fix(audio): Remove Hamming window from synthesis (before IDCT)</title>
<updated>2026-02-06T15:53:41Z</updated>
<author>
<name>skal</name>
<email>pascal.massimino@gmail.com</email>
</author>
<published>2026-02-06T15:53:41Z</published>
<link rel='alternate' type='text/html' href='https://git.taar-o.com/demo.git/commit/?id=f998bfcd7a6167ae6bdf5ad7f8685b2cdf1fe811'/>
<id>urn:sha1:f998bfcd7a6167ae6bdf5ad7f8685b2cdf1fe811</id>
<content type='text'>
Removed incorrect windowing before IDCT in both C++ and JavaScript.
The Hamming window is ONLY for analysis (before DCT), not synthesis.

Changes:
- synth.cc: Removed windowing before IDCT (direct spectral → IDCT)
- spectral_editor/script.js: Removed spectrum windowing, kept time-domain window for overlap-add
- editor/script.js: Removed spectrum windowing, kept time-domain window for smooth transitions

Windowing Strategy (Correct):
- ANALYSIS (spectool.cc, gen.cc): Apply window BEFORE DCT
- SYNTHESIS (synth.cc, editors): NO window before IDCT

Why:
- Analysis window reduces spectral leakage during DCT
- Synthesis needs raw IDCT output for accurate reconstruction
- Time-domain window after IDCT is OK for overlap-add smoothing

Result:
- Correct audio synthesis without spectral distortion
- Spectrograms reconstruct properly
- C++ and JavaScript now match correct approach

All 23 tests pass.

Co-Authored-By: Claude Sonnet 4.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>fix(editor): Apply window to spectrum before IDCT, not after</title>
<updated>2026-02-06T15:44:18Z</updated>
<author>
<name>skal</name>
<email>pascal.massimino@gmail.com</email>
</author>
<published>2026-02-06T15:44:18Z</published>
<link rel='alternate' type='text/html' href='https://git.taar-o.com/demo.git/commit/?id=6ed5952afe5c7a03f82ea02d261c3be2d56bd6a1'/>
<id>urn:sha1:6ed5952afe5c7a03f82ea02d261c3be2d56bd6a1</id>
<content type='text'>
Fixed comb-like pattern in web editor playback by matching the C++
synth windowing strategy.

Root Cause:
- C++ synth (synth.cc): Applies window to SPECTRUM before IDCT
- JavaScript editors: Applied window to TIME DOMAIN after IDCT
- This mismatch caused phase/amplitude distortion (comb pattern)

Solution:
- Updated spectral_editor/script.js: Window spectrum before IDCT
- Updated editor/script.js: Window spectrum before IDCT
- Removed redundant time-domain windowing after IDCT
- JavaScript now matches C++ approach exactly

Result:
- Clean frequency spectrum (no comb pattern)
- Correct audio playback matching C++ synth output
- Generated Gaussian curves sound proper

Co-Authored-By: Claude Sonnet 4.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>feat(audio): Integrate FFT-based DCT/IDCT into audio engine and tools</title>
<updated>2026-02-06T15:23:03Z</updated>
<author>
<name>skal</name>
<email>pascal.massimino@gmail.com</email>
</author>
<published>2026-02-06T15:23:03Z</published>
<link rel='alternate' type='text/html' href='https://git.taar-o.com/demo.git/commit/?id=d9e0da9bfd4d236a2585303ddf92c9023e064b51'/>
<id>urn:sha1:d9e0da9bfd4d236a2585303ddf92c9023e064b51</id>
<content type='text'>
Replaced O(N²) DCT/IDCT implementations with fast O(N log N) FFT-based
versions throughout the codebase.

**Audio Engine:**
- Updated `idct_512()` in `idct.cc` to use `idct_fft()`
- Updated `fdct_512()` in `fdct.cc` to use `dct_fft()`
- Synth now uses FFT-based IDCT for real-time synthesis
- Spectool uses FFT-based DCT for spectrogram analysis

**JavaScript Tools:**
- Updated `tools/spectral_editor/dct.js` with reordering method
- Updated `tools/editor/dct.js` with full FFT implementation
- Both editors now use fast O(N log N) DCT/IDCT
- JavaScript implementation matches C++ exactly

**Performance Impact:**
- Synth: ~50x faster IDCT (512-point: O(N²)→O(N log N))
- Spectool: ~50x faster DCT analysis
- Web editors: Instant spectrogram computation

**Compatibility:**
- All existing APIs unchanged (drop-in replacement)
- All 23 tests pass
- Spectrograms remain bit-compatible with existing assets

Ready for production use. Significant performance improvement for
both runtime synthesis and offline analysis tools.

Co-Authored-By: Claude Sonnet 4.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Chore: Remove trailing whitespaces across the codebase</title>
<updated>2026-01-30T23:57:49Z</updated>
<author>
<name>skal</name>
<email>pascal.massimino@gmail.com</email>
</author>
<published>2026-01-30T23:57:47Z</published>
<link rel='alternate' type='text/html' href='https://git.taar-o.com/demo.git/commit/?id=2520ae66ce2da210eaeaeba44c467c97e0c3fdd0'/>
<id>urn:sha1:2520ae66ce2da210eaeaeba44c467c97e0c3fdd0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>fix the spec editor a bit</title>
<updated>2026-01-28T20:34:59Z</updated>
<author>
<name>skal</name>
<email>pascal.massimino@gmail.com</email>
</author>
<published>2026-01-28T20:34:59Z</published>
<link rel='alternate' type='text/html' href='https://git.taar-o.com/demo.git/commit/?id=d82db7e301ff778b3c71a409263d696d9f561b74'/>
<id>urn:sha1:d82db7e301ff778b3c71a409263d696d9f561b74</id>
<content type='text'>
</content>
</entry>
<entry>
<title>feat(gemini): Add .geminiignore file</title>
<updated>2026-01-28T19:27:25Z</updated>
<author>
<name>skal</name>
<email>pascal.massimino@gmail.com</email>
</author>
<published>2026-01-28T19:27:25Z</published>
<link rel='alternate' type='text/html' href='https://git.taar-o.com/demo.git/commit/?id=340fdb217c629803eafd4b13731044adf6f5fb3d'/>
<id>urn:sha1:340fdb217c629803eafd4b13731044adf6f5fb3d</id>
<content type='text'>
Propose and add a .geminiignore file to exclude build artifacts, dependency build outputs, archives, temporary files, and IDE configurations from Gemini's analysis and operations.
</content>
</entry>
<entry>
<title>fix(editor): Correct CSS formatting issues</title>
<updated>2026-01-28T18:06:28Z</updated>
<author>
<name>skal</name>
<email>pascal.massimino@gmail.com</email>
</author>
<published>2026-01-28T18:06:28Z</published>
<link rel='alternate' type='text/html' href='https://git.taar-o.com/demo.git/commit/?id=9b677566c18aab7b77b9f4e6c3cf9ce89a02e886'/>
<id>urn:sha1:9b677566c18aab7b77b9f4e6c3cf9ce89a02e886</id>
<content type='text'>
Cleaned up CSS formatting in style.css to resolve potential parsing errors and ensure proper styling of elements, including buttons and layout.
</content>
</entry>
<entry>
<title>refactor(editor): Complete rewrite of script.js for stability and correctness</title>
<updated>2026-01-28T17:59:45Z</updated>
<author>
<name>skal</name>
<email>pascal.massimino@gmail.com</email>
</author>
<published>2026-01-28T17:59:45Z</published>
<link rel='alternate' type='text/html' href='https://git.taar-o.com/demo.git/commit/?id=e4778510915bfe3c08f56c14848d59c1d7889346'/>
<id>urn:sha1:e4778510915bfe3c08f56c14848d59c1d7889346</id>
<content type='text'>
Addressed all reported errors by completely restructuring script.js to ensure correct function definition order, fixing the 2x vertical scaling issue in frequency mapping, and confirming SDF logic and audio playback dependencies.

- All global variables, constants, utility functions, element declarations, event listeners, and main logic functions are now correctly ordered.

-  and  corrected to use  for proper frequency mapping.
</content>
</entry>
<entry>
<title>fix(editor): Resolve all scoping, ordering, and scaling issues</title>
<updated>2026-01-28T12:35:24Z</updated>
<author>
<name>skal</name>
<email>pascal.massimino@gmail.com</email>
</author>
<published>2026-01-28T12:35:24Z</published>
<link rel='alternate' type='text/html' href='https://git.taar-o.com/demo.git/commit/?id=a7557e775e7c30bfc8036983b5258da4382d0261'/>
<id>urn:sha1:a7557e775e7c30bfc8036983b5258da4382d0261</id>
<content type='text'>
Completely restructured script.js to guarantee correct function definition order and fixed the 2x vertical scaling issue in frequency mapping.

- Moved all utility functions (audio, SDF, coordinate/frequency mapping) to be defined before their use.

- Corrected  and  to use  for accurate frequency scaling.

- Ensured all button element declarations and event listeners are correctly placed at the top of the script to prevent initialization errors.
</content>
</entry>
</feed>
