title: Structuring Overtone project
body: <p>I'm just getting started with Overtone, but I want to keep things somewhat organised from the start.</p>
  
  <p><em><strong><code>project.clj:</code></em></strong></p>
  
  <pre><code>(defproject overtone-sketchbook "0.1.0-SNAPSHOT"
    :dependencies [[org.clojure/clojure "1.5.1"]
                   [overtone "0.9.1"]])
  </code></pre>
  
  <p><em><strong><code>src/overtone_sketchbook/synths.clj:</code></em></strong></p>
  
  <pre><code>(ns overtone-sketchbook.synths
    (:use [overtone.live]))
  
  (definst pluck-saw [f 800 d 3]
           (* (saw (+ 100 (* 200 (saw d))))
              (pluck (* (white-noise)
                        (env-gen (perc 0.001 2) :action FREE))
                     1 3 (/ 1 f))))
  </code></pre>
  
  <h3><em>REPL session 1:</em></h3>
  
  <pre><code>&gt; lein repl
  nREPL server started on port 52425
  REPL-y 0.2.0
  Clojure 1.5.1
      Docs: (doc function-name-here)
            (find-doc "part-of-name-here")
    Source: (source function-name-here)
   Javadoc: (javadoc java-object-or-class-here)
      Exit: Control+D or (exit) or (quit)
  
  user=&gt; (use 'overtone.live)
  --&gt; Loading Overtone...
    ********************************************************** 
         WARNING: JVM argument TieredStopAtLevel=1 is active, and may 
         lead to reduced performance. This happens to currently be the 
         default lein setting:
  
         https://github.com/technomancy/leiningen/pull/1230
  
         If you didn't intend this JVM arg to be specified, you can turn 
         it off in your project.clj file or your global 
         ~/.lein/profiles.clj file by adding the key-val
  
         :jvm-opts ^:replace [] 
         ********************************************************** 
  --&gt; Booting internal SuperCollider server...
  Found 0 LADSPA plugins
  *** ERROR: open directory failed '/Users/ilya/Library/Application Support/SuperCollider/synthdefs'
  Number of Devices: 2
     0 : "Built-in Input"
     1 : "Built-in Output"
  
  "Built-in Input" Input Device
     Streams: 1
        0  channels 2
  
  "Built-in Output" Output Device
     Streams: 1
        0  channels 2
  
  SC_AudioDriver: sample rate = 44100.000000, driver's block size = 512
  --&gt; Connecting to internal SuperCollider server...
  --&gt; Connection established
  
      _____                 __
     / __  /_  _____  _____/ /_____  ____  ___
    / / / / | / / _ \/ ___/ __/ __ \/ __ \/ _ \
   / /_/ /| |/ /  __/ /  / /_/ /_/ / / / /  __/
   \____/ |___/\___/_/   \__/\____/_/ /_/\___/
  
     Collaborative Programmable Music. v0.9.1
  
  
  Hey Ilya, I feel something magical is only just beyond the horizon...
  
  nil
  user=&gt; (demo overtone-sketchbook.synths/pluck-saw)
  
  IllegalArgumentException Don't know how to create ISeq from: clojure.lang.Symbol  clojure.lang.RT.seqFrom (RT.java:505)
  user=&gt; (use 'overtone-sketchbook.synths)
  nil
  user=&gt; (demo overtone-sketchbook.synths/pluck-saw)
  
  IllegalArgumentException Don't know how to create ISeq from: clojure.lang.Symbol  clojure.lang.RT.seqFrom (RT.java:505)
  user=&gt; (demo pluck-saw)
  
  IllegalArgumentException Don't know how to create ISeq from: clojure.lang.Symbol  clojure.lang.RT.seqFrom (RT.java:505)
  user=&gt; (require 'overtone-sketchbook.synths)
  nil
  user=&gt; (demo pluck-saw)
  
  IllegalArgumentException Don't know how to create ISeq from: clojure.lang.Symbol  clojure.lang.RT.seqFrom (RT.java:505)
  user=&gt; (demo overtone-sketchbook.synths/pluck-saw)
  
  IllegalArgumentException Don't know how to create ISeq from: clojure.lang.Symbol  clojure.lang.RT.seqFrom (RT.java:505)
  user=&gt; Bye for now!
  </code></pre>
  
  <h3><em>REPL session 2:</em></h3>
  
  <pre><code>&gt; lein repl
  nREPL server started on port 52100
  REPL-y 0.2.0
  Clojure 1.5.1
      Docs: (doc function-name-here)
            (find-doc "part-of-name-here")
    Source: (source function-name-here)
   Javadoc: (javadoc java-object-or-class-here)
      Exit: Control+D or (exit) or (quit)
  
  user=&gt; (use 'overtone-sketchbook.synths)
  --&gt; Loading Overtone...
    ********************************************************** 
         WARNING: JVM argument TieredStopAtLevel=1 is active, and may 
         lead to reduced performance. This happens to currently be the 
         default lein setting:
  
         https://github.com/technomancy/leiningen/pull/1230
  
         If you didn't intend this JVM arg to be specified, you can turn 
         it off in your project.clj file or your global 
         ~/.lein/profiles.clj file by adding the key-val
  
         :jvm-opts ^:replace [] 
         ********************************************************** 
  --&gt; Booting internal SuperCollider server...
  Found 0 LADSPA plugins
  *** ERROR: open directory failed '/Users/ilya/Library/Application Support/SuperCollider/synthdefs'
  Number of Devices: 2
     0 : "Built-in Input"
     1 : "Built-in Output"
  
  "Built-in Input" Input Device
     Streams: 1
        0  channels 2
  
  "Built-in Output" Output Device
     Streams: 1
        0  channels 2
  
  SC_AudioDriver: sample rate = 44100.000000, driver's block size = 512
  --&gt; Connecting to internal SuperCollider server...
  --&gt; Connection established
  
      _____                 __
     / __  /_  _____  _____/ /_____  ____  ___
    / / / / | / / _ \/ ___/ __/ __ \/ __ \/ _ \
   / /_/ /| |/ /  __/ /  / /_/ /_/ / / / /  __/
   \____/ |___/\___/_/   \__/\____/_/ /_/\___/
  
     Collaborative Programmable Music. v0.9.1
  
  
  Hello Ilya, may algorithmic beauty pour forth from your fingertips today.
  
  nil
  user=&gt; pluck-saw
  #overtone.studio.inst.Inst{:name "pluck-saw", :params ({:value #&lt;Atom@24fc9cde: 800.0&gt;, :name "f", :default 800.0, :rate :kr} {:value #&lt;Atom@449ec5ca: 3.0&gt;, :name "d", :default 3.0, :rate :kr}), :args ("f" "d"), :sdef {:name "overtone-sketchboo96d/pluck-saw", :constants [0.0 0 2.0 3.0 0.5 1.0 50.0 100.0 200.0 1 2 -99 -4 5 0.001], :params (800.0 3.0), :pnames ({:name "f", :index 0} {:name "d", :index 1}), :ugens ({:n-inputs 0, :args nil, :outputs ({:rate 1} {:rate 1}), :name "Control", :rate 1, :n-outputs 2, :rate-name :kr, :inputs (), :special 0, :id 280} #&lt;sc-ugen: saw:ar [1]&gt; #&lt;sc-ugen: binary-op-u-gen:ar [2]&gt; #&lt;sc-ugen: binary-op-u-gen:ar [3]&gt; #&lt;sc-ugen: saw:ar [4]&gt; #&lt;sc-ugen: white-noise:ar [0]&gt; #&lt;sc-ugen: env-gen:kr [0]&gt; #&lt;sc-ugen: binary-op-u-gen:ar [2]&gt; #&lt;sc-ugen: binary-op-u-gen:kr [1]&gt; #&lt;sc-ugen: pluck:ar [5]&gt; #&lt;sc-ugen: binary-op-u-gen:ar [11]&gt; #&lt;sc-ugen: out:ar [12]&gt;)}, :group #&lt;synth-group[live]: Inst pluck-saw Container 31&gt;, :instance-group #&lt;synth-group[live]: Inst pluck-saw 32&gt;, :fx-group #&lt;synth-group[live]: Inst pluck-saw FX 33&gt;, :mixer #&lt;synth-node[live]: overtone.stu547/mono-inst-mixer 34&gt;, :bus #&lt;audio-bus: No Name, mono, id 50&gt;, :fx-chain [], :volume #&lt;Atom@6e9cebcc: 1.0&gt;, :pan #&lt;Atom@3cd6d0: 0.0&gt;, :n-chans 1}
  user=&gt; (demo pluck-saw)
  
  CompilerException java.lang.RuntimeException: Unable to resolve symbol: demo in this context, compiling:(NO_SOURCE_PATH:1:1) 
  user=&gt; (overtone.live/demo pluck-saw)
  
  IllegalArgumentException Don't know how to create ISeq from: clojure.lang.Symbol  clojure.lang.RT.seqFrom (RT.java:505)
  user=&gt; Bye for now!
  </code></pre>
  
  <p>Am I missing something very basic?</p>