On Wednesday 18 December 2002 19.19, Tim Hockin wrote:
Two standard
float controls would work fine. Better, in fact, as
you can handle defaults and presets without any special-casing at
all.
That could work, too. I want to be careful how much we expect the
plugin coder to do, though.
Yes... Well, first of all, this is all totally optional. It's only
needed by tempo and beat sync plugins. (Through that doesn't mean it
needs a hairy API. ;-)
[...]
BTW, how about
making integer controls 64 bit? (*41* extra bits!
:-)
Is there a justification?
I can't think of any example. It's just more bits, basically.
Frankly, that's the only strong motivation I see for ints at all,
since if you just need an integer *value*, float should do. (Just
disable rounding.)
It might be nice to know that you'll never get 1.5 on a port
hinted/typed as integer, but I'm not sure that's a good motivation.
If you really need an integer, you'll round or truncate first thing
anyway, so such illegal values never get into the machinery.
32 bit CPUs are bad at 64 bit math.
Maybe a hint that says INT64, otherwise assume int32 ?
Yes... Might be interesting if you want compact protocols for sending
events over networks or something.
Do we
assume signed or unsigned? having it be 64 bits means we need to
deal with sign extension.
Well, fp is signed, and AFAIK, there are a bunch of programming
languages that don't have unsigned ints at all, so I would suggest
assuming they're signed. (Unless they're strictly meant for flags or
something, but that seems like a nasty thing to do...)
It's no
big deal in any way, because they can't be ramped (no
event
They can be, it's just not so accurate. If you want to swing
between 0 and 1000 in one block, set a ramp event.
Well, yeah... You'd have to implement ramping for integers in
plugins, and that's not quite as trivial as ramping floats. (I do it
all the time in Audiality - but that's 16:16 fixed point, so no one
relies on much accuracy in the lowest bits.)
//David Olofson - Programmer, Composer, Open Source Advocate
.- The Return of Audiality! --------------------------------.
| Free/Open Source Audio Engine for use in Games or Studio. |
| RT and off-line synth. Scripting. Sample accurate timing. |
`--------------------------->
http://olofson.net/audiality -'
---
http://olofson.net ---
http://www.reologica.se ---