Skip to content
This repository was archived by the owner on Jun 13, 2025. It is now read-only.
This repository was archived by the owner on Jun 13, 2025. It is now read-only.

Configuration is difficult #1202

@yaxu

Description

@yaxu

Since the changes to stream/clock, tidal has become more difficult to configure.

There used to be a single config structure defined in Sound.Tidal.Config, in the currently released v1.9.5:

data Config = Config {cCtrlListen :: Bool,
                      cCtrlAddr :: String,
                      cCtrlPort :: Int,
                      cCtrlBroadcast :: Bool,
                      cFrameTimespan :: Double,
                      cEnableLink :: Bool,
                      cProcessAhead :: Double,
                      cTempoAddr :: String,
                      cTempoPort :: Int,
                      cTempoClientPort :: Int,
                      cSkipTicks :: Int64,
                      cVerbose :: Bool,
                      cQuantum :: CDouble,
                      cBeatsPerCycle :: CDouble
                     }

Now there is this in Sound.Tidal.Stream.Config:

data Config = Config
  { cCtrlListen :: Bool,
    cCtrlAddr :: String,
    cCtrlPort :: Int,
    cCtrlBroadcast :: Bool,
    cVerbose :: Bool,
    cClockConfig :: Clock.ClockConfig
  }

and this is the the tidal-link package, under Sound.Tidal.Clock.Config:

data ClockConfig = ClockConfig
  { cQuantum :: CDouble,
    cBeatsPerCycle :: CDouble,
    cFrameTimespan :: Double,
    cEnableLink :: Bool,
    cSkipTicks :: Int64,
    cProcessAhead :: Double
  }

I expect this split was to allow tidal-link to be used separately from tidal, however this makes configuration more difficult.

We can add setters like in #1162

But this is not too easy to deal with either, as different parameters have to be set in a different way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions