Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #34509
| Newsgroups | comp.lang.javascript |
|---|---|
| Date | 2018-01-07 22:34 -0800 |
| References | <206a2e6b-9262-45f2-8bcd-52494069d2cb@googlegroups.com> <72e5b95b-c999-4a2d-a676-ede95207427c@googlegroups.com> |
| Message-ID | <e160f530-8a8a-4007-aea0-b69ec59cf10a@googlegroups.com> (permalink) |
| Subject | Re: Accessing clock for playup of timed events, "sequenser" |
| From | Jonas Thörnvall <jonas.thornvall@gmail.com> |
Den måndag 8 januari 2018 kl. 07:24:26 UTC+1 skrev Jonas Thörnvall:
> Den måndag 8 januari 2018 kl. 07:20:19 UTC+1 skrev Jonas Thörnvall:
> > I have timed events stored, in an "object?" that did get the clock using performance.now(), however now i need a running timer that send these events.
> >
> > And i am clueless about both how one deal with timecritical events both in general and in javascript. Should i "poll/request?" the timer/clock again and again?
>
> In principle is this the approach, or is there most sophisticated ways?
>
> function refresh() {
> // make Ajax call here, inside the callback call:
> setTimeout(refresh, 5000);
> // ...
> }
>
> // initial call, or just call refresh directly
> setTimeout(refresh, 5000);
Something like this?
function play()
while(playmidi){
time=performance.now();
//How big is the chance that multiple event have same value should i compare //with as many values as the polyphony of device?
//comparisson with time in array and then...
output.send(noteOnMessage);
}
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Accessing clock for playup of timed events, "sequenser" Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-07 22:20 -0800
Re: Accessing clock for playup of timed events, "sequenser" Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-07 22:24 -0800
Re: Accessing clock for playup of timed events, "sequenser" Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-07 22:34 -0800
Re: Accessing clock for playup of timed events, "sequenser" Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-07 23:33 -0800
Re: Accessing clock for playup of timed events, "sequenser" Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-08 00:50 -0800
Re: Accessing clock for playup of timed events, "sequenser" Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-08 00:52 -0800
csiph-web