Load Haskell code at Tidal start [Solved]

I am pretty sure that his has been described somewhere but I just can't find it. I am very happy just for a link if that can be found somewhere in the documentation:

I am trying to sort out my Tidal setup which - amongst other things - involves loading some additional synths (via including some synth definition files in my superdirt_startup.scd). This works well.

Now I would like to find out how to best load some additional Haskell code (like e. g. this code) to add configuration options and - probably later - some custom functions.

  • I reckon I can kind of include one or more Haskell code files in my BootTidal.hs. If yes, how do I do that? Is there an example setup somewhere online?
  • I find 4 BootTidal.hs files at .cabal/share/...; I assume I can find out which one is being used without changing them one by another, right?
  • Any further hints on best practices concerning a custom configuration layer for ones Tidal setup?

Take a look to the end of my boottidal: sc-adente/BootTidal.hs at master · ndr-brt/sc-adente · GitHub

You can use the :script directive


Thanks! Everything is now in place :slight_smile:

And, to answer my own question (just in case there is anyone besides me who is wondering): Tidal tells me the essentials in the Tidal buffer just after starting:

GHCi, version 8.8.4: https://www.haskell.org/ghc/  :? for help
Prelude> [TidalCycles version 1.7.2]
Installed in /home/marty/.cabal/share/x86_64-linux-ghc-8.8.4/tidal-1.7.2

So in my case the BootTidal.hs in use is here: .cabal/share/x86_64-linux-ghc-8.8.4/tidal-1.7.2/BootTidal.hs