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

Types

Description

This re-exports especially popular types, since they are frequently mentioned in type signatures. Unlike most of the other modules, it's meant to be imported unqualified.

Synopsis

Documentation

type TrackNum = Int Source #

Index into a block's tracks.

data ScoreTime Source #

Score time is the abstract unit of time, and its mapping to real time is dependent on the score context. ScoreTime units can be negative, but blocks only display events at >=0 ScoreTime.

Instances

Instances details
Num ScoreTime Source # 
Instance details

Defined in Ui.ScoreTime

Read ScoreTime Source # 
Instance details

Defined in Ui.ScoreTime

Fractional ScoreTime Source # 
Instance details

Defined in Ui.ScoreTime

Real ScoreTime Source # 
Instance details

Defined in Ui.ScoreTime

RealFrac ScoreTime Source # 
Instance details

Defined in Ui.ScoreTime

Show ScoreTime Source # 
Instance details

Defined in Ui.ScoreTime

CStorable ScoreTime Source # 
Instance details

Defined in Ui.ScoreTime

NFData ScoreTime Source # 
Instance details

Defined in Ui.ScoreTime

Methods

rnf :: ScoreTime -> () #

Eq ScoreTime Source # 
Instance details

Defined in Ui.ScoreTime

Ord ScoreTime Source # 
Instance details

Defined in Ui.ScoreTime

Time ScoreTime Source # 
Instance details

Defined in Derive.Deriver.Internal

ToVal ScoreTime Source # 
Instance details

Defined in Derive.REnv

Methods

to_val :: ScoreTime -> Val Source #

ShowVal ScoreTime Source # 
Instance details

Defined in Ui.ScoreTime

ToVal ScoreTime Source # 
Instance details

Defined in Derive.Typecheck

Methods

to_val :: ScoreTime -> Val Source #

Typecheck ScoreTime Source # 
Instance details

Defined in Derive.Typecheck

TypecheckNum ScoreTime Source # 
Instance details

Defined in Derive.Typecheck

Pretty ScoreTime Source # 
Instance details

Defined in Ui.ScoreTime

Seed ScoreTime Source # 
Instance details

Defined in Ui.ScoreTime

Methods

to_seed :: Int -> ScoreTime -> Int Source #

Serialize ScoreTime Source # 
Instance details

Defined in Ui.ScoreTime

ApproxEq ScoreTime Source # 
Instance details

Defined in Ui.ScoreTime

Methods

eq :: Double -> ScoreTime -> ScoreTime -> Bool Source #

type TrackTime = ScoreTime Source #

This is also ScoreTime, but it's relative to the beginning of the track. I.e., UI events are all in track time, but when they get shifted and stretched as by note slicing they're no longer in TrackTime, but not yet in RealTime.

I'd like to make a type-level distinction because it's easy to get confused about whether a time has or hasn't been transformed, but when I tried it seemed like a big hassle since I'd really like for TrackTime to be a subtype of ScoreTime. I could do it with a phantom type, but it would change about a million type declarations. And since Events start in TrackTime but are then ScoreTime if transformed, they would also need a type parameter, along with probably a few other basic data types.

Unless I work up the courage to do that someday, the least I can do is document the difference with a type synonym.

data RealTime Source #

A concrete unit of time.

This must have negative values because it's used for signals, which are used for the warp map, which is oriented with zero at the note start. If a note wants to get the real time before it, it must look up a negative RealTime.

Instances

Instances details
Storable RealTime Source # 
Instance details

Defined in Perform.RealTime

Num RealTime Source # 
Instance details

Defined in Perform.RealTime

Read RealTime Source # 
Instance details

Defined in Perform.RealTime

Fractional RealTime Source # 
Instance details

Defined in Perform.RealTime

Real RealTime Source # 
Instance details

Defined in Perform.RealTime

RealFrac RealTime Source # 
Instance details

Defined in Perform.RealTime

Methods

properFraction :: Integral b => RealTime -> (b, RealTime) #

truncate :: Integral b => RealTime -> b #

round :: Integral b => RealTime -> b #

ceiling :: Integral b => RealTime -> b #

floor :: Integral b => RealTime -> b #

Show RealTime Source # 
Instance details

Defined in Perform.RealTime

CStorable RealTime Source # 
Instance details

Defined in Perform.RealTime

NFData RealTime Source # 
Instance details

Defined in Perform.RealTime

Methods

rnf :: RealTime -> () #

Eq RealTime Source # 
Instance details

Defined in Perform.RealTime

Ord RealTime Source # 
Instance details

Defined in Perform.RealTime

Time RealTime Source # 
Instance details

Defined in Derive.Deriver.Internal

ToVal RealTime Source # 
Instance details

Defined in Derive.REnv

Methods

to_val :: RealTime -> Val Source #

ShowVal RealTime Source # 
Instance details

Defined in Perform.RealTime

ToVal RealTime Source # 
Instance details

Defined in Derive.Typecheck

Methods

to_val :: RealTime -> Val Source #

Typecheck PitchFunction Source # 
Instance details

Defined in Derive.Typecheck

Typecheck Function Source # 
Instance details

Defined in Derive.Typecheck

Typecheck TypedFunction Source # 
Instance details

Defined in Derive.Typecheck

Typecheck RealTime Source # 
Instance details

Defined in Derive.Typecheck

TypecheckNum RealTime Source # 
Instance details

Defined in Derive.Typecheck

Pretty RealTime Source # 
Instance details

Defined in Perform.RealTime

Serialize RealTime Source # 
Instance details

Defined in Perform.RealTime

ApproxEq RealTime Source # 
Instance details

Defined in Perform.RealTime

Methods

eq :: Double -> RealTime -> RealTime -> Bool Source #

FromJSON RealTime Source # 
Instance details

Defined in Perform.RealTime

ToJSON RealTime Source # 
Instance details

Defined in Perform.RealTime

Typecheck (RealTime -> RealTime) Source # 
Instance details

Defined in Derive.Typecheck

data BlockId Source #

Reference to a Block. Use this to look up Blocks in the State.

The convention is that BlockId should name a block which is expected to exist, and the only way to create a BlockId is via create_block. The name of a block which is to be created is simply Id.

However, since the constructor is exported, this isn't rigorously enforced.

Unlike other Ids, block names have no restrictions, except no spaces. This is because they become note calls, and it's convenient to have arbitrary names for the same reason it's convenient to allow arbitrary characters in call names.

Instances

Instances details
Read BlockId Source # 
Instance details

Defined in Ui.Id

Show BlockId Source # 
Instance details

Defined in Ui.Id

NFData BlockId Source # 
Instance details

Defined in Ui.Id

Methods

rnf :: BlockId -> () #

Eq BlockId Source # 
Instance details

Defined in Ui.Id

Methods

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

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

Ord BlockId Source # 
Instance details

Defined in Ui.Id

Ident BlockId Source # 
Instance details

Defined in Ui.Id

Pretty BlockId Source # 
Instance details

Defined in Ui.Id

Seed BlockId Source # 
Instance details

Defined in Ui.Id

Methods

to_seed :: Int -> BlockId -> Int Source #

Serialize BlockId Source # 
Instance details

Defined in Ui.Id

FromJSON BlockId Source # 
Instance details

Defined in Ui.Id

ToJSON BlockId Source # 
Instance details

Defined in Ui.Id

data ViewId Source #

Reference to a View, as per BlockId.

Instances

Instances details
Read ViewId Source # 
Instance details

Defined in Ui.Id

Show ViewId Source # 
Instance details

Defined in Ui.Id

NFData ViewId Source # 
Instance details

Defined in Ui.Id

Methods

rnf :: ViewId -> () #

Eq ViewId Source # 
Instance details

Defined in Ui.Id

Methods

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

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

Ord ViewId Source # 
Instance details

Defined in Ui.Id

Ident ViewId Source # 
Instance details

Defined in Ui.Id

Pretty ViewId Source # 
Instance details

Defined in Ui.Id

Serialize ViewId Source # 
Instance details

Defined in Ui.Id

FromJSON ViewId Source # 
Instance details

Defined in Ui.Id

ToJSON ViewId Source # 
Instance details

Defined in Ui.Id

data TrackId Source #

Instances

Instances details
Read TrackId Source # 
Instance details

Defined in Ui.Id

Show TrackId Source # 
Instance details

Defined in Ui.Id

NFData TrackId Source # 
Instance details

Defined in Ui.Id

Methods

rnf :: TrackId -> () #

Eq TrackId Source # 
Instance details

Defined in Ui.Id

Methods

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

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

Ord TrackId Source # 
Instance details

Defined in Ui.Id

Ident TrackId Source # 
Instance details

Defined in Ui.Id

Pretty TrackId Source # 
Instance details

Defined in Ui.Id

Seed TrackId Source # 
Instance details

Defined in Ui.Id

Methods

to_seed :: Int -> TrackId -> Int Source #

Serialize TrackId Source # 
Instance details

Defined in Ui.Id

FromJSON TrackId Source # 
Instance details

Defined in Ui.Id

ToJSON TrackId Source # 
Instance details

Defined in Ui.Id

data RulerId Source #

Instances

Instances details
Read RulerId Source # 
Instance details

Defined in Ui.Id

Show RulerId Source # 
Instance details

Defined in Ui.Id

NFData RulerId Source # 
Instance details

Defined in Ui.Id

Methods

rnf :: RulerId -> () #

Eq RulerId Source # 
Instance details

Defined in Ui.Id

Methods

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

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

Ord RulerId Source # 
Instance details

Defined in Ui.Id

Ident RulerId Source # 
Instance details

Defined in Ui.Id

Pretty RulerId Source # 
Instance details

Defined in Ui.Id

Serialize RulerId Source # 
Instance details

Defined in Ui.Id

FromJSON RulerId Source # 
Instance details

Defined in Ui.Id

ToJSON RulerId Source # 
Instance details

Defined in Ui.Id