right now the ui uses its own 'uielements' json object, which stores
all the information about the object and its paramaters ,
and the sound uses its own 'pd.graph' json object. I'm proposing to
merge them, to avoid the kung-fu necessary in connecting the ui
interaction events of the 'uiobjects[2].mousepressed' stuff to the
'pd.graph[3].sendmessage' stuff.
it means having non-sound stuff right beside the sound stuff.
which probably is not a big deal
Sorry for the slow reply. I have been meaning to dive into the WebPd
stuff and catch up on all the mails you guys have sent through. I will
do this soon, hopefully. Sorry about the delay.
With regards to the ui vs audio stuff, I would love to keep them
separate as far as possible. What I don't want is for people who want to
use WebPd as an engine in their game, or online instrument or whatever,
to have to have the UI code installed too. I think the UI code is
totally awesome, but I just want to make sure we can keep them separate.
Can you think of a way to make your life easier without actually putting
UI code into the webpd core? This might involve taking advantage of some
Javascript trickery and modifying classes at runtime and stuff like
that. If you want to commit your code I can take a look at it and see if
I can come up with some way to make your life easier and at the same
time keep the UI and engine separate.
Chris.
--
-------------------
http://mccormick.cx
hey chris, I agree. I do have a question.
how do I pull the object connection information from pd.js?
if this gets the object name: pd["_graph"].objects[i].type
then how do I get its connections? its in the variable called 'source'?
i'm completely rewriting the UI. its the smartest thing i've ever done.
bugs are exploding instantaneously. demo soon.
for (var i in pd["_graph"].objects) {
for (var o in pd["_graph"].objects[i].outlets)
{
alert("outlet "+o+" of "+pd["_graph"].objects[i].type+" connects to
inlet "+pd["_graph"].objects[i].outlets[o][1]+" of
"+pd["_graph"].objects[i].outlets[o][0].type)