fix: implement true glissando for Glide block (Related to #7257)#7258
Open
Prince1895 wants to merge 1 commit intosugarlabs:masterfrom
Open
fix: implement true glissando for Glide block (Related to #7257)#7258Prince1895 wants to merge 1 commit intosugarlabs:masterfrom
Prince1895 wants to merge 1 commit intosugarlabs:masterfrom
Conversation
Contributor
|
🧪 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% |
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.
Description
This PR resolves the broken glissando behavior in the
Glideblock and fulfills theTODOcomment previously left inOrnamentBlocks.js.Previously, the
Glideblock 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
eqeqeqlint warnings injs/turtle-singer.jswere fixed to satisfy thehuskypre-commit hooks).Related Issue
This PR fixes #7257
PR Category
Changes Made
js/turtle-singer.js: Fixed duration calculation bug. The glissando durationtur.singer.glideOverrideis now properly multiplied bybpmFactorinstead of dividing it. Applied the same tempo-scaling fix to theportamentovariable. Fixed 14 loose equality==/!=warnings.js/utils/synthutils.js: Passed the scheduled audio time (Tone.now() + future) to thesynth.setNote()calls so pitch changes are correctly synced in the audio graph.js/blocks/OrnamentBlocks.js: Removed the outdatedTODOcomment regarding the lack of glissando support.Testing Performed
Glideblock using multiple internalNoteblocks.sine,electronic synth) now slide smoothly in pitch rather than playing discrete notes.npm run lintandnpx prettier --check .hooks pass successfully.