Re: Non-destructive effects stacks

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Non-destructive effects stacks

Jorge Rodriguez-7
Mr. Chinen suggested in IRC that I be more specific about what my priorities are. What I'm really after is not so much real-time effects stacks, as non-destructive effects. Having them be real-time is really only a bonus for me. The real thing I'm getting involved with Audacity for is to make sure that it has the capacity for non-destructive effects. As such, I've renamed the thread appropriately.

--
Jorge Rodriguez
Matrieya Studios, LLC
Email: [hidden email]
Phone: (919) 757-3066
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Reply | Threaded
Open this post in threaded view
|

Re: Non-destructive effects stacks

Jorge Rodriguez-7
Bump!

After a small amount of reworking and one or two new features I have another patch. You don't need the previous patch to use this patch, as it is against CVS HEAD. Also a lot of this email is copied from the last one so ignore that one and just read this one. It is of a prototype of non-destructive effects stacks using the "render-to-another-disk-buffer" method. See attached.

Here's what to do to see it in action, after you've applied the patch and built it:

1) Create a new project.
2) Record a short sample.
3) Save the project. Open up the .aup and observe that the XML looks normal.
4) Click on the track name and choose the "Render effects" option. A placeholder fade-in effect will be applied to the recorded sample.
5) Save the project. Open up the .aup and observe that the original data is still there, but a new "wet" version has been added to the XML.
6) Play the block files on your hard drive and hear how one of them fades in, and the other is original.
7) Click "Render effects" as much as you want, and observe that the original data is never modified, and the "wet" version never gets the fade-in applied more than once.
8) Export the project and observe how the exported data has the fade-in effect applied.
9) (New in this patch) There is a new button on the toolbar on the top right. It has the undo graphic, but it toggles the view between the original "dry" tracks and the "wet" tracks with the fadein effect applied.

The WaveClip class previously had a Sequence* mSequence; pointer as a member. I added Sequence* mWetSequence; to the class, and modified WaveClip so that it uses mWetSequence at the appropriate times instead of mSequence. mWetSequence behaves exactly the same as mSequence, except that it exports slightly different XML into the project file. This one's implemented a tiny bit differently than the last patch, which had a WetSequence class which is gone now.

Studying the structure of the XML, I decided the most canonical structure to duplicate was the "sequence" structure. I didn't want to duplicate "waveclip" because it contains envelope information that you don't want to duplicate. (In other words, one envelope data set should affect both the wet and the dry.) However, "waveblock" seemed too much of a low-level, implementation issue, and because of its many-to-one relationship with sequences. I would like some input from the core Audacity developers on whether or not this was a good choice or whether I should have done it a different way.

Hopefully this time I can actually put this down and not work on it until we get someone else looking at it. I'm waiting for input because I don't want to put a lot of work into this thing for it not to be accepted by the core developers. I've worked on a few open source projects where this has happened. Some things I'd like to know: Is the way I chose to implement this a good one? Should I go back and redo some things, or should we take a step back and think of another way to approach this? (Using the undo stacks?) Eventually I will have to serialize effects stacks into XML; what's the best way to go about doing this? My recent code changes include making the wet sequence part of the Sequence class instead of subclassing it, a good structural improvement. Other than that, what do does the Audacity team think?

If all goes well, then the way forward will be to create a small GUI that allows the user to edit the effects stack for any particular track, but as I said, I'll hold off on that until I get some input on this.

--
Jorge Rodriguez
Matrieya Studios, LLC
Email: [hidden email]
Phone: (919) 757-3066
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel

audacity-nondestructive-effects-prototype2.patch (35K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Non-destructive effects stacks

Martyn Shaw-2
Hi Jorge

You have clearly put a lot of thought into this, and I don't want you
to think that we are ignoring you.  We have a lot going on at the
moment, what with the recent release, the impending release, GSoC (and
from my own pov, an awful lot of 6-10,000 word reports to read).

I'd love to try this, but just don't have the brain power at the
moment.  I'll leave it in my inbox for a week or two and we'll see if
somebody gets to it.  If not, please try again!

Sorry
Martyn

Jorge Rodriguez wrote:

> Bump!
>
> After a small amount of reworking and one or two new features I have
> another patch. You don't need the previous patch to use this patch, as
> it is against CVS HEAD. Also a lot of this email is copied from the last
> one so ignore that one and just read this one. It is of a prototype of
> non-destructive effects stacks using the "render-to-another-disk-buffer"
> method. See attached.
>
> Here's what to do to see it in action, after you've applied the patch
> and built it:
>
> 1) Create a new project.
> 2) Record a short sample.
> 3) Save the project. Open up the .aup and observe that the XML looks normal.
> 4) Click on the track name and choose the "Render effects" option. A
> placeholder fade-in effect will be applied to the recorded sample.
> 5) Save the project. Open up the .aup and observe that the original data
> is still there, but a new "wet" version has been added to the XML.
> 6) Play the block files on your hard drive and hear how one of them
> fades in, and the other is original.
> 7) Click "Render effects" as much as you want, and observe that the
> original data is never modified, and the "wet" version never gets the
> fade-in applied more than once.
> 8) Export the project and observe how the exported data has the fade-in
> effect applied.
> 9) (New in this patch) There is a new button on the toolbar on the top
> right. It has the undo graphic, but it toggles the view between the
> original "dry" tracks and the "wet" tracks with the fadein effect applied.
>
> The WaveClip class previously had a Sequence* mSequence; pointer as a
> member. I added Sequence* mWetSequence; to the class, and modified
> WaveClip so that it uses mWetSequence at the appropriate times instead
> of mSequence. mWetSequence behaves exactly the same as mSequence, except
> that it exports slightly different XML into the project file. This one's
> implemented a tiny bit differently than the last patch, which had a
> WetSequence class which is gone now.
>
> Studying the structure of the XML, I decided the most canonical
> structure to duplicate was the "sequence" structure. I didn't want to
> duplicate "waveclip" because it contains envelope information that you
> don't want to duplicate. (In other words, one envelope data set should
> affect both the wet and the dry.) However, "waveblock" seemed too much
> of a low-level, implementation issue, and because of its many-to-one
> relationship with sequences. I would like some input from the core
> Audacity developers on whether or not this was a good choice or whether
> I should have done it a different way.
>
> Hopefully this time I can actually put this down and not work on it
> until we get someone else looking at it. I'm waiting for input because I
> don't want to put a lot of work into this thing for it not to be
> accepted by the core developers. I've worked on a few open source
> projects where this has happened. Some things I'd like to know: Is the
> way I chose to implement this a good one? Should I go back and redo some
> things, or should we take a step back and think of another way to
> approach this? (Using the undo stacks?) Eventually I will have to
> serialize effects stacks into XML; what's the best way to go about doing
> this? My recent code changes include making the wet sequence part of the
> Sequence class instead of subclassing it, a good structural improvement.
> Other than that, what do does the Audacity team think?
>
> If all goes well, then the way forward will be to create a small GUI
> that allows the user to edit the effects stack for any particular track,
> but as I said, I'll hold off on that until I get some input on this.
>
> --
> Jorge Rodriguez
> Matrieya Studios, LLC
> Email: [hidden email] <mailto:[hidden email]>
> Phone: (919) 757-3066
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Don't miss this year's exciting event. There's still time to save $100.
> Use priority code J8TL2D2.
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Audacity-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/audacity-devel

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Reply | Threaded
Open this post in threaded view
|

Re: Non-destructive effects stacks

Jorge Rodriguez-7
Thanks Martyn, I'll hold tight. donfede (on IRC) also said he would look into it when he has time, and I understand that you guys are busy with a release cycle and GSoC. Just don't forget! :P

--
Jorge Rodriguez
Matrieya Studios, LLC
Email: [hidden email]
Phone: (919) 757-3066
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Reply | Threaded
Open this post in threaded view
|

Re: Non-destructive effects stacks

Jorge Rodriguez-7
Bump!

I understand you're all busy, but please somebody who is in the know, don't forget to take a look at the patch!

--
Jorge Rodriguez
Matrieya Studios, LLC
Email: [hidden email]
Phone: (919) 757-3066
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Reply | Threaded
Open this post in threaded view
|

Re: Non-destructive effects stacks

Gale Andrews
In reply to this post by Jorge Rodriguez-7

| From "Jorge Rodriguez" <[hidden email]>
| Fri, 9 May 2008 16:18:03 -0400
| Subject: [Audacity-devel] Non-destructive effects stacks
> Bump!

Only a few trivial comments I'm afraid, possibly born of
ignorance, though I did skim read this thread a while ago...


> After a small amount of reworking and one or two new features I have another
> patch. You don't need the previous patch to use this patch, as it is against
> CVS HEAD. Also a lot of this email is copied from the last one so ignore
> that one and just read this one. It is of a prototype of non-destructive
> effects stacks using the "render-to-another-disk-buffer" method. See
> attached.
>
> Here's what to do to see it in action, after you've applied the patch and
> built it:
>
> 1) Create a new project.
> 2) Record a short sample.
> 3) Save the project. Open up the .aup and observe that the XML looks normal.
> 4) Click on the track name and choose the "Render effects" option. A
> placeholder fade-in effect will be applied to the recorded sample.
> 5) Save the project. Open up the .aup and observe that the original data is
> still there, but a new "wet" version has been added to the XML.
> 6) Play the block files on your hard drive and hear how one of them fades
> in, and the other is original.
> 7) Click "Render effects" as much as you want, and observe that the original
> data is never modified, and the "wet" version never gets the fade-in applied
> more than once.

If you Edit > Undo after "Render Effects" (even if you clicked "Render
Effects" several times), you only have to Undo once to get back to
before you rendered. But if you Edit > Redo after Undo then click
"Render effects" a few times, it seems you have to Edit > Undo that
number of times to get back to before you rendered.

If you "Render effects", click the Destructive button, do certain
effects, then click Destructive, that doesn't let you get straight
back to the point before you first clicked the Destructive button
(nothing happens). Applying a Soundtouch effect certainly causes
this.

After a number of times opening and closing tracks (can't pin it
down exactly), Render Effects no longer works on the newly
opened track.

Does your system support a choice of effects to render, chosen from
the menu?

>
> 8) Export the project and observe how the exported data has the fade-in
> effect applied.
> 9) (New in this patch) There is a new button on the toolbar on the top
> right. It has the undo graphic, but it toggles the view between the original
> "dry" tracks and the "wet" tracks with the fadein effect applied.

Can this be button be depressed like those on Tools toolbar so you can
see if you are in destructive/non-destructive mode? Better to call it
"Non-Destructive", as we can get destructive effects anyway?

I assume in due course the button will only apply to selected tracks?
 
Thanks

 
Gale





-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Reply | Threaded
Open this post in threaded view
|

Re: Non-destructive effects stacks

Jorge Rodriguez-7
FINALLY!

I can't really look at this until tomorrow but I'll give you some quick answers right away:

On Tue, May 20, 2008 at 9:20 PM, Gale Andrews <[hidden email]> wrote:
If you Edit > Undo after "Render Effects" (even if you clicked "Render
Effects" several times), you only have to Undo once to get back to
before you rendered. But if you Edit > Redo after Undo then click
"Render effects" a few times, it seems you have to Edit > Undo that
number of times to get back to before you rendered.

Ah, I never tested the undo with the effects actually. I have no idea what it does and it might need more work. However, I'll tell you how it should work. The undo feature should affect the effects stack itself, but not what has been rendered. In other words, if you use the rendering feature in nondestructive mode, it's not undoable, because why should it be? You're not destroying anything. Rather, undo will affect the effects stack itself, removing whatever edit or addition or subtraction that you made to the effects stack. However if you are in destructive mode, then it would undo if you tell it to render destructively (which you can't do right now.)

If you "Render effects", click the Destructive button, do certain
effects, then click Destructive, that doesn't let you get straight
back to the point before you first clicked the Destructive button
(nothing happens). Applying a Soundtouch effect certainly causes
this.

Uh... the Destructive button is on nondestructive mode by default. Also, the "render effects" feature is always non-destructive by hard-code, it renders to another buffer no matter what the button is set at. (Later on I can provide a version that renders destructively, but that was easy and not the point of this patch.) So, what I think you've done here is rendered the second buffer, then gone into destructive mode and destructively applied an effect, then come out of destructive mode. The result will be both effects applied. Is that what you were trying to do?

Also, what's a soundtouch effect?
 
After a number of times opening and closing tracks (can't pin it
down exactly), Render Effects no longer works on the newly
opened track.

I'll take a look tomorrow night.
 
Does your system support a choice of effects to render, chosen from
the menu?

Not yet, that would be the next step. I wanted to get some input on my implementation method before I proceeded. For example, is the way that I'm serializing the render info into the XML project file good or should it have been done differently? I don't want to get all the way done and they the patch is denied because it doesn't fit some kind of structure you guys have going on. Does anybody have any input on that?
 
Can this be button be depressed like those on Tools toolbar so you can
see if you are in destructive/non-destructive mode? Better to call it
"Non-Destructive", as we can get destructive effects anyway?

Yeah we can do it that way, easy.
 
I assume in due course the button will only apply to selected tracks?

The button's supposed to be global the way I had it in mind. The fact that you asked this question tells me that maybe we have different ideas of how the button's supposed to work. The way I was thinking, when it is depressed, any effect you apply to any track is destructive, and when it is not, the effect is only added onto the effects stack, which must be rendered with the "render effects" feature.

I'll look into this and maybe do a bit more refining work on it tomorrow, now that somebody has actually shown interest in it.

--
Jorge Rodriguez
Matrieya Studios, LLC
Email: [hidden email]
Phone: (919) 757-3066
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Reply | Threaded
Open this post in threaded view
|

Re: Non-destructive effects stacks

Jorge Rodriguez-7
In reply to this post by Gale Andrews
On Tue, May 20, 2008 at 9:20 PM, Gale Andrews <[hidden email]> wrote:
If you "Render effects", click the Destructive button, do certain
effects, then click Destructive, that doesn't let you get straight
back to the point before you first clicked the Destructive button
(nothing happens). Applying a Soundtouch effect certainly causes
this.

Okay I tried it out, and this is what's going on:

Once you "Render effects" it renders to a second buffer. Then you click "destructive" to get back to the original "dry" waveform and apply an effect. This effect is applied destructively to the original. You click "destructive" again and are given the wet waveform, but it hasn't been re-rendered yet, so you don't get the new effect. You just need to click "Render effects" again to get both effects together, in the order of the second one first. I'll have to do something where it does a quick render when you hit the play button if any tracks are still dirty.

I haven't had time to look at anything else, and now I have other things to do. I've still got to look into that multiple tracks problem though, so I'll have to put it down and come back to it later, but doesn't anybody else have any opinions on this patch or the remarks that have been made in this thread?

--
Jorge Rodriguez
Matrieya Studios, LLC
Email: [hidden email]
Phone: (919) 757-3066
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel