Skip to content

fix: implement true glissando for Glide block (Related to #7257)#7258

Open
Prince1895 wants to merge 1 commit intosugarlabs:masterfrom
Prince1895:fix-glide-glissando
Open

fix: implement true glissando for Glide block (Related to #7257)#7258
Prince1895 wants to merge 1 commit intosugarlabs:masterfrom
Prince1895:fix-glide-glissando

Conversation

@Prince1895
Copy link
Copy Markdown

Description

This PR resolves the broken glissando behavior in the Glide block and fulfills the TODO comment previously left in OrnamentBlocks.js.

Previously, the Glide block played nested notes as distinct, disconnected pitches. This PR fixes the duration calculations and audio scheduling to correctly interface with Tone.js's native portamento feature, resulting in a smooth, continuous pitch slide (a true glissando).

(Note: In addition to the glissando fix, 14 preexisting eqeqeq lint warnings in js/turtle-singer.js were fixed to satisfy the husky pre-commit hooks).

Related Issue

This PR fixes #7257

PR Category

  • Bug Fix — Fixes a bug or incorrect behavior
  • Feature — Adds new functionality
  • Performance — Improves performance (load time, memory, rendering, etc.)
  • Tests — Adds or updates test coverage
  • Documentation — Updates to docs, comments, or README

Changes Made

  • js/turtle-singer.js: Fixed duration calculation bug. The glissando duration tur.singer.glideOverride is now properly multiplied by bpmFactor instead of dividing it. Applied the same tempo-scaling fix to the portamento variable. Fixed 14 loose equality == / != warnings.
  • js/utils/synthutils.js: Passed the scheduled audio time (Tone.now() + future) to the synth.setNote() calls so pitch changes are correctly synced in the audio graph.
  • js/blocks/OrnamentBlocks.js: Removed the outdated TODO comment regarding the lack of glissando support.

Testing Performed

  • Started local server and tested the Glide block using multiple internal Note blocks.
  • Verified that synthesized instruments (e.g., sine, electronic synth) now slide smoothly in pitch rather than playing discrete notes.
  • Verified that the npm run lint and npx prettier --check . hooks pass successfully.

@github-actions github-actions Bot added bug fix Fixes a bug or incorrect behavior size/M Medium: 50-249 lines changed area/javascript Changes to JS source files labels May 9, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 9, 2026

🧪 Jest Test Results

✅ All Jest tests passed! This PR is ready to merge.

Coverage: Statements: 46.9% | Branches: 38.4% | Functions: 51.3% | Lines: 47.32%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/javascript Changes to JS source files bug fix Fixes a bug or incorrect behavior size/M Medium: 50-249 lines changed

Projects

Development

Successfully merging this pull request may close these issues.

[Bug] Glide block does not produce true glissando effect (missing portamento)

1 participant