Distorted sound mixing audio channels.

Hi,

I’m trying to output two sounds simoultaneusly.

Mix Audio Channels documentation says

If the input audio samples range between -1 and 1, 
then the mixed samples may fall outside the range of -1 to 1, 
resulting in distorted sound if you try to play them on an audio device. 
To avoid this, scale the loudness of the combined N channels of audio 
by (1/N)¼ using the Adjust Loudness node.

I’m following the suggestion, but still I get distorted sound. Am I doing something wrong?

Regards
michele

PlayAudioFile.vuo (3.27 KB)

Play it safe and adjust the loudness to 1/N. In this case, 0.5 (6 dB softer).

0.84 is 1.5 dB softer: more often than not, this is insufficient when adding two audio signals together. It should be at least 3 dB softer (0.707).

Thanks @Kewl. I tried; unfortunately distortion is heard even changing Loudness values to 0,5 or even less.

How many channels in your files? Because “Mixed Samples - A single audio buffer consisting of all channels added together.” So… Two stereo files would be four channels added together?

They are two stereo files. Lowering loudness to 0,25 makes the sound almost disappear, but still cracklings are there. Here are the files. Anyway even using different files I still experiment the issue.

Archivio.zip (3.46 MB)

You might try exporting both files again from audio software at the same sample rate. Your chime file is 24k whereas the bell is 44.1k. That might be asking a lot of Vuo.

Thanks @jersmi for the suggestion. I tried exporting as you suggested, and also in a 8bit wav. I tried also to decrease loudness before mixing. No luck, I get always the same trouble.

The bell file is “dual mono”: mono signal in a “stereo” file.

The chime file (which to my ears “should” be played an octave higher) is full of distortions: maybe this is what you’re hearing?

Dear @Kewl, thanks for your support.

My idea is that the issue is independent of the audio file. Chime file is quite distorted itself, I know, but what I hear is something different.

To clear it better, I tried running the last composition feeding twice with “DeclineOfTheAmiga.mp3” that is distribuited with Vuo examples.

In the attached archive, you can hear the result, recorded via BlackHole.

I notice also the result is slowed down a bit.

Any ideas?

michele

EDIT: I tried reexporting DeclineOfTheAmiga to a lower quality 8Khz mp3, then also mixing with bell.mp3… always the same slowed down buzz.  

Archivio.zip (429 KB)

Even barebones, the gritty slowdown happens… Maybe a bug?

Please take a look at our answer to a previous discussion about mixing audio.

1 Like

I hear the same thing as you. the DeclineOfTheAmiga.mp3 file you shared has some distortion in it already but that’s not the distortion your experiencing when sending the audio live. when interleaving two audio channels the composition distorts and slows the music down to like half speed.

I tried with two mono audio files that I know are not distorted and tried to just send them out live without mixing or adding and I experience the same distortion and slowing of the audio files as you. when doing something like this.

it seems to be an issue when using two audio files on the same live send. when doing something like this using two send audio live nodes there is no distortion or slowing down of the music and you are able to mix and play more than one audio file in sync.

with your test file bypassing the mix audio nodes and using a second send live audio fixes the distortion and slowing of the music problem and lets you play two audio files undistorted. for what ever reason when you mix the audio signals or interleaved them on one send live audio node things get distorted and slowed down. possibly because one of the audio buffers is slower or faster than the other confusing the send audio live ? I really have no idea but using two send audio live nodes fixed the problem for me.

audio_test.zip (10.6 MB)

1 Like

There you go, two Send Live Audio nodes. Also to note that 8k is quite a low sample rate, might have its own unwanted artifacts on top of it. I’d be more inclined to keep a higher sample rate (44.1k or 48k, or at least go back to original audio file for highest possible) and if you want to add some lo-fi quality try, for example, Vuo’s audio filter.

indeed 8bit is little low and can add distortions or unwanted artifacts. I bounce my audio @ 24bit which is plenty enough quality for me. Vuo supports up to 64bit which is a really high resolution for audio if you ask me. there might be some use cases for something that high but normally 16bit is fine. you could also play around with the bit crusher node to get some lofi sounds if you want distortions. sometimes it sounds good to bit crush some drums or a bass line if you want a more vintage feeling.

Dear all,

thanks everybody for the support to solve my issue. Vuo is not just a great piece of software, but also a serious team and a helpful community.

I was so used to send multiple layers to one Render Layers to Window only node that I didn’t think audio behaves differently.

@Jmcc, just my 2 cents: I think could be helpful to add a sort of Play simoultaneous sounds example in the library.

Cheers

michele

1 Like

@cremaschi,

add an… example in the library.

Thanks. We’ll definitely consider it.