Skip to content

Commit

Permalink
fix 'proxy-handle'
Browse files Browse the repository at this point in the history
  • Loading branch information
byulparan authored and byulparan committed Sep 22, 2018
1 parent c97afd4 commit b745ff2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ugens.lisp
Expand Up @@ -34,7 +34,6 @@
(defun sel-pos.kr (div len contents)
(sc:select.kr (sc::mod~ (sc::floor~ (sc::/~ (cnt div) len)) (length contents)) contents))


(defmacro proxy-handle (key &optional action handle (to 1))
(let* ((name (format nil "~a-HANDLE" (string-upcase key)))
(cmd (format nil "/~a" name))
Expand All @@ -49,9 +48,10 @@
(if (zerop fract) v (+ v fract)))))
(apply func (mapcar #'float-to-int (cddr args))))))
(proxy ,key
(destructuring-bind (trig &rest values)
,action
(send-reply.kr trig ,cmd values))
(let ((result ,action))
(destructuring-bind (trig &rest values)
result
(send-reply.kr trig ,cmd values)))
:to ,to
:fade .0))
`(proxy ,key))))
Expand Down

0 comments on commit b745ff2

Please sign in to comment.