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

Gapless Playback Has a Gap! #736

Open
f4lc0n-asm opened this issue Dec 10, 2024 · 5 comments
Open

Gapless Playback Has a Gap! #736

f4lc0n-asm opened this issue Dec 10, 2024 · 5 comments

Comments

@f4lc0n-asm
Copy link

Hello,

just tested the gapless playback in Dopamine 3.0 Preview 37 and there is an audible gap btwn two songs. I even created 2 test files with pure 1kHz FS sinus, which starts in the 1st file and fluently continues in the 2nd file. When these 2 files are played sequentially in a playlist, there is an audible gap…

I am attaching the audio files (FLAC and WAV versions) for you to test.

f4lc0n

Gapless.Audio.Test.zip (7-Zip)

@digimezzo
Copy link
Owner

@f4lc0n-asm For these test files, it's expected that there would be a gap. In the current implementation, Dopamine preloads the next file in the playlist 2 seconds after a file starts playing, to try to ensure a smooth transition when from current to next file. The tests files are too short for preload to work.
The songs you're speaking of, how log are thye? And woudl it be possible to share those so that I test them out?
Thanks!

@f4lc0n-asm
Copy link
Author

f4lc0n-asm commented Dec 10, 2024

My bad - the songs I thought were connected had a short gaps in themselves at the beginning and the end…

I created two 10sec sinus audio clips in FLAC and these play gapless. However, if I during the playback of the 1st file fast forward it by clicking somewhere ahead in the blue position strip at the bottom of the player window, a short click is heard immediately (not surprising), but a click is also heard just when the 2nd file starts playing. Please check the 2 new files.

Gapless.Audio.Test.v2.zip (7-Zip)

@f4lc0n-asm
Copy link
Author

f4lc0n-asm commented Dec 11, 2024

May I suggest that you open 2 files simultaneously without the 2sec delay for the second file (if there is just one file in the playlist to be repeated, then open it twice at once). And when the 1st file finishes, immediately open the 3rd file (or reopen the 1st file), and so on… This way you will be able to play gapless even very short audio clips.

I put together 1sec and 10sec sine audio clip pairs (the 1st version of 1sec audio clip pair has unfortunately 1 overlapping sample, so this time I double checked on sample level before saving them):
Gapless.Audio.Test.v3.zip (7-Zip)

==================================================================================

If you feel like it, here are some musical highlights from Notre Dame opening:

Opening of Notre Dame Cathedral 7.12.2024 - Opening of the gates of Notre Dame Cathedral (2':14''-2':27'') - opened by Archbishop Laurent Ulrich, magnificent singing of the cathedral choir under the direction of Henri Chalet:
https://youtu.be/Lu9W4FyINdw?t=8093

Resurrection of the Notre Dame Cathedral Organ (3':17'' -3'39''). Played by the cathedral organists Olivier Latry (62), Philippa Lefebvre (75), Thierry Escaich (59), and others:
https://youtu.be/Lu9W4FyINdw?t=11817

Final Te Deum (3':55''-4':04''):
https://youtu.be/Lu9W4FyINdw?t=14131
Final improvisation 4:00: https://youtu.be/Lu9W4FyINdw?t=14445

Holy Mass of the Consecration of the Altar in Notre Dame Cathedral 8.12.2024 - Alleluia and organ improvisation during the anointing of the altar table with oil (2'07''- 2':14''):
https://youtu.be/FV_pLweUIuk?t=7633

Singing of the chorale Alma Redmptoris Mater (2'30''- 2':36'') organ improvisation:
https://youtu.be/FV_pLweUIuk?t=10967

And a little bit of the romance from the concert in the cathedral:
Finale from Symphony No. 3 - Camille Saint-Saëns / organ Olivier Latry:
https://youtu.be/2UWBwkdC2to

@digimezzo
Copy link
Owner

Thanks a lot for your suggestions and sample files! This is very helpful. I'll definitely try out your suggestion about preloading 2 files at once. Gapless is a bit new for me so all ideas to improve it are very welcome.

@f4lc0n-asm
Copy link
Author

Maybe you came across the open-source WinAmp - things which might inspire you:
Gapless PlaybackSrc/nu/GaplessRingBuffer.*Src/external_dependencies/openmpt-trunk/include/mpg123/src/libmpg123/gapless.h
EqualizerSrc/external/dependencies/openmpt-trunk/sounddsp/EQ.*Src/external_dependencies/openmpt-trunk/soundlib/plugins/dmo/ParamEq.*

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

2 participants