rsc3/doc/help/ugen/oscillators/index.help.scrbl

36 lines
544 B
Text
Raw Permalink Normal View History

2022-08-24 13:53:18 +00:00
#lang scribble/manual
@(require (for-label racket))
2022-08-28 10:27:01 +00:00
@title{index}
@racketblock[
(import (sosc) (rsc3))
]
2022-08-24 13:53:18 +00:00
Allocate and set values at buffer 10.
2022-08-28 10:27:01 +00:00
@racketblock[
2022-08-24 13:53:18 +00:00
(with-sc3
(lambda (fd)
(async fd (b-alloc 10 6 1))
(send fd (b-setn1 10 0 (list 50 100 200 400 800 1600)))))
2022-08-28 10:27:01 +00:00
]
2022-08-24 13:53:18 +00:00
Index into the above buffer for frequency values.
2022-08-28 10:27:01 +00:00
@racketblock[
2022-08-24 13:53:18 +00:00
(let ((f (mul (index 10 (mul (lf-saw kr 2 3) 4)) (mce2 1 9))))
(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
Free buffer
2022-08-28 10:27:01 +00:00
@racketblock[
2022-08-24 13:53:18 +00:00
(with-sc3
(lambda (fd)
(async fd (b-free 10))))
2022-08-28 10:27:01 +00:00
]
2022-08-24 13:53:18 +00:00