Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: High distortion (Read 11859 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: High distortion

Reply #25
The problem is when I play this file in WinXP. In WinXP DFX is a Winamp plugin. In Win10 DFX is a kind of "audio driver".
This is the problem. Winamp audio engine does not use floating point.
Everything is transmitted in 16bits (They added a 24bits integer option later on, but since many plugins didn't support it, it was not recommended to enable it and it is disabled by default).
As such, you need to ensure that the output of the DFX plugin does not clip before coming back to Winamp.
Since there's a problem with Winamp, what about using Foobar2000? DFX can install a plugin for it in WinXP too. But I don't know how to use Foobar and how it could process WAV files. There's a tutorial here https://www.fxsound.com/support/dfx/manual/current/record/index.php but it's about writing a CD with DFX enhancements. Any ideas about how to process WAVs in Foobar2000?

Quote
Maybe I could solve this problem setting Winamp Pre-amp button but I would have to do that to each WAV file.
Programs that support replaygain (Winamp included) have an option to apply different gains if a track has Replaygain or it doesnt.
I recommend to apply a constant reduction of gain for tracks that don't have replaygain. In this screenshot this value is set to -4, and tracks with replaygain get a gain of +3 (This helps to compensate this "apparent lost of quality").
I did not understand it. Are you saying I should use those replaygain settings during processing WAVs with Winamp+DFX or only when playing WAVs already processed?

Re: High distortion

Reply #26
Oh... I see it has a specific foobar2000 plugin. That should improve things because foobar2000 interface uses floating point.

The special part about foobar2000 is that some things, like replaygain can be calculated and stored into its library (so no need to worry if the file format supports it), and in that case, it could decrease the gain on non-replaygained (the original files), and increase the gain on replaygained (which you would do on the processed files, although you could ideally replaygain scan all them).

If the output of the plugin is still clipped, it will still generate clipped output when generating a wav file, but you could always add a gain DSP plugin after DFX to compensate for that.

Re: High distortion

Reply #27
Oh... I see it has a specific foobar2000 plugin. That should improve things because foobar2000 interface uses floating point.

The special part about foobar2000 is that some things, like replaygain can be calculated and stored into its library (so no need to worry if the file format supports it), and in that case, it could decrease the gain on non-replaygained (the original files), and increase the gain on replaygained (which you would do on the processed files, although you could ideally replaygain scan all them).

If the output of the plugin is still clipped, it will still generate clipped output when generating a wav file, but you could always add a gain DSP plugin after DFX to compensate for that.
I have tried Foobar but got the same distortion as before while playing the original file. I did not change anything except Preferences > Playback > Output > Output Data Format from 16 to 24 to 32 and back to 16 but got no better results. AFAIK, Foobar does not write WAV files anyway. Well, since you know Foobar better than me, do you have more tests I can do?


Re: High distortion

Reply #28
The soundcard output data format is just there for when using a mode that talks directly to the soundcard (like wasapi exclusive, or asio) so that it uses the same format that the soundcard uses. Else, if it works in 32bits float, it's better to use that. (It depends on the version of directsound).

The replaygain settings on foobar2000 are in Playback (probably you saw that already). You can try setting what I said above, +3 -4 or +2 -5 and see if that reduces the distortion enough without the punch you miss.

Re: High distortion

Reply #29
The replaygain settings on foobar2000 are in Playback (probably you saw that already). You can try setting what I said above, +3 -4 or +2 -5 and see if that reduces the distortion enough without the punch you miss.
In fact, distortion was reduced when setting to -5 in Foobar and Winamp. With -4 distortion is noticeable and with -6 sound is too low. Foobar has a sound quality slightly better than Winamp, but both are still "weak" in my opinion with -5.

Back to the tests, the best I've got so far was:
using WaveGain: original(-9.68dB) + replaygain ---> wav(0dB)
using Winamp: wav(0dB) + DFX ---> wav(-8.25dB)

I'm thinking about something: is there any way to capture the sound after DFX in Win10? This would be a good option since I could get the sound exactly as it's generated. Do you know any way to do that accurately?

Re: High distortion

Reply #30
Oh!!! I almost forgot!  foobar2000 has a limiter that could, maybe help in this case.

Add the "Advanced limiter" after the DFX plugin and check if that improves things.

Re: High distortion

Reply #31
Oh!!! I almost forgot!  foobar2000 has a limiter that could, maybe help in this case.

Add the "Advanced limiter" after the DFX plugin and check if that improves things.
Unfortunately, adding/removing Advanced Limiter made no noticeable difference.
I have played with it putting it after and before DFX, but no results. It seems the distortion is too high for it.
Now Replaygain is critical. Without it, there's no way.

Two questions:
1 - Is there any way in Foobar to save this processed file to a new WAV file as in Winamp?
2 - What about the idea to capture the sound after DFX in Win10, regardless the player being used, I mean capture the sound directly? I don't know if I'm talking nonsense.


 

Re: High distortion

Reply #32
1 - Yes. select the track, right click to show the popup menu, and there look for the "convert" option. Once in there, remember to select the DSPs too (else they are disabled by default).
2 - I am guessing that you could try recording it with audacity. If you select the "WASAPI" api, you can select a soundcard and it will record what is playing.

Re: High distortion

Reply #33
1 - Yes. select the track, right click to show the popup menu, and there look for the "convert" option. Once in there, remember to select the DSPs too (else they are disabled by default).
2 - I am guessing that you could try recording it with audacity. If you select the "WASAPI" api, you can select a soundcard and it will record what is playing.
I've got very good results (in my opinion) regarding audio quality when trying to record with Audacity.
But got some problems too:
- The beginning of the song is often "cut off".
- In the middle of the song, sometimes there are small "cuts" for no apparent reason.
- Playing the processed file in Audacity, the sound is much louder than in Foobar.
- I can't touch the computer while recording, since any change to sound will be recorded too.

I'm using the following settings (mostly default). Do you know any better settings to eliminate those problems?

Windows 10:
   All volume settings to 50% (default)

Foobar:
   Volume (main window): -10dB
   Playback
      ReplayGain
         Source mode: none
         Processing: none
         Preamp:
            With RG infor: 0.0dB
            Without RG info: 0.0dB
      DSP Manager
         Active DSPs: none (default)
      Output
         Device: DFX Speakers

Audacity:
   Devices
      Interface
         Host: Windows WASAPI
      Playback
         Device: DFX Speakers
      Recording
         Device: Speakers/Creative SB X-Fi
         Channels: 2(Stereo)
   Recording: default settings
   Quality
      Sampling
         Default Sample Rate: 44100Hz
         Default Sample Format: 32-bit float
      Real-time Conversion
         Sample Rate Converter: Best Quality (Slowest)
         Dither: None
      High-quality Conversion
         Sample Rate Converter: Best Quality (Slowest) (default)
         Dither: Shaped (default)


Re: High distortion

Reply #34
Hi.
Yes, I've experienced once or twice the problem that you describe when starting to record. Not sure what causes it. Since I don't use it much for recording, I didn't care to know how to fix it.
Small cuts might be caused by latency problems, and that depends entirely on Windows and the hardware connected to it. Usual causes are wifi devices and sometimes graphics drivers. Back in the day, also the soundblaster Live :P
Louder sound: Well.. In foobar you decrease the volume by 10dB
And yes.. the problem of recording it this way is that it records all the sounds that are produced.

Quote
Output
   Device: DFX Speakers
[...]
Playback
         Device: DFX Speakers
Sorry to bug you but... Did you also use these Outputs when playing the already processed wav? It might be the whole reason why they sound bad.

The Windows volume depends entirely on what you have physically connected to the outputs, but it sounds as a reasonable value too.

The settings on Audacity seems fine. It might not be needed to use the best quality on the realtime conversion (that's the one used on playback), but aside of that, they are reasonable values.

The settings on Foobar are slightly different from what I would have.  I am guessing that you need to reduce the main volume so that the DFX "soundcard" plays fine. I wonder if you couldn't do the same with :

Quote
Source mode: by playback order  (this means that if it is playing an album, it uses album gain, and if the track is not part of an album, it uses track gain)
         Processing: apply gain  (prevent clipping might be useful if you have mostly lossless, but with lossy, it might unintentionally lower too much the gain)
With RG infor: -4.0dB
            Without RG info: -10.0dB
Of course, leaving a margin on the main volume allows you to increase it if needed, so If that works better for your tracks, then it's fine.


Re: High distortion

Reply #35
Quote
Output
  Device: DFX Speakers
[...]
Playback
        Device: DFX Speakers
Sorry to bug you but... Did you also use these Outputs when playing the already processed wav? It might be the whole reason why they sound bad.
In fact, when I play any processed file I have to disable DFX, otherwise the distorion will be extremely high.

Now there is a new situation. Maybe you remember when I said that the best I had gotten was:
using WaveGain: original(-9.68dB) + replaygain ---> wav(0dB)
using Winamp: wav(0dB) + DFX ---> wav(-8.25dB)

In Win10, playing that wav(-8.25dB) and the wav just recorded by Audacity, I can not hear any significant difference betwen them. Actually, doing a blind test, I could not tell which one was playing!!! Well, provided the wav recorded by Audacity has no small "cuts".

It was a surprise to me. Win10 seems to have a much better audio structure than WinXP. The drawback is the need to use old softwares but this is not a big problem.

Also I need to do more tests, since the goal is to play these files in audio systems without the same resources as in a computer.
Well, back to the tests.