-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
218 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
;;;; An undertone / Extempore demonstration of arpeggios | ||
;;;; | ||
|
||
;; For use in setting up song in the LFE undertone REPL, having executed the | ||
;; following: | ||
;; (undertone.repl.extempore:start) | ||
;; | ||
;; Then: | ||
;; (load "priv/xt-midi/lambda-days-2021/init.xtm") | ||
;; | ||
;; Then, in the REPL, load the required functions: | ||
;; (load "priv/xt-midi/lambda-days-2021/util.xtm") | ||
;; (load "priv/xt-midi/lambda-days-2021/funs.xtm") | ||
;; | ||
;; After that, load the notes, chords, and arpeggios: | ||
;; (load "priv/xt-midi/lambda-days-2021/notes.xtm") | ||
|
||
;; From Extempore, you can do: | ||
;;(define prefix "/Users/dmcgreggor/lab/lfe/undertone/examples/lambda-days-2021/") | ||
(define prefix "/Users/oubiwann/lab/lfe/undertone/examples/lambda-days-2021/") | ||
|
||
(sys:load (string-append prefix "init.xtm")) | ||
(sys:load (string-append prefix "util.xtm")) | ||
(sys:load (string-append prefix "funs.xtm")) | ||
(sys:load (string-append prefix "notes.xtm")) | ||
(sys:load (string-append prefix "moog-ipad-minimoog.xtm")) | ||
|
||
;; Now you're ready to set up the MIDI channels (coupled to tracks in the DAW) | ||
;; for the score ... and play it: | ||
|
||
(pm_print_devices) | ||
|
||
;;(define primary-midi-device-id 3) ; ; Arturia Moog modular V (virtual synth) | ||
(define primary-midi-device-id 5) ; Behringer Model D (physical synth/eurorack) | ||
(define *midiout* (pm_create_output_stream primary-midi-device-id)) | ||
|
||
(define midi-chan-1 0) | ||
|
||
(define seq-1 (list c3 c4 c3 c4 a#3 g3)) | ||
(define seq-1 (list c3 c4 c3 c4 a#3 g3 a#3 g3)) | ||
;(define seq-1 (list c3 c3 a#3 g3 c4 c3 c4 g3)) | ||
(define seq-1 (list c3 c3 a#3 g3 c4 c4 a#3 g3)) | ||
(define seq-1 (list c3 c3 c4 c4 a#3 g3)) | ||
(define seq-1 (list c4 c3 a#3 g3)) | ||
(define seq-1 (list c4 c3)) | ||
|
||
;; tune seq: | ||
(define seq-1 (list a4)) | ||
(define seq-1-pulse (list 127)) | ||
|
||
(define seq-1-pulse (list 127 127 127 127 127 127)) | ||
(define seq-1-pulse (list 127 127 127 127 127 127 127 127)) | ||
|
||
(define beats-per-measure 8) | ||
(define note-timing 1/2) | ||
|
||
(*metro* 'set-tempo 108) | ||
|
||
(define midi-loop | ||
(lambda (beat dur nlst plst) | ||
(mplay *midiout* | ||
(car nlst) | ||
(car plst) | ||
dur | ||
midi-chan-1) | ||
(if (null? (cdr nlst)) | ||
(callback (*metro* (+ beat (* 1 dur))) | ||
'midi-loop | ||
(+ beat dur) | ||
note-timing | ||
seq-1 | ||
seq-1-pulse) | ||
(callback (*metro* (+ beat (* 1 dur))) | ||
'midi-loop | ||
(+ beat dur) | ||
note-timing | ||
(cdr nlst) | ||
(cdr plst))))) | ||
|
||
(midi-loop (*metro* 'get-beat beats-per-measure) note-timing seq-1 seq-1-pulse) | ||
|
||
(define midi-loop | ||
(lambda (beat dur plist) #t)) | ||
|
||
(define cc-vals (list 0 10 20 30 40 50 60 70 80 100 120)) | ||
(define cc-vals (list 0.0 0.25 0.5 0.25 0.0)) | ||
|
||
(define general-volume 7) | ||
(define cutoff-filter-3 16) | ||
(define resonance-filter-3 17) | ||
(define cutoff-filter-2 18) | ||
(define resonance-filter-2 19) | ||
(define resonance-filter-1 71) | ||
(define release-time-env-1 72) | ||
(define attack-time-env-1 73) | ||
(define cutoff-filter-1 74) | ||
(define decay-time-env-1 75) | ||
(define rate-lfo-1 76) | ||
(define anount-fm-1-filter-1 77) | ||
(define sustain-level-env-1 79) | ||
(define attack-time-vca-1 80) | ||
(define decay-time-vca-1 81) | ||
(define sustain-level-vca-1 82) | ||
(define release-time-vca-1 83) | ||
(define vca-1-soft-clip 85) | ||
(define wet-level-delay 91) | ||
(define wel-level-chorous 93) | ||
|
||
(define cc-midi-chan-1 0) | ||
|
||
(define midi-cc-loop | ||
(lambda (beat cc plst) | ||
(mcc *midiout* | ||
cc | ||
(car plst) | ||
cc-midi-chan-1) | ||
(if (null? (cdr plst)) | ||
(callback (*metro* beat) | ||
'midi-cc-loop | ||
beat | ||
cc | ||
cc-vals) | ||
(callback (*metro* beat) | ||
'midi-cc-loop | ||
beat | ||
cc | ||
(cdr plst))))) | ||
|
||
(define cc cutoff-filter-1) | ||
(define cc resonance-filter-1) | ||
|
||
(define cc-beats-per-measure 12) | ||
|
||
(midi-cc-loop (*metro* 'get-beat cc-beats-per-measure) cc cc-vals) | ||
|
||
(send-midi-cc (now) *midiout* cc 15 cc-midi-chan-1) | ||
|
||
(define midi-cc-loop | ||
(lambda (beat cc plist) #t)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters