Skip to content

Commit

Permalink
using m.a.d without emacs and minor readme changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Vlachoyiannis committed Mar 15, 2011
1 parent d0e0b95 commit 1a86a85
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 9 deletions.
20 changes: 17 additions & 3 deletions README.markdown
Expand Up @@ -53,10 +53,19 @@ tempo, scaling whatever.


# How to use # # How to use #
First, build the project (see Building). Some examples are included and I would be happy to include any of yours. First, build the project (see Building). Some examples are included and I would be happy to include any of yours.
Also, you must use emacs (at least until someone sends me alternative ways of starting and using the REPL). If you don't use emacs, you can try this one:


Then, start your repl (lein swank) and go to core.clj . lein compile
Go inside emacs, run slime-connect, go to the core namespace, select everything and press CTRL+C, CTRL+R to compile the selection. After that, you have a REPL with libraries included and system are ready to go! Just run: lein repl
clj=> (require 'music-as-data.core)
clj=> (in-ns 'music-as-data.core)

and keep reading after the emacs block.

If you use emacs, start your repl (lein swank) and go to core.clj .
Go inside emacs, run slime-connect, go to the core namespace, select everything and press CTRL+C, CTRL+R to compile the selection.

After you have access to a REPL you are ready to go! Just run:


(start main) (start main)


Expand All @@ -79,6 +88,10 @@ and then:
(play! [A4]) (play! [A4])
(play! [C5]) (play! [C5])


In order to play a pause, you can play the _ note:

(play! [A4 _ A4])



# Building # # Building #


Expand All @@ -99,3 +112,4 @@ http://processing.org ('cause it rocks)


http://code.compartmental.net/tools/minim/ (for the AWESOME sound system) http://code.compartmental.net/tools/minim/ (for the AWESOME sound system)


zero (for how to use it without emacs)
14 changes: 8 additions & 6 deletions src/music_as_data/core.clj
Expand Up @@ -39,19 +39,21 @@




;; Run this AFTER you have started the system ;; Run this AFTER you have started the system
;; using (start main) ;; using
(start main)


;; Create notes and load samples ;; Create notes and load samples
;; after system started ;; after system started


;;(create-notes) (create-notes)


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

(p (pattern [A4])))


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

0 comments on commit 1a86a85

Please sign in to comment.