Overview Clamps Packages CM Dictionary Clamps Dictionary Fomus
Next: R , Previous: pwd , Home: Overview

Clamps Dictionary

Q

quantize-time

Function

(quantize-time val &optional (quantlist (make-quantlist '(3 4 5))))

Quantize the fractional part of val to a quantization list quantlist of possible quantization points in the range [0..1].

Arguments

val The value to be quantized.
quantlist Sorted list of possible quantization points in the range [0..1].

Examples

(quantize-time 1/7 (make-quantlist '(3 4 5))) ; => 1/5

(quantize-time 37/7 (make-quantlist '(3 4 5))) ; => 21/4

(quantize-time 17/7 (make-quantlist '(3 4 5))) ; => 12/5

(quantize-time 17/7 (make-quantlist '(3 4))) ; => 5/2 

See also

Author: Orm Finnendahl

Created: 2025-02-18 Di 12:58

Validate