Re: [PD] Writing OSC applications in XUL

2007-04-30 Thread Andre Schmidt
On Sat, 2007-04-28 at 15:49 -0400, Stephen Sinclair wrote:
 Hi,
 
  is there a serialization for PD messages inside OSC? for example
  so one could load a webpage containing some XUL data hosted
  on padawan's site...it could check for a local PD instance, and
  shuttle the patch data over and open it..
 
 If I understand you correctly, yes this is something I had in mind.
 Perhaps it could be used in a firefox extension instead of in a
 XULrunner app, so that you could browse to a server that hosts your
 audio interfaces.  That would make setting up a networked audio system
 very nice and easy.
 
 I'm not sure how it would work exactly in terms of the Mozilla
 security architecture, however, since as I understand it, remotely
 loaded pages can't access XPCOM components.  I'm really not an expert
 with Mozilla, so if anyone has ideas on how to accomplish something
 like that I'd all ears.

yup, thats the same i encountered, if you want to easily connect to
XPCOM with mozilla/firefox, you have to do that code as an extension.

heres an old test that i made:

http://www.osku.de/pd/foo/ff-pd_socket-example.png
http://www.osku.de/pd/foo/ff-pd_socket-example.tar.gz



 Originally I wanted to do this is 100% javascript instead of having to
 create an XPCOM component, but it seems there is no way to have JS
 send UDP messages from a XUL app.  As far I can tell anyways.

here i started to try to make a SVGUI library for XULRunner and PD:

http://www.osku.de/pd/libsvgui001.png
http://www.osku.de/pd/libsvgui001.tar.gz


.andre

 
 
 Steve
 
 ___
 PD-list@iem.at mailing list
 UNSUBSCRIBE and account-management - 
 http://lists.puredata.info/listinfo/pd-list


___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Writing OSC applications in XUL

2007-04-29 Thread Steffen

On 28/04/2007, at 20.37, Stephen Sinclair wrote:

 Anyways, this should allow people to use their SVG/HTML web-design-fu
 to create nice interfaces to audio applications, PureData patches,
 among other things.

Sorry for being a tad green.  Andre Schmidt has made some SVG GUI  
examples http://osku.de/svg/gui-examples/. Say one would like to  
use such GUI's to - via OSC - control things in a Pd patch running  
on, say, localhost. What is the obvius next step?

My intuition doesn't ask for a Firefox extension, but rather some  
Java Script that can send the OSC messages to Pd. Any pointers would  
be nice.

Best, Steffen

___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Writing OSC applications in XUL

2007-04-29 Thread Steffen

On 29/04/2007, at 11.08, Steffen wrote:

 Say one would like to
 use such GUI's to - via OSC - control things in a Pd patch running
 on, say, localhost. What is the obvius next step?

Just to be clear: The Pd patch was to run on the server where also  
the GUI stuff lives. And which is where the web-browser is pointed to.

___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Writing OSC applications in XUL

2007-04-29 Thread Patco
Hello, I don't know about java but you can send OSC messages with a PHP 
script.

Here is a god template:
http://a2hd.com/software
PC

Steffen a écrit :
 On 28/04/2007, at 20.37, Stephen Sinclair wrote:

   
 Anyways, this should allow people to use their SVG/HTML web-design-fu
 to create nice interfaces to audio applications, PureData patches,
 among other things.
 

 Sorry for being a tad green.  Andre Schmidt has made some SVG GUI  
 examples http://osku.de/svg/gui-examples/. Say one would like to  
 use such GUI's to - via OSC - control things in a Pd patch running  
 on, say, localhost. What is the obvius next step?

 My intuition doesn't ask for a Firefox extension, but rather some  
 Java Script that can send the OSC messages to Pd. Any pointers would  
 be nice.

 Best, Steffen

 ___
 PD-list@iem.at mailing list
 UNSUBSCRIBE and account-management - 
 http://lists.puredata.info/listinfo/pd-list

   


___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Writing OSC applications in XUL

2007-04-29 Thread Stephen Sinclair
 Sorry for being a tad green.  Andre Schmidt has made some SVG GUI
 examples http://osku.de/svg/gui-examples/. Say one would like to
 use such GUI's to - via OSC - control things in a Pd patch running
 on, say, localhost. What is the obvius next step?

 My intuition doesn't ask for a Firefox extension, but rather some
 Java Script that can send the OSC messages to Pd. Any pointers would
 be nice.

Well, that's just the problem.  There is no way to send UDP messages
from JavaScript just like that.  (As far as I know..)

So I wrote an XPCOM component which JavaScript can talk to as per my
example.  The XPCOM component is written in C++ and uses LibLo to send
and receive OSC.

So say you wanted to get these SVG examples working with OSC.  (Thanks
for the link by the way!!)

The way my example works is that it is a XULrunner app (basically the
firefox back-end), and it has a file called oscapp.xul.  This file
tells it what the interface should look like.  i.e., open a window and
put a browser in it.  In the browser tag there is an attribute which
tells it to load the file test.xhtml into the browser.  You could,
for example, change this to point to your SVG files.  Alternatively,
have test.xhtml include your SVG files and arrange them on the page.

Then do the same thing I did in test.xhtml -- link to a JavaScript
file, test.js, and create a function which instantiates the XPCOM
component, called OpenSoundControl, and use it to send a message.

Take a look at test.js for an example of how to do it.  I make no
claims that my object has the best possible API, but it works.

The advantage of doing it this way over using a PHP or Python back-end
is that it doesn't require running apache or communicating with it
using HTTP, which probably introduces unwanted latency.  The
application just sends and receives OSC directly.  (However, if you
find writing a server back-end easier and more familiar, I say go for
it!)


Cheers,
Steve

___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Writing OSC applications in XUL

2007-04-28 Thread carmen
On Sat Apr 28, 2007 at 02:37:27PM -0400, Stephen Sinclair wrote:
 Hello,
 
 I've created an XPCOM component that wraps LibLo, allowing you to
 communicate via OSC with JavaScript.
 
 It's sort of raw right now, and hasn't yet been ported to Windows or
 OS X, but doing so shouldn't be too hard.  I really don't have time to
 work on it right now, so I thought I may as well upload it and make it
 available to other people who might be interested instead of allowing
 it to accumulate mold in my subversion repository.
 
 http://www.music.mcgill.ca/~sinclair/content/blog:communication_between_xul_and_osc
 
 Anyways, this should allow people to use their SVG/HTML web-design-fu
 to create nice interfaces to audio applications, PureData patches,
 among other things.
 
 If anyone's interested in improving it, please feel free to send me
 patches or even to fork it.

is there a serialization for PD messages inside OSC? for example so one could 
load a webpage containing some XUL data hosted on padawan's site...it could 
check for a local PD instance, and shuttle the patch data over and open it..

 
 
 Steve
 
 ___
 PD-list@iem.at mailing list
 UNSUBSCRIBE and account-management - 
 http://lists.puredata.info/listinfo/pd-list
 

___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Writing OSC applications in XUL

2007-04-28 Thread Stephen Sinclair
Hi,

 is there a serialization for PD messages inside OSC? for example
 so one could load a webpage containing some XUL data hosted
 on padawan's site...it could check for a local PD instance, and
 shuttle the patch data over and open it..

If I understand you correctly, yes this is something I had in mind.
Perhaps it could be used in a firefox extension instead of in a
XULrunner app, so that you could browse to a server that hosts your
audio interfaces.  That would make setting up a networked audio system
very nice and easy.

I'm not sure how it would work exactly in terms of the Mozilla
security architecture, however, since as I understand it, remotely
loaded pages can't access XPCOM components.  I'm really not an expert
with Mozilla, so if anyone has ideas on how to accomplish something
like that I'd all ears.

Originally I wanted to do this is 100% javascript instead of having to
create an XPCOM component, but it seems there is no way to have JS
send UDP messages from a XUL app.  As far I can tell anyways.


Steve

___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Writing OSC applications in XUL

2007-04-28 Thread Alexandre Quessy
Hi !
Very nice tool Stephen. It work on Ubuntu Dapper too. Very interesting
for controlling/monitoring server-side pd too. I should update my
AJAX/PHP tool too.
http://pear.php.net/pepr/pepr-proposal-show.php?id=422 is not much
used.

I might provide some beautiful XUL examples to help to spread it if I
have time... A firefox extension is obivously a must. Is the pd patch
extension for firefox abandonned ?

a

2007/4/28, Stephen Sinclair [EMAIL PROTECTED]:
 Hi,

  is there a serialization for PD messages inside OSC? for example
  so one could load a webpage containing some XUL data hosted
  on padawan's site...it could check for a local PD instance, and
  shuttle the patch data over and open it..

 If I understand you correctly, yes this is something I had in mind.
 Perhaps it could be used in a firefox extension instead of in a
 XULrunner app, so that you could browse to a server that hosts your
 audio interfaces.  That would make setting up a networked audio system
 very nice and easy.

 I'm not sure how it would work exactly in terms of the Mozilla
 security architecture, however, since as I understand it, remotely
 loaded pages can't access XPCOM components.  I'm really not an expert
 with Mozilla, so if anyone has ideas on how to accomplish something
 like that I'd all ears.

 Originally I wanted to do this is 100% javascript instead of having to
 create an XPCOM component, but it seems there is no way to have JS
 send UDP messages from a XUL app.  As far I can tell anyways.


 Steve

 ___
 PD-list@iem.at mailing list
 UNSUBSCRIBE and account-management - 
 http://lists.puredata.info/listinfo/pd-list



-- 
Alexandre Quessy
http://alexandre.quessy.net
http://www.puredata.info/Members/aalex

___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Writing OSC applications in XUL

2007-04-28 Thread Stephen Sinclair
 Very nice tool Stephen. It work on Ubuntu Dapper too. Very interesting
 for controlling/monitoring server-side pd too. I should update my

Cool, I'm glad you got it working!
Always good to know something compiles and runs on someone else's machine.. ;-)


Steve

___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list