[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Sc-devel] Servers with nil latency?



On Dec 20, 2007, at 6:22 AM, ronald kuivila wrote:

 The latency key in the event would be just another time offset like lag, sendBundle would always use Server,latency..
I think James' priority scheme works something like this:

Ptpar(0, Pevent(bassline, (lag:0.2)), 0.2, sopranoline)

So the bassline computes its notes 0.2 of a beat early, but play in sync with sopranoline.
I am assuming he wants to keep lag available for other purposes; James you old third person, is this right?

That's basically it, yes. I think it would be better to keep it separate from lag, not so much for my own use since I mostly use custom event prototypes, more rather for users just picking up chucklib who will most likely use the default event prototype.

Calling the key in the event "latency" might be confusing. Really, it's a scheduling correction. schedAdjust, maybe? Most users will probably not touch it. I would probably have it default to 0 in most cases, with the option of increasing it for the aforementioned case.

There are a number of little niggling details around note timing that might need to be handled different ways, depending on context.
They can all be handled by writing different versions of ~schedBundle and ~schedSustainedBundle, so I will definitely make an implementation:

1. strummed chords: in seconds or beats? (SystemClock or thisThread.clock)
2. note duration: in seconds or beats? (SystemClock or thisThread.clock)
3. should strummed notes end together or in succession? (need to have both lag and strumLag as arguments)
4. hasGate -> it is reasonable to have a fixed length envelope AND a gate for early release

For #4 the release bundle should be surrounded by /error messages, in case a fixed length envelope terminates sooner than the message is sent.... wait a minute, how would this work actually? If the envelope supplied to EnvGen has a release node, the synth does not die until the gate input falls to 0. If the envelope doesn't have a release node, as far as I know the gate input has no effect. I've handled this by having a second envelope for quick release, but I would expect the default event to schedule anything on the second gate argument.

Still, if you use DetectSilence to kill the synth before the gate'd envelope releases, the /error messages would be useful. You can't always assume the node will be there when the release message goes out.

thisThread.sched ( time + sustain, { server.sendBundle(server.latency,
#[error, -1], releaseBundle, #[error, -2])
});

For the other three, I agree it's better to give the choice to the user.
hjh


: H. James Harkins

: jamshark70@xxxxxxxxxxxxxxxxx

: http://www.dewdrop-world.net

.::!:.:.......:.::........:..!.::.::...:..:...:.:.:.:..:


"Come said the Muse,

Sing me a song no poet has yet chanted,

Sing me the universal."  -- Whitman