i should really have done something as lucid as chris made for pd.js,
so people can work together on it in a clean way.
I have way more time this week than i have had, so im gonna get going on it.
wanna work on a public versioning thing? i have it right now on
dropbox - http://dl.dropbox.com/u/8068328/webpd/index.html
but can do whatever.
i'm gonna pull things live from the pd.js object. which may mean
setting up listeners. this is complicated, but possible.
I went to a conference this week and met alot of the audio api guys.
allister mcdonald, david humphrey. they were really receptive, and
they said theres a good group of hacker guys that can join in on this.
It's demo city over there in W3C, when they push the other browsers to
adopt this standard. If we get this up and running, it'll get a lot of
eyeballs.
if we get something usable, i'll set it up on puredatajs.com, or
something, and set up like an ecosystem of opensource pd patches. like
hascanvas.com ? where you can publish things.
so chris and brandon, what, besides settimeout(), could function as a
metro timer?
thats priority #1 as far as I'm concerned. I've had success using
settimeout to bang a loadbang repeatedly, though didn't push it with
performance.
hope you guys are swell
happy halloween
That is exactly how metro should work. Here is how it should be coded.
Metro internally keeps two values - one is the 'counter' and the other
is the fixed value of it's tick length in milliseconds ('length'). Every
DSP tick, you should add the length of one frame to the counter. The
frame length is the tick length in milliseconds which you can find by
dividing the samplerate by the frame size in samples (i think it's 128
in our case but should use the internal variable so it's always
correct). So then you have a test that looks like this in the dsp tick:
while (counter >= length) {
counter -= length;
sendBangToMyOutlet();
}
So basically every time the counter spills over the length of the metro
tick, a bang should be sent and the counter should jump back. The while
loop means we can be sure that even if it spills over several times in
one dsp tick (timer is set shorter than the length of a tick) that the
right number of bangs gets sent.
Hopefully this makes sense.
Sorry I haven't had time to look at all this lately. I'll try and get
onto it soon.
Chris.
-------------------
http://mccormick.cx
On Sun, 31 Oct 2010 23:14:55 -0700 (PDT), Brandon James
<xbrando...@gmail.com> wrote:
> I assume [delay] should work much the same way as [metro].
Yeah, exactly. There should be a 'spill' timer and when it goes over it
should trigger the delay bang.
> Also, I think dollar ags in msg objects may have a problem with zero.
Hm, that is very likely true! Maybe we should start using the issue
tracker on the google code page?
Cheers,
Chris.
-------------------
http://mccormick.cx