summaryrefslogtreecommitdiff
path: root/demos/pmorales/a5.lsp
diff options
context:
space:
mode:
Diffstat (limited to 'demos/pmorales/a5.lsp')
-rw-r--r--demos/pmorales/a5.lsp20
1 files changed, 20 insertions, 0 deletions
diff --git a/demos/pmorales/a5.lsp b/demos/pmorales/a5.lsp
new file mode 100644
index 0000000..33ef37e
--- /dev/null
+++ b/demos/pmorales/a5.lsp
@@ -0,0 +1,20 @@
+;;; SIMPLE SYNTHESIS
+;;; Waveform + Envelope. Modulating the frequency
+;;; coded by Pedro Jose Morales
+;;; pmorales@iele-ab.uclm.es
+
+(setf *pmorales-path* (current-path))
+(load (strcat *pmorales-path* "pjmg.lsp"))
+
+(defun whiny (dur frq)
+ (let ((lfo-f (step-to-hz frq)))
+ (mult (pwl 0.1 1 (- dur 0.1) 1 dur)
+ (fmosc frq (pwl (* 0.1 dur) (/ lfo-f -2.0)
+ (* 0.25 dur) (* lfo-f 2.0)
+ (* 0.3 dur) (* lfo-f 1.5)
+ (* 0.7 dur) (* lfo-f -7.0 (/ 8.0))
+ dur (* lfo-f -15.0 (/ 16.0))
+ )))))
+
+(defun whiny-demo () (ss (whiny 10 a5)))
+