rsc3/doc/help/ugen/noise/mantissa-mask.help.scrbl

21 lines
473 B
Text
Raw Normal View History

2022-08-24 13:53:18 +00:00
#lang scribble/manual
@(require (for-label racket))
@title{(mantissa-mask in bits)}
2022-08-28 10:27:01 +00:00
2022-08-24 13:53:18 +00:00
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.
2022-08-28 10:27:01 +00:00
@racketblock[
2022-08-24 13:53:18 +00:00
(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))))
2022-08-28 10:27:01 +00:00
]
2022-08-24 13:53:18 +00:00