Patterns

Ellen Harlizius-Klück asked me for some greyscale images that she could try to weave while visiting Textiles Zentrum Haslach.

Here’s my first go, along with the tidal code used to generate each one. I think the last one is my favourite.

testa

((flip darken) <$> (every 7 (iter 4) $ every 2 (0.5 <~) $ every 5 rev
 $ slowspread ($) [rev, density 2, slow 3, (0.25 <~)] "[black ~ grey ~, white darkgrey grey]") <*> ((+) <$> slow 19 sine1 <*> slow 47 ((+0.1) . (*0.9) <$> sine1)))

testb

((flip darken) <$> (every 7 (iter 4) $ every 5 rev $ slowspread ($)
 [rev, density 2, slow 3, (0.25 <~)] "[black ~ grey ~, white darkgrey
 grey]") <*> ((*) <$> slow 45 sine1 <*> slow 46 sine1))

testc

((flip darken) <$> (every 5 rev $ slowspread ($) [rev, density 2, slow
 3] "{grey darkgrey grey, grey, black white [black ~ white] grey}") <*> ((*) <$> slow 37 rand <*> slow 45 sine1))

testd

((flip darken) <$> (superimpose (iter 8) $ every 4 (slow 3) $ every 3
(density 5) $ "[grey white black, lightgrey darkgrey]") <*> (slow 4
sine1))

Note that to reproduce any of these you’ll need a bit of wrapper code to generate them, e.g. for that last one:

import Sound.Tidal.Vis
import qualified Graphics.Rendering.Cairo as C 
import Data.Colour
import Data.Colour.Names
import Data.Colour.SRGB

let pat = ((flip darken) <$> (superimpose (iter 8) $ every 4 (slow 3) $ every 3 (density 5) $ "[grey white black, lightgrey darkgrey]") <*> (slow 4 sine1)) in
vLines (C.withSVGSurface) "test.svg" (400,400) pat 50 50

The “(400,400)” there is the width and height in pixels, and the “50 50” is the number of cycles across and down – it’s rendered as a scan line.

2 Comments

  1. Hi Alex,

    I am not able to visualize the code with Tidal.
    If I try the code above: I run jack, Dirt, Tidal, and boot it on Atom;
    I save the file: visual_test.tidal;
    if I run the first single line, I read in the post window: “Could not find module ‘Sound.Tidal.Vis’
    if I run all 5 declaration lines, I read: “parse error in import declaration”.
    When I run the pattern: “Not in scope ‘vLines’

    Do you know which could be the problem?
    I have to install other other packages or modules?
    Thank you

    Sebastiano

Leave a Reply

Your email address will not be published. Required fields are marked *