mpogue2 / SquareDesk

Fully-featured music player and sequence designer, designed for square dance callers
10 stars 4 forks source link

music player causes distortion #1183

Open Gero5 opened 2 weeks ago

Gero5 commented 2 weeks ago

pre requirements: everything in the music player is set to default or normal

Bildschirmfoto 2024-09-11 um 23 10 19

with everything set to normal the music output should be 'normal'.

However, the music player produces a slight distortion in the music. Best to be heard with highly compressed music compared to the same file played with QuickTime Player. It is not much but if you are able to hear it still a bit annoying and I wonder where it comes from. Most irritating/most noticeable in the low notes / bass. Bose boxes do their best to make that distortion even bigger. Anyhow, the cause lies in the mp3 reproduction of the music in SquareDesk.

is it possible that the tempo or pitch unit influences the output even with the sliders in middle position? which should result to bypassing the input IMO. Somehow this 'distortion' sounds similar to the shift in sound when speeding or pitching the music. that is why these units are my best suspects.

mpogue2 commented 2 weeks ago

@Gero5 That is a possibility. We could try explicitly removing pitch/tempo and/or EQ from the pipeline, if everything is at the nominal position.

Gero5 commented 2 weeks ago

Clearly hearable on high end headphones: the music is distorted when played with the SquareDesk mp3 player.

Note that it needs a 'modern' piece of music that is highly compressed. so the sound envelope looks almost like rectangle - see above. Almost all square dance music productions are below that level.

This is a slightly difference and I don't know how to measure it. I guess there must be some 'extra frequencies' in the SquareDesk audio, but I think we cannot see it a frequency analysis as long as we do not know what to look for exactly. Maybe a pure sine wave at low frequency like 100 Hz and maximum volume could show something if you put the output to a spectrum analyzer and compare SquareDesk wir QuickTime Player?

My best guesses for the cause of this a) overdrive: the audio is overamplified somewhere in the chain so calculated volume goes above 0dB but then is truncated to 0 dB this might be related to #1181 where I have the impression that volume compensation at 0 dB is at the same level as the QuickTime Player where it is to be expected an +2dB volume compensation. b) sound manipulators work where they are not supposed to do: EQ, tempo or pitch unit influences the output even with the sliders in middle position

We have to be sure that this is not caused by the Qt audio player itself. Therefore can you shortcut or bypass everything else like EQ, pitch, tempo aso. So that we can listen to the original sound that mp3 player produces without other influences.

I highly expect and hope that it is clear music without distortion then. because if it was not, somebody would have brought that up as an issue in the qt framework.

mpogue2 commented 2 weeks ago

Could you send me a copy of "The Weekend - Blinding Lights" that you used for testing, so I can run some tests?

a) I think is unlikely. But, this is easily checked. b) I think is more likely. With sliders in middle position, there is still processing going on right now.

Gero5 commented 2 weeks ago

what you probably can do is: grab/record the output audio and look at the waveform and compare it to the unprocessed file

this is Saltwater at 2.35 sec

Bildschirmfoto 2024-09-13 um 12 12 33

as you see the peaks in the source are pushed to the 0dB limit. My first attempt would be looking whether the peak shape looks any different after being reproduced by Squaredesk.

mpogue2 commented 2 weeks ago

Will take a look.... The "Audio Hijack" app does a digital capture, so that should make it possible to compare.

Question for you (just double-checking):

Gero5 commented 2 weeks ago

Do you have Force Mono turned on?

No.

Bildschirmfoto 2024-09-14 um 10 52 03
mpogue2 commented 2 weeks ago

Copying relevant comments to here.

Because I'm suspecting that SoundTouch introduces distortion (when it could be disabled entirely, if tempo/pitch are nominal) I've sent @Gero5 three files to listen to:

mpogue2 commented 2 weeks ago

@Gero5 I'm not sure my emails are making it through to you. I sent you 3 files to listen to by email (with links to the files -- they are large), and I also sent you a link to the SquareDeskPreRelease folder, so you could try 1.0.11 .