Skip to content

Commit

Permalink
documentation - phase 0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Vlachoyiannis committed Mar 10, 2011
1 parent bf41b00 commit 17fdf92
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 9 deletions.
33 changes: 32 additions & 1 deletion README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ samples.

You can see (and hear) examples at http://mad.emotionull.com

The documentation still lacks a lot of stuff but I am working on it.
The documentation still lacks a lot of stuff, so this is NOT for the faint-hearted.

# Example #

Expand Down Expand Up @@ -51,6 +51,37 @@ The advantage is that you can manipulate data and their properties thus mess aro
tempo, scaling whatever.


# How to use #
First of all, don't run lein deps. All libraries and samples are included (bad bad bad).
Change the globals.clj into the path where samples are (so you can have drum sets).

Then, start your repl (lein swank) and go to core.clj.

Compile core.clj and

(start main)

Don't close the window that will pop-up. This is the processing window (so you can have graphics too!).
After that, run

(create-notes)

and you are ready to start playing!


(p (pattern [A4 A2]))

(p (pattern [kick snare (+ hihat snare)]))

You can have it playing on a loop by executing:
(keep-looping)

and then:

(play! [A4])
(play! [C5])


# Building #
Still cleaning up the repository from deps, so some jars might not be inside project.clj yet.

Expand Down
22 changes: 14 additions & 8 deletions src/music_as_data/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,20 @@
(stop applet))


;; Create notes and load samples
;; Run this AFTER you have started the system
;; using (start main)

;; Create notes and load samples
;; after system started
(create-notes)

(defsample kick "KickDrums1/kickdrum6.wav")
(defsample kick2 "KickDrums4/kickdrum154.wav")
(defsample snare "SnareDrums1/snaredrum2.wav")
(defsample snare2 "DistortedSnares2/distortedsnare52.wav")
(defsample hihat "HiHats1/hihat2.wav")
;;(create-notes)

;;(defsample kick "KickDrums1/kickdrum6.wav")
;;(defsample kick2 "KickDrums4/kickdrum154.wav")
;;(defsample snare "SnareDrums1/snaredrum2.wav")
;;(defsample snare2 "DistortedSnares2/distortedsnare52.wav")
;;(defsample hihat "HiHats1/hihat2.wav")

(keep-looping)
;;(p (pattern (A4)))
;;(play! [A4 B4])
;;(keep-looping)

0 comments on commit 17fdf92

Please sign in to comment.