JFugue wrapper for Clojure
Clojure
Pull request Compare This branch is 20 commits behind sebastiansen:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src/fughetta
test/fughetta/test
.gitignore
README.md
project.clj

README.md

fughetta

A JFugue wrapper for Clojure with some ideas from Haskore

Notes, durations and chords as functions

  • Defaults
  (cs) => "[61]" = "C#"   
  (q-) => "Rq."
  • Octave
  (c 6) => "[72]" = "C6"
  • Durations
  (c 6 q i) = (i (q (c 6))) => "[72]qi"
  • Chords
  (maj (q (c))) => "[60]majq"
  (min* (d 6 w)) => "[74]minw"

Instruments and rhythms

  • Instruments
  (inst :distortion-guitar (c) (d) (e)) => "I[DISTORTION_GUITAR] [60] [62] [64]"
  • Rhythms
  (let [x "q"
        - "Rq"]
    (rhythm
      :bass-drum      [x - - - x - - - x - - - x - - -]
      :electric-snare [- - x - - - x - - - x - - - x -]
      :closed-hi-hat  [x x x x x x x x x x x x x x x x]))

Combining Notes

  (++ (c) (d) (e)) => "[60]+[62]+[64]"
  (++ (c) (-- (d) (e))) => "[60]+[62]_[64]"

Patterns

Use the pattern function to join notes as well as patterns

  (pattern 
    (inst :distortion-guitar (c) (d) (e))
    (pattern (c) (d) (e)))
  => " I[DISTORTION_GUITAR] [60] [62] [64]   [60] [62] [64]  "

Tempo

  (tempo 150 (pattern (c) (d) (e)))

Player

  • Play
  (play! (c) (d 5) (e 5 q))
  • Stop
  (stop!)
  • Save to file
  (save! "filename" (c) (d 5) (e 5 q))

More to come...

JFugue

More information on JFugue can be found here

License

Copyright (C) 2011 Sebastian Rojas

Distributed under the GNU Lesser General Public License, the same as JFugue.