Karya, built on 2018-05-31T02:46:59 (patch 0a1a35479c514820d77330ae8a978975ba22a47a)

Safe HaskellNone

Synth.Shared.Config

Contents

Description

Shared config to coordinate between the sequencer and im subsystems.

TODO Currently paths rely on you being in the right directory, but should probably have some more robust configuration at some point. Of course app_dir is just return . too.

Synopsis

Documentation

data Config Source #

Constructors

Config 

Fields

  • imDir :: FilePath

    All of the data files used by the Im backend are based in this directory. Everything in here should be temporary files, used for communication or caching.

  • synths :: Map SynthName Synth
     
Instances
Eq Config # 
Instance details

Defined in Synth.Shared.Config

Methods

(==) :: Config -> Config -> Bool #

(/=) :: Config -> Config -> Bool #

Show Config # 
Instance details

Defined in Synth.Shared.Config

data Synth Source #

Constructors

Synth 

Fields

Instances
Eq Synth # 
Instance details

Defined in Synth.Shared.Config

Methods

(==) :: Synth -> Synth -> Bool #

(/=) :: Synth -> Synth -> Bool #

Show Synth # 
Instance details

Defined in Synth.Shared.Config

Methods

showsPrec :: Int -> Synth -> ShowS #

show :: Synth -> String #

showList :: [Synth] -> ShowS #

notesParentDir :: FilePath Source #

All serialized notes are in im / notesParentDir.

cacheDir :: FilePath Source #

All rendered output is in im / cacheDir.

samplingRate :: Int Source #

All im synths render at this sampling rate, and the sequencer sets the start time by it.

type SamplingRate = 44100 Source #

chunkSize :: Int Source #

Number of frames in each audio chunk.

checkpointSize :: Int Source #

Save an audio chunk and checkpoint in this many frames. This should be an integral multiple of chunkSize, so checkpoint state lines up with audio output.

cache files

notesFilename Source #

Arguments

:: FilePath 
-> Synth 
-> FilePath

Path to the score, relative to the save dir. This should uniquely identify this score.

-> Id.BlockId 
-> FilePath 

Write serialized notes to this file.

outputFilename Source #

Arguments

:: FilePath 
-> FilePath

Names as produced by notesFilename.

-> Text

ScoreTypes.Instrument, but I don't want to import ScoreTypes.

-> FilePath 

Get the filename that should be used for the output of a certain block and instrument.

outputDirectory Source #

Arguments

:: FilePath 
-> FilePath

Names as produced by notesFilename.

-> Text

ScoreTypes.Instrument, but I don't want to import ScoreTypes.

-> FilePath 

playFilename :: FilePath -> Id.BlockId -> FilePath Source #

This is text sent over MIDI to tell play_cache which directory to play from. Relative to imDir/cacheDir.