Skip to content

Commit

Permalink
include symbolatom, fix leading space bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
pdikmann committed May 17, 2017
1 parent 98bd3a9 commit 577f181
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
1 change: 1 addition & 0 deletions pd-nodes.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@
(node-template 'self-node text)
(node-template 'patch-node patch)
(node-template 'floatatom-node floatatom)
(node-template 'symbolatom-node symbolatom)
(node-template 'bng-node bng)
(node-template 'tgl-node tgl)
(node-template 'cnv-node cnv)
Expand Down
16 changes: 12 additions & 4 deletions pd-structs.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
:self-node
:patch-node
:floatatom-node
:symbolatom-node
:ui-node
:bng-node
:tgl-node
Expand Down Expand Up @@ -94,7 +95,7 @@

(defclass patch-node (object-node) ())

(defclass floatatom-node (node)
(defclass atom-node (node)
((send-symbol :initarg :send :initform "-")
(receive-symbol :initarg :receive :initform "-")
(label-text :initarg :label :initform "-")
Expand All @@ -103,6 +104,12 @@
(lower-limit :initarg :lower :initform 0)
(upper-limit :initarg :upper :initform 0)))

(defclass floatatom-node (atom-node)
((width :initarg width :initform 5)))

(defclass symbolatom-node (atom-node)
((width :initarg width :initform 10)))

(defclass ui-node (node)
((send-symbol :accessor node-send-symbol :initarg :send :initform "empty")
(receive-symbol :accessor node-receive-symbol :initarg :receive :initform "empty")
Expand Down Expand Up @@ -168,7 +175,7 @@
n
(concatenate 'string
s
" "
(if s " " "")
(to-string
(if (symbolp arg)
(slot-value n arg)
Expand All @@ -186,8 +193,9 @@
(defmethod write-node ((n patch-node))
(fill-template '("#X obj" x y init-args) n))

(defmethod write-node ((n floatatom-node))
(fill-template '("#X floatatom"
(defmethod write-node ((n atom-node))
(fill-template '("#X"
name ; floatatom or symbolatom
x y
width
lower-limit upper-limit
Expand Down

0 comments on commit 577f181

Please sign in to comment.