Repository navigation
Read a tone's pitch past breaks in its waveform (CHALLENGES 390) - #335
Merged
Merged
Conversation
Fixes #334. An emulator started by hand breaks a tone's phase through its host audio output, 151 breaks in 48 s against none with -no-audio, same app. The FFT read 430 Hz for 440, which split one sound in two. Not a dropout, as the issue guessed: the tone is unbroken, and packets were neither late nor short. Measured by hand: audio.sh main 1 of 6, this 6 of 6. Real captures at -42 to -49 dBFS split 6 of 68 on main and none here; at -62 dBFS, 5 of 14 and 2 of 14. Also: -port leaves an emulator with no control port, so SETUP.md no longer says to pass it and the refusal names it. audio.sh took a tone's first instant for a sound in the pause; a sound inside the pause still fails it.
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.
Fixes #334.
audio.shpassed 1 of 6 on an Android 15 emulator started by hand: one steady tone was heard as two sounds.Cause
The issue guessed a dropout. That was wrong: the tone sounds unbroken, and packets were neither late nor short. The waveform has pairs of breaks 33 samples apart, with the tone's phase jumping across them. An FFT across them read 430 Hz for 440, past the 2% that holds one sound together.
The breaks are the emulator's host audio output. The same app and tones gave 151 breaks in 48 s when started by hand, and none from
mobium boot, which passes-no-audio. They cluster after audio starts, which is why a loop of captures rarely split and the check usually did.What changes
steadyPitchcuts a window at each break and takes the median of the stretches. Stretches that are not one sound are two notes, read whole as before, so a melody and a real pitch change still split.docs/SETUP.mdboots withmobium boot, and says what a hand start costs.-portleaves an emulator with no control port, measured on emulator 37.1.11.SETUP.mdsaid to pass it, and the refusal blamed-no-grpcalone.audio.shtook a tone's first instant for a sound in the pause, failing both versions now and then. A sound inside the pause, and a too-short pause, still fail it.Measured
audio.shby hand:main1 of 6, this 6 of 6. On-no-audio, 4 of 4, and Android 17 passes.audio-sim.shpasses.Real captures, started by hand:
mainNot settled here