Le 2011-11-10 à 09:54:00, Charles Goyard a écrit :
Hans and I are talking from the user (user=the guy that creates a patch) point of view. That is, it _looks like_ objects do things in parallel when patched with parallel cords.
That's not from a user's perspective, that's the perspective of someone who doesn't have a clue. A real user learns about execution order, [t] order and [unpack] order in the first few hours of learning. Those who don't actually get their job done by someone who knows. (this doesn't take ~-objects into account, who use a different execution model)
Of course that's not true, pure-data is more of a multiplexed state-machine, just like an ethernet network. [...] Does "switched state-machine" sounds good to define pd's core ?
Well... sounds like a math undergrad exercise of fitting any state transition model onto a possibly infinite-by-infinite matrix and then try to multiply it by an infinite vector of markov chain state probabilities, using limits and stuff. I vaguely remember doing this in 2nd year at UdeM. It's one of those « anything can be expressed as anything else » kind of exercise.
When trying to be practical, though, flat state machines are usually ineffectual, and nearly everybody who says just « state machine » means the flat thing. Some came up with something named hierarchical state machine, which is a much more useful model for nesting stuff, because it uses a stack. But to understand PureData, the whole GOTO concept at heart of state machines is not very useful. You still need to distinguish how many messages a [t] or a [until] has sent, but the GOTO model isn't so useful for that, especially when number of states are variable or unlimited, but also any time that a metaphor of storage can be used (e.g. [until] uses an internal int variable to count iterations when it needs to). But overall, it's better to put a lot more emphasis on stack metaphors when teaching Pd, because a lot of Pd is to send messages (function call) and to come back (return) from the processing of a message.
In that respect, soundfiler is not made to run well in a switched environnement such as pd. Just like a network interface that would saturate a link, ignoring time-slots, collision-detection and such.
The big resemblance between the two is really just the realtime aspect. Apart from that, Pd doesn't generally ever discards any data, whereas a network switch has to, and Pd does its execution mainly by depth-first searches, whereas network switches hardly ever have to do any recursion.
| Mathieu BOUCHARD ----- téléphone : +1.514.383.3801 ----- Montréal, QC