Skip to content

Commit

Permalink
Play from a file.
Browse files Browse the repository at this point in the history
  • Loading branch information
ssrihari committed Apr 11, 2015
1 parent e9ca959 commit 2a1413d
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 3 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ Not sure what this is meant to do yet.
(play-string (:bilahari d/janyas)
"s,,r g,p, d,s., n,d, p,dp mgrs rs .n .d s,,,
s,,r g,p, m,,g p,d, r.,,s. n,d, p,,m g,r,")

(play-file (:mohana d/janyas)
"mohana-varnam.txt")
```

## License
Expand Down
32 changes: 32 additions & 0 deletions resources/mohana-varnam.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
g,g, r,,, ssrr ggrr
srgr srs .d srgp grsr
gpgg rsrg rrs .d srgr
gpgp dpds. ddpg dpgr

g,g, p,,, ggpp ddp,
ds.dd pgdp dgdp grsr

ggpp dpds. ds.r.s. g.r.,s.
ds.r.s., dpd s.d,p grsr

g,rg rsr, srsg rgsr
s .dsr grgp gpd, p,,,
gpdp ds.r.g. r.,g.s. ,r.d,
s.p,d s.r.g.s., dp, grsr

g,g, gpgr rgpg p,,,
ggdd p,gg dpgp grsr

g,,, r,s, r,,, .d,,,
r, .d, s,,, r,,, g,r,

g,gr grsr g,g .p .d .dsr
g,gg dpgr g,gs. dpgr

p,dd p,gr s,rg r,s .d
s,rg p,d, s.s.,d p,gr

s.,r.g. r.s.r.s. ds.dp grsr
s,,, ,,ss rrgg ppdd
s.r.g.r. g.r.ds. r.s.r.s. pds.d
s.dgp dpdp r.s.dp grsr
16 changes: 13 additions & 3 deletions src/movertone/core.clj
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
(ns movertone.core
(:require [overtone.live :as olive]
(:require [clojure.java.io :as io]
[clojure.string :as s]
[overtone.live :as olive]
[overtone.inst.piano :as piano]
[movertone.violin :as violin]
[movertone.beep :as beep]
Expand Down Expand Up @@ -59,10 +61,15 @@
(play-phrase
(string->phrase raga string)))

(defn play-file [raga filename]
(play-string raga
(-> filename io/resource slurp (s/replace #"\n" ""))))

(comment

(:ragavardhini d/melakarthas)
> {:arohanam [:s :r3 :g3 :m1 :p :d1 :n2 :s.], :avarohanam (:s. :n2 :d1 :p :m1 :g3 :r3 :s)}
> {:arohanam [:s :r3 :g3 :m1 :p :d1 :n2 :s.],
:avarohanam (:s. :n2 :d1 :p :m1 :g3 :r3 :s)}

(play-arohanam-and-avarohanam (:hanumatodi d/melakarthas))

Expand All @@ -80,4 +87,7 @@

(play-string (:bilahari d/janyas)
"s,,r g,p, d,s., n,d, p,dp mgrs rs .n .d s,,,
s,,r g,p, m,,g p,d, r.,,s. n,d, p,,m g,r,"))
s,,r g,p, m,,g p,d, r.,,s. n,d, p,,m g,r,")

(play-file (:mohana d/janyas)
"mohana-varnam.txt"))

0 comments on commit 2a1413d

Please sign in to comment.