-
Notifications
You must be signed in to change notification settings - Fork 25
/
slynk-extensions.lisp
32 lines (31 loc) · 1.28 KB
/
slynk-extensions.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
(in-package #:cl-collider)
;; make sly show the synthdef's argument list for (synth ...)
(defmethod slynk::compute-enriched-decoded-arglist ((operator-form (eql 'synth))
argument-forms)
(let* ((fst (car argument-forms))
(controls (unless (typep fst 'slynk::arglist-dummy)
(synthdef-metadata (if (and (listp fst)
(eql 'quote (car fst)))
(cadr fst)
fst)
:controls))))
(if controls
(loop
:for ctl :in controls
:if (atom ctl)
:collect ctl :into req
:if (listp ctl)
:collect (slynk::make-keyword-arg
(alexandria:make-keyword (car ctl))
(car ctl)
(cadr ctl))
:into key
:finally
(return
(slynk::make-arglist
:required-args (append (list fst) req)
:key-p t
:keyword-args (append
key
(slynk::keywords-of-operator operator-form)))))
(call-next-method))))