BootTidal.hs editing help

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:

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?

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

Thanks, but I've tried that...

I'm trying to follow the sparse instructions here, 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:

 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?

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

Sure.

It's from this page: Cycles | Tidal Cycles

And this is the code:

// 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...

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.

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

Amazing! Thank you!