Multitrack playback bug

This section is now closed.
Forum rules
Audacity 1.3.x is now obsolete. Please use the current Audacity 2.1.x version.

The final version of Audacity for Windows 98/ME is the legacy 2.0.0 version.
Ianpb
Posts: 4
Joined: Sat Aug 20, 2011 4:17 pm
Operating System: Please select

Multitrack playback bug

Post by Ianpb » Sat Aug 20, 2011 5:04 pm

I noticed that as more tracks are played back at the same time the loudness was increasing, so I conducted an experiment to confirm this:

I created a track with a continual note being played by an electric organ, and noted the level at around -30.
I then copied this track and played both at the same time, this time the reading was about -24.
I then made six further copies of the first track, thereby now having eight duplicate tracks all at the same level, and when played together the output level was now about -12.

This bug will seriously inhibit multitrack mixing.

kozikowski
Forum Staff
Posts: 68902
Joined: Thu Aug 02, 2007 5:57 pm
Operating System: macOS 10.13 High Sierra

Re: Multitrack playback bug

Post by kozikowski » Sat Aug 20, 2011 7:52 pm

Before you throw the "B" word around, you need to make sure that the behavior wasn't intended. Very few people pile up exactly the same show one atop the other. That's what the Amplify effect does. What's more normal is violins, trumpets, vocal, and piano. In that case, the overall volume of the performance doesn't change.

Can you imagine the chaos if you added a track and all the other tracks changed volume? The help forum would crash.

Koz

Ianpb
Posts: 4
Joined: Sat Aug 20, 2011 4:17 pm
Operating System: Please select

Re: Multitrack playback bug

Post by Ianpb » Sat Aug 20, 2011 8:36 pm

I'm sorry but I don't know what you're talking about.
kozikowski wrote:Before you throw the "B" word around, you need to make sure that the behavior wasn't intended.
What does that mean? I noticed an issue, so confirmed it with a test. That was the intention of the test, so it was intended.
kozikowski wrote:That's what the Amplify effect does."
What "Amplify effect" are you referring to? There should not be any amplification caused by using more than one track if all tracks are identical and equal. If that effect occurs then there is a fault with the programming code.
kozikowski wrote:What's more normal is violins, trumpets, vocal, and piano. In that case, the overall volume of the performance doesn't change.
So are you saying that if different instruments are used in each track that the volume does not change, as opposed to using duplicated tracks? That's not only incorrect, it's also illogical. I first noticed the effect with different instruments, so it was necessary to confirm it with an identical sound source, ie. a constant electronic organ tone.
kozikowski wrote:Can you imagine the chaos if you added a track and all the other tracks changed volume?
I did add a track and the volume did change, and it did so with each track addition. That's what this post is about. Are you being sarcastic?

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Multitrack playback bug

Post by Gale Andrews » Sun Aug 21, 2011 12:23 am

There is no bug (meaning something is happening that the developers don't intend). I think you're asking for some kind of feature to automatically scale the tracks equally so there is no clipping, or to have a master fader. These are popular Feature Request on our system:
One-step way to avoid clipping on multiple tracks: (25 votes)

* Master Fader ability: (20 votes)
- Separate mixing window (like Mixer Board but with a "Master-Fader" control): (5 votes)
- Shortcut that moves all gain sliders by same amount (6 votes)
- Master-Fader or Master Envelope track: (3 votes) Like the Envelope Tool but in its own track and applies to all tracks, used additional to and independently of Envelope Tool. On playback, fader position is interpolated (linearly in dB) between the track points and the result is added (in dB thus multiplied) with the current "envelope" value.

* Automatic gain adjustment (Mix and Scale): (10 votes) so that the mix in unmuted tracks can never clip. Could be a control that sets the target level of the mix.
Please tell us which of the above you would vote for (or suggest another idea). I think a lot of experienced users would still not want this feature on by default - they would want to adjust the gain down on each track separately to blend the sum to best advantage.
Ianpb wrote:There should not be any amplification caused by using more than one track if all tracks are identical and equal. If that effect occurs then there is a fault with the programming code.
If tracks are mixed together then obviously the sound will combine and be louder than if the tracks were soloed. Sing as loud as you can. Get your friend to sing next to you as loud as he can. Is the sound of both of you singing together the same volume as when you sing on your own? I think not.

kozikowski wrote:What's more normal is violins, trumpets, vocal, and piano. In that case, the overall volume of the performance doesn't change.
Possibly in terms of how you hear the sound, combining the same tracks of a given peak volume would sound louder than combining different tracks of the same given peak volume. That is, the average RMS volume (light blue in the Audacity waveform) might not increase so much if the tracks were different.

But if you are combining different or identical tracks the overall peak digital volume must increase surely, unless some sounds are opposites and cancelling each other out?

Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

Ianpb
Posts: 4
Joined: Sat Aug 20, 2011 4:17 pm
Operating System: Please select

Re: Multitrack playback bug

Post by Ianpb » Sun Aug 21, 2011 1:13 am

Gale Andrews wrote:There is no bug (meaning something is happening that the developers don't intend). I think you're asking for some kind of feature to automatically scale the tracks equally so there is no clipping, or to have a master fader.
No, I'm not asking for any feature to be added. This has nothing to do with clipping, fading or any such thing, because
I'm pointing out an important flaw in the software. Clipping never even occurred in my test because track levels were low.
Gale Andrews wrote:If tracks are mixed together then obviously the sound will combine and be louder than if the tracks were soloed. Sing as loud as you can. Get your friend to sing next to you as loud as he can. Is the sound of both of you singing together the same volume as when you sing on your own? I think not.
You are wrong there. This issue concerns the stage of signal MIXING, not the physical pushing of more air as would be the case of two singers over one, or even two speakers over one. I have worked with real mixing desks and the output level is NEVER higher than the highest input. If this were the case then record producers would demand extra circuitry to compensate for increased and decreased levels when they switch tracks in and out, but they don't because it doesn't happen. If a live mixing desk behaved like Audacity it would drive the sound engineer to distraction when he takes a channel out and the overall loudness suddenly decreased. But it doesn't happen like that. This is why I point to a flaw in software coding.
kozikowski wrote:What's more normal is violins, trumpets, vocal, and piano. In that case, the overall volume of the performance doesn't change.
Gale Andrews wrote:Possibly in terms of how you hear the sound, combining the same tracks of a given peak volume would sound louder than combining different tracks of the same given peak volume. That is, the average RMS volume (light blue in the Audacity waveform) might not increase so much if the tracks were different. But if you are combining different or identical tracks the overall peak digital volume must increase surely, unless some sounds are opposites and cancelling each other out?
This is nothing to do with how I hear the sound, although I do hear extra loudness when new identical tracks are introduced. The (digital) audio level of the software would equate to a voltage level in a physical mixing desk. If the level on one channel is, say 100 millivolts and another channel is introduced with another 100 millivolts, as with paralleled batteries, the voltage would remain at 100 millivolts, ie. no change in audio level. Unfortunately, Audacity is not correctly emulating a mixing desk. It would appear that the software has been designed as a series chain of channels rather than a parallel array. If this is so then it would cause this misfunction.

steve
Site Admin
Posts: 80679
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Multitrack playback bug

Post by steve » Sun Aug 21, 2011 7:52 am

Audacity is not a mixing desk, it is a multi-track recorder. Multi-track recorders and mixing desks are essentially different in that a mixing desk mixes multiple channels of sound into one (mono or stereo) channel, whereas a multi-track recorder records multiple audio tracks. Where a correlation does exist between a multi-track recorder and a mixing desk is that when the multiple tracks are played back they are summed (mixed) to one (mono or stereo) output stream that is played through the sound card in much the same way as a mixer sums (mixes) multiple channels into the master output.

"Mixing" is an additive process for both mixing desks and for the playback of multi-track recordings. http://en.wikipedia.org/wiki/Audio_mixi ... %29#Mixers

You've not said what make/model of mixer you use, but on all the mixers that I have ever used (and I use mixing desks every day) the level on the master meter does increase if additional audio signals are added to the mix. For example, if I have an 8 channel mix of instruments that are all playing and it registers on the master meter as -3 dB (peak), if I then start muting channels (mute channel 1 > 2 > 3 > ...) then the level on the master meter will go down until finally the level will be -inf when all channels are muted. Note that this is not the same as soloing one or more channels. Typically a soloed channel will show the pre-fader level of that specific channel and not the post fader "mix" level of that channel.
Ianpb wrote: I have worked with real mixing desks and the output level is NEVER higher than the highest input.
The behaviour that you are referring to is a peculiarity of mixing desks. Typically a mixing desk will be designed such that the sum of all channels, when carrying an average / normal type of music signal where each channel has a peak level of 0 dB and all faders are set at 0 dB, the mix level will be somewhere around 0 dB. This is achieved in the hardware design by reducing the gain of each channel prior to mixing according to the number of channels that the mixing desk has. So for example, a 0 dB signal on one channel will register considerably lower than 0 dB on the master meter, but if you have music on all channels, and all channels are "typical" music channels (such as voices or single instruments), then the master output will be somewhere around 0 dB. Note that it will only be "somewhere around" and not "exactly" as the actual output level will depend on the actual audio signals being fed into each channel. (if same phase and same frequency sine waves, each at 0 dB, are fed into each channel of the mixer then the mix level will be considerably higher than 0 dB, but of course one is unlikely to ever do that in real life situations).

While this approach is very useful on mixing desks it is less desirable (and more problematic) for a multi-track recorder. A mixing desk has a set number of channels, where as the the number of audio tracks in Audacity is not predetermined - there could be just one mono track, or 50 stereo tracks, so it would be impractical to automatically reduce the level of each track by a fixed amount as occurs with hardware mixers. You may suggest that perhaps it would be better to automatically reduce the level of each track according to the number of tracks in the mix, but that is still problematic - if you decide that you want to mute one or more tracks, should the level reduction then be altered to reflect the lower track count in the mix? If you don't do that then you will be applying too much automatic level reduction to the mix, but if you do do that, then the levels of individual tracks within the mix will be going up and down depending on which tracks are muted and you will have no idea what the actual level of each track is.

Another problem with attempting to compensate for sum level of all tracks is that with a multi-track recorder, some tracks may be exact duplicates of other tracks. In this case the sum of the two signals is 6 dB higher than the level of one signal alone. This is a lot more than the increase that you would get from unrelated signals (such as a vocal track and a guitar track). On the other hand, one track could identical to another but with the phase inverted. In this case the mix from the two tracks will be silence (and there's no way that you could compensate for that situation).

The "solution" that is adopted by multi-track recorders (such as Pro-Tools, Sonar, Ardour, Reaper, Cubase et al) is for the master meter to show the actual level of the sum (mix) of all channels, and that is what Audacity does.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Ianpb
Posts: 4
Joined: Sat Aug 20, 2011 4:17 pm
Operating System: Please select

Re: Multitrack playback bug

Post by Ianpb » Sun Aug 21, 2011 9:04 pm

If Audacity is, as you say, merely a multitrack recorder, then why does it have the ability to mix down? That is the function of a mixing desk, and mere multitrack recorders shouldn't be able to do that. As you will be aware, Audacity is often packaged in products as 'recording and music creation software', and to quote Behringer's website regarding their 'Podcastudio' product, "Powerful DAW software included (Kristal Audio Engine, Audacity)". The fact is that Audacity is a sound recorder, editor and mixer all in one, effectively a Digital Audio Workstation (DAW), albeit somewhat basic compared to many commercial packages.

I must say that during my spell as a recording engineer some years ago, neither I nor my associates, noticed this problem with the mixing desk we used that was built in the early Eighties. Personally, I would guess that the phenomena you mention on your mixing desk was possibly due to poor design, perhaps insufficient resistive isolation between the channels. This would come as little surprise to me considering more modern mixing desks often employ more specialised integrated cirtuits that exhibit poorer isolation due to lower internal impedance than older models that used a greater number of basic audio op-amps and transistors. That would be in line with current manufacturing phylosophy that would rather build a guitar fuzzbox full of modern (often digital) integrated circuits, even though they sound inferior and less musical than older and simpler two to three transistor models that had one amplifier stage overloading another.

What appears to be overlooked here is that once the sound is recorded with the software it is no longer a sound, it is digital data that represents electrical current, and the loudness would be dictated by the voltage (obviously the software represents this voltage in abstract terms of numbers). In the real world, 1 volt in parallel with 1 volt = 1 volt, and ten parallel 1 volts = 1 volt. Therefore, as far as the mixing interface is concerned, there should be no increase in level, but there is. Whatever happens when that signal is converted back to sound is irrelevant. Even if software exhibits the same phenomena as your mixing desks, why should that even be considered a desirable thing? I may be a bit of a dunce when it comes to software programming, but if a compensation feature were included then that could make the software more perfect than the modern mixing desk, and maybe many would prefer it that way. It would seem that whether you use the current method or a compensated method, either could have it's advantages and disadvantages, and therefore this feature could perhaps be made switchable. The fact is that progress will not occur with a "that's how it is" attitude.

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Multitrack playback bug

Post by Gale Andrews » Mon Aug 22, 2011 2:26 pm

Ianpb wrote:if a compensation feature were included then that could make the software more perfect than the modern mixing desk, and maybe many would prefer it that way. It would seem that whether you use the current method or a compensated method, either could have it's advantages and disadvantages, and therefore this feature could perhaps be made switchable. The fact is that progress will not occur with a "that's how it is" attitude.
That's why I pointed you to the "Feature Requests" to compensate for changing levels on tracks or increasing the track count. So if you don't like those ideas please write a couple of sentences that describes your proposed feature. And it's still not a bug that tracks add to the volume level.


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

kozikowski
Forum Staff
Posts: 68902
Joined: Thu Aug 02, 2007 5:57 pm
Operating System: macOS 10.13 High Sierra

Re: Multitrack playback bug

Post by kozikowski » Mon Aug 22, 2011 3:19 pm

If Audacity is, as you say, merely a multitrack recorder
We probably shouldn't go too far down that pathway. Audacity is an Editorial Environment Production Manager. It's natural saved outputs are Audacity Projects not sound files. If you want a sound file bad enough, you have to Export one. Direct comparisons to physical processes and equipment can get cloudy and messy in a hurry.

Koz

steve
Site Admin
Posts: 80679
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Multitrack playback bug

Post by steve » Mon Aug 22, 2011 3:36 pm

steve wrote:"Mixing" is an additive process for both mixing desks and for the playback of multi-track recordings. http://en.wikipedia.org/wiki/Audio_mixi ... %29#Mixers
Practical Example:
  1. Generate a tone into a new (empty) project (Generate menu > Tone) - any sort of tone will do, but for clarity, set the Amplitude to 0.5 (approximately -6 dB).
    If you play the track you will see that the playback meter registers -6 dB (as expected).
  2. With the track selected, duplicate the track (Ctrl+D)
  3. Select only the second track and invert it (Effect menu > Invert)
At this stage, if you zoom in close you will see that for each peak in the first track there is an equal but opposite trough in the second track (and vice verse):
tracks002.png
tracks002.png (18.29 KiB) Viewed 1353 times
If you now press "Play", both tracks will play, but the two waveforms will entirely cancel each other out and the result will be silence.

It would obviously be entirely wrong if the playback meter still showed -6 dB. The playback meter indicates what is actually happening - that is a level of -inf (silence).

You can check that playback is actually occurring by adjusting the playback "gain" slider on one of the tracks - if the playback levels are different, then phase cancellation will be incomplete and you will see and hear the volume increase.

In case there is any doubt, this is not a quirk of Audacity, it is the laws of physics in action, and is the basis of the widely documented "centre pan voice cancellation method", "noise cancelling headphones" and is often referred to a "Phase Cancellation" and is the reason why most high quality mixing desks have a "phase reversal" button on each channel.
VTC-Sect-1.jpg
Phase Reversal button on TL Audio VTC
VTC-Sect-1.jpg (14.59 KiB) Viewed 1353 times
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Locked