# BootTidal.hs editing help

**URL:** <https://uzu.lurk.org/t/boottidal-hs-editing-help/3566>\
**Category:** Uncategorized\
**Created:** [17 October 2021 16:37 UTC](https://uzu.lurk.org/t/boottidal-hs-editing-help/3566 "2021-10-17T16:37:15Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ouyuegu](https://uzu.lurk.org/user_avatar/uzu.lurk.org/ouyuegu/32/1719_2.png) [@Ouyuegu](https://uzu.lurk.org/u/Ouyuegu)\
**Post date:** [17 October 2021 16:37 UTC](https://uzu.lurk.org/t/boottidal-hs-editing-help/3566/1 "2021-10-17T16:37:15Z")

</div>

Hi there.

So, I want to start modding Tidal with some of the stuff I find on the main website, starting with the cycle visualiser, but I couldn't understand how to edit the BootTidal.hs file...

I found the file, and opened it in Atom, but it doesn't look right to me:

 ![Screenshot 2021-10-18 at 12.32.06 AM](https://club.tidalcycles.org/uploads/default/original/2X/d/df2dec0c7dd136d759b95aa8f5525b4cd71f9405.png)

When I added the cycle visualiser code and saved it, it just kept claiming that there were parsing errors everywhere... the instructions said to evaluate the code, but this wasn't possible...

Can someone please tell me what stupid thing am I doing wrong?

---

<div class="post-metadata">

**Author:** ![cleary](https://uzu.lurk.org/user_avatar/uzu.lurk.org/cleary/32/177_2.png) [@cleary](https://uzu.lurk.org/u/cleary)\
**Post date:** [18 October 2021 09:51 UTC](https://uzu.lurk.org/t/boottidal-hs-editing-help/3566/2 "2021-10-18T09:51:34Z")

</div>

You may need to enclose your code blocks in their own `:{ }:`

---

<div class="post-metadata">

**Author:** ![Ouyuegu](https://uzu.lurk.org/user_avatar/uzu.lurk.org/ouyuegu/32/1719_2.png) [@Ouyuegu](https://uzu.lurk.org/u/Ouyuegu)\
**Post date:** [18 October 2021 14:40 UTC](https://uzu.lurk.org/t/boottidal-hs-editing-help/3566/3 "2021-10-18T14:40:41Z")

</div>

Thanks, but I've tried that...

I'm trying to follow the sparse instructions [here](https://tidalcycles.org/docs/reference/cycles/#pop-up-window), but to no avail... Whenever I paste the code given into the BootTidal.hs file, save it and then reboot tidal, I get messages complaining about parsing errors in the boot file. Errors like this:

```haskell
 parse error on input ‘;’
   |
74 | var clockMods, clockBeats, screenW, screenH, clockW, clockH, clockX, clockY, resizable, border;
   |                                          

```

It seems that there is an issue with almost every part of this code, according to Tidal.

Any ideas?

---

<div class="post-metadata">

**Author:** ![geikha](https://uzu.lurk.org/user_avatar/uzu.lurk.org/geikha/32/2701_2.png) [@geikha](https://uzu.lurk.org/u/geikha)\
**Post date:** [18 October 2021 15:28 UTC](https://uzu.lurk.org/t/boottidal-hs-editing-help/3566/4 "2021-10-18T15:28:41Z")

</div>

mhmhm var isn't a haskell keyword iirc. are you sure you are pasting haskell code? maybe you confused some SuperCollider code with Haskell code. And you should be adding to your SC startup instead of your boottidal... not sure  
share what you are trying to paste pls

---

<div class="post-metadata">

**Author:** ![Ouyuegu](https://uzu.lurk.org/user_avatar/uzu.lurk.org/ouyuegu/32/1719_2.png) [@Ouyuegu](https://uzu.lurk.org/u/Ouyuegu)\
**Post date:** [19 October 2021 12:57 UTC](https://uzu.lurk.org/t/boottidal-hs-editing-help/3566/5 "2021-10-19T12:57:00Z")

</div>

Sure.

It's from this page: [Cycles | Tidal Cycles](https://tidalcycles.org/docs/reference/cycles/#pop-up-window)

And this is the code:

```haskell
// start superdirt first
(
var clockMods, clockBeats, screenW, screenH, clockW, clockH, clockX, clockY, resizable, border;
clockMods = [4,6];
clockBeats = 4;
screenW = 1440;
screenH = 900;
clockW = 120;
clockH = 22;
clockX = screenW - clockW;
clockY = screenH - 1;
resizable = false;
border = false;

~clockText = StaticText()
.string_("[clock]")
.font_(Font.defaultMonoFace)
.align_(\center)
.stringColor_(Color(1,1,1))
.minHeight_(20);

~updateClock = { |cycle|
    var text, beat;
    text = clockMods.collect { |m| "" ++ (cycle.floor.asInteger.mod(m) + 1) ++ "/" ++ m; }.join(" ");
    beat = (cycle.mod(1)*clockBeats).round.asInteger + 1;
    text = text ++ " " ++ clockBeats.collect { |i| if(i < beat, ".", " "); }.join;
    ~clockText.string_(text);
};

~clockWindow = Window("clock", Rect(clockX, clockY, clockW, clockH), resizable, border)
.background_(Color(0.3,0.3,0.3))
.layout_(
    HLayout(
        ~clockText
    ).margins_(0!4)
);

~clockWindow.alwaysOnTop_(true);
~clockWindow.visible_(true);

SynthDef(\tick, { |cycle|
    SendReply.kr(Impulse.kr(0), "/tick", [cycle]);
    FreeSelf.kr(Impulse.kr(0));
}).add;

OSCdef(\tick, { |msg|
    var cycle;
    #cycle = msg[3..];
    Routine {
        { ~updateClock.(cycle); }.defer;
    }.play(SystemClock);
}, "/tick");
)

```

The instructions on the site say: After evaluating this script (in your BootTidal.hs or after booting SuperDirt), play the following pattern: `p "tick" $ "0*4" # s "tick"`.

I assumed that the meant I should edit the BootTidal.hs file...

---

<div class="post-metadata">

**Author:** ![Ouyuegu](https://uzu.lurk.org/user_avatar/uzu.lurk.org/ouyuegu/32/1719_2.png) [@Ouyuegu](https://uzu.lurk.org/u/Ouyuegu)\
**Post date:** [19 October 2021 13:02 UTC](https://uzu.lurk.org/t/boottidal-hs-editing-help/3566/6 "2021-10-19T13:02:09Z")

</div>

OK... yes... sorry... It was in Supercollider that I should have done this.

It's a pity that there're no "tidal for complete morons" books out there...

Thanks for your help everyone.

---

<div class="post-metadata">

**Author:** ![geikha](https://uzu.lurk.org/user_avatar/uzu.lurk.org/geikha/32/2701_2.png) [@geikha](https://uzu.lurk.org/u/geikha)\
**Post date:** [19 October 2021 19:43 UTC](https://uzu.lurk.org/t/boottidal-hs-editing-help/3566/7 "2021-10-19T19:43:26Z")

</div>

well, there's the first draft of the Tidal book by Yaxu:

> **[pihkal.pdf](https://github.com/yaxu/pihkal/blob/master/pihkal.pdf)**

---

<div class="post-metadata">

**Author:** ![Ouyuegu](https://uzu.lurk.org/user_avatar/uzu.lurk.org/ouyuegu/32/1719_2.png) [@Ouyuegu](https://uzu.lurk.org/u/Ouyuegu)\
**Post date:** [20 October 2021 02:01 UTC](https://uzu.lurk.org/t/boottidal-hs-editing-help/3566/8 "2021-10-20T02:01:45Z")

</div>

Amazing! Thank you!
