Emacs Extension


I managed to install Tidal and the atom extension in my Ubuntu 18.04.1 and seems to work (it produces the sound after following ’ Instructions for Atom’ in https://tidalcycles.org/index.php/Start_tidalcycles_and_superdirt_for_the_first_time).

But when I try to execute the same .tidal file in emacs, after C-c C-s I got the message: “GHCi, version 8.0.2: http://www.haskell.org/ghc/ :? for hel Prelude> IO error: “/home/USERNAME/.cabal/store/ghc-8.0.2/package.db/BootTidal.hs” does not exist” (although in my Ubuntu exists the file “/home/USERNAME/.cabal/share/x86_64-linux-ghc-8.0.2/tidal-1.4.8/BootTidal.hs”)

and then when I ‘C-return’ the tidal line I get “:3:1: error: Variable not in scope: d1 :: t0 -> t:3:6: error:• Variable not in scope: sound :: [Char] -> t0• Perhaps you meant ‘round’ (imported from Prelude)”

(I think it’s not related but in case it’s useful I have seen that I have ‘/usr/bin/jackd -T -ndefault -T -d alsa’ and /usr/bin/pulseaudio --daemonize=no’’ both running)

1 Like

I think this is the same problem that forced a long sabbatical from tidal on me - took half a day to figure out. Hack/fix that worked for me suggested here is to set the path to BootTidal.hs on your machine - I have this in my init.el:
(setq tidal-boot-script-path "/home/chris/.cabal/share/x86_64-linux-ghc-8.6.5/tidal-1.4.8/BootTidal.hs")


that worked perfectly @TSC67 ! Thanks a lot!

@yaxu I’m not sure if this is enough general, but maybe could be also added to the documentation

Ok the page needs a revamp, but I quickly updated this page:

It is a wiki if anyone has time to improve it!

Thanks @yaxu

The wiki doesn’t let edit it (not belonging to the “users” group https://tidalcycles.org/index.php/TidalCycles_userbase:Users)

I think it would be great if the general Emacs page https://tidalcycles.org/index.php/Emacs can be referenced in the “Instructions: Emacs Extension” of https://tidalcycles.org/index.php/Linux_installation (I totally missed that there was a general Emacs page)


Hm have you created an account? You can do that here https://tidalcycles.org/index.php?title=Special:CreateAccount&returnto=TidalCycles+userbase:Users

Ahm, I thought it was the same account as this forum. Got it! Thanks

1 Like

The wiki does need some proper gardening!

Thanks a lot ! Working for me within Doom-Emacs ! :grinning: :+1:

1 Like

If anyone happens to be using Spacemacs, about a month ago I upstreamed a TidalCycles layer, so if you’re using the develop branch you just need to add tidalcycles to dotspacemacs-configuration-layers and it should work out of the box.

1 Like

i was having trouble configuring emacs for tidal and saw your post, it seemed like an exciting path.
I decided to give spacemacs a try but for me it's a huge undertaking. could you give a little more info? how can i reach the dotspacemacs configuration-layers? where in the file does the tidalcycles tag go...?

First of all, I just want to clarify that you still have to install Tidal and SuperDirt in the usual way, the Spacemacs layer will just handle the editor integration.

You can find dotspacemacs-configuration-layers in the first lines of the .spacemacs file in your home folder (if you're in Spacemacs SPC f e d should open it for you).

You can see that between parenthesis there's a list of layers that Spacemacs will install for you, you just have to add a row with tidalcycles there and then reload the configuration with SPC f e R or just close and reopen Spacemacs.

Then you start SuperDirt the usual way, you open a random file with a .tidal extension and Spacemacs should load the Tidal mode for you, and with , t s you should be able to start the connection with Tidal.

From there you can use the usual Ctrl-Ret to evaluate a line, or you can use the alternative shortcuts defined with the major mode leader key (if you press , Spacemacs should show you a menu with all the possible combos).

1 Like

don't mean to resurrect this thread, I just want to express my appreciation for that! After a half hour of troubleshooting, adding the path to BootTidal.hs did the trick for me in Doom emacs. Thank you so much!

1 Like