Skip to content

Instantly share code, notes, and snippets.

@kindohm
Created June 29, 2017 17:20
Show Gist options
  • Save kindohm/500f223542866e6c075d78057e03c7de to your computer and use it in GitHub Desktop.
Save kindohm/500f223542866e6c075d78057e03c7de to your computer and use it in GitHub Desktop.
import Sound.Tidal.Vis
import qualified Graphics.Rendering.Cairo as C
import Data.Colour
import Data.Colour.Names
import Data.Colour.SRGB
import System.Cmd
-- 1.640625 ratio
-- 2400 / 1462
do
let vis name pat = do vLines (C.withSVGSurface) (name ++ ".svg") (2400,1462) pat 16 1
rawSystem "/home/kindohm/tidal-vis-edges.pl" [name ++ ".svg"]
rawSystem "convert" [name ++ ".svg", name ++ ".pdf"]
return ()
vis "blart" ( superimpose (foldEvery [2,3] (0.25 <~) .
foldEvery [3,4] (density 2)) $
stack [
degradeBy 0.6 $ (0.25 <~) $ "~ [~ lime ~] ~",
"[white [[lightgrey grey? white white]/3 ~ white]/2 lightgrey]",
every 2 (density 2) $ "[grey? lightgrey]/2 white [white grey?]/2 [white]/3",
every 3 (rev) $ "white white [[grey? lightgrey?]/2 white] lightgrey"])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment