You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can see this very easily using the kaleidoscope visualization and having the star radii being driven by the segments and setting the volume queue to use a smoothing of 120 or even higher. I noticed this because I was scaling the smoothing factor by the dancibility rating of the song from Spotify's track features endpoint so that less dancey songs had slower moving animations
The animation will lag behind the actual beat. This is happening because you are smoothing only from the past so essentially the animation will always be delayed by the smoothing factor.
To fix this I stored half the value of the currently active smoothing factor when the call is made to get the volume. Then this value is used as a lookAhead value so that the volumes you are getting are always the current and next volumes, but ahead by half the smoothing factor. This realigns the animation back in sync, but keeping the smoothing capability intact.
The text was updated successfully, but these errors were encountered:
GeorgiaPeanuts
changed the title
Volume syncing is off-sync the by the smoothing factor used in the Volume Queue smoothing
Volume syncing is off-sync by the smoothing factor used in the Volume Queue smoothing
Jul 31, 2020
This is a great find. Thank you so much. It's gonna be a while before I'm able to update Kaleidosync/Spotify Sync's core, but I have a new implementation locally that I'd be happy to share with you if you're interested.
You can see this very easily using the kaleidoscope visualization and having the star radii being driven by the segments and setting the volume queue to use a smoothing of 120 or even higher. I noticed this because I was scaling the smoothing factor by the dancibility rating of the song from Spotify's track features endpoint so that less dancey songs had slower moving animations
The animation will lag behind the actual beat. This is happening because you are smoothing only from the past so essentially the animation will always be delayed by the smoothing factor.
To fix this I stored half the value of the currently active smoothing factor when the call is made to get the volume. Then this value is used as a lookAhead value so that the volumes you are getting are always the current and next volumes, but ahead by half the smoothing factor. This realigns the animation back in sync, but keeping the smoothing capability intact.
The text was updated successfully, but these errors were encountered: