added 2 testcases to rhs.rkt just to see how rackunit works

This commit is contained in:
Mustafa 2014-02-25 20:36:16 -08:00
parent b90bc552d4
commit 3cf9feed7d
2 changed files with 38 additions and 0 deletions

View file

@ -773,3 +773,11 @@ Licensed under GPL (2 or 3? FIXME)
(let ((lr (partition* (compose not pair?) t)))
(cons (fst lr) (levels (concat (snd lr))))))))
(module+ test
(require rackunit)
(check-equal? (drop 2 '(1 2 3 4 5 6)) '(3 4 5 6))
(check-equal? (transpose '((1 2) (3 4))) '((1 3) (2 4)))
)

30
rsc3/examples/ring3.rkt Normal file
View file

@ -0,0 +1,30 @@
#lang racket
(require rsc3)
;; from rsc3/help/ugen/binary-ops/ring3.help.scm
;; make group 1
(with-sc3 (lambda (fd) (send fd (g-new1 1 add-to-tail 0))))
(audition
(out 0 (mul (ring4 (f-sin-osc ar 800 0)
(f-sin-osc ar (x-line kr 200 500 5 do-nothing) 0))
0.125)))
(let ((a (f-sin-osc ar 800 0))
(b (f-sin-osc ar (x-line kr 200 500 5 do-nothing) 0)))
(audition
(out 0 (mul (sub (mul3 a a b) (mul3 a b b))
0.125))))
(audition
(out 0 (mul (ring3 (f-sin-osc ar 800 0)
(f-sin-osc ar (x-line kr 200 500 5 do-nothing) 0))
0.125)))
;; to stop sound and reset nodes/groups
;; (with-sc3 reset)