-
Notifications
You must be signed in to change notification settings - Fork 149
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
[Research] Audio-video offset synchronization and audio+input delay calibration #87
Comments
Calibrating the value of _A_Methods
StatusData have been collected and in analysis. |
From the data analysis, we have found that the delay on average is 13.96 ms. This is very small, and we are pretty safe to use 0ms delay as default value. The average standard deviation of the delay is 21.57 milliseconds. This means that on average, we are 99% confident that the actual delay is within 6.59 of the obtained mean. This shows that our method is quite effective. Our advisor, @jittat, suggested that we can try to reduce the number of required samples, so that the calibration process would become shorter. Try to simulate by performing the same experiment, but only using the first _n_ samples. Find the smallest value of _n_ such that the average resulting 99% confidence interval is less than 10 milliseconds. |
Mean and Standard Deviation
Mean and Standard Deviation (length 50) |
@Nachanok Thank you! I think it's better for you to focus on the skin's code. I'll continue from here. 😄 |
I've done some changes to our calculation: Since our sample is going to be small, and we only have sample standard deviation (we don't know the population standard deviation), I used T-score instead of Z-score. Some communication problems also led to the sample data being incorrectly trimmed. |
Here's the confidence interval results by trying various values of _n. For each value of _n, each person's tapping pattern is truncated to the first _n_ taps.
Each song section is 28 hits. Therefore, with only one section, we are 98% sure that our observed mean will be within 10ms of the actual audio+input delay. To be more sure (99%), I think obtaining just 35 samples are good enough. |
I think the preliminary research has obtained satisfactory result. The task of implementing them in the game will be another issue. |
Assumptions
Findings
Methods
Calibration
Measure _A_ = _S+_I
This is the time it takes from when the sound is emitted to when the computer recognizes the button press. This means that when computer emits sound at time _t, the computer will receive button press at time _t'=_t+_A. To compensate, when button press is received at time _t', judgement must be performed for time _t'-_A=_t.
Measure _B_ = _S-_D
This is the audio/video offset. This can be done by letting user adjust the value until audio and video are in sync. With this value, we adjust the display to display notes in time _t+_B.
Gameplay
sound(t)
: At time _t_, emit sound as usual.display(t+B)
: At time _t_, emit graphic in sync with the sound.judgment(t-A)
: Judge notes _A_ unit of time behind the sound emission.Auto-Keysounds
This is a problem if the value of _A_ is large. If the player hit the note at the correct time, they will hear delayed keysounds.
That's why for most keysounded music games, user has to press the button significantly before the sound is emitted. Examples include DJMAX Technika and Tone Sphere.
Therefore, we have to play keysound for the player, so that the player hears at the correct time. This is called "Auto-sound" in Open2Jam.
Enabling AutoSound
AutoSound will only be enabled when value of _A_ is significantly large. I'd say 16 milliseconds. A warning message should appear in synchronization dialog saying that AutoSound has been enabled to compensate for audio delay.
AutoSound Mechanics
The text was updated successfully, but these errors were encountered: