Fr4nKB / Glyphify

Glyphify is an Android app made for Nothing Phones, it tries to make the Glyph interface more useful.
102 stars 4 forks source link

Beat and Glyphs desync over time #3

Closed SebiAi closed 3 months ago

SebiAi commented 3 months ago

Hi, I tried your project and I noticed that the Glyphs and the beats seem to drift apart over time.

I verified this by generating a metronome audio file that ticks every two seconds and ran that through Glyphify. Download here. This is because the LIGHT_DURATION_MS constant should be 16.666 instead of 16.

This should merit a "major" version increase of the app if you are using Semantic Versioning. I think it would also be useful to indicate this change in the metadata of the compositions, e.g.: changing the ALBUM tag from Glyphify to Glyphify v{MAJOR}, where {MAJOR} should be replaced with the major version number (Semantic Versioning).

Used Glyphify version 1.3.4 on a Nothing Phone (1)

Fr4nKB commented 3 months ago

Well done, really smart way to debug that. I'll try to convert everything into microseconds then (changing the values to Double would be even worse). The metadata versioning also sounds like a good idea.

SebiAi commented 3 months ago

The metadata versioning also sounds like a good idea.

That would be nice, especially for tools that try to further process the data.

Fr4nKB commented 3 months ago

Are you planning on scraping the data? I'm using your file, to me it looks ok now. It was an easy fix: I just changed some values (I thought it would take hours but hey it appears that my code is not that bad) Anyway, I'll publish the update today so you can try it yourself. Thanks again

SebiAi commented 3 months ago

Are you planning on scraping the data?

The rewrite of the Glyph Tools (aka. custom-nothing-glyph-tools) (not public yet) tries to detect if a composition might desync when reading one with the GlyphModder script.

I want to also detect ones made with this tool. That's why I proposed the ALBUM metadata tag change so the script can differentiate between desyncing ones and normal working ones.

Thank you for your work and the quick responses 👍

Fr4nKB commented 3 months ago

Sounds awesome, thank you for collaborating with me to make my app better