A Variable-shape, multi-track cross-fade.

4 messages Options
Embed this post
Permalink
Dave Storer

A Variable-shape, multi-track cross-fade.

Reply Threaded More More options
Print post
Permalink


Here is the cross-fade plug-in mentioned in a previous post about how to publish a new plug-in.    It will only operate with Audacity 1.3.8 and above because it requires Nyquist fixes included in 1.3.8.

The plug-in can be downloaded from CrossFade2.ny into the Audacity plug-ins directory.   Once Audacity is restarted, it will appear on the Effects menu as "Variable shape crossfade".

It can operate on multiple tracks at the same time (as can any plug-in), but the two existing pairs of fades (Fade In, Fade Out, Cross Fade In, and Cross Fade Out) will do to all tracks whatever the operation is -- fade in or out.

Rather than provide a pair of plug-ins, this one allows a choice of all selected tracks faded IN, all selected tracks faded OUT, or by choosing the CROSS operation, the operations will start with a fade out on the first track, then fade in on the second, out on the third, in on the fourth, etc.    You'll probably only use it on two tracks at a time.
Currently, the same shape (see below) parameters will apply to both the fade out and in.   It would not be too hard to have independent shapes for IN and OUT.

The variable part of the name comes is enabled by two slider values, one for the primary shape and a second which can fine tune the shape a little.

The default zero values yield a linear fade,  / or \, exactly like the existing fade-in and fade-out effects.
If the shape slider is positive, the shapes will bow upward;  if negative the fade line will sag downward.
The fine tune slider alters the curve by increasing one half of the line and decreasing the other.   You'll have to play with this one to find out exactly how it works, as it it non-linear and counter-intuitive.   With large values, it can give totally unexpected shapes which are not fades at all.     There is probably a better way of doing the fine tuning. 

If the shape argument is +0.691 [  ln(0.5) ], the shape will exactly match the existing cross-fade plug-in.

There is also a RESET operation which will force the CROSS operation to start with a fade out, but will change nothing.  This is needed if the plug-in has gotten out of sync when you applied the CROSS operation to an odd number of tracks.    Selecting the IN or OUT operation will also reset the CROSS operation.

The interface between Audacity and Nyquist implements multiple track operations by simply calling the plug-in once for each selected track with the same set of arguments for each call.   Unfortunately, there seems to be no way to carry over any information from one call to the next except by saving the state information in an external file.
The file, called "crossfadestate.txt" is only one byte long.   After an IN, OUT, or RESET operation, there is an F in the file (for oFf).    When doing the CROSS operation, after a fade out, the value saved is I to indicate that the next operation should be IN.   After the subsequent IN, the value saved is O (Oh).

I hope this plug-in helps people use Audacity more effectively.

Dave

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Audacity-nyquist mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-nyquist
Leland (Audacity Team)

Re: A Variable-shape, multi-track cross-fade.

Reply Threaded More More options
Print post
Permalink
Dave Storer wrote:
>
> The interface between Audacity and Nyquist implements multiple track
> operations by simply calling the plug-in once for each selected track
> with the same set of arguments for each call.   Unfortunately, there
> seems to be no way to carry over any information from one call to the
> next except by saving the state information in an external file.

Dave,

There's a global variable called *SCRATCH* that can be used for this
purpose.  It is not restored between between tracks.

Leland

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Audacity-nyquist mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-nyquist
Stevethefiddle

Re: A Variable-shape, multi-track cross-fade.

Reply Threaded More More options
Print post
Permalink
On Sun, 2009-09-20 at 13:04 -0500, Leland wrote:

> Dave Storer wrote:
> >
> > The interface between Audacity and Nyquist implements multiple track
> > operations by simply calling the plug-in once for each selected track
> > with the same set of arguments for each call.   Unfortunately, there
> > seems to be no way to carry over any information from one call to the
> > next except by saving the state information in an external file.
>
> Dave,
>
> There's a global variable called *SCRATCH* that can be used for this
> purpose.  It is not restored between between tracks.
>
> Leland

That's fantastic! Suddenly a plug-in that I wanted to make becomes
possible.

Is *SCRATCH* a new feature specific to Audacity? I've seen no
documentation about it whatsoever.

Any other undocumented features that you know of?

Is Audacity now using Nyquist Version 3.02?

It appears that SAL is now available, though I've not been able to do
anything useful with it (other than lock up Audacity). Is there any
information about using SAL in Audacity? Are there any advantages to
using SAL?

Steve D


------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Audacity-nyquist mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-nyquist
Leland (Audacity Team)

Re: A Variable-shape, multi-track cross-fade.

Reply Threaded More More options
Print post
Permalink
Steve wrote:

> On Sun, 2009-09-20 at 13:04 -0500, Leland wrote:
>> Dave Storer wrote:
>>> The interface between Audacity and Nyquist implements multiple track
>>> operations by simply calling the plug-in once for each selected track
>>> with the same set of arguments for each call.   Unfortunately, there
>>> seems to be no way to carry over any information from one call to the
>>> next except by saving the state information in an external file.
>> Dave,
>>
>> There's a global variable called *SCRATCH* that can be used for this
>> purpose.  It is not restored between between tracks.
>>
>> Leland
>
> That's fantastic! Suddenly a plug-in that I wanted to make becomes
> possible.
>
> Is *SCRATCH* a new feature specific to Audacity? I've seen no
> documentation about it whatsoever.

Yes, it is Audacity only since, AFAIK, Audacity is the only app that
uses Nyquist as a library.  It was added when I upgrade the Nyquist
version in Audacity at the beginning of the year.

>
> Any other undocumented features that you know of?
>
A couple of new comment statements were added when I did the upgrade.

;codetype lisp | sal

Tells Audacity the syntax to expect and how to pass it on to libnyquist.
  The default is lisp.  Only one type is allowed.

;debugflags trace | notrace | compiler | nocompiler

Trace and notrace simply set Nyquist's "*tracenable*" global.  This is
similar to clicking the Debug button in the Nyquist prompt, but it
allows the plug-in to control it instead.

Compiler and nocompiler controls whether the generated Lisp code from
the SAL compiler will be sent to stdout or to the output window in the
Nyquist Workbench.

> Is Audacity now using Nyquist Version 3.02?
>
It's at 3.03.

> It appears that SAL is now available, though I've not been able to do
> anything useful with it (other than lock up Audacity). Is there any
> information about using SAL in Audacity?
No documentation.  I was sort of hoping Edgar might add it to his nice
Nyquist site.  :-)

> Are there any advantages to
> using SAL?
>
Much easier to grok for us Lisp challenged ppl.  :-)


Leland


------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Audacity-nyquist mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-nyquist