-
Notifications
You must be signed in to change notification settings - Fork 4
/
megra-load.megra
64 lines (49 loc) · 1.79 KB
/
megra-load.megra
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
(ql:quickload :incudine)
(ql:quickload :cm)
(require 'incudine)
(require 'cm)
(in-package :cm)
;; --------- PATHS TO SET ------------- ;;
;; path to megra package
(defparameter *megra-root* (concatenate 'string (sb-posix:getcwd) "/megra"))
;; sample root folder ... note trailing "/" !
(defparameter *sample-root* (concatenate 'string (sb-posix:getcwd) "/megra-samples/"))
;; sample type aka file extension - wav or flac !
;; (currently not possible to mix ...)
(defparameter *sample-type* "flac" )
;; the impulse response to use for the reverb (no file extension)
(defparameter *reverb-ir* "ir1" )
;; --------- END PATHS TO SET ------------- ;;
;; --------- INITIALIZATION --------------- ;;
(progn
;; start incudine, wait a little
(incudine:rt-start)
(sleep 1)
;; int midi io
;; (defvar *midiin* (midi-open-default :direction :input))
;;(defvar *midiout* (midi-open-default :direction :output))
;; port to supercollider
(defvar *oscout* (osc:open :host "127.0.0.1"
:port 57110 ;; <-- change this if you have scsynth running on another port
:direction :output
:latency 0))
;; misc cm-stuff ...
;;(setf *out* (cm::new cm::incudine-stream))
;;(setf *rts-out* *out*)
;; log level
(setf (incudine::logger-level) :error))
;; start recieving midi
;;(incudine::recv-start *midiin*))
;;(incudine::set-sharp-square-bracket-syntax)
;;(incudine::add-sharp-square-bracket-syntax)
;; now everything should be ready to load the megra package ...
(load (concatenate 'string *megra-root* "/megra-package.lisp"))
(in-package :megra)
;; init group one if scsynth started from command line
;; (scsynth need to be started manually still)
(init-sc-base-group)
;; load ir data for reverb (contains hardcoded stuff)
(prepare-ir)
(init-2ch-rev)
(init-2ch-echo)
(init-2ch-echorev)