preserve the envelope?

This section is now closed.
Forum rules
Audacity 1.2.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.
dlh
Posts: 4
Joined: Mon Feb 18, 2008 10:24 pm
Operating System: Please select

preserve the envelope?

Post by dlh » Mon Feb 18, 2008 10:34 pm

I've been using Audacity for a few years and I think I remember coming across this at some point but now I cannot remember...

I'd like to preserve a complicated Envelope that I've created and apply it to another sound file (or another part of the same sound file). Is there a way to do this? Copy/Paste with new sound data just replaces the old envelope.

Any advice would be really, really appreciated.

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

Re: preserve the envelope?

Post by kozikowski » Mon Feb 18, 2008 11:56 pm

Please excuse the puzzled cocker spaniel look.

How did you create the envelope? I'm going through all the tools in my head and I'm not getting any hits.

Koz

dlh
Posts: 4
Joined: Mon Feb 18, 2008 10:24 pm
Operating System: Please select

Re: preserve the envelope?

Post by dlh » Tue Feb 19, 2008 12:10 am

I created the Amplification Envelope manually, creating lots and lots of control points to adjust the volume of a music sample.

I'm using this to simulate a radio fading in and out. The music volume changes frequently on one track and, on a separate track, the static volume changes inversely. Music soft and static loud, then music loud and static soft, etc.

Now I'd like to use my work again, with a different music track.

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

Re: preserve the envelope?

Post by kozikowski » Tue Feb 19, 2008 2:44 am

I have a painful work-around for you.

You can't save the envelope (well, you can, but that's even more painful) but you can change the music underneath the existing envelope.

Save your existing performance as a unique project. Know exactly where the music came from and exactly the filename. This would be a good time to set Windows to show you filename extensions and stop hiding registered filetypes. Change the music filename to something slightly different:

piano2.wav > piano2a.wav

Now change the new music name to the old filename:

GlennMillerSwings.wav > piano2.wav

Make sure the new music is in exactly the same location or folder as the old.

Open up the project and it should have the new music in there with the old envelope.


I think you can save the envelope information by opening up the AUP file in WordPad and cut and paste the Envelope Node Point Information Listings. Or, you can poke yourself repeatedly with a sharp stick which will be a lot less painful.

Koz

dlh
Posts: 4
Joined: Mon Feb 18, 2008 10:24 pm
Operating System: Please select

Re: preserve the envelope?

Post by dlh » Tue Feb 19, 2008 10:28 am

An intriguing solution. Not at all what I was expecting... Thank you!

May I ask for some additional instructions: I got the music track into my project by Copy/Pasting it from another project. So now the copied clip exists as a single file within my project's files-folder, right? How do I identify the particular file? Up to now I've just considered the files-folder to be a black box.

(I do vaguely recall some sort of Copy/Paste activity that preserved the Amplification Envelope. It happened to me when I did not want that behavior. At the time I believe I considered it a bug.)

(There are problems for which I'd happily choose the sharp stick approach, if only it would be guaranteed to work as well as the more painful method.)

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

Re: preserve the envelope?

Post by kozikowski » Tue Feb 19, 2008 11:23 pm

The only way this work-around works is by having a totally non-magic, uncomplicated, and unedited single sound file. If you have anything other than that, you lose on Sports Call®.

So now you have an unrecoverable Project. You need to go way back and form one simple WAV file and use that for a bed for your envelope treatment. I would do a screen capture of the existing one to remind me where everything was. You can't have two Audacities open at once.

Koz

waxcylinder
Forum Staff
Posts: 14684
Joined: Tue Jul 31, 2007 11:03 am
Operating System: Windows 10

Re: preserve the envelope?

Post by waxcylinder » Wed Feb 20, 2008 10:26 am

kozikowski wrote: You can't have two Audacities open at once.

Koz
More accurately, you can't have two 1.2 Audacities open - in 1.3 you can. Nor can you open a 1.3 and then a 1.2.

I'm not sure how robust the data structures are for heavy multiple use in 1.3 - but I do use it sometimes for cutting and pasting bewteen projects.

I am not brave enough to use it to set up multiple timed recordings (Koz: does TotalRecorder handle mutiple timed recording events, like a VCR/PVR?)

WC
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * FAQ * * * * * Tutorials * * * * * Audacity Manual * * * * *

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

Re: preserve the envelope?

Post by steve » Wed Feb 20, 2008 11:50 am

It's quite easy to copy envelopes (but keep backups of everything because if it's quite easy to destroy an Audacity project with manual editing).

Lets say you have two tracks of audio - on track one you have a piano, and on track two you have a synth.
Now lets say that you have done a bit of editing and have created a complicated envelope in the middle of the synth track.
You decide that you want to use that envelope on a recording of someone singing.

1st make a note of which track it is (in this example it's the second track), and make a note of what time your envelope starts - for this example let's say that it starts at exactly 10.0 seconds, and goes on to 16.3 seconds.
Then save the piano/synth project - lets say you've called it "pianosynth". You will now have a file "pianosynth.aup" and a folder "pianosynth_data".

Open a new project, and import the singing recording.
Let's say that the singing starts, precisely 1.5 seconds after the start of the track, and that is the point that we want our envelope to start. Save the project as "singing".

Now open "pianosynth.aup" in a text editor (such as Notepad).
The aup file starts with some format information (xml version, and !DOCTYPE and stuff) then below that there will be a block of information about "wavetrack", "waveclip", "samples" and stuff like that for the first track. This is information about the audio data - don't change any of this.

The next block of data starts with "<envelope numpoints="xx">"
This is the envelope data for the first track. This section ends with "</envelope>".

Now it was the second track that we were interested in, so follow the page down: There will be another block of wave and sample information - this time for track 2, and below it will be another set of envelope data - this time for track 2.

The first line of this (<envelope numpoints="xx">) tells audacity how many edit points there are in the envelope.
We want to copy all the points between 10.0 seconds and 16.3 seconds.
Click and drag to select all the points that have times (the "t=number") between 10.000000 and 16.3000000.
Paste this text into a new document.
Now count how many "control points" you have in the list - let's say there are 14 in the list.
Insert a new line at the top of the list (in your new document) and type <envelope numpoints="14">
At the bottom of the list type </envelope>
You can now save this text file - lets call it "envelope.txt"

We decided that we wanted to start the envelope at 1.5 seconds in our "singing" project - however our envelope starts at 10 seconds. In order to have the envelope in the correct place, we need to set all the times for the control points 8.5 seconds earlier (10 seconds - 1.5 seconds). For each of the control points in our list we must therefore subtract 8.50000000.
When that is done we can save the file.

Now open the "singing.aup" file in Notepad.
As we do not yet have an envelope, there will be a line "<envelope numpoints="0"/>"
Simply replace this line with the contents of the "envelope.txt" file and save the singing.aup file.

Now when you open "singing.aup" you will find that either your beautiful envelope is applied to the singing, or it won't open and you destroyed the project. (don't forget the backup :) )
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

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

Re: preserve the envelope?

Post by kozikowski » Thu Feb 21, 2008 12:06 am

I wondered about manually changing the coding inside the AUP file. I know you should be able to do that.

I can't help thinking that the poster was looking for a little blue radio button to push that would transfer the envelope.

No button?

Koz

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

Re: preserve the envelope?

Post by kozikowski » Thu Feb 21, 2008 6:06 am

<<<(Koz: does TotalRecorder handle mutiple timed recording events, like a VCR/PVR?)>>>

I've never had to do that to mine, but there is certainly enough scheduling detail to lead me to think it would. I've never understood the programming to get it to "change the channel" since that means surfing to a different music server and logging in. All my recordings were done on a one-off basis, but yes, Saturday at 9:30 am, I set it to record from 10:00 to 11:00 and it does that every time while I'm eating breakfast. Cool Edit, by the way, isn't very good in the timed recording field as it can only deal with one event. Start at 10am on Friday and record for 2 hours. Stop. That's it.

The PCs are the noisiest machines I have, so I tend to use them only when I need to.

Koz

Locked