#!r6rs (library (rsc3 ugen constructor) (export construct-ugen) (import (rnrs) (only (srfi lists) make-list) (rsc3 graphdef output) (rsc3 graphdef rate) (rsc3 graphdef rate-of) (rsc3 graphdef ugen) (rsc3 ugen mce) (rsc3 ugen proxied)) ;; name = | ;; rate? = | #f ;; inputs = of ;; mce? = | #f ;; outputs = ;; special = ;; It is significant whether MCE or Proxing occurs first, the ordering ;; here follows that in sclang. (define (construct-ugen name rate? inputs mce? outputs special id) (let* ((inputs* (if mce? (append inputs (mce-l mce?)) inputs)) (rate (if rate? rate? (rate-select (map rate-of inputs*)))) (u (make-ugen (if (symbol? name) (symbol->string name) name) rate inputs* (make-outputs outputs rate) special id))) (proxied (mced u)))) )