Hi Geoff, Thanks for taking an interest. :-)
The first thing I would recommend on getting a Clojure environment set up is to install Leiningen <https://github.com/technomancy/leiningen>. That's the most popular Clojure build tool, and it will take care of things like managing the Java classpath and starting up a repl for you. Once you have done that, I'd recommend getting some music playing from the repl before you worry about editor integration. First, get into the directory, download the dependencies and start a repl session: cd functional-composition lein deps lein repl Then you can switch to the namespace and try and play something: (in-ns 'goldberg.variations.canone-alla-quarta) (beep) If you hear a sound, great! You can play anything in that file. For example, you can copy and paste this into the repl: (->> melody canone-alla-quarta (concat bass) (where :pitch (comp G major)) (where :time (bpm 90)) play graph) When I'm playing around with music, I use Vim to execute pieces of code directly. All of the parts in the file where there is a (comment ...) form are there so that when I load the file the music doesn't go off immediately, but so that I can play them at my leisure. Once you get the music going from the repl, I'm sure there will be plenty of people who can help you get your Emacs singing. Cheers, Chris On 3 August 2013 22:47, Geoffrey Knauth <[email protected]> wrote: > I'm fairly new to Clojure. At LambdaJam I saw Chris Ford give a great > demo of functional composition [music]. I want to show my 16-yo the same > code working, since he's really doing well with Racket (and Gregor > Kiczales' MOOC via UBC) and loving it, and he loves music and music > composition too. > > Chris Ford posted his code here: > https://github.com/ctford/functional-composition/tree/LambdaJam-2013 > > My directory structure looks like this: > ~/test/github/lj2013/chris-ford/ > functional-composition/ > ... > functional-composition/src/jazz/standards/in_the_mood.clj > ... > leipzig/ > overtone/ > whelmed/ > > I've installed Clojure and Leiningen. I'm in Emacs and have clojure-mode > and nrepl. I'm trying to figure out how to get things going. I typed M-x > nrepl-jack-in in Emacs and got a REPL. I'm sure my classpath is not set > up right; I'm not sure how to do that. I think .clj files need to be > compiled. I'm not sure how to make that happen. > > How should I organize these files to get things to work? > > There is an Emacs-Live setup for Overtone+Emacs but when I tried that it > completely moved my ~/.emacs aside and I'm not sure that's what I want, > since I use Emacs for many many things that are not in Emacs-Live's setup. > > Geoff > > -- > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to [email protected] > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
