Jamoma API  0.6.0.a19
JamomaModularForPd.h File Reference

JamomaModular For Max Shared Library. More...

#include "JamomaForPd.h"
#include "TTNode.h"
#include "TTNodeDirectory.h"
#include "TTRegex.h"
#include "TTSubscriber.h"
#include "TTInput.h"
#include "TTOutput.h"
+ Include dependency graph for JamomaModularForPd.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

TTErr JAMOMA_EXPORT jamoma_subscriber_create (t_eobj *x, TTObject &anObject, TTAddress relativeAddress, TTObject &returnedSubscriber, TTSymbol &returnedAddress, TTNodePtr *returnedNode, TTNodePtr *returnedContextNode)
 Create a #TTSubscriber object and register a TTObject into the tree or, if aTTObject is NULL, retrieve all context info to bind on an object. More...
 
void JAMOMA_EXPORT jamoma_subscriber_get_patcher_list (t_eobj *x, TTList &aContextListToFill)
 Get the <patcher name, patcher pointer> list above an external. More...
 
TTErr JAMOMA_EXPORT jamoma_container_create (t_object *x, TTObject &returnedContainer)
 Create a TTContainer object. More...
 
TTErr JAMOMA_EXPORT jamoma_container_send (TTObject &aContainer, t_symbol *relativeAddressAndAttribute, long argc, const t_atom *argv)
 Send Max data to a node (e.g., a j.parameter object) using a TTContainer object. More...
 
TTErr JAMOMA_EXPORT jamoma_node_info_create (t_object *x, TTObject &returnedNodeInfo)
 Create a TTNodeInfo object. More...
 
TTErr JAMOMA_EXPORT jamoma_data_create (t_object *x, TTObject &returnedData, TTSymbol service)
 Create a TTData object. More...
 
TTErr JAMOMA_EXPORT jamoma_data_command (TTObject &aData, t_symbol *msg, long argc, const t_atom *argv)
 Set the TTData value attribute using the #TTData::Command method. More...
 
TTErr JAMOMA_EXPORT jamoma_sender_create (t_object *x, TTObject &returnedSender)
 Create a TTSender object. More...
 
TTErr JAMOMA_EXPORT jamoma_sender_create_audio (t_object *x, TTObject &returnedSender)
 Create a TTSender object for audio signal. More...
 
TTErr JAMOMA_EXPORT jamoma_sender_send (TTObject &aSender, t_symbol *msg, long argc, const t_atom *argv)
 Send Max data using a TTSender object. More...
 
TTErr JAMOMA_EXPORT jamoma_receiver_create (t_object *x, TTObject &returnedReceiver)
 Create a TTReceiver object. More...
 
TTErr JAMOMA_EXPORT jamoma_receiver_create_audio (t_object *x, TTObject &returnedReceiver)
 Create a TTReceiver object for audio signal. More...
 
TTErr JAMOMA_EXPORT jamoma_presetManager_create (t_object *x, TTObject &returnedPresetManager)
 Create a #TTPresetManager object. More...
 
TTErr JAMOMA_EXPORT jamoma_cueManager_create (t_object *x, TTObject &returnedCueManager)
 Create a #TTCueManager object. More...
 
TTErr JAMOMA_EXPORT jamoma_input_create (t_object *x, TTObject &returnedInput)
 Create a #TTInput object for signal. More...
 
TTErr JAMOMA_EXPORT jamoma_input_create_audio (t_object *x, TTObject &returnedInput)
 Create a #TTInput object for audio signal. More...
 
TTErr JAMOMA_EXPORT jamoma_input_send (TTObject &anInput, t_symbol *msg, long argc, const t_atom *argv)
 Send any signal to a TTInput object. More...
 
TTErr JAMOMA_EXPORT jamoma_output_create (t_object *x, TTObject &returnedOutput)
 Create a TTOutput object for signal. More...
 
TTErr JAMOMA_EXPORT jamoma_output_create_audio (t_object *x, TTObject &returnedOutput)
 Create an output object for audio signal. More...
 
TTErr JAMOMA_EXPORT jamoma_output_send (TTObject &anOutput, t_symbol *msg, long argc, const t_atom *argv)
 Send any signal to a TTOutput object. More...
 
TTErr JAMOMA_EXPORT jamoma_mapper_create (t_object *x, TTObject &returnedMapper)
 Create a TTMapper object. More...
 
TTErr JAMOMA_EXPORT jamoma_viewer_create (t_object *x, TTObject &returnedViewer)
 Create a #TTViewer object. More...
 
TTErr JAMOMA_EXPORT jamoma_viewer_send (TTObject &aViewer, t_symbol *msg, long argc, const t_atom *argv)
 Send Max data using a #TTViewer object. More...
 
TTErr JAMOMA_EXPORT jamoma_explorer_create (t_object *x, TTObject &returnedExplorer)
 Create a TTExplorer object. More...
 
TTHashPtr JAMOMA_EXPORT jamoma_explorer_default_filter_bank (void)
 
TTErr JAMOMA_EXPORT jamoma_ramp_create (t_object *x, TTObject &returnedRamp)
 Create a TTRamp object. More...
 
void JAMOMA_EXPORT jamoma_callback_return_ramped_value (void *o, TTUInt32 n, TTFloat64 *v)
 
void JAMOMA_EXPORT jamoma_callback_return_address (const TTValue &baton, const TTValue &v)
 Return an address to a j. More...
 
void JAMOMA_EXPORT jamoma_callback_return_value (const TTValue &baton, const TTValue &v)
 Return the value to a j. More...
 
void JAMOMA_EXPORT jamoma_callback_return_value_typed (const TTValue &baton, const TTValue &v)
 Return the value to a j. More...
 
void JAMOMA_EXPORT jamoma_callback_return_signal (const TTValue &baton, const TTValue &v)
 Return any signal. More...
 
void JAMOMA_EXPORT jamoma_callback_return_signal_audio (const TTValue &baton, const TTValue &v)
 Return audio signal. More...
 
void JAMOMA_EXPORT jamoma_patcher_get_args (t_canvas *patcher, long *argc, t_atom **argv)
 Convenient method to get the patcher argument easily. More...
 
t_symbol JAMOMA_EXPORT * jamoma_patcher_get_hierarchy (t_canvas *patcher)
 Get the hierarchy of the patcher : bpatcher, subpatcher or toplevel. More...
 
void JAMOMA_EXPORT jamoma_patcher_get_context (t_canvas **patcher, TTSymbol &returnedContext)
 Get the context from the upper jcom model|view in the patcher or from patcher's name. More...
 
void JAMOMA_EXPORT jamoma_patcher_get_class (t_canvas *patcher, TTSymbol context, TTSymbol &returnedClass)
 Get the class of the patcher from the file name (removing .model and .view convention name if they are in) More...
 
void JAMOMA_EXPORT jamoma_patcher_get_name (t_canvas *patcher, TTSymbol context, TTSymbol &returnedName)
 Get the name of the patcher from his arguments. More...
 
void JAMOMA_EXPORT jamoma_patcher_share_info (t_canvas *patcher, t_canvas **returnedPatcher, TTSymbol &returnedContext, TTSymbol &returnedClass, TTSymbol &returnedName)
 Get all context info from the root jcom model|view in the patcher. More...
 
void JAMOMA_EXPORT jamoma_patcher_share_node (t_canvas *, TTNodePtr *patcherNode)
 Get patcher's node from the root jcom model|view in the patcher. More...
 
TTErr JAMOMA_EXPORT jamoma_patcher_get_info (t_canvas *obj, t_canvas **returnedPatcher, TTSymbol &returnedContext, TTSymbol &returnedClass, TTSymbol &returnedName)
 Get all context info from an object (his patcher and the context, the class and the name of his patcher). More...
 
void JAMOMA_EXPORT jamoma_patcher_get_model_or_view (t_canvas *patcher, t_object **returnedModelOrView)
 Get j.model or j.view of a patcher. More...
 
void JAMOMA_EXPORT jamoma_patcher_get_model_patcher (t_canvas *patcher, TTSymbol modelClass, t_object **returnedModelPatcher)
 Get the "aClass.model" external in the patcher. More...
 
void JAMOMA_EXPORT jamoma_patcher_get_input_output (t_canvas *patcher, TTBoolean &dataInput, TTBoolean &dataOutput, TTBoolean &audioInput, TTBoolean &audioOutput)
 Look into the given patcher to know if there are data or audio inputs and outputs. More...
 
TTBoolean JAMOMA_EXPORT jamoma_patcher_get_ui (t_object *patcher)
 Look into the given patcher to know if there is a j.ui. More...
 
void JAMOMA_EXPORT jamoma_ttvalue_to_typed_Atom (const TTValue &v, t_symbol **msg, long *argc, t_atom **argv, TTBoolean &shifted)
 Make a typed Atom array from a TTValue. More...
 
void JAMOMA_EXPORT jamoma_ttvalue_to_Atom (const TTValue &v, long *argc, t_atom **argv)
 Make an Atom array from a TTValue. More...
 
void JAMOMA_EXPORT jamoma_ttvalue_from_Atom (TTValue &v, t_symbol *msg, long argc, const t_atom *argv)
 Make a TTValue from Atom array. More...
 
t_symbol JAMOMA_EXPORT * jamoma_TTName_To_PdName (TTSymbol TTName)
 Convert a TTSymbol "MyObjectMessage" into a t_symbol *"my/object/message" or return NULL if the TTSymbol doesn't begin by an uppercase letter. More...
 
TTBoolean JAMOMA_EXPORT jamoma_extern_load (t_symbol *objectname, long argc, const t_atom *argv, t_object **object)
 Load an external for internal use. More...
 
TTUInt32 JAMOMA_EXPORT jamoma_parse_bracket (t_symbol *s, TTString &si_format, TTString &ss_format)
 Returned the N inside "pp/xx.[N]/yyy" and a format string as "pp/xx.%d/yy" and a format string as "pp/xx.%s/yy". More...
 
void JAMOMA_EXPORT jamoma_edit_numeric_instance (TTString format, t_symbol **returnedName, long i)
 Edit a new instance of the given format address using interger. More...
 
void JAMOMA_EXPORT jamoma_edit_string_instance (TTString format, t_symbol **returnedName, TTString s)
 Edit a new instance of the given format address using string. More...
 
void JAMOMA_EXPORT jamoma_edit_filename (TTString format, TTSymbol className, t_symbol **returnedFileName)
 Edit a file name from a given file format and a class name. More...
 
t_symbol JAMOMA_EXPORT * jamoma_parse_dieze (t_canvas *x, t_symbol *address)
 Parse #N inside address and replace them by parent patcher arguments if there are. More...
 
TTSymbol JAMOMA_EXPORT jamoma_file_write (t_object *x, long argc, t_atom *argv, char *default_filename)
 Get BOOT style filepath from args or, if no args open a dialog to write a file. More...
 
TTSymbol JAMOMA_EXPORT jamoma_file_read (t_object *x, long argc, t_atom *argv, t_fourcc filetype)
 Get BOOT style filepath from args or, if no args open a dialog to read a file. More...
 

Variables

JAMOMA_EXPORT TTRegex * ttRegexForJmod
 A global regex to parse jmod. (usefull to detect a 0.5 module)
 
JAMOMA_EXPORT TTRegex * ttRegexForJcom
 A global regex to parse j.
 
JAMOMA_EXPORT TTRegex * ttRegexForModel
 A global regex to parse .model.
 
JAMOMA_EXPORT TTRegex * ttRegexForModule
 A global regex to parse .module.
 
JAMOMA_EXPORT TTRegex * ttRegexForView
 A global regex to parse .view.
 
JAMOMA_EXPORT TTRegex * ttRegexForPdpat
 A global regex to parse .maxpat.
 
JAMOMA_EXPORT TTRegex * ttRegexForPdhelp
 A global regex to parse .maxhelp.
 
JAMOMA_EXPORT TTRegex * ttRegexForBracket
 A global regex to parse [ and ].
 

Detailed Description

JamomaModular For Max Shared Library.

Functions and resources based on Modular framework used by Max objects

Authors
Théo de la Hogue, Tim Place, Antoine Villeret

Definition in file JamomaModularForPd.h.

Function Documentation

void JAMOMA_EXPORT jamoma_callback_return_address ( const TTValue baton,
const TTValue v 
)

Return an address to a j.

external.

Parameters
baton
v

Definition at line 858 of file JamomaModularForMax.cpp.

References TTSymbol::c_str(), kTypeSymbol, and TTValue::size().

Referenced by jamoma_container_create(), jamoma_receiver_create(), and jamoma_receiver_create_audio().

+ Here is the call graph for this function:

void JAMOMA_EXPORT jamoma_callback_return_ramped_value ( void *  o,
TTUInt32  n,
TTFloat64 v 
)
Parameters
o
n
v

Definition at line 831 of file JamomaModularForMax.cpp.

Referenced by jamoma_ramp_create().

void JAMOMA_EXPORT jamoma_callback_return_signal ( const TTValue baton,
const TTValue v 
)

Return any signal.

Parameters
baton
v

Definition at line 981 of file JamomaModularForMax.cpp.

References jamoma_ttvalue_to_Atom().

+ Here is the call graph for this function:

void JAMOMA_EXPORT jamoma_callback_return_signal_audio ( const TTValue baton,
const TTValue v 
)

Return audio signal.

Parameters
baton
v

Definition at line 999 of file JamomaModularForMax.cpp.

References TTValue::size().

+ Here is the call graph for this function:

void JAMOMA_EXPORT jamoma_callback_return_value ( const TTValue baton,
const TTValue v 
)

Return the value to a j.

  • external as msg, argc, argv.
    Parameters
    batonThe Max wrapper object
    vThe value(s) being passed back. This is passed back as an array of three argumens: msg, argc and argv
    external as _sym_nothing, argc, argv

Definition at line 880 of file JamomaModularForMax.cpp.

References jamoma_ttvalue_to_Atom(), and TTValue::size().

Referenced by jamoma_container_create(), jamoma_cueManager_create(), jamoma_explorer_create(), jamoma_mapper_create(), and jamoma_presetManager_create().

+ Here is the call graph for this function:

void JAMOMA_EXPORT jamoma_callback_return_value_typed ( const TTValue baton,
const TTValue v 
)

Return the value to a j.

  • external as msg, argc, argv. The msg part carries information about what type of atom(s) we are getting,
    Parameters
    batonThe Max wrapper object
    vThe value(s) being passed back. This is passed back as an array of three argumens: msg, argc and argv
    external as msg, argc, argv

Definition at line 929 of file JamomaModularForMax.cpp.

References jamoma_ttvalue_to_typed_Atom(), and TTValue::size().

Referenced by jamoma_data_create(), jamoma_input_create(), jamoma_output_create(), jamoma_receiver_create(), and jamoma_viewer_create().

+ Here is the call graph for this function:

TTErr JAMOMA_EXPORT jamoma_container_create ( t_object *  x,
TTObject returnedContainer 
)

Create a TTContainer object.

Parameters
x
returnedContainer
Returns
TTErr error message if the method does not execute as expected.

Create a TTContainer object.

Definition at line 326 of file JamomaModularForMax.cpp.

References TTValue::append(), jamoma_callback_return_address(), jamoma_callback_return_value(), kTTErrNone, and TTObject::set().

+ Here is the call graph for this function:

TTErr JAMOMA_EXPORT jamoma_container_send ( TTObject aContainer,
t_symbol *  relativeAddressAndAttribute,
long  argc,
const t_atom *  argv 
)

Send Max data to a node (e.g., a j.parameter object) using a TTContainer object.

Parameters
aContainer
relativeAddressAndAttributeThe relative address and attribute of the node that the message is to be sent to.
argcThe number of arguments of the message.
argvPointer to the array of arguments.
Returns
TTErr error message if the method does not execute as expected.

Send Max data to a node (e.g., a j.parameter object) using a TTContainer object.

Definition at line 348 of file JamomaModularForMax.cpp.

References TTValue::append(), TTAddress::appendAttribute(), TTAddress::getAttribute(), TTAddress::getType(), jamoma_ttvalue_from_Atom(), kAddressRelative, kTTErrGeneric, TTObject::send(), ToTTName, and TTObject::valid().

+ Here is the call graph for this function:

TTErr JAMOMA_EXPORT jamoma_cueManager_create ( t_object *  x,
TTObject returnedCueManager 
)

Create a #TTCueManager object.

Parameters
x
returnedCueManager
Returns
TTErr error message if the method does not execute as expected.

Create a #TTCueManager object.

Definition at line 521 of file JamomaModularForMax.cpp.

References jamoma_callback_return_value(), kTTErrNone, and TTObject::set().

+ Here is the call graph for this function:

TTErr JAMOMA_EXPORT jamoma_data_command ( TTObject aData,
t_symbol *  msg,
long  argc,
const t_atom *  argv 
)

Set the TTData value attribute using the #TTData::Command method.

Parameters
aDataTTData instance (the Modular class which handles parameter, message or return)
msgA symbol describing the Max type (_sym_bang, _sym_float, ...)
argcThe number of arguments of the command
argvPointer to the array of arguments.
Returns
TTErr error message if the method does not execute as expected.

Set the TTData value attribute using the #TTData::Command method.

Definition at line 407 of file JamomaModularForMax.cpp.

References jamoma_ttvalue_from_Atom(), kTTErrGeneric, kTTErrNone, TTObject::send(), and TTObject::valid().

+ Here is the call graph for this function:

TTErr JAMOMA_EXPORT jamoma_data_create ( t_object *  x,
TTObject returnedData,
TTSymbol  service 
)

Create a TTData object.

Parameters
x
returnedData
service
Returns
TTErr error message if the method does not execute as expected.

Create a TTData object.

Definition at line 393 of file JamomaModularForMax.cpp.

References jamoma_callback_return_value_typed(), kTTErrNone, and TTObject::set().

+ Here is the call graph for this function:

void JAMOMA_EXPORT jamoma_edit_filename ( TTString  format,
TTSymbol  className,
t_symbol **  returnedFileName 
)

Edit a file name from a given file format and a class name.

Parameters
format
className
returnedFileNameEdit a file name from a given file format and a class name.

Definition at line 1850 of file JamomaModularForMax.cpp.

References TTSymbol::c_str(), TTString::c_str(), and TTString::size().

Referenced by jamoma_patcher_get_model_patcher().

+ Here is the call graph for this function:

void JAMOMA_EXPORT jamoma_edit_numeric_instance ( TTString  format,
t_symbol **  returnedName,
long  i 
)

Edit a new instance of the given format address using interger.

Parameters
format
returnedName
iEdit a new instance of the given format address using interger.

Definition at line 1822 of file JamomaModularForMax.cpp.

References TTString::c_str(), and TTString::size().

+ Here is the call graph for this function:

void JAMOMA_EXPORT jamoma_edit_string_instance ( TTString  format,
t_symbol **  returnedName,
TTString  s 
)

Edit a new instance of the given format address using string.

Parameters
format
returnedName
sEdit a new instance of the given format address using string.

Definition at line 1837 of file JamomaModularForMax.cpp.

References TTString::c_str(), and TTString::size().

+ Here is the call graph for this function:

TTErr JAMOMA_EXPORT jamoma_explorer_create ( t_object *  x,
TTObject returnedExplorer 
)

Create a TTExplorer object.

Parameters
x
returnedExplorer
Returns
TTErr error message if the method does not execute as expected.

Create a TTExplorer object.

Definition at line 700 of file JamomaModularForMax.cpp.

References TTValue::append(), jamoma_callback_return_value(), jamoma_explorer_default_filter_bank(), kTTErrNone, and TTObject::set().

+ Here is the call graph for this function:

TTHashPtr JAMOMA_EXPORT jamoma_explorer_default_filter_bank ( void  )
Returns

Definition at line 724 of file JamomaModularForMax.cpp.

References TTHash::append(), TTDictionaryBase::append(), and TTDictionaryBase::setSchema().

Referenced by jamoma_explorer_create().

+ Here is the call graph for this function:

TTBoolean JAMOMA_EXPORT jamoma_extern_load ( t_symbol *  objectname,
long  argc,
const t_atom *  argv,
t_object **  object 
)

Load an external for internal use.

Returns true if successful.

Parameters
objectname
argcThe number of arguments of the message.
argvPointer to the array of arguments.
object
Returns
TTSymbol JAMOMA_EXPORT jamoma_file_read ( t_object *  x,
long  argc,
t_atom *  argv,
t_fourcc  filetype 
)

Get BOOT style filepath from args or, if no args open a dialog to read a file.

Parameters
x
argcThe number of arguments of the message.
argvPointer to the array of arguments.
filetype
Returns

Definition at line 1877 of file JamomaModularForPd.cpp.

TTSymbol JAMOMA_EXPORT jamoma_file_write ( t_object *  x,
long  argc,
t_atom *  argv,
char *  default_filename 
)

Get BOOT style filepath from args or, if no args open a dialog to write a file.

Parameters
x
argcThe number of arguments of the message.
argvPointer to the array of arguments.
default_filename
Returns

Definition at line 1822 of file JamomaModularForPd.cpp.

TTErr JAMOMA_EXPORT jamoma_input_create ( t_object *  x,
TTObject returnedInput 
)

Create a #TTInput object for signal.

Parameters
x
returnedInput
Returns
TTErr error message if the method does not execute as expected.

Create a #TTInput object for signal.

Definition at line 538 of file JamomaModularForMax.cpp.

References jamoma_callback_return_value_typed(), kTTErrNone, and TTObject::set().

+ Here is the call graph for this function:

TTErr JAMOMA_EXPORT jamoma_input_create_audio ( t_object *  x,
TTObject returnedInput 
)

Create a #TTInput object for audio signal.

Parameters
x
returnedInput
Returns
TTErr error message if the method does not execute as expected.

Create a #TTInput object for audio signal.

Definition at line 555 of file JamomaModularForMax.cpp.

References kTTErrNone.

TTErr JAMOMA_EXPORT jamoma_input_send ( TTObject anInput,
t_symbol *  msg,
long  argc,
const t_atom *  argv 
)

Send any signal to a TTInput object.

Parameters
anInput
msg
argcThe number of arguments of the message.
argvPointer to the array of arguments.
Returns
TTErr error message if the method does not execute as expected.

Send any signal to a TTInput object.

Definition at line 562 of file JamomaModularForMax.cpp.

References jamoma_ttvalue_from_Atom(), kTTErrGeneric, TTObject::send(), and TTObject::valid().

+ Here is the call graph for this function:

TTErr JAMOMA_EXPORT jamoma_mapper_create ( t_object *  x,
TTObject returnedMapper 
)

Create a TTMapper object.

Parameters
x
returnedMapper
Returns
TTErr error message if the method does not execute as expected.

Create a TTMapper object.

Definition at line 625 of file JamomaModularForMax.cpp.

References TTValue::append(), jamoma_callback_return_value(), kTTErrNone, and TTObject::set().

+ Here is the call graph for this function:

TTErr JAMOMA_EXPORT jamoma_node_info_create ( t_object *  x,
TTObject returnedNodeInfo 
)

Create a TTNodeInfo object.

Parameters
x
returnedNodeInfo
Returns
TTErr error message if the method does not execute as expected.

Definition at line 383 of file JamomaModularForMax.cpp.

References kTTErrNone.

TTErr JAMOMA_EXPORT jamoma_output_create ( t_object *  x,
TTObject returnedOutput 
)

Create a TTOutput object for signal.

Parameters
x
returnedOutput
Returns
TTErr error message if the method does not execute as expected.

Create a TTOutput object for signal.

Definition at line 581 of file JamomaModularForMax.cpp.

References jamoma_callback_return_value_typed(), kTTErrNone, and TTObject::set().

+ Here is the call graph for this function:

TTErr JAMOMA_EXPORT jamoma_output_create_audio ( t_object *  x,
TTObject returnedOutput 
)

Create an output object for audio signal.

Parameters
x
returnedOutput
Returns
TTErr error message if the method does not execute as expected.

Definition at line 598 of file JamomaModularForMax.cpp.

References kTTErrNone.

TTErr JAMOMA_EXPORT jamoma_output_send ( TTObject anOutput,
t_symbol *  msg,
long  argc,
const t_atom *  argv 
)

Send any signal to a TTOutput object.

Parameters
anOutput
msg
argcThe number of arguments of the message.
argvPointer to the array of arguments.
Returns
TTErr error message if the method does not execute as expected.

Send any signal to a TTOutput object.

Definition at line 606 of file JamomaModularForMax.cpp.

References jamoma_ttvalue_from_Atom(), kTTErrGeneric, TTObject::send(), and TTObject::valid().

+ Here is the call graph for this function:

TTUInt32 JAMOMA_EXPORT jamoma_parse_bracket ( t_symbol *  s,
TTString si_format,
TTString ss_format 
)

Returned the N inside "pp/xx.[N]/yyy" and a format string as "pp/xx.%d/yy" and a format string as "pp/xx.%s/yy".

Parameters
s
si_format
ss_format
Returns

Returned the N inside "pp/xx.[N]/yyy" and a format string as "pp/xx.%d/yy" and a format string as "pp/xx.%s/yy".

Definition at line 1780 of file JamomaModularForMax.cpp.

References TTString::c_str(), and ttRegexForBracket.

+ Here is the call graph for this function:

t_symbol JAMOMA_EXPORT* jamoma_parse_dieze ( t_canvas *  x,
t_symbol *  address 
)

Parse #N inside address and replace them by parent patcher arguments if there are.

Parameters
x
address
Returns

Definition at line 156 of file JamomaModularForPd.cpp.

References jamoma_patcher_get_args(), and jamoma_patcher_get_hierarchy().

Referenced by jamoma_patcher_get_name().

+ Here is the call graph for this function:

void JAMOMA_EXPORT jamoma_patcher_get_args ( t_canvas *  canvas,
long *  argc,
t_atom **  argv 
)

Convenient method to get the patcher argument easily.

In poly case it also return the voice index (0 else)

Parameters
patcher
argcThe number of arguments of the message.
argvPointer to the array of arguments.

Convenient method to get the patcher argument easily.

Returns true if successful

Definition at line 1202 of file JamomaModularForPd.cpp.

Referenced by jamoma_parse_dieze(), jamoma_patcher_get_class(), jamoma_patcher_get_name(), and jamoma_subscriber_create().

void JAMOMA_EXPORT jamoma_patcher_get_class ( t_canvas *  patcher,
TTSymbol  context,
TTSymbol returnedClass 
)

Get the class of the patcher from the file name (removing .model and .view convention name if they are in)

Get the class of the patcher from the file name (removing .model and .view convention name if they are in)

Definition at line 1274 of file JamomaModularForPd.cpp.

References jamoma_patcher_get_args(), jamoma_patcher_get_hierarchy(), ttRegexForJcom, ttRegexForJmod, ttRegexForModel, ttRegexForModule, ttRegexForPdhelp, ttRegexForPdpat, and ttRegexForView.

Referenced by jamoma_patcher_get_info().

+ Here is the call graph for this function:

void JAMOMA_EXPORT jamoma_patcher_get_context ( t_canvas **  patcher,
TTSymbol returnedContext 
)

Get the context from the upper jcom model|view in the patcher or from patcher's name.

Parameters
patcher
returnedContext
t_symbol JAMOMA_EXPORT* jamoma_patcher_get_hierarchy ( t_canvas *  canvas)

Get the hierarchy of the patcher : bpatcher, subpatcher or toplevel.

Parameters
patcher
Returns

Get the hierarchy of the patcher : bpatcher, subpatcher or toplevel.

Definition at line 146 of file JamomaModularForPd.cpp.

Referenced by jamoma_parse_dieze(), jamoma_patcher_get_class(), jamoma_patcher_get_context(), jamoma_patcher_get_name(), and jamoma_subscriber_get_patcher_list().

TTErr JAMOMA_EXPORT jamoma_patcher_get_info ( t_canvas *  obj,
t_canvas **  returnedPatcher,
TTSymbol returnedContext,
TTSymbol returnedClass,
TTSymbol returnedName 
)

Get all context info from an object (his patcher and the context, the class and the name of his patcher).

Parameters
obj
returnedPatcher
returnedContext
modelClass
returnedName
Returns
TTErr error message if the method does not execute as expected.

Get all context info from an object (his patcher and the context, the class and the name of his patcher).

Definition at line 1606 of file JamomaModularForPd.cpp.

References TTSymbol::c_str(), jamoma_patcher_get_class(), jamoma_patcher_get_context(), jamoma_patcher_get_name(), jamoma_patcher_share_info(), kTTErrGeneric, and kTTErrNone.

Referenced by jamoma_subscriber_create(), and jamoma_subscriber_get_patcher_list().

+ Here is the call graph for this function:

void JAMOMA_EXPORT jamoma_patcher_get_input_output ( t_canvas *  patcher,
TTBoolean dataInput,
TTBoolean dataOutput,
TTBoolean audioInput,
TTBoolean audioOutput 
)

Look into the given patcher to know if there are data or audio inputs and outputs.

Parameters
patcher
dataInputis there a data input in the patcher ?
dataOutputis there a data output in the patcher ?
audioInputis there an audio input in the patcher ?
audioOutputis there an audio output in the patcher ?

Look into the given patcher to know if there are data or audio inputs and outputs.

Definition at line 1511 of file JamomaModularForPd.cpp.

void JAMOMA_EXPORT jamoma_patcher_get_model_or_view ( t_canvas *  patcher,
t_object **  returnedModelOrView 
)

Get j.model or j.view of a patcher.

Parameters
patcher
returnedModelOrView

Definition at line 1488 of file JamomaModularForPd.cpp.

void JAMOMA_EXPORT jamoma_patcher_get_model_patcher ( t_canvas *  patcher,
TTSymbol  modelClass,
t_object **  returnedModelPatcher 
)

Get the "aClass.model" external in the patcher.

Parameters
patcher
modelClass
returnedModelPatcher

Definition at line 1555 of file JamomaModularForPd.cpp.

References jamoma_edit_filename().

+ Here is the call graph for this function:

void JAMOMA_EXPORT jamoma_patcher_get_name ( t_canvas *  patcher,
TTSymbol  context,
TTSymbol returnedName 
)

Get the name of the patcher from his arguments.

Parameters
patcher
context
returnedName

Definition at line 1404 of file JamomaModularForPd.cpp.

References jamoma_parse_dieze(), jamoma_patcher_get_args(), and jamoma_patcher_get_hierarchy().

Referenced by jamoma_patcher_get_info().

+ Here is the call graph for this function:

TTBoolean JAMOMA_EXPORT jamoma_patcher_get_ui ( t_object *  patcher)

Look into the given patcher to know if there is a j.ui.

Parameters
patcher
Returns
true if there is a j.ui in the patcher

Look into the given patcher to know if there is a j.ui.

Definition at line 1573 of file JamomaModularForMax.cpp.

void JAMOMA_EXPORT jamoma_patcher_share_info ( t_canvas *  patcher,
t_canvas **  returnedPatcher,
TTSymbol returnedContext,
TTSymbol returnedClass,
TTSymbol returnedName 
)

Get all context info from the root jcom model|view in the patcher.

Parameters
patcher
returnedPatcher
returnedContext
returnedClass
returnedNameGet all context info from the root jcom model|view in the patcher.

Definition at line 1459 of file JamomaModularForPd.cpp.

References TTValue::size().

Referenced by jamoma_patcher_get_info().

+ Here is the call graph for this function:

void JAMOMA_EXPORT jamoma_patcher_share_node ( t_canvas *  patcher,
TTNodePtr patcherNode 
)

Get patcher's node from the root jcom model|view in the patcher.

Parameters
obj
patcherNodeGet patcher's node from the root jcom model|view in the patcher.

Definition at line 1582 of file JamomaModularForPd.cpp.

TTErr JAMOMA_EXPORT jamoma_presetManager_create ( t_object *  x,
TTObject returnedPresetManager 
)

Create a #TTPresetManager object.

Parameters
x
returnedPresetManager
Returns
TTErr error message if the method does not execute as expected.

Create a #TTPresetManager object.

Definition at line 507 of file JamomaModularForMax.cpp.

References jamoma_callback_return_value(), kTTErrNone, and TTObject::set().

+ Here is the call graph for this function:

TTErr JAMOMA_EXPORT jamoma_ramp_create ( t_object *  x,
TTObject returnedRamp 
)

Create a TTRamp object.

Parameters
x
returnedRamp
Returns
TTErr error message if the method does not execute as expected.

Definition at line 819 of file JamomaModularForMax.cpp.

References TTValue::append(), jamoma_callback_return_ramped_value(), and kTTErrNone.

+ Here is the call graph for this function:

TTErr JAMOMA_EXPORT jamoma_receiver_create ( t_object *  x,
TTObject returnedReceiver 
)

Create a TTReceiver object.

Parameters
x
returnedReceiver
Returns
TTErr error message if the method does not execute as expected.

Create a TTReceiver object.

Definition at line 462 of file JamomaModularForMax.cpp.

References TTValue::append(), jamoma_callback_return_address(), jamoma_callback_return_value_typed(), kTTErrNone, and TTObject::set().

+ Here is the call graph for this function:

TTErr JAMOMA_EXPORT jamoma_receiver_create_audio ( t_object *  x,
TTObject returnedReceiver 
)

Create a TTReceiver object for audio signal.

Parameters
x
returnedReceiver
Returns
TTErr error message if the method does not execute as expected.

Create a TTReceiver object for audio signal.

Definition at line 483 of file JamomaModularForMax.cpp.

References TTValue::append(), jamoma_callback_return_address(), kTTErrNone, and TTObject::set().

+ Here is the call graph for this function:

TTErr JAMOMA_EXPORT jamoma_sender_create ( t_object *  x,
TTObject returnedSender 
)

Create a TTSender object.

Parameters
x
returnedSender
Returns
TTErr error message if the method does not execute as expected.

Create a TTSender object.

Definition at line 425 of file JamomaModularForMax.cpp.

References kTTErrNone.

TTErr JAMOMA_EXPORT jamoma_sender_create_audio ( t_object *  x,
TTObject returnedSender 
)

Create a TTSender object for audio signal.

Parameters
x
returnedSender
Returns
TTErr error message if the method does not execute as expected.

Create a TTSender object for audio signal.

Definition at line 432 of file JamomaModularForMax.cpp.

References kTTErrNone.

TTErr JAMOMA_EXPORT jamoma_sender_send ( TTObject aSender,
t_symbol *  msg,
long  argc,
const t_atom *  argv 
)

Send Max data using a TTSender object.

Parameters
aSender
msg
arcThe number of arguments of the message.
argvPointer to the array of arguments.
Returns
TTErr error message if the method does not execute as expected.

Send Max data using a TTSender object.

Definition at line 444 of file JamomaModularForMax.cpp.

References jamoma_ttvalue_from_Atom(), kTTErrGeneric, TTObject::send(), and TTObject::valid().

+ Here is the call graph for this function:

TTErr JAMOMA_EXPORT jamoma_subscriber_create ( t_eobj *  x,
TTObject anObject,
TTAddress  relativeAddress,
TTObject returnedSubscriber,
TTSymbol returnedAddress,
TTNodePtr returnedNode,
TTNodePtr returnedContextNode 
)

Create a #TTSubscriber object and register a TTObject into the tree or, if aTTObject is NULL, retrieve all context info to bind on an object.

Parameters
x
anObject
relativeAddress
returnedSubscriberPointer to the new #TTSubscriber object.
returnedAddress
returnedNode
returnedContextNode
Returns
TTErr error message if the method does not execute as expected.

Definition at line 32 of file JamomaModularForPd.cpp.

References TTValue::append(), TTSymbol::c_str(), TTObject::get(), TTAddress::getNameInstance(), jamoma_patcher_get_args(), jamoma_patcher_get_info(), jamoma_subscriber_get_patcher_list(), kTTErrGeneric, kTTErrNone, TTObject::send(), TTValue::size(), and TTObject::valid().

+ Here is the call graph for this function:

void JAMOMA_EXPORT jamoma_subscriber_get_patcher_list ( t_eobj *  x,
TTList &  aContextListToFill 
)

Get the <patcher name, patcher pointer> list above an external.

To understand what this method have to provide see in TTSubscriber.h and TTSubscriber.cpp.

Parameters
x
aContextListToFill

Definition at line 243 of file JamomaModularForPd.cpp.

References jamoma_patcher_get_hierarchy(), and jamoma_patcher_get_info().

Referenced by jamoma_subscriber_create().

+ Here is the call graph for this function:

t_symbol JAMOMA_EXPORT* jamoma_TTName_To_PdName ( TTSymbol  TTName)

Convert a TTSymbol "MyObjectMessage" into a t_symbol *"my/object/message" or return NULL if the TTSymbol doesn't begin by an uppercase letter.

Parameters
TTName
Returns

Definition at line 1150 of file JamomaModularForPd.cpp.

References TTSymbol::c_str(), and ToAppName.

Referenced by wrapTTModularClassAsPdClass().

+ Here is the call graph for this function:

void JAMOMA_EXPORT jamoma_ttvalue_from_Atom ( TTValue v,
t_symbol *  msg,
long  argc,
const t_atom *  argv 
)

Make a TTValue from Atom array.

Parameters
v
msg
argcThe number of arguments of the message.
argvPointer to the array of arguments.

Make a TTValue from Atom array.

Definition at line 1125 of file JamomaModularForMax.cpp.

References TTValue::clear(), and TTValue::resize().

Referenced by jamoma_container_send(), jamoma_data_command(), jamoma_input_send(), jamoma_output_send(), jamoma_sender_send(), and jamoma_viewer_send().

+ Here is the call graph for this function:

void JAMOMA_EXPORT jamoma_ttvalue_to_Atom ( const TTValue v,
long *  argc,
t_atom **  argv 
)

Make an Atom array from a TTValue.

(NB: This method allocate memory for the Atom array. Make sure to free it afterwards!)

Parameters
v
argcThe number of arguments of the message.
argvPointer to the array of arguments.

Make an Atom array from a TTValue.

Definition at line 1086 of file JamomaModularForMax.cpp.

References TTSymbol::c_str(), kTypeFloat32, kTypeFloat64, kTypeSymbol, and TTValue::size().

Referenced by jamoma_callback_return_signal(), and jamoma_callback_return_value().

+ Here is the call graph for this function:

void JAMOMA_EXPORT jamoma_ttvalue_to_typed_Atom ( const TTValue v,
t_symbol **  msg,
long *  argc,
t_atom **  argv,
TTBoolean shifted 
)

Make a typed Atom array from a TTValue.

(NB: This method allocate memory for the Atom array. Make sure to free it afterwards!)

Parameters
v
msg
argcThe number of arguments of the message.
argvPointer to the array of arguments.
shiftedMake a typed Atom array from a TTValue.

Make a typed Atom array from a TTValue.

disable audio support for now void jamoma_callback_return_signal_audio(const TTValue& baton, const TTValue& v) { t_object *x; TTPtr signal; long i, argc = 0; t_atom *argv = NULL;

unpack baton (a t_object*) x = (t_object*)((TTPtr)baton[0]);

unpack data (signal) argc = v.size(); argv = (t_atom*)sysmem_newptr(sizeof(t_atom) * argc); for (i = 0; i < argc; i++) { signal = v[i]; atom_setobj(argv+i, signal); }

send signal using the return_signal method object_method(x, jps_return_signal, _sym_nothing, argc, argv);

sysmem_freeptr(argv); }Make a typed Atom array from a TTValue (!!! this method allocate memory for the Atom array ! free it after !

Definition at line 1027 of file JamomaModularForMax.cpp.

References TTSymbol::c_str(), kTypeFloat32, kTypeFloat64, kTypeSymbol, and TTValue::size().

Referenced by jamoma_callback_return_value_typed().

+ Here is the call graph for this function:

TTErr JAMOMA_EXPORT jamoma_viewer_create ( t_object *  x,
TTObject returnedViewer 
)

Create a #TTViewer object.

Parameters
x
returnedViewer
Returns
TTErr error message if the method does not execute as expected.

Create a #TTViewer object.

Definition at line 670 of file JamomaModularForMax.cpp.

References jamoma_callback_return_value_typed(), kTTErrNone, and TTObject::set().

+ Here is the call graph for this function:

TTErr JAMOMA_EXPORT jamoma_viewer_send ( TTObject aViewer,
t_symbol *  msg,
long  argc,
const t_atom *  argv 
)

Send Max data using a #TTViewer object.

Parameters
aViewer
msg
argcThe number of arguments of the message.
argvPointer to the array of arguments.
Returns
TTErr error message if the method does not execute as expected.

Send Max data using a #TTViewer object.

Definition at line 681 of file JamomaModularForMax.cpp.

References jamoma_ttvalue_from_Atom(), kTTErrGeneric, TTObject::send(), and TTObject::valid().

+ Here is the call graph for this function: