chord progressions custom defun
This commit is contained in:
@@ -297,3 +297,24 @@ http://doc.sccode.org/Tutorials/Streams-Patterns-Events5.html
|
||||
* [2022-09-04 Sun]
|
||||
** evil marcro for wrapping consecutive values (or args) into pairwise brackets:
|
||||
well, not being inserted due to backspace, sad
|
||||
* [2022-09-04 Sun]
|
||||
** reading patterns.lisp to figure out bpind pdef and pb
|
||||
found prest
|
||||
#+begin_src common-lisp
|
||||
(defclass prest ()
|
||||
((value :initarg :value :initform 1))
|
||||
(:documentation "An object representing a rest. When set as a value in an event, the event's :type becomes :rest and the prest's value slot is used as the actual value for the event key instead."))
|
||||
|
||||
defun prest (&optional (value 1))
|
||||
Make a prest object, which, when used in a `pbind' or similar event pattern, turns the current event into a rest and yields VALUE for the key's value.
|
||||
|
||||
Note that this is not a pattern; it is just a regular function that returns a prest object.
|
||||
|
||||
Example:
|
||||
|
||||
;; (next-upto-n (pbind :degree (pseq (list 0 1 (prest 2) 3) 1)))
|
||||
;; ;=> ((EVENT :DEGREE 0) (EVENT :DEGREE 1) (EVENT :TYPE :REST :DEGREE 2) (EVENT :DEGREE 3))
|
||||
#+end_src
|
||||
|
||||
is that pause?
|
||||
but why would event then still have :DEGREE attribute?
|
||||
|
||||
Reference in New Issue
Block a user