-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpop-env.lsp
32 lines (29 loc) · 844 Bytes
/
pop-env.lsp
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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; File: pop-env.lsp
;;;
;;; Author: Daniel James Ross ([email protected])
;;;
;;; Date: 22 July 2015
;;;
;;; Update: Thu 25 Jan 2018 09:15:26 GMT
;;;
;;; Purpose: Generate an evelope using make-popcorn
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(in-package :sc)
(defun pop-env (&key (high 10.0) (low 1.0) (min 2.0) (max 4.0))
"Popcorn envelope"
(let* ((pop (scale
(make-popcorn '(0.01 0.2)
:min-spike min
:max-spike max)
high low)))
(flatten
(loop for i in pop
for j from 0 to 100 by (length pop)
collect
(list (round j) (round i))))))
; (pop-env)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; EOF mypop.lsp