Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get ready for 1.0.0 #40

Merged
merged 1 commit into from
Dec 16, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Get ready for 1.0.0
  • Loading branch information
yaxu authored Dec 8, 2018
commit 94fc2d1005dcbbc6d64b34e592f7471282aea364
72 changes: 47 additions & 25 deletions lib/BootTidal.hs
Original file line number Diff line number Diff line change
@@ -1,32 +1,54 @@
:set -XOverloadedStrings
:set prompt ""
:module Sound.Tidal.Context
:set prompt-cont ""

(cps, nudger, getNow) <- cpsUtils'
import Sound.Tidal.Context

(c1,ct1) <- dirtSetters getNow
(c2,ct2) <- dirtSetters getNow
(c3,ct3) <- dirtSetters getNow
(c4,ct4) <- dirtSetters getNow
(c5,ct5) <- dirtSetters getNow
(c6,ct6) <- dirtSetters getNow
(c7,ct7) <- dirtSetters getNow
(c8,ct8) <- dirtSetters getNow
(c9,ct9) <- dirtSetters getNow
-- total latency = oLatency + cFrameTimespan
tidal <- startTidal (superdirtTarget {oLatency = 0.1, oAddress = "127.0.0.1", oPort = 57120}) (defaultConfig {cFrameTimespan = 1/20})

(d1,t1) <- superDirtSetters getNow
(d2,t2) <- superDirtSetters getNow
(d3,t3) <- superDirtSetters getNow
(d4,t4) <- superDirtSetters getNow
(d5,t5) <- superDirtSetters getNow
(d6,t6) <- superDirtSetters getNow
(d7,t7) <- superDirtSetters getNow
(d8,t8) <- superDirtSetters getNow
(d9,t9) <- superDirtSetters getNow


let bps x = cps (x/2)
let hush = mapM_ ($ silence) [d1,d2,d3,d4,d5,d6,d7,d8,d9,c1,c2,c3,c4,c5,c6,c7,c8,c9]
let solo = (>>) hush
let p = streamReplace tidal
let hush = streamHush tidal
let list = streamList tidal
let mute = streamMute tidal
let unmute = streamUnmute tidal
let solo = streamSolo tidal
let unsolo = streamUnsolo tidal
let once = streamOnce tidal False
let asap = streamOnce tidal True
let nudgeAll = streamNudgeAll tidal
let setcps = asap . cps
let xfade = transition tidal (Sound.Tidal.Transition.xfadeIn 4)
let xfadeIn t = transition tidal (Sound.Tidal.Transition.xfadeIn t)
let histpan t = transition tidal (Sound.Tidal.Transition.histpan t)
let wait t = transition tidal (Sound.Tidal.Transition.wait t)
let waitT f t = transition tidal (Sound.Tidal.Transition.waitT f t)
let jump = transition tidal (Sound.Tidal.Transition.jump)
let jumpIn t = transition tidal (Sound.Tidal.Transition.jumpIn t)
let jumpIn' t = transition tidal (Sound.Tidal.Transition.jumpIn' t)
let jumpMod t = transition tidal (Sound.Tidal.Transition.jumpMod t)
let mortal lifespan release = transition tidal (Sound.Tidal.Transition.mortal lifespan release)
let interpolate = transition tidal (Sound.Tidal.Transition.interpolate)
let interpolateIn t = transition tidal (Sound.Tidal.Transition.interpolateIn t)
let clutch = transition tidal (Sound.Tidal.Transition.clutch)
let clutchIn t = transition tidal (Sound.Tidal.Transition.clutchIn t)
let anticipate = transition tidal (Sound.Tidal.Transition.anticipate)
let anticipateIn t = transition tidal (Sound.Tidal.Transition.anticipateIn t)
let d1 = p "1"
let d2 = p "2"
let d3 = p "3"
let d4 = p "4"
let d5 = p "5"
let d6 = p "6"
let d7 = p "7"
let d8 = p "8"
let d9 = p "9"
let d10 = p "10"
let d11 = p "11"
let d12 = p "12"
let d13 = p "13"
let d14 = p "14"
let d15 = p "15"
let d16 = p "16"

:set prompt "tidal> "