[LAD] "enhanced event port" LV2 extension proposal

David Olofson david at olofson.net
Fri Nov 30 04:07:50 UTC 2007


On Friday 30 November 2007, Dave Robillard wrote:
[...]
> The current version of LV2 MIDI just uses double.  All the precision
> you could ask for, or an insane range if you'd prefer.  It's a bit
> big maybe, but hey, why not?
> 
> We could use float I guess to save a bit of space, but I definitely
> prefer floating point.  Fixed point is just a PITA, modern CPUs are
> much faster at FP anyway, why bother?

Well, normally, you'd use the integer part for splitting the "sample 
loop" internally (that is, you need to calculate loop counts from 
it), and you'd use the fractional part alone to determine offset 
within the sample frame. Might be hard to avoid the weak spot of 
modern CPUs that is FP<->integer conversions.

I don't know if this is a real performance issue, though. Besides, you 
probably have to do some integer->FP conversions to make use of the 
fractional part of integer timestamps in FP DSP code - but then 
again, that impacts only the plugins that actually use it. Others 
just shift the fraction bits out and use the resulting integer sample 
frame offset.


//David Olofson - Programmer, Composer, Open Source Advocate

.-------  http://olofson.net - Games, SDL examples  -------.
|        http://zeespace.net - 2.5D rendering engine       |
|       http://audiality.org - Music/audio engine          |
|     http://eel.olofson.net - Real time scripting         |
'--  http://www.reologica.se - Rheology instrumentation  --'



More information about the Linux-audio-dev mailing list