When setting selection start and selection end of a waveform using its corresponding inlets, the output of selection start and selection end differs by a very small amount. I attached an example patch…
Is this normal, and if so why? I’m computing starting and ending points of the waveform using the length of the waveform. If I want to write these points into a groove~, should I directly route the start/end points into the groove~ or should I take the start/end outputs of the waveform~ object?
-- Pasted Max Patch, click to expand. --
Copy all of the following text. Then, in Max, select New From Clipboard.
waveform~ internally converts the incoming milliseconds value to samples. This may result in floating point sample values, which get quantized to integer sample values.
For the outlets this integer sample value gets converted back to milliseconds.
So the difference between input and output will never be bigger than 1 sample.