Repository navigation
fix(plot): render non-finite samples as gaps instead of edge spikes - #476
Open
bluejay-creators wants to merge 1 commit into
Open
bluejay-creators wants to merge 1 commit into
bluejay-creators wants to merge 1 commit into
Conversation
PlotCurve drew one GL line strip, which cannot contain gaps, so every silence in the pitch tracker was drawn as a vertical line down to the plot edge and a flat line along it. Draw independent segments between consecutive finite points instead, so non-finite samples become gaps. The pitch tracker now maps unvoiced frames and the zero-filled initial buffer to NaN, and treats estimates outside the axis range as gaps rather than clipping them to the edge. Silence is blank, and phrases are separate strokes.
This branch has not been deployed
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.
Following up on your comment in #330 that hiding zeroes and NaN in plots "is something that could be addressed".
PlotCurvedraws a single GL line strip, and a line strip can't have gaps. So in the pitch tracker, every silence is drawn as a vertical line down to the bottom edge, then a flat line along it until the next note.This PR:
PlotCurvedraws independent line segments between consecutive finite points (DrawLinesinstead ofDrawLineStrip), so non-finite samples become gaps. Curves with no NaN look the same as before.Before / after (three sung notes with rests in between, rendered from the same synthetic input):
Before
After
The other plots (for example long-time levels) could also use NaN for "no data" now. I've kept this PR to the pitch tracker so it stays small.
🤖 Generated with Claude Code