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

Support for milliseconds (songlengths.md5) #4

Open
Tekl opened this issue Apr 13, 2021 · 9 comments
Open

Support for milliseconds (songlengths.md5) #4

Tekl opened this issue Apr 13, 2021 · 9 comments
Assignees

Comments

@Tekl
Copy link

Tekl commented Apr 13, 2021

I compiled sidplayfp 2.1.1 on my M1 MacBook (ARM). Sidplayfp supports the new songlengths.md5 format but it seems to round the lengths by seconds and ignores the milliseconds. Maybe there's an option to make sidplayfp more accurate, but I haven't found it.

It would be great if you can fix this in a future release of sidplayfp. On the Mac I only found Java SID Player Music Library V2 that will respect milliseconds in the lengths.

@drfiemost drfiemost self-assigned this Apr 13, 2021
@drfiemost
Copy link
Member

The new songlengths DB format is already supported but milliseconds are not displayed and not recognized for -b and -t options. Will fix this in the next release

@drfiemost
Copy link
Member

It's now done in master if you want to give it a try.

@Tekl
Copy link
Author

Tekl commented Apr 18, 2021

Thanks for the fast fix. There must be a bug in parsing the songlengths file. For example I've the value "0:23.079". Sidplayfp makes "0:23.790" of it. Using "-t0:23.079" seems to work but the length of the exported wave file is still 0:24.000. Also the playback seems not to stop exactly at 0:23.079 (compared to the wav file).

Take "/MUSICIANS/N/Nebula/Tune_2.sid" for example. I exported it to wav and measured the exact lenght with an wav editor (ocenaudio). The song should stop at 0:30.762. I edited the sonlenght file and sidplayfp shows the correct value, but the playback is a little bit longer than expected. Btw. Java SIDPlay 2 does it right.

@drfiemost
Copy link
Member

Thank you for testing. I can confirm the -t problem, it's due to the buffer size fixed at one second.
I don't see the other issues, can you specify the steps to reproduce, please? (And BTW, here with HVSC #74 Tune_2 is 16 seconds long)

@Tekl
Copy link
Author

Tekl commented Apr 18, 2021

I'm trying to correct the values in HVSC, that's because the official values are currently different. To reproduce the issue with the changing milliseconds, edit this entry in the Songlengths.md5:

; /MUSICIANS/N/Nebula/Groovy.sid
53811c41e0a243820e996932daf1d84c=0:23.079

It seems that sidplayfp removes the leading 0 of the milliseconds.

@drfiemost
Copy link
Member

drfiemost commented Apr 19, 2021

This should be fixed in master, I cannot reproduce it anymore.

Edit: this actually was a bug in the library, fixed with libsidplayfp/libsidplayfp@3c54725

@Tekl
Copy link
Author

Tekl commented Apr 20, 2021

Great. It seems to be fixed. The playback hasn't changed, right? You're speaking of a 1 sec buffer. The tunes play well, when I substract around 75 milliseconds, not a whole second.

@drfiemost
Copy link
Member

The playback is still broken. The wav writer uses a bigger buffer as there are no latency problems while other output methods have smaller buffers, depending on platform. But at the moments writes smaller than buffer size are not supported so the song ending is not precise as it should.

@drfiemost
Copy link
Member

Tried to progress a bit on this in the new branch "milliseconds". Results are still disappointing though :/

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

No branches or pull requests

2 participants