Update Tap-to-Tone with filter and tone generator options#2368
Merged
hasinur010 merged 5 commits intogoogle:mainfrom Apr 10, 2026
Merged
Update Tap-to-Tone with filter and tone generator options#2368hasinur010 merged 5 commits intogoogle:mainfrom
hasinur010 merged 5 commits intogoogle:mainfrom
Conversation
… filters - Replace "Use Noise Pulse" checkbox with a "Tone type" spinner supporting Blip, Saw, and NoisePulse generators. - Added `BlipGenerator` native class for sine wave pulses. - Add a "Filter" spinner to `TapToToneActivity` and `ExternalTapToToneActivity` to allow selecting between AUTO, HIGHPASS, and AVERAGE analysis filters. - Update `TapLatencyAnalyser` to support multiple filter types and improve detection by optionally falling back to an average filter in AUTO mode. - Update the UI to display how often the average filter is used during measurements. - Increment `CMakeLists.txt` sync version for new native files.
… filters - Replace "Use Noise Pulse" checkbox with a "Tone type" spinner supporting Blip, Saw, and NoisePulse generators. - Added `BlipGenerator` native class for sine wave pulses. - Add a "Filter" spinner to `TapToToneActivity` and `ExternalTapToToneActivity` to allow selecting between AUTO, HIGHPASS, and AVERAGE analysis filters. - Update `TapLatencyAnalyser` to support multiple filter types and improve detection by optionally falling back to an average filter in AUTO mode. - Update the UI to display how often the average filter is used during measurements. - Increment `CMakeLists.txt` sync version for new native files.
robertwu1
reviewed
Apr 10, 2026
| } else { | ||
| if (mUseToneGeneratorType == "Blip"){ | ||
| mExactBlipGenerator.output.connect(&(monoToMulti->input)); | ||
| }else if(mUseToneGeneratorType == "Saw"){ |
Collaborator
There was a problem hiding this comment.
elsewhere in the file too
Collaborator
Author
There was a problem hiding this comment.
Thanks, updated.
robertwu1
reviewed
Apr 10, 2026
| <item>AVERAGE</item> | ||
| </string-array> | ||
|
|
||
| <string name="tone_type_prompt">Choose a Filter</string> |
Collaborator
Author
There was a problem hiding this comment.
Thanks, updated.
robertwu1
reviewed
Apr 10, 2026
| } | ||
|
|
||
| return numFrames; | ||
| } No newline at end of file |
Collaborator
There was a problem hiding this comment.
newlines at the end of files
Collaborator
Author
There was a problem hiding this comment.
Thanks, updated. Both BlipGenerator.h and BlipGenerator.cpp.
robertwu1
reviewed
Apr 10, 2026
| mAverageFilterUsedInAuto = false; | ||
| float[] highPassBuffer = new float[numSamples]; | ||
| highPassFilter(buffer, offset, numSamples, highPassBuffer); | ||
| TapLatencyEvent[] events_from_highpass = applyEnvelopeFollowerAndScanForEdges(highPassBuffer, numSamples); |
Collaborator
Author
There was a problem hiding this comment.
Thanks, updated.
robertwu1
reviewed
Apr 10, 2026
| mFilteredBuffer = avgFilteredBuffer; | ||
| return events_from_avg; | ||
| }else{ | ||
| if (events_from_highpass.length == 2) { |
Collaborator
There was a problem hiding this comment.
Are we planning to add this logic to CTS Verifier with highpass first and average filter if there's not 2 events otherwise?
Collaborator
Author
There was a problem hiding this comment.
Yes! We have implemented this in CTS Verifier as part of our risk mitigation strategy.
robertwu1
reviewed
Apr 10, 2026
| bool mUseNoisePulse; | ||
| std::string mUseToneGeneratorType; | ||
| SawPingGenerator mSawPingGenerator; | ||
| BlipGenerator mExactBlipGenerator; |
Collaborator
Author
There was a problem hiding this comment.
Thanks, updated.
… filters - Replace "Use Noise Pulse" checkbox with a "Tone type" spinner supporting Blip, Saw, and NoisePulse generators. - Added `BlipGenerator` native class for sine wave pulses. - Add a "Filter" spinner to `TapToToneActivity` and `ExternalTapToToneActivity` to allow selecting between AUTO, HIGHPASS, and AVERAGE analysis filters. - Update `TapLatencyAnalyser` to support multiple filter types and improve detection by optionally falling back to an average filter in AUTO mode. - Update the UI to display how often the average filter is used during measurements. - Increment `CMakeLists.txt` sync version for new native files.
robertwu1
approved these changes
Apr 10, 2026
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.
Update Tap-to-Tone with filter and tone generator options
BlipGeneratornative class for sine wave pulses.TapToToneActivityandExternalTapToToneActivityto allow selecting between AUTO, HIGHPASS, and AVERAGE analysis filters.TapLatencyAnalyserto support multiple filter types and improve detection by optionally falling back to an average filter in AUTO mode.CMakeLists.txtsync version for new native files.