-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPatterns.lisp
64 lines (52 loc) · 2.06 KB
/
Patterns.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
;;; Time-stamp: <2023-11-06 14:15:45 andersvi>
;;;
;;; Patterns library for OM, Anders Vinjar
;;;
;;; This library is an adaption of Rick Taube's "Item Streams" (or "Patterns
;;; Streams") as found in Common Music. Variations of Rick's original "Item
;;; Streams" can be found in other composition environments, notably
;;; SuperColliders "Pattern" classes.
;;;
;;; A good general intro to Item Streams is found in chapter 20 of Rick Taube's
;;; book "Notes from the Metalevel":
;;;
;;; http://www.moz.ac.at/sem/lehre/lib/cm/Notes%20from%20the%20Metalevel/index.html
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the Lisp Lesser Gnu Public License. See
;;; http://www.cliki.net/LLGPL for the text of this agreement.
(in-package :om)
(let* ((srcdir (append (pathname-directory *load-pathname*) '("sources")))
(pattern-files '("package" "utils" "pattern-classes" "OM-classes")))
(mapc #'(lambda (f)
(compile&load (make-pathname :directory srcdir :name f)))
pattern-files))
(defparameter ompa::*pattern-version* '1.0)
(defparameter ompa::*pattern-date* '2023-11-06)
;; (om::addpackage2pack (find-library "PATTERNS") om::*om-package-tree*)
(let ((funcs '(p-next p-eod? p-eop?
p-cycle p-palindrome p-line p-heap
p-weighting p-w-node
p-markov p-markov-analyze p-transition
p-graph p-graph-node p-accumulation p-thunk p-rotation
p-rewrite p-rewrite-node
p-range p-join p-copier
pval set-pval get-pval
))
(p (find-library "PATTERNS")))
(AddGenFun2Pack funcs p))
(set-lib-release ompa::*pattern-version* (find-library "PATTERNS"))
;; (om::addclass2pack '(ompa::pattern) (find-library "PATTERNS") :protect nil)
(print
(format nil "
;; ============================================
;; Patterns - a Pattern Stream Library for OM
;; Version: ~A
;; Date: ~A
;; Author: Anders Vinjar
;; ============================================
"
ompa::*pattern-version*
ompa::*pattern-date*))
;; generate html doc:
;; (om::gen-lib-reference (exist-lib-p "Patterns"))