# Tidal Command Line Interpreter?

**URL:** <https://uzu.lurk.org/t/tidal-command-line-interpreter/3249>\
**Category:** TidalCycles\
**Tags:** questions\
**Created:** [17 June 2021 21:23 UTC](https://uzu.lurk.org/t/tidal-command-line-interpreter/3249 "2021-06-17T21:23:46Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Albert](https://uzu.lurk.org/user_avatar/uzu.lurk.org/albert/32/1216_2.png) [@Albert](https://uzu.lurk.org/u/Albert)\
**Post date:** [17 June 2021 21:23 UTC](https://uzu.lurk.org/t/tidal-command-line-interpreter/3249/1 "2021-06-17T21:23:46Z")

</div>

Nub question: Is there a command line interpreter for Tidal? Or can I execute Tidal code with a Haskell CLI?

The reason I ask is because I am working on a vintage machine (EPSON PX-8) which is not a VT compatible terminal. This is a problem when attempting to open Vim, for example. Scrambled eggs on screen.

I have managed to at least get the non-functioning delete key working by setting $TERM to IBM3151. No luck yet on arrow keys however. I believe this may sadly be an intentional limitation of the 7508 sub processor that controls interfacing with keyboard. Booooooooooooo.

Anyway, since Vim is looking more and more impossible I am instead exploring the possibility of at least using this machine to execute pre-written Tidal code from a CLI. Lame I know, but I am not ready to give up on this machine quite yet. The PX-8 paired with the Roland 909, both controlling an s6000 sampler would be a dream team live setup.

 ![DSC01513](https://uzu.lurk.org/uploads/default/original/2X/1/111af119d2e3093103d940b7154fc58ceb6c6f0d.jpeg)

 ![DSC01511](https://uzu.lurk.org/uploads/default/original/2X/0/0a4049873660f9c0c9b69d1373999299939a90ec.jpeg)

---

<div class="post-metadata">

**Author:** ![yaxu](https://uzu.lurk.org/user_avatar/uzu.lurk.org/yaxu/32/2_2.png) [@yaxu](https://uzu.lurk.org/u/yaxu)\
**Post date:** [17 June 2021 23:07 UTC](https://uzu.lurk.org/t/tidal-command-line-interpreter/3249/2 "2021-06-17T23:07:53Z")

</div>

Beautiful!  
First you need BootTidal.hs, you can get it with:

```haskell
wget https://raw.githubusercontent.com/tidalcycles/Tidal/main/BootTidal.hs

```

Then just start `ghci`, then run

```haskell
:script BootTidal.hs

```

You can also find that file on your system, e.g. with

```haskell
alex@olga:~$ ghci
GHCi, version 8.6.5: http://www.haskell.org/ghc/ :? for help
Loaded package environment from /home/alex/.ghc/x86_64-linux-8.6.5/environments/default
Prelude> import Paths_tidal
Prelude Paths_tidal> getDataDir 
"/home/alex/.cabal/store/ghc-8.6.5/tidal-1.7.2-85748ac99b81a768b32b8d2193816f1c3ed9b3e8f71793eada0e91b58deca9e0/share"

```

The file will be in whatever folder `getDataDirt` tells you.

---

<div class="post-metadata">

**Author:** ![Albert](https://uzu.lurk.org/user_avatar/uzu.lurk.org/albert/32/1216_2.png) [@Albert](https://uzu.lurk.org/u/Albert)\
**Post date:** [18 June 2021 19:55 UTC](https://uzu.lurk.org/t/tidal-command-line-interpreter/3249/3 "2021-06-18T19:55:28Z")

</div>

OK yes! This is the answer I was hoping for! Thank you! I will give this a try and come back with questions if I have any.

---

<div class="post-metadata">

**Author:** ![khoparzi](https://uzu.lurk.org/letter_avatar_proxy/v4/letter/k/c37758/32.png) [@khoparzi](https://uzu.lurk.org/u/khoparzi)\
**Post date:** [26 June 2021 18:58 UTC](https://uzu.lurk.org/t/tidal-command-line-interpreter/3249/4 "2021-06-26T18:58:29Z")

</div>

Oh cool! Didn't know Haskell could work on Raspberry PI (or arm7/arm8) for that matter. I will follow this closely.

---

<div class="post-metadata">

**Author:** ![Albert](https://uzu.lurk.org/user_avatar/uzu.lurk.org/albert/32/1216_2.png) [@Albert](https://uzu.lurk.org/u/Albert)\
**Post date:** [14 July 2021 03:33 UTC](https://uzu.lurk.org/t/tidal-command-line-interpreter/3249/5 "2021-07-14T03:33:08Z")

</div>

Oh this is interesting. I took it for granted Haskell would be supported on the Pi assuming ooh ARM is universal blah blah. I'll have to dig into this some more.

Maybe I need to build a tiny x86 based machine to connect to for this project instead. I do have 1u free in the rack with the s6000.

---

<div class="post-metadata">

**Author:** ![Albert](https://uzu.lurk.org/user_avatar/uzu.lurk.org/albert/32/1216_2.png) [@Albert](https://uzu.lurk.org/u/Albert)\
**Post date:** [14 July 2021 04:02 UTC](https://uzu.lurk.org/t/tidal-command-line-interpreter/3249/6 "2021-07-14T04:02:14Z")

</div>

yaxu,

Now that i've got a tidal\> prompt up and running (and it works when I test for audio), is there a way I can execute a .tidal file with code I have pre written?

---

<div class="post-metadata">

**Author:** ![tgirod](https://uzu.lurk.org/letter_avatar_proxy/v4/letter/t/35a633/32.png) [@tgirod](https://uzu.lurk.org/u/tgirod)\
**Post date:** [14 July 2021 07:14 UTC](https://uzu.lurk.org/t/tidal-command-line-interpreter/3249/7 "2021-07-14T07:14:06Z")

</div>

I think you can do something like this:

```haskell
ghci -script BootTidal.hs myfile.tidal

```

Otherwise, you can put you tidal code at the end of BootTidal.hs

---

<div class="post-metadata">

**Author:** ![Albert](https://uzu.lurk.org/user_avatar/uzu.lurk.org/albert/32/1216_2.png) [@Albert](https://uzu.lurk.org/u/Albert)\
**Post date:** [14 July 2021 16:18 UTC](https://uzu.lurk.org/t/tidal-command-line-interpreter/3249/8 "2021-07-14T16:18:59Z")

</div>

Oooh okay :script can also be used after I run BootTidal.hs .. Ok excellent. Yes! This works! I'm on my way. Thank you!

---

<div class="post-metadata">

**Author:** ![yaxu](https://uzu.lurk.org/user_avatar/uzu.lurk.org/yaxu/32/2_2.png) [@yaxu](https://uzu.lurk.org/u/yaxu)\
**Post date:** [15 July 2021 10:37 UTC](https://uzu.lurk.org/t/tidal-command-line-interpreter/3249/9 "2021-07-15T10:37:44Z")

</div>

Note that with `:script`, if you have a multi-line command, you have to surround it with `:{` and `:}` on the lines preceding and following each block. You can see examples of this in BootTidal.hs.
