Hi all,
I've been toying with some new HTML tags (canvas and audio), in a an attempt to build a web app that would work as a simple sequencer. Although canvas is great, i'm not fully satisfied with the audio tag. I was wondering, is there a way i could use Pd as a sound engine in a web application? Can it run on a server? Sorry if this is a silly question... There was a discussion a few months back about a project calld WebPd. Anybody knows if it's been developped any further?
Cheers!
Pierre
A few people (myself included) have built web UIs that control PD patches that run on a server. The technique I've used involves an http server that acts as a gateway, transforming http requests into OSC messages which are then sent to PD patches. My blog has some info about some of my experiments: http://www.pillowsopher.com/blog/
I've also been looking at wrapping libpd (http://gitorious.org/pdlib/pages/Libpd) in a web server (maybe writing a node.js binding?) and using that to generate audio based on data from a web browser.
andy
On Tue, Mar 29, 2011 at 8:07 AM, Pierre Massat pimassat@gmail.com wrote:
Sometimes you guys make me want to shout with happiness. Dont stop the rock.
On Tue, 29 Mar 2011 09:45:26 -0400 Andrew Turley aturley@acm.org wrote:
I think you should all read this: https://wiki.mozilla.org/Audio_Data_API
and this: http://weblog.bocoup.com/web-audio-all-aboard
I believe it only works in Firefox 4 at the moment.
If i wanted to use Pd to generate sound for a web application, i'd have to keep an instance of Pd running on the server continuously, right? And keep all the patches i need open? Which means that if any patch crashes Pd there'll be no sounds anymore?
Pierre
2011/3/29 Andy Farnell padawan12@obiwannabe.co.uk
Those are both good reads. The "Web Audio! All Aboard" article is pretty inspiring.
As for running Pd on a server, if the user's don't need to share data (for example, if you are streaming the results of their patches back to them) you could run one instance of Pd per user. That way one user couldn't kill audio for everyone.
In most of the work I've done the web UI interacts with Pd patches, but it doesn't actually send patches, so to the extent that I trust my own patching ability, I can feel fairly certain that my instance of Pd won't crash. I guess I assumed that with the sequencer that's the type of thing you would be doing.
andy
On Tue, Mar 29, 2011 at 11:00 AM, Pierre Massat pimassat@gmail.com wrote:
If i wanted to use Pd to generate sound for a web application, i'd have to keep an instance of Pd running on the server continuously, right? And keep all the patches i need open? Which means that if any patch crashes Pd there'll be no sounds anymore?
Well, the question is how the audio is getting to the user. As you said, WebPd requires FF4's audio API. If you want the actual Pd running on a server then you need a way of hearing the output. In my own pd-on-the-web project, PuréeData, I'll be using an mp3 or ogg stream. Latency will be an issue, but hopefully not a tremendously bad one.
——t3db0t
On Mar 29, 2011, at 11:00 AM, Pierre Massat wrote:
On Tue, Mar 29, 2011 at 17:20, Tedb0t lists@liminastudio.com wrote:
Huh, if it really goes over the internet, not just on localhost, expect a latency of 1-10sec...
Andras
...and tweak buffers, on the client side too if possible - they are time-bottlenecks (is this the right expression? :o) ...going mono might help as well ...and i always liked realaudio's auto bitrate calibration based on network thruput - not that i'm recommending realaudio anyway
Andras
On Tue, Mar 29, 2011 at 18:01, Tedb0t lists@liminastudio.com wrote:
Hello Pierre,
I'm doing some experiments using Mozilla Audio Data API. Please take a look at a simple bliptronic clone:
http://automata.cc/src/vivace/experiments/matrix.html
It's based on a JS library on top of Audio Data API:
https://github.com/oampo/Audiolet
I'm trying to integrate WebSockets with OSC too:
And please, don't forget Chris' WebPd:
http://mccormick.cx/projects/WebPd/
All the best!
2011/3/29 Pierre Massat pimassat@gmail.com
On Tue, Mar 29, 2011 at 02:07:24PM -0300, Vilson Vieira wrote:
And please, don't forget Chris' WebPd:
If you have FF4, hit this: http://mccormick.cx/projects/WebPd/demos/xmen-sample-looper/
Then drag your mouse on the waveform.
Paches welcome!
Cheers,
Chris.
Is it possible just to download this version of ff4?
Are you planning on putting the contents of your workshop on libpd online?
Or to do an online workshop, where people all around can listen to you?
João
Hi João,
On Wed, Apr 13, 2011 at 03:35:18PM +0200, João Pais wrote:
Is it possible just to download this version of ff4?
For sure. Go here: http://www.mozilla.org/ and click on "Get Firefox" (4 is the recently released stable version).
I am not sure what the recording arrangements will be, but if either NYC or LA are recorded I am sure it will be put online.
However this is a type of interactive workshop where I hope to help people out on their actual laptops and devices rather than lecturing at them, so it might not be 100% suitable for video.
By the way, for anyone interested the New York session still has places available in two Saturdays time. You can sign up here: http://www.eventbrite.com/event/1491957485
If you are in LA, the session is: Friday April 29, 7pm -> 11pm CRASHspace (10526 Venice Blvd., Culver City, CA 90232) http://pd-la.info/pd-launch-schedule/
Maybe I can get to Berlin somehow soonish?
By the way, libpd is due to a massive effort by Peter Brinkmann and also Peter Kirn, Hans-Christoph Steiner, Martin Roth, and that includes really excellent documentation: https://gitorious.org/pdlib/pages/Libpd https://gitorious.org/pdlib/pages/PdForAndroid https://gitorious.org/pdlib/pages
Cheers,
Chris.
yes, but it would be nice for us to be informed. I'm itching to get my
http://code.google.com/p/clicktracker/ as an online tool.
Maybe I can get to Berlin somehow soonish?
that's up to you, not to me :)
I should be able to get a place to stay. I can give some contacts of
places to teach, but of course Berlin is famous for being cheap to live,
and treating it's residents and guests even cheaper than that.
João
forgot to ask: when do you think you might add delay and readsf~ to the
libpd objects?
would it make sense for you to open up a pd-ext.js file, where non-vanilla
objects are coded?
João
On Wed, Apr 13, 2011 at 04:22:06PM +0200, João Pais wrote:
forgot to ask: when do you think you might add delay and readsf~ to the
libpd objects?
As soon as someone sends me the patch I will add it. :)
Actually, [delay] is very high on my TODO list.
Unfortunately my development on WebPd is divided between my clients (day job) and other spare time projects so it doesn't always get the love it needs. So far it has kept plodding along due to some really awesome and huge patches from Brandon and Spencer with an occasionally architecture tweak from me.
would it make sense for you to open up a pd-ext.js file, where non-vanilla objects are coded?
Yes, perfect sense. Or someone could make their own pd-ext.js or pd-zexy.js or pd-gridflow.js and self-publish them. There are already some non-vanilla objects in pd.js though which I should move into pd-ext.js and that is a good idea, thanks.
Goodnight,
Chris.