Replacing a track's source audio

Program: Audacity 2.0.5
OS: Windows XP SP2

Summary: I’d like to know how (or if) it’s possible to replace the source audio for individual tracks.

Details: I put together a suite of themes from a film soundtrack I liked. I did this from mediocre-quality MP3s while I was waiting for the CD to arrive. I got carried away and finished the suite, and now that the CD is here, I’d like to replace the MP3 sources with the WAV sources. There are no differences between the MP3s and WAVs in relation to length or volume - only quality. Therefore, replacing the sources would allow me to keep the timing and volume envelopes of each track rather than having to reconstruct the entire project. It seemed like the source replacements should be an obvious plug-n-chug process, but I can’t seem to find a way to do this. I might be blind, but I looked through the FAQ, 10 pages of forum topics and searched the wiki - no luck (though I found lots of nice info on advanced editing).

So - is this even possible?

And if not, can I copy things like volume envelopes and audio positions from one track to another?

Because I’d rather not redo this from scratch.

Please be careful with Windows XP. Microsoft are no longer officially supporting it, so it will be unpatched against any new security vulnerabilities that appear.

Make sure you have XP Service Pack 3. You can still download Service Pack 3 from Microsoft if necessary: Windows XP support has ended - Microsoft Support .

Ensure you have a good third-party anti-virus application. Be aware though that this will not give you complete protection against a previously unknown attack.

For some extra protection you can install http://technet.microsoft.com/en-us/security/jj653751 .

If it is not practicable for you to update to the much more secure Windows 7 or Windows 8, you can consider installing a Linux operating system instead. Most versions are free and all are very secure.

Gale

There probably are small differences. MP3’s have silence padding at the start but WAV’s do not.

Audacity always copies MP3 files into the project in small chunks. The chunks get moved around as you edit. So no. If you had imported WAV files and “read them directly” (not copied in) then you could simply change the path to another WAV.

Volume envelopes could be copied from the AUP file if you copy/replace the syntax exactly. Close the project then make a backup copy of the AUP file before attempting this.

Look at this example where the envelope points are in track 1.

	<wavetrack name="Audio Track" channel="2" linked="0" mute="0" solo="0" height="150" minimized="0" isSelected="0" rate="44100" gain="1.0" pan="0.0">
		<waveclip offset="0.00000000">
			<sequence maxsamples="262144" sampleformat="262159" numsamples="44100">
				<waveblock start="0">
					<simpleblockfile filename="e0000168.au" len="44100" min="-0.799348" max="0.799933" rms="0.243545"/>
				</waveblock>
			</sequence>
			<envelope numpoints="2">
				<controlpoint t="0.189368770764" val="0.347222208977"/>
				<controlpoint t="0.287375415282" val="1.000000000000"/>
			</envelope>
		</waveclip>
	</wavetrack>
	<wavetrack name="Audio Track" channel="2" linked="0" mute="0" solo="0" height="150" minimized="0" isSelected="1" rate="44100" gain="1.0" pan="0.0">
		<waveclip offset="0.00000000">
			<sequence maxsamples="262144" sampleformat="262159" numsamples="44100">
				<waveblock start="0">
					<simpleblockfile filename="e000045f.au" len="44100" min="-0.798806" max="0.7996" rms="0.286156"/>
				</waveblock>
			</sequence>
			<envelope numpoints="0"/>
		</waveclip>
	</wavetrack>

And here I edited the AUP file to put the points in track 2 instead:

	<wavetrack name="Audio Track" channel="2" linked="0" mute="0" solo="0" height="150" minimized="0" isSelected="0" rate="44100" gain="1.0" pan="0.0">
		<waveclip offset="0.00000000">
			<sequence maxsamples="262144" sampleformat="262159" numsamples="44100">
				<waveblock start="0">
					<simpleblockfile filename="e0000168.au" len="44100" min="-0.799348" max="0.799933" rms="0.243545"/>
				</waveblock>
			</sequence>
			<envelope numpoints="0"/>
		</waveclip>
	</wavetrack>
	<wavetrack name="Audio Track" channel="2" linked="0" mute="0" solo="0" height="150" minimized="0" isSelected="1" rate="44100" gain="1.0" pan="0.0">
		<waveclip offset="0.00000000">
			<sequence maxsamples="262144" sampleformat="262159" numsamples="44100">
				<waveblock start="0">
					<simpleblockfile filename="e000045f.au" len="44100" min="-0.798806" max="0.7996" rms="0.286156"/>
				</waveblock>
			</sequence>
         <envelope numpoints="2">
				<controlpoint t="0.189368770764" val="0.347222208977"/>
				<controlpoint t="0.287375415282" val="1.000000000000"/>
			</envelope>
		</waveclip>
	</wavetrack>

Cursor or selection position should not need to be edited.

Gale

Interesting. Winamp and other audio programs play flowing tracks without any skips during the transition, so maybe they’re coded to ignore it.

Alright, fair enough. I remembered doing the source-change fairly easily in Acid Pro, and was hoping this had the equivalent - but then I always used WAV files, never MP3s.

OK, that’s nice and easy. That’ll save quite a bit of time. Re-aligning the WAV tracks isn’t proving to be hard - I’m just matching them to the MP3 track, then deleting it. Takes all of a few minutes.

And yes I’m aware of the XP support thing. It’s never proven to be an issue. I remember reading some things about SP3 that made me not want to install it at the time, but I’ve seen there’s now a few patches that don’t work with SP2, so I was going to update it anyway and just deal with its new annoyances. Windows 7’s out of the question for this computer, not to mention some older software that doesn’t work in 7 (that, and from the times I’ve used it on school computers, the interface just doesn’t compare to XP). My next computer’s going to be a Windows 7 unit though, so it’s inevitable.

Anyway, thanks for all the help and the info. Everything’s going quite smooth now. Much appreciated.

Yes, several players manage to cheat the limitation by automatically skipping over a bit at the start and doing a quick short fade. The LAME encoder is able to add a “tag” (I don’t think it’s actually part of the official MP3 specification and it’s not currently supported by Audacity) that provides a hint to (some) audio players about how much to skip.

In future versions of Audacity there may be a better (easier) way to do that.

I wasn’t looking forward to that inevitability (it was Vista looming on the horizon at that time), so I switched to Linux and love it :slight_smile:. Linux is available in many different “flavours” (called “distributions”), including some that provide a very “XP-like” user experience.

Even if you do switch to Windows 7 (or 8 or 9), you can always keep a separate machine with XP, or run XP in a “virtual machine”. If XP is not connected to the Internet or any other network, and you keep it isolated from the outside world (don’t use USB sticks unless they are thoroughly scanned first), then you should be safe to continue using it. XP SP3 is a lot “heavier” than SP2, so you may find that performance takes a nose-dive, especially if the computer is short of RAM.