Safe Haskell | Safe-Inferred |
---|
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.
Documentation
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
Num ScoreTime Source # | |
Read ScoreTime Source # | |
Fractional ScoreTime Source # | |
Real ScoreTime Source # | |
Defined in Ui.ScoreTime toRational :: ScoreTime -> Rational # | |
RealFrac ScoreTime Source # | |
Show ScoreTime Source # | |
CStorable ScoreTime Source # | |
Defined in Ui.ScoreTime | |
NFData ScoreTime Source # | |
Defined in Ui.ScoreTime | |
Eq ScoreTime Source # | |
Ord ScoreTime Source # | |
Defined in Ui.ScoreTime | |
Time ScoreTime Source # | |
ToVal ScoreTime Source # | |
ShowVal ScoreTime Source # | |
ToVal ScoreTime Source # | |
Typecheck ScoreTime Source # | |
TypecheckNum ScoreTime Source # | |
Pretty ScoreTime Source # | |
Seed ScoreTime Source # | |
Serialize ScoreTime Source # | |
ApproxEq ScoreTime 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.
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
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.
Reference to a View, as per BlockId
.