Skip to content
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

tape position display may drift after looping #1528

Open
catfact opened this issue Mar 16, 2022 · 5 comments
Open

tape position display may drift after looping #1528

catfact opened this issue Mar 16, 2022 · 5 comments

Comments

@catfact
Copy link
Collaborator

catfact commented Mar 16, 2022

https://github.com/monome/norns/blob/main/lua/core/menu/tape.lua#L122-L123

we do not try very hard to make it not drift; we are just assuming that the actual seconds spent playinfg the file is equal to the elapsed seconds recorded by the system clock. (this is never really true.)

improvement would involve explicit periodic sync with the audio thread.

at the moment it doesnt seem worth it to build that and i would rather just hide the display widget.

in v3 it will be relatively trivial to add a direct getter for the current tape position.


also, it seems to me that the drift would be more noticeable with a slow sdcard, needing longer to prime the streaming buffer in between loops. indeed nobody has reported an issue with this until recentlty (while using a UHS-1 card and also experiencing audible dropouts in playback.)

@catfact catfact changed the title tape position display may drift tape position display may drift after looping Mar 16, 2022
@tehn
Copy link
Member

tehn commented Mar 16, 2022

this issue i believe got more pronounced with looping

https://github.com/monome/norns/blob/main/lua/core/menu/tape.lua#L122

fwiw, particularly in non-looped mode on a long sample, it's nice to visually spot when it's approaching the end. particularly if it's an accompaniment. i agree that in looping mode it's less meaningful, and definitely a problem if it's just really wrong

@catfact
Copy link
Collaborator Author

catfact commented Mar 16, 2022

yes indeed. its wrong enough.

whatever, its not a huge deal to add a position callback, its just one more OSC channel and data stream from audio thread. my question is whether to do that now or just not biother until v3 (on which it becomes insignificant both in terms of code and runtime cost.)

@dndrks
Copy link
Member

dndrks commented Mar 29, 2022

small report bump cuz it was part of testing a unit today on both standard norns and two different shield units, but i'm seeing the TAPE seconds counter (not just lil progress widget) being ~four seconds off on the first pass of hermit-leaves, before it even loops back around.

@catfact
Copy link
Collaborator Author

catfact commented Mar 29, 2022

if this is considered urgent enough to keep looking at it and to keep bumping the issue, i should just create a fix. its not difficult. the current version of the feature is very much a hail mary that does not even involve real position updates from the audio thread. (it has always been pretty wrong.)

@tehn
Copy link
Member

tehn commented Oct 11, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants