Karya, built on 2023-08-29T07:47:28 (patch 7a412d5d6ba4968ca4155ef276a062ccdeb9109a)
Safe HaskellSafe-Inferred

Perform.Midi.Types

Contents

Description

Basic types for Perform.Midi.Perform.

Synopsis

Documentation

data Patch Source #

The Patch is derived from a Patch.Patch and contains all the data necessary to render a Event to a midi message. Each Event has an attached Patch.

Constructors

Patch 

Fields

  • patch_name :: !ScoreT.Instrument

    The name for the instrument as used in the score. It should globally identify the instrument within this score.

  • patch_keyswitches :: ![Patch.Keyswitch]

    Keyswitches required by this instrument. At higher levels, a single instrument can respond to a variety of keyswitches, but at the perform level, each instrument of each note is specialized to the particular keyswitches intended. So this is normally empty, but filled in by convert prior to perform.

  • patch_hold_keyswitches :: !Bool

    If true, the keysitch has to be held while the note is playing. Otherwise, it will just be tapped before the note starts.

  • patch_control_map :: !Control.ControlMap

    Map control names to a control number. Some controls are shared by all midi instruments, but some instruments have special controls.

  • patch_pitch_bend_range :: !Control.PbRange
     
  • patch_decay :: !(Maybe RealTime)

    Time from NoteOff to inaudible, in seconds. This can be used to figure out how long to generate control messages, or possibly determine overlap for channel allocation, though I use LRU so it shouldn't matter.

Instances

Instances details
Show Patch Source # 
Instance details

Defined in Perform.Midi.Types

Methods

showsPrec :: Int -> Patch -> ShowS #

show :: Patch -> String #

showList :: [Patch] -> ShowS #

DeepSeq.NFData Patch Source # 
Instance details

Defined in Perform.Midi.Types

Methods

rnf :: Patch -> () #

Eq Patch Source # 
Instance details

Defined in Perform.Midi.Types

Methods

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

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

Ord Patch Source # 
Instance details

Defined in Perform.Midi.Types

Methods

compare :: Patch -> Patch -> Ordering #

(<) :: Patch -> Patch -> Bool #

(<=) :: Patch -> Patch -> Bool #

(>) :: Patch -> Patch -> Bool #

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

max :: Patch -> Patch -> Patch #

min :: Patch -> Patch -> Patch #

Pretty.Pretty Patch Source # 
Instance details

Defined in Perform.Midi.Types

default_decay :: RealTime Source #

Somewhat conservative default decay which should suit most instruments. decay will probably only rarely be explicitly set.

event

data Event Source #

Instances

Instances details
Show Event Source # 
Instance details

Defined in Perform.Midi.Types

Methods

showsPrec :: Int -> Event -> ShowS #

show :: Event -> String #

showList :: [Event] -> ShowS #

DeepSeq.NFData Event Source # 
Instance details

Defined in Perform.Midi.Types

Methods

rnf :: Event -> () #

Eq Event Source # 
Instance details

Defined in Perform.Midi.Types

Methods

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

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

Pretty.Pretty Event Source # 
Instance details

Defined in Perform.Midi.Types

show_short :: Event -> Text Source #

Pretty print the event more briefly than the Pretty instance.