Work in progress : FCPD a FreeCAD PureData connexion
Has anybody written up a list of basic constructions of this sort?
I'm currently working on a PD interface for FreeCAD. The whole features are already available through Python and my workbench is an overlay for guys who aren't comfortable with standard programming.
So I'll be happy to see anything that can make PD easier to use.
@ingox You make me think I can ask the communication patch for a pending command and call the [fc_process] only when it ends. Maybe throw a global [r activityEnd]. I have to know if a command is still waiting but it's quite in place in the "wait for callback" part.
Another solution could be to delegate the process chain to python i.e. add netsend/netreceive everywhere and trust the python server for answer order.
Thank you everybody!
@ddw_music It could be a solution but in certain case I don't need all the inputs so it can't be generalized.
For a vanilla version replace [iemlib/any] per [float] or [symbol]:
(print b then a even if you click a before b )
Finally I think the "activity chain" is the easiest and clearest, let's modify all my objects…
As in my original question, if it was possible to stop the PD computation during the external ones it could be great. But it seems it can't be done despite PD knows when an object ends.
@ingox The problem is in
[bang( | [t b b] | \ [code b] [code a] | | [code c ]
if it has a [netreceive] in [code a], [code c] is computed before [code a] returns a value.
And as [code b] doesn't need [code a] output I can't chain [code a] to [code b] without the mentioned "bang-when-done".
with the waitings for [netreceive] inbetween.
It's really what I'm looking to remove
@ingox It's quite more complicate than my simple example.
Here is my main communication patch:
Messages are sent throw this [fc_process]:
And I'm in trouble with this (each [fc_…] and [ik/…] have a [fc_process] inside):
It may be easier to update all my objects with a bang-to-process inlet and a bang-when-done outlet.
I'm facing an issue with [netsend] [netreceive].
I'm sending messages to a python server and like to wait for computation before PD continues.
I currently have an abstraction like
[inlet] | [some stuff] | [netsend] [netreceive] | [other stuff] | [outlet]
[bang( | [t b b] | | | [myAbstraction] | | [print a] [print b]
[print a] is triggered before [print b]
So my question:
Is there a way to stop PD computation to trigger [print b] BEFORE [print a]?
Finally I do it at python side with PyQt5.QtCore.QFileSystemWatcher.
You can see the implementation here:
Thank you for all the ideas !