Pdefn fadetime?

How do I change the crossfade time when changing a Pdefn? Pdef has a fadeTime property, Pdefn doesn’t seem to have one.

Pdef’s fade does not fade the pattern’s values. Pdef is for event patterns. The “fade” affects the resulting events’ \amp key but it doesn’t attempt to interpolate between any other values.

Pdefn is for data patterns (not events). Hence there is no \amp key, hence nothing to crossfade.

Let me also offer a counterexample.

Pdefn(\a, 0);

Pdefn(\a).fadeTime = 2;  // hypothetically, this doesn't exist for real

Pdefn(\a, 1);

In a case like this you might have expected the pattern to produce 0.5 after 1 second etc.

Pdefn, however, can produce any type of data, so what about this?

Pdefn(\a, \abc);

Pdefn(\a).fadeTime = 2;  // hypothetically

Pdefn(\a, \wxyz);

What is a meaningful half-interpolation between symbols \abc and \wxyz? All the options I can think of are flawed enough to be perhaps not meaningful.

When considering a new feature, we do have to consider cases outside the norm. If a Pdefn fadeTime were implemented carelessly, it would be possible / easy to end up with nonsense.

hjh

Thanks for clarifying. I assume then Pdefn changes happen as soon as the command is processed?

I believe quant applies to Pdefn, so it might not be immediate.

hjh

Yes it does. It can be set to nil.