Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- type Time = Rational
- data ArcF a = Arc {}
- type Arc = ArcF Time
- sam :: Time -> Time
- toTime :: Real a => a -> Rational
- fromTime :: Fractional a => Time -> a
- nextSam :: Time -> Time
- cyclePos :: Time -> Time
- hull :: Arc -> Arc -> Arc
- subArc :: Arc -> Arc -> Maybe Arc
- subMaybeArc :: Maybe Arc -> Maybe Arc -> Maybe (Maybe Arc)
- sect :: Arc -> Arc -> Arc
- timeToCycleArc :: Time -> Arc
- cycleArc :: Arc -> Arc
- cyclesInArc :: Integral a => Arc -> [a]
- cycleArcsInArc :: Arc -> [Arc]
- arcCycles :: Arc -> [Arc]
- arcCyclesZW :: Arc -> [Arc]
- mapCycle :: (Time -> Time) -> Arc -> Arc
- isIn :: Arc -> Time -> Bool
Documentation
An arc of time, with a start time (or onset) and a stop time (or offset)
Instances
Functor ArcF Source # | |
Show Arc Source # | |
Applicative ArcF Source # | |
Eq a => Eq (ArcF a) Source # | |
Fractional a => Fractional (ArcF a) Source # | |
Num a => Num (ArcF a) Source # | |
Ord a => Ord (ArcF a) Source # | |
Show a => Show (ArcF a) Source # | |
Show a => Show (Event a) Source # | |
Generic (ArcF a) Source # | |
NFData a => NFData (ArcF a) Source # | |
Defined in Sound.Tidal.Time | |
type Rep (ArcF a) Source # | |
Defined in Sound.Tidal.Time type Rep (ArcF a) = D1 ('MetaData "ArcF" "Sound.Tidal.Time" "tidal-1.7.2-LITOvfpqMOPBG8fQfUenVV" 'False) (C1 ('MetaCons "Arc" 'PrefixI 'True) (S1 ('MetaSel ('Just "start") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Just "stop") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))) |
toTime :: Real a => a -> Rational Source #
Turns a number into a (rational) time value. An alias for toRational
.
fromTime :: Fractional a => Time -> a Source #
Turns a (rational) time value into another number. An alias for fromRational
.
nextSam :: Time -> Time Source #
The end point of the current cycle (and starting point of the next cycle)
subArc :: Arc -> Arc -> Maybe Arc Source #
subArc i j
is the timespan that is the intersection of i
and j
.
intersection
The definition is a bit fiddly as results might be zero-width, but
not at the end of an non-zero-width arc - e.g. (0,1) and (1,2) do
not intersect, but (1,1) (1,1) does.
timeToCycleArc :: Time -> Arc Source #
The arc of the whole cycle that the given time value falls within
cyclesInArc :: Integral a => Arc -> [a] Source #
A list of cycle numbers which are included in the given arc
cycleArcsInArc :: Arc -> [Arc] Source #
A list of arcs of the whole cycles which are included in the given arc
arcCyclesZW :: Arc -> [Arc] Source #
Like arcCycles, but returns zero-width arcs