rsc3/doc/help/ugen/noise/mantissa-mask.help.scrbl
2022-08-28 12:27:01 +02:00

20 lines
473 B
Racket

#lang scribble/manual
@(require (for-label racket))
@title{(mantissa-mask in bits)}
Masks off bits in the mantissa of the floating point sample
value. This introduces a quantization noise, but is less severe
than linearly quantizing the signal.
in - input signal
bits - the number of mantissa bits to preserve. a number from 0 to 23.
@racketblock[
(let ((s (mul (sin-osc ar (mul-add (sin-osc kr 0.2 0) 400 500) 0) 0.4)))
(audition (out 0 (mantissa-mask s 3))))
]