Weird clicks when reading uploaded MP3 but not on local play

Having trouble with LMMS? Ask about it here.
I created a music in LMMS. I exported it as MP3 with the following settings:
Interpolation: SInc Best
Oversampling: 8x
Stereo Mode: Stereo
Bitrate: 320 Kbit/s

I changed each instrument and modified these values:
ATT: 0.04 (0.1 makes drums and others too soft)
REL: I leave at 0.1
DEC: all but 1 are maxed
AMT: Maxed

Instruments used:
kick02.ogg
Fisa_k_k.ds
TR909_clap.ds
snare01.ogg
crash01.ogg
tom03.ogg
rim01.ogg
snare04.ogg
tom01.ogg
piano01.ogg
juno_pad01.ogg
steel_guitar01.ogg
violin_fingered01.ogg
dong02.ogg
chorus02.ogg
strings01.ogg

When I read the exported MP3 in my player (Media PLayer Classic), the music is fine, no clicks whatsoever. When I share it to a good friend of mine through Discord or my wife on Messenger, I hear many clicks that are not heard when read locally from my drive. Can anyone guide me in what the problem could be?
First off, Welcome to the Forum avidichard!
Here are all important links:
http://lmms.io/forum/viewtopic.php?f=1&t=4740
-A few rules and useful forum instructions
If you like to introduce yourself, to the community, go here:
http://lmms.io/forum/viewtopic.php?f=4&t=4480
avidichard wrote:
Sat Jan 23, 2021 6:19 pm
Oversampling: 8x
I believe That is the reason. It however does explain why you only have artefacts on other systems, thet is puzzling 😐 -Except the file has been processed, either for shipping, or streaming. The thing you could try was to zip it and ship it, maby that would work ..idk Would be interesting to know if that change anything :)
But back to oversampling. Current LMMS does not do that well.
Our resident sound-engineer says that Streaming sites now transcode and down sample to 128kbps MP3 and CDs top out at 44.1kHz 16 bit integer.
That can be a guideline for the export-settings. Masters should always be lossless, eg not mp3
Here is more about exporting, though it does not address mp3, and is more aimed at Master-quality export
musikbear wrote:
Sun Jan 24, 2021 3:45 pm
First off, Welcome to the Forum avidichard!
Here are all important links:
http://lmms.io/forum/viewtopic.php?f=1&t=4740
-A few rules and useful forum instructions
If you like to introduce yourself, to the community, go here:
http://lmms.io/forum/viewtopic.php?f=4&t=4480
Thank you for the welcome and will do take a look into introducing myself, although, I am not a very exciting person to introduce.
musikbear wrote:
Sun Jan 24, 2021 3:45 pm
I believe That is the reason. It however does explain why you only have artefacts on other systems, thet is puzzling 😐 -Except the file has been processed, either for shipping, or streaming. The thing you could try was to zip it and ship it, maby that would work ..idk Would be interesting to know if that change anything :)
But back to oversampling. Current LMMS does not do that well.
Our resident sound-engineer says that Streaming sites now transcode and down sample to 128kbps MP3 and CDs top out at 44.1kHz 16 bit integer.
That can be a guideline for the export-settings. Masters should always be lossless, eg not mp3
Here is more about exporting, though it does not address mp3, and is more aimed at Master-quality export
As for this, I had a small hint that it may be one of the export settings as I guessed that The uploads on Discord, Messenger and probably other sites try to compress more the file therefor creating weird sound artifacts.

I tried exporting a WAV file with these settings BEFORE I saw your answer:
Oversampling: 8x
Interpolation: Sinc Best
Samplerate: 48000 Hz (I would not even dare go higher)
Depth: 32 Bit Float

But, it produces a 35 mb file size which is too big just to share to get comments from my close ones. Now that I have read the comment, I'll play with it and see if I can comme up with a solution following your guidelines.

I tried reducing:
Oversampling: 2x
Bitrate: 192 Kbp/s

Still got the same clicking effects.

I realised that the clicks happen on the tom03.ogg and crash01.ogg

I tried changing the ATT to 0.6 for crash01 and changed REL to 0.2 on both, but I still have the clicks. I reduced to:
Oversampling: 1x
Bitrate: 128 Kbp/s

The clicks stopped on tom03 but crash01 still has clicks even with those settings. I would not have thought that uploading MP3 files would make such problems when on my end they work fine.

NOTE: As for zip files, I use the built in messenger and discord players which automatically puts a playable message. In zip format, they would neet to download and unzip, but both use their cell phones and are not as tech-savy as me so, I try to make it clear using the built-in messenger and discord audio players.

EDIT (added notes):
I tried exporting the seperate intruments. tom01, tom03, no problems. As soon as I put both - Clicks happen. This may give a clue for someone here to help me out on a thing I did not think of.

Here's my music sample, sorry for the long start, I just did not bother redoing my whole song so I muted the other instruments, just move to position 30 seconds, the clicks are heard from there. The clicks are heard with x8, 320 Kbp/s, Sinc Best AND, they are also heard with x1, 128 Kbps, Sinc Best.
8x320: https://drive.google.com/file/d/1un6wYt ... sp=sharing
1x128: https://drive.google.com/file/d/1tu5t4A ... sp=sharing
PARTIAL solution

There seams to be a problem in MP3 exportation OR MP3 conversion from an exported WAV file. Although the clicks dissapeared from Discord and Messenger players, Audacity's MP3 importation reads all the clicks again. And exporting a clickless WAV file to MP3 using the lame codec, still produces the clicks from Audacity. So, I'm kind of speachless into why this is happenning. Why is the WAV audio format clickless while the exported MP3 happens to create clicks where initially, there were none...I'll update when I get more information.

After many tries and attempts, THIS comment gave me a big hint amongst others I will explain lower:
https://github.com/LMMS/lmms/issues/541 ... -599110006

I posted screenshots to help for those that are a bit more visual.

I ran through forums and applied these corrections to each of my instruments after reading some notes about clicking sounds:
Image
Enveloppe
ATT: 0.04 to 0.05
REL: Default - 0.1
AMT: Max
LFO
ATT: 0.1
Enable Filter
Select: LowPass or Allpass

Then, as I saw, something REALLY important, probably a noob mistake on my side, this meter:
Image
Speaking in prehistoric language terms...
RED - Not good
GREEN - Good.
So, I disabled all of my instruments and ran 1 by 1 each instrument to see if they were in red. I adjusted 2 things, the master volume and the note velocities where required.
Image
Image

After exporting a few times, the bothersome clicks were dissapearing leaving me with 1 single click happenning on a BIG bass tom03, tom01 and kick02 moment. I adjusted my tom03 note velocity, lowered it down and there it was, my no clicking complete music.

I exported with all of the highest options as MP3 with NO clicks anywhere (Note: I'm on Windows 10 for the linux people out there wondering):
Interpolation: Sinc Best
Oversampling: 8x
Bitrate: 320 KBit/s
Stereo mode: Stereo

Thank you for the people trying to help me. Hoping this helps many others like me wondering how to reduce clicking sounds. I think I covered many different possible situations here, but most certainly not all of them.
avidichard wrote:
Sun Jan 24, 2021 8:50 pm
SOLUTION!!!

FINALLY! After many tries and attempts, THIS comment gave me a big hint amongst others I will explain lower:
https://github.com/LMMS/lmms/issues/541 ... -599110006

I posted screenshots to help for those that are a bit more visual.

I ran through forums and applied these corrections to each of my instruments after reading some notes about clicking sounds:
Image
Enveloppe
ATT: 0.04 to 0.05
REL: Default - 0.1
AMT: Max
LFO
ATT: 0.1
Enable Filter
Select: LowPass or Allpass

Then, as I saw, something REALLY important, probably a noob mistake on my side, this meter:
Image
Speaking in prehistoric language terms...
RED - Not good
GREEN - Good.
So, I disabled all of my instruments and ran 1 by 1 each instrument to see if they were in red. I adjusted 2 things, the master volume and the note velocities where required.
Image
Image

After exporting a few times, the bothersome clicks were dissapearing leaving me with 1 single click happenning on a BIG bass tom03, tom01 and kick02 moment. I adjusted my tom03 note velocity, lowered it down and there it was, my no clicking complete music.

I exported with all of the highest options as MP3 with NO clicks anywhere (Note: I'm on Windows 10 for the linux people out there wondering):
Interpolation: Sinc Best
Oversampling: 8x
Bitrate: 320 KBit/s
Stereo mode: Stereo

That was 3 hours job, but well worth it. I learned a lot, hope to make others learn too with my mistakes and I have a lot more to learn. So lesson learned: Do not make your instruments have high velocity or loud volume, crank up your speaker volume instead. AND set your Enveloppe and LFO ATT values and add a LowPass or Allpass filter to almost all of your instrument before composing with them.

Thank you for the person that tried to help me. Hoping this helps many others like me wondering how to reduce clicking sounds. I think I covered many different possible situations here, but most certainly not all of them.
They are all 100% correct fixes, but these fixes makes it even more strange that you had one version that played perfectly. It was that difference between a perfect version on your own system (no clicks) and artefact plagued versions on other platforms, that make me not talt about envelopes ao velocity / volume settings, because with those you should have has artefacts on all and any replay -.weird
Perhaps you output on your own system is extremely low, so low that you could not hear the artefacts ... idk
But fixed! That is the important part! :)
musikbear wrote:
Mon Jan 25, 2021 4:12 pm
They are all 100% correct fixes, but these fixes makes it even more strange that you had one version that played perfectly. It was that difference between a perfect version on your own system (no clicks) and artefact plagued versions on other platforms, that make me not talt about envelopes ao velocity / volume settings, because with those you should have has artefacts on all and any replay -.weird
Perhaps you output on your own system is extremely low, so low that you could not hear the artefacts ... idk
But fixed! That is the important part! :)
After your comment, I was curious and had to try something out. I take other people's comment seriously so I thought, Audacity will tell me for sure if something is wrong. I've used it for years, never had a single problem with MP3 exports and conversions. I find it reliable and good to test this clicks situation.

So, I tried to get in Audacity to raise the volume, but before, I just wanted to re-export as-is to begin with. I did an initial play of the original "clickless" MP3 I exported, AND...results, SO MANY CLICKS. I tried opening the same export which was a hefty 150 Mb file exported at 8x192000 Sinc Best 32 Kbit/s WAV. NO clicks. Tried the 1x48000 Best Sinc 24 Kbit/s in WAV too and no clicks. So I would have a tendency to believe that the MP3 codec used for encoding the output probably has a problem UNTIL I tested THIS.

Re-import my previous exported MP3 from Audacity from my hefty 150 Mb WAV file BACK in audacity, the clicks come again. SO, there seams to be a problem for MP3 formats that are not present in WAV and I still am questionning if anyone would have an answer to that. But, I'll try playing arround with my music in LMMS again to figure out how to undoubtfully eliminate these clicks in MP3. So, let's just say, problem QUARTER-solved.

If anyone has other comments, I would really appreciate. I'll edit my SOLVED to partially solved just to not let others believe that my solution is magicaly doing the stuff right.
Some observation after some more time fiddling in LMMS. I have managed to reduce clicking sounds by gaging the volumes with this graph:
Image

SO, I opened Audacity to examine the Clicking area. I found THIS anomaly:
Image

As you can see, the TOP portion has the light-blue wave peak at the top in a straight square patern while as at the bottom, there is a normal wave patern with dark blue being at the peak but NOT the light-blue. That's when clicking happens, when the light-blue happens to be too high. So now, I am trying to figure out, what causes this peak on only 1 single side of the Stereo.

THAT moment happens to be a crash01 or snare01 + (tom01, kick02, tom03) moment at once on a low key. So I am trying to find what causes this peak. When playing in LMMS, my graph shows STRAIGHT red bar at THAT precise START of note moment. On the key stroke, I get a flat red peak and THAT is what's giving me clicks in the MP3 file.
Image

I still don't get why during playing it does NOT click and why WAV does not click ONLY MP3, but that's another thing one should consider to help out if you can :)
avidichard wrote:
Tue Jan 26, 2021 3:53 am
Some observation after some more time fiddling in LMMS. I have managed to reduce clicking sounds by gaging the volumes with this graph:
Image

SO, I opened Audacity to examine the Clicking area. I found THIS anomaly:
Image

As you can see, the TOP portion has the light-blue wave peak at the top in a straight square patern while as at the bottom, there is a normal wave patern with dark blue being at the peak but NOT the light-blue. That's when clicking happens, when the light-blue happens to be too high. So now, I am trying to figure out, what causes this peak on only 1 single side of the Stereo.

THAT moment happens to be a crash01 or snare01 + (tom01, kick02, tom03) moment at once on a low key. So I am trying to find what causes this peak. When playing in LMMS, my graph shows STRAIGHT red bar at THAT precise START of note moment. On the key stroke, I get a flat red peak and THAT is what's giving me clicks in the MP3 file.
Image

I still don't get why during playing it does NOT click and why WAV does not click ONLY MP3, but that's another thing one should consider to help out if you can :)
LMMS- visualisation gadget is quite ok, but its not 100% accurate. Look for SPAN or perhaps use LMMS -parametric EQ as visualisation. If we look at the Audacity images, the we have visualized clipping The spectrum should preferably not max out outside the 'available-span' (your marked peaks) -But!
That is not a done deal!
Clipping is fine, as long as it does not influence other frequencies negatively
a lot of great sound effects like sonic-boom depends on clipping!
So the bottomline is that the one thing you ned to use when you mix, that is your ears!
Your clips was bad -they resulted in clicks and crackles, so they must be 'fixed', Other times you will have clipping that does not create artefacts, and then you do not have to remove them.
So why clicks on mp3 and not on wave..
mp3 does change the frequencies so that could be where this happens. some interfering freq meets in mp3, but not in wave, but im only guessing
Perhaps try a limiter on the mp3 export...