rsc3/doc/help/ugen/unary-ops/amp-db.help.scrbl

25 lines
387 B
Text
Raw Normal View History

2022-08-24 13:53:18 +00:00
#lang scribble/manual
@(require (for-label racket))
@title{(amp-db a)}
2022-08-28 10:27:01 +00:00
2022-08-24 13:53:18 +00:00
Convert linear amplitude to decibels.
2022-08-28 10:27:01 +00:00
@racketblock[
2022-08-24 13:53:18 +00:00
(audition
(out 0 (mul (f-sin-osc ar 800 0.0)
(db-amp (amp-db (line kr 0.5 0.0 5 remove-synth))))))
2022-08-28 10:27:01 +00:00
]
2022-08-24 13:53:18 +00:00
2022-08-28 10:27:01 +00:00
@racketblock[
2022-08-24 13:53:18 +00:00
(let* ((x (mouse-x kr -60 0 0 0.1))
(f (mul-add (db-amp x) 600 900)))
(audition
(out 0 (mul (sin-osc ar f 0) 0.1))))
2022-08-28 10:27:01 +00:00
]
2022-08-24 13:53:18 +00:00