paul at linuxaudiosystems.com
Mon May 9 23:02:21 UTC 2005
>Well, I guess the way it's done in most audio editors is that you draw a
>vertical line between the min and max (and maybe also the rms on top of
>that), if a single pixel has to represent multiple samples, and the
>usual connect-the-points-with-lines thingy (or splines, if you prefer
>smooth curves), when zoomed in to the sample or sub-sample level. Is
>there a better way?
the devil is in the details, as gerard and i found out to our mental
health with ardour recently.
if you allow arbitrary zoom scales, then the mapping between pixel
position on screen (or some notional "unit" position as offered by
canvas widgets) and a sample is non-integral, which implies
rounding. that in turn implies errors of several different kinds.
moreover, if you are displaying large audio files, reading the audio
data itself is excrutiatingly slow. hence, peakfiles.
all of this and more, in gruesome detail:
which is the canvas item used by ardour to draw waveforms. its
lightning fast and awesomely headache inducing.
More information about the Linux-audio-dev