Workshop @ TriClojure, 1/25/18
https://github.com/alda-lang/alda
@dave_yarwood
Programming Music With Alda and Clojure
Here's the plan:
-
Background on Alda
-
Installation and Setup
-
Using the Alda REPL
-
Writing a Score
-
Features
-
Alda + Clojure
(that's me!)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>HTML</title>
</head>
<body>
<div class="sort-of-important">
<p>I'm a paragraph!</p>
</div>
</body>
</html>
(defn fibonacci [n]
"Compute the nth Fibonacci number."
(case n
0 1
1 1
(+ (fibonacci (- n 1)) (fibonacci (- n 2)))))
abc
X:1
T:The Legacy Jig
M:6/8
L:1/8
R:jig
K:G
GFG BAB | gfg gab | GFG BAB | d2A AFD |
GFG BAB | gfg gab | age edB |1 dBA AFD :|2 dBA ABd |:
efe edB | dBA ABd | efe edB | gdB ABd |
efe edB | d2d def | gfe edB |1 dBA ABd :|2 dBA AFD |]
\score {
\new Staff {
\key d \major
\numericTimeSignature
\time 2/4
<cs' d'' b''>16 <cs' d'' b''>8.
~
<cs' d'' b''>8 [ <b d'' a''> ]
}
}
LilyPond
#timebase 480
#title "The M.GAKKOU KOUKA"
#copyright "Music Composed by Kenkichi Motoi 2009 Wikimedia version 2012"
A t160
A o3l4 V12
A @1 ed8ce8 gg8er8 aa8>c<a8 g2r
A aa8ga8 >cc8d<r8 ee8de8 c2r
A dd8dd8 dd8dr8 ed8ef8 g2r
A aa8ga8 >cc8<ar8 >dc8de8 d2<r
A >ee8dc8< ab8>cc8< gg8ea8 g2r
A >cc8<ge8 cd8ea8 gg8de8 c2r
Music Macro Language (MML)
Installation and Setup
-
Prerequisite: Java 8+
-
java -version
-
-
chmod +x alda && mv alda /usr/local/bin
-
Windows: see github.com/alda-lang/alda#windows
-
- Recommended: install FluidR3 soundfont for better instrument quality
- Editor plugins available for Vim, Emacs, Sublime Text, Atom, and Eclipse
The Alda REPL
Writing a Score
Exercise: Amateur Orchestra
Exercise: Amateur Orchestra
piano, harpsichord, clavinet, celeste, glockenspiel, music-box, vibraphone, marimba, xylophone, dulcimer, organ, accordion, harmonica, violin, viola, cello, double-bass, harp, timpani, trumpet, trombone, tuba, french-horn, soprano-sax, alto-sax, tenor-sax, bari-sax, oboe, english-horn, bassoon, clarinet, piccolo, flute, recorder, square-wave, saw-wave, sitar, koto, banjo, bagpipes, steel-drums
Exercise: Amateur Orchestra
o1: tuba, contrabassoon (bassoon)
o2: tuba, bassoon, double-bass, cello
o3: trombone, cello, bassoon, bari-sax
o4: french-horn, trombone, trumpet, bassoon, english-horn, alto-sax, tenor-sax, viola
o5: clarinet, flute, oboe, soprano-sax, violin
o6: clarinet, flute, oboe, violin
o7: piccolo, violin
Exercise: Amateur Orchestra
cello:
(tempo! 30)
o3 c1
Features
+
Alda
Clojure
Programming Music with Alda and Clojure
By Dave Yarwood
Programming Music with Alda and Clojure
Slides for Alda workshop at TriClojure meetup, 1/25/18
- 1,264