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

Safe HaskellNone

Instrument.Inst

Contents

Description

This is called Inst because I already have way too many modules named Instrument and I couldn't think of anything better. TODO think of something better.

The hierarchy, from general to specific goes:

  • InstTypes.Qualified - global name of an Inst, used to instantiate a ScoreTypes.Instrument.
  • Instrument - name an instance of an Inst within a score
  • Inst - instrument encompassing all backends.
  • Patch - backend-specific instrument

Instrument configuration is divided into static (built-in to the instrument) and dynamic (configured per score).

Static configuration starts with Inst, and is divided into Backend specific and Common.Common.

Dynamic configuration starts with Allocation and is also divided into Backend specific and Common.Config. When a new allocation is created, the Midi.Patch.patch_defaults are copied to Midi.Patch.config_settings.

Synopsis

Inst

data Inst code Source #

Constructors

Inst 
Instances
Show code => Show (Inst code) # 
Instance details

Defined in Instrument.Inst

Methods

showsPrec :: Int -> Inst code -> ShowS #

show :: Inst code -> String #

showList :: [Inst code] -> ShowS #

Pretty.Pretty code => Pretty.Pretty (Inst code) # 
Instance details

Defined in Instrument.Inst

Methods

pretty :: Inst code -> Text Source #

format :: Inst code -> Doc Source #

formatList :: [Inst code] -> Doc Source #

data Backend Source #

Instances
Show Backend # 
Instance details

Defined in Instrument.Inst

Pretty.Pretty Backend # 
Instance details

Defined in Instrument.Inst

db

data Db code Source #

Instances
Show code => Show (Db code) # 
Instance details

Defined in Instrument.Inst

Methods

showsPrec :: Int -> Db code -> ShowS #

show :: Db code -> String #

showList :: [Db code] -> ShowS #

Pretty.Pretty code => Pretty.Pretty (Db code) # 
Instance details

Defined in Instrument.Inst

Methods

pretty :: Db code -> Text Source #

format :: Db code -> Doc Source #

formatList :: [Db code] -> Doc Source #

data Synth code Source #

Constructors

Synth 

Fields

Instances
Show code => Show (Synth code) # 
Instance details

Defined in Instrument.Inst

Methods

showsPrec :: Int -> Synth code -> ShowS #

show :: Synth code -> String #

showList :: [Synth code] -> ShowS #

Pretty.Pretty code => Pretty.Pretty (Synth code) # 
Instance details

Defined in Instrument.Inst

Methods

pretty :: Synth code -> Text Source #

format :: Synth code -> Doc Source #

formatList :: [Synth code] -> Doc Source #

empty :: Db code Source #

size :: Db code -> Int Source #

Number of Insts in the db.

synths :: Db code -> [(InstTypes.SynthName, Synth code)] Source #

data SynthDecl code Source #

Unchecked synth declaration. db will check it for duplicates and other problems. (name, doc, patches)

Instances
Show code => Show (SynthDecl code) # 
Instance details

Defined in Instrument.Inst

Methods

showsPrec :: Int -> SynthDecl code -> ShowS #

show :: SynthDecl code -> String #

showList :: [SynthDecl code] -> ShowS #

Pretty.Pretty code => Pretty.Pretty (SynthDecl code) # 
Instance details

Defined in Instrument.Inst

Methods

pretty :: SynthDecl code -> Text Source #

format :: SynthDecl code -> Doc Source #

formatList :: [SynthDecl code] -> Doc Source #

db :: [SynthDecl code] -> (Db code, [Text]) Source #

Construct and validate a Db, returning any errors that occurred.

merge :: Db code -> Db code -> (Db code, [InstTypes.SynthName]) Source #

Merge the Dbs, and return any duplicate synths.