Giter Site home page Giter Site logo

boots-n-cats's Introduction

# boots-n-cats - Techno, clojure style.
# See the blog at: http://eng.wealthfront.com/2012/02/boots-n-cats-every-techno-song-ever-in.html

$ lein new boots-and-cats
$ cd boots-and-cats

Then edit the <b>project.clj</b> file to contain:

(defproject boots-and-cats "1.0"
  :dependencies [[org.clojure/clojure "1.3.0"]
                 [overtone "0.6.0"]])

$ lein deps # Note: this downloads the entire internet.
$ lein repl
REPL started; server listening on localhost port 48182
user=> (use 'overtone.live)
[... prints a bunch of stuff talking about your audio system ...]
          _____                 __
         / __  /_  _____  _____/ /_____  ____  ___
        / / / / | / / _ \/ ___/ __/ __ \/ __ \/ _ \
       / /_/ /| |/ /  __/ /  / /_/ /_/ / / / /  __/
       \____/ |___/\___/_/   \__/\____/_/ /_/\___/


                          Programmable Music. v0.6
[...]
user=> (def boot (sample "boot.wav"))
#'user/boot
user=> (boot)
28
user=> (def cat (sample "cat.wav"))
#'user/cat
user=> (cat)
28
user=> (def boot-sample (load-sample "boot.wav"))
#'user/boot-sample
user=> (defsynth reverb-boot []
  (let [dry (play-buf 1 boot-sample)
        wet (free-verb dry 0.6)]
      (out 0 [wet dry])))
#<synth: reverb-boot>
user=> (reverb-boot)
28
user=> (def cat-sample (load-sample "cat.wav"))
#'user/cat-sample
user=> (defsynth reverb-cat []
  (let [dry (play-buf 1 cat-sample)
        wet (free-verb dry 0.6)]
    (out 0 [dry wet])))
#<synth: reverb-cat>
user=> (reverb-cat)
user=> (def bees (sample "bees.wav"))
#'user/bees
user=> (def kneehigh (sample "kneehigh.wav"))
#'user/kneehigh
user=> (def metro (metronome 60))
#'user/metro
user=> (defn player [beat]
  (at (metro beat) (reverb-boot))
  (at (metro (+ 0.5 beat)) (reverb-cat))
  (apply-at (metro (inc beat)) #'player (inc beat) []))
#'user/player
user=> (player (metro))
user=> (stop)

boots-n-cats's People

Contributors

hitch17 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.