Jamoma API  0.6.0.a19
JamomaModularForPd.h
Go to the documentation of this file.
1 /** @file
2  *
3  * @ingroup implementationPdLibrary
4  *
5  * @brief JamomaModular For Max Shared Library
6  *
7  * @details Functions and resources based on Modular framework used by Max objects
8  *
9  * @authors Théo de la Hogue, Tim Place, Antoine Villeret
10  *
11  * @copyright © 2013, Théo de la Hogue & Tim Place @n
12  * Copyright © 2015, Antoine Villeret@n
13  * This code is licensed under the terms of the "New BSD License" @n
14  * http://creativecommons.org/licenses/BSD/
15  */
16 
17 #ifndef __JAMOMA_MODULAR_FOR_PD_H__
18 #define __JAMOMA_MODULAR_FOR_PD_H__
19 
20 #include "JamomaForPd.h"
21 
22 #include "TTNode.h"
23 #include "TTNodeDirectory.h"
24 #include "TTRegex.h"
25 #include "TTSubscriber.h"
26 #include "TTInput.h"
27 #include "TTOutput.h"
28 
29 extern JAMOMA_EXPORT TTSymbol kTTSym_Jamoma; ///<
30 extern JAMOMA_EXPORT TTObject JamomaApplicationManager;///<
31 extern JAMOMA_EXPORT TTObject JamomaApplication; ///<
32 
33 extern JAMOMA_EXPORT TTRegex* ttRegexForJmod; ///< A global regex to parse jmod. (usefull to detect a 0.5 module)
34 extern JAMOMA_EXPORT TTRegex* ttRegexForJcom; ///< A global regex to parse j.
35 extern JAMOMA_EXPORT TTRegex* ttRegexForModel; ///< A global regex to parse .model
36 extern JAMOMA_EXPORT TTRegex* ttRegexForModule; ///< A global regex to parse .module
37 extern JAMOMA_EXPORT TTRegex* ttRegexForView; ///< A global regex to parse .view
38 extern JAMOMA_EXPORT TTRegex* ttRegexForPdpat; ///< A global regex to parse .maxpat
39 extern JAMOMA_EXPORT TTRegex* ttRegexForPdhelp; ///< A global regex to parse .maxhelp
40 extern JAMOMA_EXPORT TTRegex* ttRegexForBracket; ///< A global regex to parse [ and ]
41 
42 extern JAMOMA_EXPORT TTString* ModelPatcherFormat; ///<
43 extern JAMOMA_EXPORT TTString* ModelPresetFormat; ///<
44 extern JAMOMA_EXPORT TTString* ViewPresetFormat; ///<
45 extern JAMOMA_EXPORT TTString* HelpPatcherFormat; ///<
46 extern JAMOMA_EXPORT TTString* RefpageFormat; ///<
47 extern JAMOMA_EXPORT TTString* DocumentationFormat; ///<
48 
49 #define ModelPatcher "model"
50 #define ViewPatcher "view"
51 
52 #define JamomaDebug if (accessApplicationLocalDebug)
53 
54 
55 // Methods to deal with TTSubscriber
56 ///////////////////////////////////////////////////////////////////////
57 
58 /** Create a #TTSubscriber object and register a #TTObject into the tree
59  or, if aTTObject is NULL, retrieve all context info to bind on an object.
60  @param x
61  @param anObject
62  @param relativeAddress
63  @param returnedSubscriber Pointer to the new #TTSubscriber object.
64  @param returnedAddress
65  @param returnedNode
66  @param returnedContextNode
67  @return #TTErr error message if the method does not execute as expected.
68  */
69 TTErr JAMOMA_EXPORT jamoma_subscriber_create(t_eobj *x, TTObject& anObject, TTAddress relativeAddress, TTObject& returnedSubscriber, TTSymbol& returnedAddress, TTNodePtr *returnedNode, TTNodePtr *returnedContextNode);
70 
71 
72 /** Get the <patcher name, patcher pointer> list above an external.
73  @details To understand what this method have to provide see in TTSubscriber.h and TTSubscriber.cpp.
74  @param x
75  @param aContextListToFill
76  */
77 void JAMOMA_EXPORT jamoma_subscriber_get_patcher_list(t_eobj *x, TTList& aContextListToFill);
78 
79 
80 
81 // Method to deal with #TTContainer
82 ///////////////////////////////////////////////////////////////////////
83 
84 /** Create a #TTContainer object.
85  @param x
86  @param returnedContainer
87  @return #TTErr error message if the method does not execute as expected.
88  */
89 TTErr JAMOMA_EXPORT jamoma_container_create(t_object *x, TTObject& returnedContainer);
90 
91 
92 /** Send Max data to a node (e.g., a j.parameter object) using a #TTContainer object.
93  @param aContainer
94  @param relativeAddressAndAttribute The relative address and attribute of the node that the message is to be sent to.
95  @param argc The number of arguments of the message.
96  @param argv Pointer to the array of arguments.
97  @return #TTErr error message if the method does not execute as expected.
98  */
99 TTErr JAMOMA_EXPORT jamoma_container_send(TTObject& aContainer, t_symbol *relativeAddressAndAttribute, long argc, const t_atom *argv);
100 
101 
102 
103 // Method to deal with #TTNodeInfo
104 ///////////////////////////////////////////////////////////////////////
105 
106 /** Create a #TTNodeInfo object.
107  @param x
108  @param returnedNodeInfo
109  @return #TTErr error message if the method does not execute as expected.
110  */
111 TTErr JAMOMA_EXPORT jamoma_node_info_create(t_object *x, TTObject& returnedNodeInfo);
112 
113 
114 
115 // Method to deal with #TTData
116 ///////////////////////////////////////////////////////////////////////
117 
118 /** Create a #TTData object.
119  @param x
120  @param returnedData
121  @param service
122  @return #TTErr error message if the method does not execute as expected.
123  */
124 TTErr JAMOMA_EXPORT jamoma_data_create(t_object *x, TTObject& returnedData, TTSymbol service);
125 
126 
127 /** Set the #TTData value attribute using the #TTData::Command method.
128  @param aData #TTData instance (the Modular class which handles parameter, message or return)
129  @param msg A symbol describing the Max type (_sym_bang, _sym_float, ...)
130  @param argc The number of arguments of the command
131  @param argv Pointer to the array of arguments.
132  @return #TTErr error message if the method does not execute as expected.
133  */
134 TTErr JAMOMA_EXPORT jamoma_data_command(TTObject& aData, t_symbol *msg, long argc, const t_atom *argv);
135 
136 
137 
138 // Methods to deal with #TTSender
139 ///////////////////////////////////////////////////////////////////////
140 
141 /** Create a #TTSender object.
142  @param x
143  @param returnedSender
144  @return #TTErr error message if the method does not execute as expected.
145  */
146 TTErr JAMOMA_EXPORT jamoma_sender_create(t_object *x, TTObject& returnedSender);
147 
148 
149 /** Create a #TTSender object for audio signal.
150  @param x
151  @param returnedSender
152  @return #TTErr error message if the method does not execute as expected.
153  */
154 TTErr JAMOMA_EXPORT jamoma_sender_create_audio(t_object *x, TTObject& returnedSender);
155 
156 
157 /** Send Max data using a #TTSender object.
158  @param aSender
159  @param msg
160  @param arc The number of arguments of the message.
161  @param argv Pointer to the array of arguments.
162  @return #TTErr error message if the method does not execute as expected.
163  */
164 TTErr JAMOMA_EXPORT jamoma_sender_send(TTObject& aSender, t_symbol *msg, long argc, const t_atom *argv);
165 
166 
167 
168 // Method to deal with #TTReceiver
169 ///////////////////////////////////////////////////////////////////////
170 
171 /** Create a #TTReceiver object.
172  @param x
173  @param returnedReceiver
174  @return #TTErr error message if the method does not execute as expected.
175  */
176 TTErr JAMOMA_EXPORT jamoma_receiver_create(t_object *x, TTObject& returnedReceiver);
177 
178 
179 /** Create a #TTReceiver object for audio signal.
180  @param x
181  @param returnedReceiver
182  @return #TTErr error message if the method does not execute as expected.
183  */
184 TTErr JAMOMA_EXPORT jamoma_receiver_create_audio(t_object *x, TTObject& returnedReceiver);
185 
186 
187 
188 // Method to deal with TTPresetManager and TTCueManager
189 ///////////////////////////////////////////////////////////////////////
190 
191 /** Create a #TTPresetManager object.
192  @param x
193  @param returnedPresetManager
194  @return #TTErr error message if the method does not execute as expected.
195  */
196 TTErr JAMOMA_EXPORT jamoma_presetManager_create(t_object *x, TTObject& returnedPresetManager);
197 
198 
199 /** Create a #TTCueManager object.
200  @param x
201  @param returnedCueManager
202  @return #TTErr error message if the method does not execute as expected.
203  */
204 TTErr JAMOMA_EXPORT jamoma_cueManager_create(t_object *x, TTObject& returnedCueManager);
205 
206 
207 
208 // Method to deal with TTInput
209 ///////////////////////////////////////////////////////////////////////
210 
211 /** Create a #TTInput object for signal.
212  @param x
213  @param returnedInput
214  @return #TTErr error message if the method does not execute as expected.
215  */
216 TTErr JAMOMA_EXPORT jamoma_input_create(t_object *x, TTObject& returnedInput);
217 
218 
219 /** Create a #TTInput object for audio signal.
220  @param x
221  @param returnedInput
222  @return #TTErr error message if the method does not execute as expected.
223  */
224 TTErr JAMOMA_EXPORT jamoma_input_create_audio(t_object *x, TTObject& returnedInput);
225 
226 
227 /** Send any signal to a TTInput object.
228  @param anInput
229  @param msg
230  @param argc The number of arguments of the message.
231  @param argv Pointer to the array of arguments.
232  @return #TTErr error message if the method does not execute as expected.
233  */
234 TTErr JAMOMA_EXPORT jamoma_input_send(TTObject& anInput, t_symbol *msg, long argc, const t_atom *argv);
235 
236 
237 
238 // Method to deal with TTOutput
239 ///////////////////////////////////////////////////////////////////////
240 
241 /** Create a TTOutput object for signal.
242  @param x
243  @param returnedOutput
244  @return #TTErr error message if the method does not execute as expected.
245  */
246 TTErr JAMOMA_EXPORT jamoma_output_create(t_object *x, TTObject& returnedOutput);
247 
248 
249 /** Create an output object for audio signal.
250  @param x
251  @param returnedOutput
252  @return #TTErr error message if the method does not execute as expected.
253  */
254 TTErr JAMOMA_EXPORT jamoma_output_create_audio(t_object *x, TTObject& returnedOutput);
255 
256 
257 /** Send any signal to a TTOutput object.
258  @param anOutput
259  @param msg
260  @param argc The number of arguments of the message.
261  @param argv Pointer to the array of arguments.
262  @return #TTErr error message if the method does not execute as expected.
263  */
264 TTErr JAMOMA_EXPORT jamoma_output_send(TTObject& anOutput, t_symbol *msg, long argc, const t_atom *argv);
265 
266 
267 // Method to deal with TTMapper
268 ///////////////////////////////////////////////////////////////////////
269 
270 /** Create a TTMapper object.
271  @param x
272  @param returnedMapper
273  @return #TTErr error message if the method does not execute as expected.
274  */
275 TTErr JAMOMA_EXPORT jamoma_mapper_create(t_object *x, TTObject& returnedMapper);
276 
277 
278 
279 // Method to deal with #TTViewer
280 ///////////////////////////////////////////////////////////////////////
281 
282 /** Create a #TTViewer object.
283  @param x
284  @param returnedViewer
285  @return #TTErr error message if the method does not execute as expected.
286  */
287 TTErr JAMOMA_EXPORT jamoma_viewer_create(t_object *x, TTObject& returnedViewer);
288 
289 
290 /** Send Max data using a #TTViewer object.
291  @param aViewer
292  @param msg
293  @param argc The number of arguments of the message.
294  @param argv Pointer to the array of arguments.
295  @return #TTErr error message if the method does not execute as expected.
296  */
297 TTErr JAMOMA_EXPORT jamoma_viewer_send(TTObject& aViewer, t_symbol *msg, long argc, const t_atom *argv);
298 
299 
300 
301 // Method to deal with #TTExplorer
302 ///////////////////////////////////////////////////////////////////////
303 
304 /** Create a #TTExplorer object.
305  @param x
306  @param returnedExplorer
307  @return #TTErr error message if the method does not execute as expected.
308  */
309 TTErr JAMOMA_EXPORT jamoma_explorer_create(t_object *x, TTObject& returnedExplorer);
310 
311 
312 /**
313  @return
314  */
316 
317 
318 
319 // Method to deal with TTRamp
320 ///////////////////////////////////////////////////////////////////////
321 
322 /** Create a #TTRamp object.
323  @param x
324  @param returnedRamp
325  @return #TTErr error message if the method does not execute as expected.
326  */
327 TTErr JAMOMA_EXPORT jamoma_ramp_create(t_object *x, TTObject& returnedRamp);
328 
329 
330 /**
331  @param o
332  @param n
333  @param v
334  */
335 void JAMOMA_EXPORT jamoma_callback_return_ramped_value(void *o, TTUInt32 n, TTFloat64 *v);
336 
337 
338 
339 // Method to return data
340 ///////////////////////////////////////////////////////////////////////
341 
342 /** Return an address to a j. external.
343  @param baton
344  @param v
345  */
346 void JAMOMA_EXPORT jamoma_callback_return_address(const TTValue& baton, const TTValue& v);
347 
348 
349 /** Return the value to a j.* external as msg, argc, argv.
350  @param baton The Max wrapper object
351  @param v The value(s) being passed back. This is passed back as an array of three argumens: msg, argc and argv
352  */
353 void JAMOMA_EXPORT jamoma_callback_return_value(const TTValue& baton, const TTValue& v);
354 
355 
356 /** 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,
357  @param baton The Max wrapper object
358  @param v The value(s) being passed back. This is passed back as an array of three argumens: msg, argc and argv
359  */
360 void JAMOMA_EXPORT jamoma_callback_return_value_typed(const TTValue& baton, const TTValue& v);
361 
362 
363 /** Return any signal.
364  @param baton
365  @param v
366  */
367 void JAMOMA_EXPORT jamoma_callback_return_signal(const TTValue& baton, const TTValue& v);
368 
369 
370 /** Return audio signal.
371  @param baton
372  @param v
373  */
374 void JAMOMA_EXPORT jamoma_callback_return_signal_audio(const TTValue& baton, const TTValue& v);
375 
376 
377 
378 // Patcher
379 ///////////////////////////////////////////////
380 
381 /** Convenient method to get the patcher argument easily.
382  In poly case it also return the voice index (0 else)
383  @param patcher
384  @param argc The number of arguments of the message.
385  @param argv Pointer to the array of arguments.
386  */
387 void JAMOMA_EXPORT jamoma_patcher_get_args(t_canvas *patcher, long *argc, t_atom **argv);
388 
389 
390 /** Get the hierarchy of the patcher : bpatcher, subpatcher or toplevel.
391  @param patcher
392  @return
393  */
394 t_symbol JAMOMA_EXPORT *jamoma_patcher_get_hierarchy(t_canvas *patcher);
395 
396 
397 /** Get the context from the upper jcom model|view in the patcher or from patcher's name.
398  @param patcher
399  @param returnedContext
400  */
401 void JAMOMA_EXPORT jamoma_patcher_get_context(t_canvas **patcher, TTSymbol& returnedContext);
402 
403 
404 /** Get the class of the patcher from the file name (removing .model and .view convention name if they are in) */
405 void JAMOMA_EXPORT jamoma_patcher_get_class(t_canvas *patcher, TTSymbol context, TTSymbol& returnedClass);
406 
407 
408 /** Get the name of the patcher from his arguments.
409  @param patcher
410  @param context
411  @param returnedName
412  */
413 void JAMOMA_EXPORT jamoma_patcher_get_name(t_canvas *patcher, TTSymbol context, TTSymbol& returnedName);
414 
415 /** Get all context info from the root jcom model|view in the patcher.
416  @param patcher
417  @param returnedPatcher
418  @param returnedContext
419  @param returnedClass
420  @param returnedName
421  */
422 void JAMOMA_EXPORT jamoma_patcher_share_info(t_canvas *patcher, t_canvas **returnedPatcher, TTSymbol& returnedContext, TTSymbol& returnedClass, TTSymbol& returnedName);
423 
424 
425 /** Get patcher's node from the root jcom model|view in the patcher.
426  @param obj
427  @param patcherNode
428  */
429 void JAMOMA_EXPORT jamoma_patcher_share_node(t_canvas *, TTNodePtr *patcherNode);
430 
431 
432 /** Get all context info from an object (his patcher and the context, the class and the name of his patcher).
433  @param obj
434  @param returnedPatcher
435  @param returnedContext
436  @param modelClass
437  @param returnedName
438  @return #TTErr error message if the method does not execute as expected.
439  */
440 TTErr JAMOMA_EXPORT jamoma_patcher_get_info(t_canvas *obj, t_canvas **returnedPatcher, TTSymbol& returnedContext, TTSymbol& returnedClass, TTSymbol& returnedName);
441 
442 /** Get j.model or j.view of a patcher
443  @param patcher
444  @param returnedModelOrView
445  */
446 void JAMOMA_EXPORT jamoma_patcher_get_model_or_view(t_canvas *patcher, t_object **returnedModelOrView);
447 
448 /** Get the "aClass.model" external in the patcher.
449  @param patcher
450  @param modelClass
451  @param returnedModelPatcher
452  */
453 void JAMOMA_EXPORT jamoma_patcher_get_model_patcher(t_canvas *patcher, TTSymbol modelClass, t_object **returnedModelPatcher);
454 
455 /** Look into the given patcher to know if there are data or audio inputs and outputs
456  @param patcher
457  @param dataInput is there a data input in the patcher ?
458  @param dataOutput is there a data output in the patcher ?
459  @param audioInput is there an audio input in the patcher ?
460  @param audioOutput is there an audio output in the patcher ?
461  */
462 void JAMOMA_EXPORT jamoma_patcher_get_input_output(t_canvas *patcher, TTBoolean& dataInput, TTBoolean& dataOutput, TTBoolean& audioInput, TTBoolean& audioOutput);
463 
464 /** Look into the given patcher to know if there is a j.ui
465  @param patcher
466  @return true if there is a j.ui in the patcher
467  */
468 TTBoolean JAMOMA_EXPORT jamoma_patcher_get_ui(t_object *patcher);
469 
470 
471 // Tools
472 ///////////////////////////////////////////////
473 
474 /** Make a typed Atom array from a #TTValue. (NB: This method allocate memory for the Atom array. Make sure to free it afterwards!)
475  @param v
476  @param msg
477  @param argc The number of arguments of the message.
478  @param argv Pointer to the array of arguments.
479  @param shifted
480  */
481 void JAMOMA_EXPORT jamoma_ttvalue_to_typed_Atom(const TTValue& v, t_symbol **msg, long *argc, t_atom **argv, TTBoolean& shifted);
482 
483 
484 /** Make an Atom array from a #TTValue. (NB: This method allocate memory for the Atom array. Make sure to free it afterwards!)
485  @param v
486  @param argc The number of arguments of the message.
487  @param argv Pointer to the array of arguments.
488  */
489 void JAMOMA_EXPORT jamoma_ttvalue_to_Atom(const TTValue& v, long *argc, t_atom **argv);
490 
491 
492 /** Make a #TTValue from Atom array.
493  @param v
494  @param msg
495  @param argc The number of arguments of the message.
496  @param argv Pointer to the array of arguments.
497  */
498 void JAMOMA_EXPORT jamoma_ttvalue_from_Atom(TTValue& v, t_symbol *msg, long argc, const t_atom *argv);
499 
500 
501 /** Convert a TTSymbol "MyObjectMessage" into a t_symbol *"my/object/message"
502  or return NULL if the TTSymbol doesn't begin by an uppercase letter.
503  @param TTName
504  @return
505  */
506 t_symbol JAMOMA_EXPORT *jamoma_TTName_To_PdName(TTSymbol TTName);
507 
508 
509 /** Load an external for internal use. Returns true if successful.
510  @param objectname
511  @param argc The number of arguments of the message.
512  @param argv Pointer to the array of arguments.
513  @param object
514  @return
515  */
516 TTBoolean JAMOMA_EXPORT jamoma_extern_load(t_symbol *objectname, long argc, const t_atom *argv, t_object** object);
517 
518 
519 /** 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".
520  @param s
521  @param si_format
522  @param ss_format
523  @return
524  */
525 TTUInt32 JAMOMA_EXPORT jamoma_parse_bracket(t_symbol *s, TTString& si_format, TTString& ss_format);
526 
527 
528 /** Edit a new instance of the given format address using interger.
529  @param format
530  @param returnedName
531  @param i
532  */
533 void JAMOMA_EXPORT jamoma_edit_numeric_instance(TTString format, t_symbol** returnedName, long i);
534 
535 
536 /** Edit a new instance of the given format address using string.
537  @param format
538  @param returnedName
539  @param s
540  */
541 void JAMOMA_EXPORT jamoma_edit_string_instance(TTString format, t_symbol** returnedName, TTString s);
542 
543 
544 /** Edit a file name from a given file format and a class name.
545  @param format
546  @param className
547  @param returnedFileName
548  */
549 void JAMOMA_EXPORT jamoma_edit_filename(TTString format, TTSymbol className, t_symbol** returnedFileName);
550 
551 
552 /** Parse #N inside address and replace them by parent patcher arguments if there are.
553  @param x
554  @param address
555  @return
556  */
557 t_symbol JAMOMA_EXPORT *jamoma_parse_dieze(t_canvas *x, t_symbol *address);
558 
559 
560 
561 // Files
562 ///////////////////////////////////////////////
563 
564 /** Get BOOT style filepath from args or, if no args open a dialog to write a file.
565  @param x
566  @param argc The number of arguments of the message.
567  @param argv Pointer to the array of arguments.
568  @param default_filename
569  @return
570  */
571 TTSymbol JAMOMA_EXPORT jamoma_file_write(t_object *x, long argc, t_atom *argv, char* default_filename);
572 
573 /** Get BOOT style filepath from args or, if no args open a dialog to read a file.
574  @param x
575  @param argc The number of arguments of the message.
576  @param argv Pointer to the array of arguments.
577  @param filetype
578  @return
579  */
580 TTSymbol JAMOMA_EXPORT jamoma_file_read(t_object *x, long argc, t_atom *argv, t_fourcc filetype);
581 
582 #endif // __JAMOMA_MODULAR_FOR_PD_H__
583 
584 
585 
TTErr JAMOMA_EXPORT jamoma_sender_send(TTObject &aSender, t_symbol *msg, long argc, const t_atom *argv)
Send Max data using a TTSender object.
TTErr JAMOMA_EXPORT jamoma_output_create(t_object *x, TTObject &returnedOutput)
Create a TTOutput object for signal.
bool TTBoolean
Boolean flag, same as Boolean on the Mac.
Definition: TTBase.h:167
JAMOMA_EXPORT TTRegex * ttRegexForModule
A global regex to parse .module.
TTErr JAMOMA_EXPORT jamoma_input_send(TTObject &anInput, t_symbol *msg, long argc, const t_atom *argv)
Send any signal to a TTInput object.
void JAMOMA_EXPORT jamoma_patcher_get_args(t_canvas *patcher, long *argc, t_atom **argv)
Convenient method to get the patcher argument easily.
JAMOMA_EXPORT TTRegex * ttRegexForModel
A global regex to parse .model.
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.
void JAMOMA_EXPORT jamoma_patcher_share_node(t_canvas *, TTNodePtr *patcherNode)
Get patcher's node from the root jcom model|view in the patcher.
TTErr JAMOMA_EXPORT jamoma_node_info_create(t_object *x, TTObject &returnedNodeInfo)
Create a TTNodeInfo object.
We build a directory of TTNodes, and you can request a pointer for any TTNode, or add an observer to ...
Definition: TTNode.h:59
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.
TTHashPtr JAMOMA_EXPORT jamoma_explorer_default_filter_bank(void)
void JAMOMA_EXPORT jamoma_ttvalue_to_Atom(const TTValue &v, long *argc, t_atom **argv)
Make an Atom array from a TTValue.
void JAMOMA_EXPORT jamoma_ttvalue_from_Atom(TTValue &v, t_symbol *msg, long argc, const t_atom *argv)
Make a TTValue from Atom array.
TTErr JAMOMA_EXPORT jamoma_receiver_create_audio(t_object *x, TTObject &returnedReceiver)
Create a TTReceiver object for audio signal.
The TTAddress class is used to represent a string and efficiently pass and compare that string...
Definition: TTAddress.h:29
Create and use Jamoma object instances.
Definition: TTObject.h:29
JAMOMA_EXPORT TTRegex * ttRegexForView
A global regex to parse .view.
void JAMOMA_EXPORT jamoma_patcher_get_model_or_view(t_canvas *patcher, t_object **returnedModelOrView)
Get j.model or j.view of a patcher.
Various utilities for interfacing with Pd that are not specific to JamomaModular as such...
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.
void JAMOMA_EXPORT jamoma_callback_return_signal(const TTValue &baton, const TTValue &v)
Return any signal.
void JAMOMA_EXPORT jamoma_patcher_get_model_patcher(t_canvas *patcher, TTSymbol modelClass, t_object **returnedModelPatcher)
Get the "aClass.model" external in the patcher.
TTErr JAMOMA_EXPORT jamoma_mapper_create(t_object *x, TTObject &returnedMapper)
Create a TTMapper object.
TTErr JAMOMA_EXPORT jamoma_output_create_audio(t_object *x, TTObject &returnedOutput)
Create an output object for audio signal.
void JAMOMA_EXPORT jamoma_callback_return_signal_audio(const TTValue &baton, const TTValue &v)
Return audio signal.
Maintain a collection of TTValue objects indexed by TTSymbol pointers.
Definition: TTHash.h:36
double TTFloat64
64 bit floating point number
Definition: TTBase.h:188
TTErr JAMOMA_EXPORT jamoma_input_create(t_object *x, TTObject &returnedInput)
Create a #TTInput object for signal.
TTErr JAMOMA_EXPORT jamoma_cueManager_create(t_object *x, TTObject &returnedCueManager)
Create a #TTCueManager object.
JAMOMA_EXPORT TTRegex * ttRegexForJmod
A global regex to parse jmod. (usefull to detect a 0.5 module)
TTErr JAMOMA_EXPORT jamoma_ramp_create(t_object *x, TTObject &returnedRamp)
Create a TTRamp object.
TTBoolean JAMOMA_EXPORT jamoma_patcher_get_ui(t_object *patcher)
Look into the given patcher to know if there is a j.ui.
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...
JAMOMA_EXPORT TTRegex * ttRegexForJcom
A global regex to parse j.
TTErr JAMOMA_EXPORT jamoma_container_create(t_object *x, TTObject &returnedContainer)
Create a TTContainer object.
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 patch...
void JAMOMA_EXPORT jamoma_patcher_get_name(t_canvas *patcher, TTSymbol context, TTSymbol &returnedName)
Get the name of the patcher from his arguments.
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 ar...
TTErr JAMOMA_EXPORT jamoma_viewer_create(t_object *x, TTObject &returnedViewer)
Create a #TTViewer object.
t_symbol JAMOMA_EXPORT * jamoma_patcher_get_hierarchy(t_canvas *patcher)
Get the hierarchy of the patcher : bpatcher, subpatcher or toplevel.
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.
The TTSymbol class is used to represent a string and efficiently pass and compare that string...
Definition: TTSymbol.h:26
TTErr JAMOMA_EXPORT jamoma_output_send(TTObject &anOutput, t_symbol *msg, long argc, const t_atom *argv)
Send any signal to a TTOutput object.
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.
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 TTSym...
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.
Handles any signal input.
TTErr JAMOMA_EXPORT jamoma_sender_create(t_object *x, TTObject &returnedSender)
Create a TTSender object.
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.
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.
JAMOMA_EXPORT TTRegex * ttRegexForPdhelp
A global regex to parse .maxhelp.
Definition: JamomaForPd.cpp:41
void JAMOMA_EXPORT jamoma_subscriber_get_patcher_list(t_eobj *x, TTList &aContextListToFill)
Get the list above an external.
TTErr JAMOMA_EXPORT jamoma_receiver_create(t_object *x, TTObject &returnedReceiver)
Create a TTReceiver object.
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.
TTErr
Jamoma Error Codes Enumeration of error codes that might be returned by any of the TTBlue functions a...
Definition: TTBase.h:342
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...
void JAMOMA_EXPORT jamoma_callback_return_value(const TTValue &baton, const TTValue &v)
Return the value to a j.
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.
JAMOMA_EXPORT TTRegex * ttRegexForPdpat
A global regex to parse .maxpat.
Definition: JamomaForPd.cpp:40
std::uint32_t TTUInt32
32 bit unsigned integer
Definition: TTBase.h:178
JAMOMA_EXPORT TTRegex * ttRegexForBracket
A global regex to parse [ and ].
References an object using a name, an instance and any contextual environnement information.
TTErr JAMOMA_EXPORT jamoma_input_create_audio(t_object *x, TTObject &returnedInput)
Create a #TTInput object for audio signal.
TTBoolean JAMOMA_EXPORT jamoma_extern_load(t_symbol *objectname, long argc, const t_atom *argv, t_object **object)
Load an external for internal use.
Handles any signal output.
A contextual subscriber to register TTObject as TTNode in a TTNodeDirectory.
TTErr JAMOMA_EXPORT jamoma_presetManager_create(t_object *x, TTObject &returnedPresetManager)
Create a #TTPresetManager object.
void JAMOMA_EXPORT jamoma_callback_return_address(const TTValue &baton, const TTValue &v)
Return an address to a j.
The TTString class is used to represent a string.
Definition: TTString.h:34
void JAMOMA_EXPORT jamoma_callback_return_ramped_value(void *o, TTUInt32 n, TTFloat64 *v)
void JAMOMA_EXPORT jamoma_callback_return_value_typed(const TTValue &baton, const TTValue &v)
Return the value to a j.
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.
TTErr JAMOMA_EXPORT jamoma_explorer_create(t_object *x, TTObject &returnedExplorer)
Create a TTExplorer object.
TTErr JAMOMA_EXPORT jamoma_sender_create_audio(t_object *x, TTObject &returnedSender)
Create a TTSender object for audio signal.
[doxygenAppendixC_copyExample]
Definition: TTValue.h:34
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.
TTErr JAMOMA_EXPORT jamoma_viewer_send(TTObject &aViewer, t_symbol *msg, long argc, const t_atom *argv)
Send Max data using a #TTViewer object.
TTErr JAMOMA_EXPORT jamoma_data_create(t_object *x, TTObject &returnedData, TTSymbol service)
Create a TTData object.