rsc3/doc/help/ugen/analysis/zero-crossing.help.scrbl

25 lines
592 B
Text
Raw Permalink Normal View History

2022-08-24 13:53:18 +00:00
#lang scribble/manual
@(require (for-label racket))
@title{(zero-crossing in)}
2022-08-28 10:27:01 +00:00
2022-08-24 13:53:18 +00:00
Zero crossing frequency follower.
outputs a frequency based upon the distance between interceptions
of the X axis. The X intercepts are determined via linear
interpolation so this gives better than just integer wavelength
resolution. This is a very crude pitch follower, but can be useful
in some situations.
in - input signal.
2022-08-28 10:27:01 +00:00
@racketblock[
2022-08-24 13:53:18 +00:00
(let* ((a (mul (sin-osc ar (mul-add (sin-osc kr 1 0) 600 700) 0) 0.1))
(b (mul (impulse ar (zero-crossing a) 0) 0.25)))
(audition (out 0 (mce2 a b))))
2022-08-28 10:27:01 +00:00
]
2022-08-24 13:53:18 +00:00