File tree 1 file changed +8
-4
lines changed
1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 20
20
'[alda.parser :refer (parse-input )]
21
21
'[alda.repl])
22
22
23
- (def +version+ " 0.2.0 " )
23
+ (def +version+ " 0.2.1 " )
24
24
(bootlaces! +version+)
25
25
26
26
(task-options!
86
86
P post-buffer MS int " The number of milliseconds to keep the synth open after the score ends. (default: 1000)"
87
87
s stock bool " Use the default MIDI soundfont of your JVM, instead of FluidR3." ]
88
88
(require '[alda.lisp]
89
- '[alda.sound])
89
+ '[alda.sound]
90
+ '[instaparse.core])
90
91
(binding [alda.sound.midi/*midi-soundfont* (when-not stock (fluid-r3! ))
91
92
alda.sound/*play-opts* {:pre-buffer (or pre-buffer 0 )
92
93
:post-buffer (or post-buffer 1000 )
93
94
:one-off? true }]
94
- (alda.sound/play! (eval (parse-input (if code code (slurp file)))))
95
- identity))
95
+ (let [parsed (parse-input (if code code (slurp file)))]
96
+ (if (instaparse.core/failure? parsed)
97
+ (prn parsed)
98
+ (alda.sound/play! (eval parsed)))
99
+ identity)))
96
100
97
101
(deftask alda-repl
98
102
" Starts an Alda Read-Evaluate-Play-Loop."
You can’t perform that action at this time.
0 commit comments