Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audio Channels seem to add when mixed #38

Closed
catvvvveasel opened this issue Jan 7, 2014 · 11 comments
Closed

Audio Channels seem to add when mixed #38

catvvvveasel opened this issue Jan 7, 2014 · 11 comments
Labels

Comments

@catvvvveasel
Copy link

So if I have many sounds playing at once, I have to pull down the master volume, ( I guess this is normal?) also I seem to have to have the Resample filter in even through the audio is 44.1 and the engine is 44.1
(I'm using asio4all and a normal sound card here btw)
Even bring levels down so that its not peaking, there is still some distortion but
If the resample transition band is 1 the distortion seems to go.
So what is the transition band?
Any suggestions of how to handle levels etc?
https://copy.com/TJNQkoZvsf4GTgkF
is my patch that distorts, audio included...
TBH at this level I can't hear it, so I've borrowed my girl friends undamaged ears to monitor for me!

@sunep sunep mentioned this issue Jan 15, 2014
@sunep
Copy link
Collaborator

sunep commented Jan 15, 2014

As far as I have understood mixing and levels, yes you are correct when mixing you add the signals.

When mixing audio you need to avoid clipping, even in the internal mix bus, where clipping can happen when the signals being mixed are too hot.

Since the signals add, then you need to lower the volume of each track enough that all tracks can reach max level at the same time without clipping if you want to be certain that distortion does not happen.

Normally it is easy, you lower the level 3dB for each track with sound (in this case 17*3 = 51dB), that is to be certain that clipping can not happen, in real life you should lower the level on a pr. track basis depending on the content of the track and quite often you know that not all tracks will have audio at the same time.

Note that clipping will occur even if eg. all input gains are on 1 and you lower the master to have no clipping on the output meter (I think in vvvv, a master fader would be a two channel matrix mixer after the 17:2 channel matrix mixer)

Other mixing engines have a floating point mixing bus giving some extra headroom that makes it possible to exceed maximum level without clipping, you would of course then need to lower the resulting signal to avoid clipping.

So I guess the question could be asked how does the mix bus work?

@sunep
Copy link
Collaborator

sunep commented Jan 15, 2014

I just realized that you are playing 17 stereo tracks, which translate into 34 monotracks which makes the possibility of clipping even greater.
besides that, you also need to tell what the level should be for each sound in Left and Right channel, see eg. this: #29 or the little stereo mixer I made (Mixing mono signals in stereo): #30

@tebjan
Copy link
Owner

tebjan commented Jan 15, 2014

the audio engine is float based, you should have all headroom you can wish for. you only have to make sure that you bring down the levels before the AudioOut node...

@tebjan
Copy link
Owner

tebjan commented Jan 15, 2014

i only wonder why you had to insert the Resampler... the transition band is a quite abstract value. it sets the parameters for a filter. this filter takes care that there is no high frequency content from aliasing after the Resampler step... low values < 2 need a lot of CPU power, but this also depends on the in/out sample rate.
it would be more interesting to check what goes wrong if you have no Resampler and all rates are the same...

@catvvvveasel
Copy link
Author

I think the clipping is gone, the Resampler is more interesting, with out it, it sounds fucked up, distorted, but sample and engine are the same rate.
I can't hear the transition band, but I'll get Em back in to test it later!

@tebjan
Copy link
Owner

tebjan commented Jan 15, 2014

can you send me some of these audio files?

@catvvvveasel
Copy link
Author

In the link above, as Sune, point out I was being dumb and everything was panned centrally, sounds better no they're spaced!

@tebjan
Copy link
Owner

tebjan commented Jan 15, 2014

ah ok, tested it. you need to remove the Resampler from the signal chain, then it works. the Resampler introduces another buffer timing for the nodes upstream. that's not really transparent, i know... thinking of a better solution...

@catvvvveasel
Copy link
Author

Here without the resampler it doesnt work though...
I'm using asio4all and my built in sound card

@tebjan
Copy link
Owner

tebjan commented Jan 15, 2014

have you completely deleted the resampler node and reload the patch?

@catvvvveasel
Copy link
Author

Ah! No I haven't!
Thanks for that :)

@tebjan tebjan closed this as completed Feb 10, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants