Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 146 lines (83 sloc) 3.594 kb
6f84689 starting to work on a full overtone integration
Jon Vlachoyiannis authored
1 Update
2 ------
3 Why use M.A.D?
4
5 Making electronic music with visualizations?
6 No, making music on the fly.
7 No, making music that makes sense, on the fly.
8
9 So, you need to be able to do live programming.
10 That means:
11 1. You can define ALL music notes, signs, tempos
12 2. You can run/play a pattern (phrase) in a loop for 'debugging'
13 3. You can combine multiple phrases into a 'conversation'
14 4. There has to be a sync for theses phrases
15
16 It would be fun if I could load only chiptunes for default.
17
18 # Language specification 0.8 #
19 M.A.D (music-as-data) tries to extend the Lisp philosophy that code -> is data -> is code, to music.
20 That means that notes are data (frequencies) but are also code (their placement creates complex structures).
21 Using a Lisp language (Clojure) we can manipulate music structures, make genetic music and release our creative minds.
22
23 This specification defines the core elements of the language.
24
25 # Timing #
26 The main thing we have to understand is timing.
27 (play! [A3 B4 C4#])
28
29 # Notes #
30 A1 means note A, octave 1. If you want to get more technical, this means 440Hz.
31
32 # Core functions
33
34
35 # Effects #
36
37 # Misc
38
39
40
41
42 Play a sample or note like this:
43 (play! [kick])
44
45 Play two samples (or notes):
46 (play! [kick kick])
47
48 Each sample is being played at one time.
49
50
51 If you want to play a sample at the same time:
52 (play! [kick (+snare hihat)])
53
54 This will play kick at one time and snare+hihat at another.
55
56 You can also play triplets:
57 (play! [kick [snare snare snare]])
58
59 Now kick will be at one time and for the same duration, you'll have three snare hits.
60
61
62 Of course you can play notes:
63 (play! [A4 B4 D#5])
64
65 Mix, notes and samples:
66 (play! [hihat A4 kick G6])
67
68
69 The fun begins when you understand that you can manipulate music as data by apply tranformations.
70 For example:
71
72 (p (reverse (pattern [kick kick])))
73
74
75 Now, instead of using play! (which plays samples in a loop - perfect for building stuff on the fly)
76 you can create a pattern and then run it only for once using the p function.
77 The advantage is that you can manipulate data and their properties thus mess around with note frequences,
78 tempo, scaling whatever.
79
80
81 # How to use #
82 First, build the project (see Building). Some examples are included and I would be happy to include any of yours.
83 If you don't use emacs, you can try this one:
84
85 lein compile
86 lein repl
87 clj=> (require 'music-as-data.core)
88 clj=> (in-ns 'music-as-data.core)
89
90 and keep reading after the emacs block.
91
92 If you use emacs, start your repl (lein swank) and go to core.clj .
93 Go inside emacs, run slime-connect, go to the core namespace, select everything and press CTRL+C, CTRL+R to compile the selection.
94
95 After you have access to a REPL you are ready to go! Just run:
96
97 (start main)
98
99 Don't close the window that will pop-up. This is the processing window (so you can have graphics too!).
100 After that, run
101
102 (create-notes)
103
104 and you are ready to start playing!
105
106 (p (pattern [A4 A2]))
107
108 (p (pattern [kick snare (+ hihat snare)]))
109
110 You can have it playing on a loop by executing:
111 (keep-looping)
112
113 and then:
114
115 (play! [A4])
116 (play! [C5])
117
118 In order to play a pause, you can play the _ note:
119
120 (play! [A4 _ A4])
121
122
123 # Building #
124
125 lein deps
126
127
128 # Authors #
129
130 Designed and developed by Jon Vlachoyiannis (http://jon.is.emotionull.com).
131
132 # Thanks #
133
134 @mar_nas (for the incredible site mad.emotionull.com)
135
136 https://github.com/rosado (for clj-processing)
137
138 http://processing.org ('cause it rocks)
139
140 http://code.compartmental.net/tools/minim/ (for the AWESOME sound system)
141
142 zero (for how to use it without emacs)
143
144
145
Something went wrong with that request. Please try again.