tidalcycles / vim-tidal

Vim plugin for TidalCycles
MIT License
222 stars 56 forks source link

A new boot file for the new tidal(1.6.1) #55

Closed gilfuser closed 3 years ago

gilfuser commented 3 years ago

Hi there!

I'm trying to keep up with the newest Tidal and therefore updating the file Tidal.ghci Problem is now I'm stuck in the limbo. I had to add this

import qualified Control.Concurrent.MVar as MV
import qualified Sound.Tidal.Tempo as Tempo
import qualified Sound.OSC.FD as O

to have this among the other stuff inside the big let there:

    getnow = do
        tempo <- MV.readMVar $ sTempoMV tidal
        now <- O.time
        return $ fromRational $ Tempo.timeToCycles tempo now

The new only, panic and getcps won't cause any complain.

If I let those imports out, with a simple test like d1 $ "bd" in tidal I get this error:

<interactive>:38:18: error:
    Not in scope: ‘MV.readMVar’
    No module named ‘MV’ is imported.

<interactive>:39:18: error:
    Not in scope: ‘Tempo.cps’
    No module named ‘Tempo’ is imported.
Loaded GHCi configuration from /home/skmecs/.local/share/nvim/plug
tidal> d1 $ s "bd"

<interactive>:1:1: error:
    • Variable not in scope: d1 :: ControlPattern -> t
    • Perhaps you meant ‘dt’ (imported from Sound.Tidal.Context)

If I let the imports in and getnow out, the simple test will work, but although I don't know exactly what they do, I bet they are there for a reason and I'll this error anyway:

<no location info>: error:
    Could not load module ‘Sound.OSC.FD’
    It is a member of the hidden package ‘hosc-0.18.1’.
    You can run ‘:set -package hosc’ to expose it.
    (Note: this unloads all the modules in the current scope.)

So, for the time being I simply commented out getnow to get things rolling. Please tell me if you have any idea on how to solve it or if I can help further on tracking the problem.

kind regards, Gil

gilfuser commented 3 years ago

Now I see! getnow isn't implemented yet. So, my assumption that its there for a reason was wrong.