24 lines
387 B
Racket
24 lines
387 B
Racket
#lang scribble/manual
|
|
@(require (for-label racket))
|
|
|
|
@title{(amp-db a)}
|
|
|
|
|
|
Convert linear amplitude to decibels.
|
|
|
|
|
|
@racketblock[
|
|
(audition
|
|
(out 0 (mul (f-sin-osc ar 800 0.0)
|
|
(db-amp (amp-db (line kr 0.5 0.0 5 remove-synth))))))
|
|
]
|
|
|
|
|
|
@racketblock[
|
|
(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))))
|
|
]
|
|
|
|
|