Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Short gap between tracks in multi-movement classical pieces
#1
RPi3, moOde 3.84 setup with Allo Boss DAC (earlier version, not 1.2).
In MPD settings, I have SoX resampling enabled, set to 32-bit/384kHz, Medium quality.

There are some multi-movement classical music pieces in which each movement should play through to the next with no silence or gap in between. However in my setup, there's a short silence and slight click or pop noise heard in between these movements, as one track ends and the next track begins. 

Examples: 

Bartok 6 String Quartets - Emerson Quartet - Deutsche Grammophon
There are three tracks, each one is a separate movement. The three movements are to be played without interruption. However, in moOde 3.84, there is a very brief silence as the first movement (track) ends and the second movement (track) begins. 

Ravel Orchestral Works - Orchestre symphonique de Montreal, Charles Dutoit - London
In the piece Ma Mere L'Oye, the first movement (Prelude) ends and plays straight through into the second movement (1er Tableau). But playing back in my setup there is a very brief silence (gap) and a slight tick/pop can be heard as the tracks change. 

In both examples, the tracks are in FLAC format, 16-bit/44.1kHz

I will try changing MPD settings to SoX disabled, and use the DAC's internal upsampling instead (set to 24-bit/192kHz) and see if the movements/tracks play continuously (with no gaps) as intended. 

Has anyone else run into this issue? 

I hope I don't have to edit these files to combine the multiple tracks' files into a single file/track so that the movements play without gaps. 
--
Reply
#2
After a little experimenting, I think yes, if you have SoX enabled and upsampling, there will be a gap/silence added between tracks.

Once SoX is disabled there are no more gaps/silences between those continuous tracks I was playing.

I'll try SoX at 24bit/192kHz Medium quality to see if the gaps/silences still happen.
Reply
#3
Update:
With SoX enabled, there's always at least a little gap of silence between tracks. The lower you set the sampling rate, the shorter the duration of the silence between tracks. If I set SoX to resample to 24bit/96kHz the gap is hardly noticeable. If I set SoX to 24bit/384kHz, the gap is very noticeable (longer duration).

Once SoX is disabled, there is no gap at all -- or at least it's so short it isn't audible.
Reply
#4
Thats an interesting result. It could be a bit of latency introduced by SoX as its processing the audio data.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#5
Is it possible there are settings that might cause SoX to need to stop and load up a data buffer before playback of a new track?

I'm using RT kernel. Any relationship between that and SoX?
Buffer settings? I have mine set to 4096, which is the lowest setting.
Reply
#6
I would use a mainline Linux kernel, turn off all DSP (resampling, eq, volume normalization, etc), leave MPD buffers at their default settings, then see if the audio glitch occurs.

Its also possible that the particular version of MPD thats used in 3.8.4 has bugs that may be contributing to the issue. MaxK has fixed a lot of bugs in MPD since 0.20.10.

moOde 4.2 uses MPD 0.20.20, updated versions of ALSA and SoX, the latest 4.14.y Linux kernel and the latest versions of all the audio device drivers.

-Tim
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#7
Thanks Tim! First suggestion, and... BINGO.

I went back to the Standard kernel, also set the MPD Scheduler Policy to TS (standard 'round robin'), restarted MPD.
The default SoX buffer setting is 4096, which I hadn't changed.
Went back and set SoX to 32bit/384kHz with Medium quality.
Now there are no unwanted gaps between tracks.

It appears that in moOde 3.84 at least, SoX resampling running with the real-time kernel results in that glitch.

I wonder if that's been fixed in the current software versions. Easy enough to test, I think.

- Get yourself a copy of something like the Ravel Orchestral Works on London/Decca, Orchestre symphonique de Montreal, Charles Dutoit cond. The first track of Ma Mere L'Oye is short, and segues right into track 2 without pause.
- Or, The Beatles Abbey Road tracks 10-15 also play through without pauses in between (Sun King all the way through Carry That Weight).

Set the kernel to the real-time kernel.
Set SoX to 32bit/384kHz.

If the tracks play through without any gap in between, then the bug has been fixed.
If there's a gap between tracks, then the bug is still there.

I'm going to try switching to low-latency kernel and see if that causes the glitch.
--
Reply
#8
So, I switched to the LL kernel. Tried it with MPD Task Scheduling set to RR, like I had it set with the RT kernel.
I tried the LL kernel at its default 10ms latency, the tracks played through with no gaps.
I tried the LL kernel with 2ms latency (lowest latency setting). The tracks played through with no gaps.

Feeling emboldened by success, I decided to see if resetting to RT kernel would bring back the glitch. Back to RT kernel, reboot, and...

No glitches. The tracks play through with no gaps.
Huh???!!

I guess it's a computer. Just needs to have its software kicked around a little once in a while. I don't understand...
Reply


Forum Jump: