Safe Haskell | None |
---|

Utilities dealing with speeds.

## Synopsis

- data Speed
- arg :: Sig.Parser DeriveT.ControlRef
- starts :: Internal.Time t => DeriveT.ControlRef -> (t, t) -> Bool -> Deriver [RealTime.RealTime]
- starts_curve :: ControlUtil.CurveF -> Speed -> Speed -> (RealTime.RealTime, RealTime.RealTime) -> Bool -> Deriver [RealTime.RealTime]
- speed_to_duration :: Speed -> DeriveT.Duration
- real_starts :: (RealTime.RealTime -> Signal.Y) -> RealTime.RealTime -> RealTime.RealTime -> Deriver [RealTime.RealTime]
- score_starts :: (RealTime.RealTime -> Signal.Y) -> ScoreTime.ScoreTime -> ScoreTime.ScoreTime -> Deriver [ScoreTime.ScoreTime]
- convert_score_signal :: Typecheck.Function -> Deriver (ScoreTime.ScoreTime -> ScoreTime.ScoreTime)
- duration_starts :: (Num a, Ord a, Show a) => (a -> a) -> a -> a -> Either Text [a]

# Documentation

#### Instances

Show Speed # | |

ShowVal.ShowVal Speed # | |

Typecheck.TypecheckNum Speed # | |

Defined in Derive.Call.Speed | |

Typecheck.ToVal Speed # | |

Defined in Derive.Call.Speed to_val :: Speed -> DeriveT.Val Source # | |

Typecheck.Typecheck Speed # | |

Defined in Derive.Call.Speed from_val :: DeriveT.Val -> Typecheck.Checked Speed Source # |

:: Internal.Time t | |

=> DeriveT.ControlRef | |

-> (t, t) | |

-> Bool | If True, include a sample at the end time. |

-> Deriver [RealTime.RealTime] |

Get start times until the end of the range, at the given speed.

:: ControlUtil.CurveF | |

-> Speed | |

-> Speed | |

-> (RealTime.RealTime, RealTime.RealTime) | |

-> Bool | If True, include a sample at the end time. |

-> Deriver [RealTime.RealTime] |

Get start times for a changing speed. The difference with `starts`

is
that the start and end speeds can be different types.

real_starts :: (RealTime.RealTime -> Signal.Y) -> RealTime.RealTime -> RealTime.RealTime -> Deriver [RealTime.RealTime] Source #

Emit RealTimes at the given speed, which may change over time. The speed is taken as hertz in real time, and must be >0.

This returns samples up to and including the end.

score_starts :: (RealTime.RealTime -> Signal.Y) -> ScoreTime.ScoreTime -> ScoreTime.ScoreTime -> Deriver [ScoreTime.ScoreTime] Source #

Emit ScoreTimes at the given speed, which may change over time. The ScoreTimes are emitted as the reciprocal of the signal at the given point in time, so it must be >0.

The result is that the speed of the emitted samples should depend on the tempo in effect.

This returns samples up to and including the end.

convert_score_signal :: Typecheck.Function -> Deriver (ScoreTime.ScoreTime -> ScoreTime.ScoreTime) Source #

Convert a function from RealTime to a ScoreTime duration to a function from ScoreTime to ScoreTime duration.