Max 5 API Reference

PFFT
[MSP]

When an object is instantiated, it is possible to determine if it is being created in pfft~ context in the new method. More...

Collaboration diagram for PFFT:

Data Structures

struct  t_pfftpub
 Public FFT Patcher struct. More...

Detailed Description

When an object is instantiated, it is possible to determine if it is being created in pfft~ context in the new method.

In the new method (and only at this time), you can check the s_thing member of the t_symbol '__pfft~__'. If this is non-null, then you will have a pointer to a t_pfftpub struct.

   t_pfftpub *pfft_parent = (t_pfftpub*) gensym("__pfft~__")->s_thing;

   if (pfft_parent) {
      // in a pfft~ context
   }
   else {
      // not in a pfft~
   }

Copyright © 2008, Cycling '74