Tidal Command Line Interpreter?

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.

7 Likes

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

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

Then just start ghci, then run

:script BootTidal.hs

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

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.

2 Likes

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.

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

2 Likes

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.

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?

I think you can do something like this:

ghci -script BootTidal.hs myfile.tidal

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

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

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.