-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Add post-processing audio effects system #271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
638820c
Add post-processing audio effects system
jamiepine 3d922ec
Fix review findings: toggle logic, preset saving, version lookup, asy…
jamiepine 25134b4
Fix player not loading new version after applying effects
jamiepine 00c5b75
Regenerate as new version, UI polish, and bugfixes
jamiepine e8d54d5
Add favorites, effects badge on profiles, UI polish
jamiepine 899b902
Add version control to track editor, restyle story list
jamiepine 310a4ac
Add source version selection when applying effects, voices tab overha…
jamiepine 626e374
Auto-select first story when navigating to Stories tab
jamiepine 1c61b47
Glassmorphic active state for sidebar buttons with accent border shine
jamiepine 103e98b
github runners suck
jamiepine 6d261c4
Merge branch 'main' into feat/post-processing-effects
jamiepine File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
In WaveSurfer.js, if pause() is called from atimeupdatecallback when currentTime >= duration, is thefinishevent still guaranteed to fire? Please cite docs/issues for the current major version.💡 Result:
No. In the current major version (WaveSurfer.js v7), the
finishevent is emitted only in the handler for the media element’sendedevent—not when you callpause()yourself. So if you callpause()from atimeupdatecallback as soon ascurrentTime >= duration, you can prevent the underlyingendedevent from occurring, and thereforefinishis not guaranteed to fire. [2]Docs describe
finishas “When the audio finishes playing,” but do not state it will fire if you programmatically pause at (or near) the end. [1]Sources: WaveSurfer events docs [1], WaveSurfer v7 source (
ended⇒ emitfinish) [2].🏁 Script executed:
Repository: jamiepine/voicebox
Length of output: 112
🏁 Script executed:
Repository: jamiepine/voicebox
Length of output: 831
🏁 Script executed:
Repository: jamiepine/voicebox
Length of output: 969
Move
onFinishcallback invocation totimeupdatehandler or consolidate all terminal logic in thefinishhandler.The
timeupdatehandler pauses at the end of track (lines 169), which prevents the media element'sendedevent from firing. Since WaveSurfer.js v7 emits thefinishevent only whenendedfires, thefinishhandler (lines 416-430) is never reached, making theonFinishcallback unreachable.Either:
onFinishfrom thetimeupdatehandler alongside the pause, ortimeupdateand let the media naturally fireended→finish→onFinish.Option 2 is cleaner and keeps terminal behavior in one place.
Proposed fix (Option 2)
📝 Committable suggestion
🤖 Prompt for AI Agents