Karya, built on 2022-03-21T01:30:44 (patch 89d1651424c35e564138d93424a157ff87457245)
Safe HaskellSafe-Inferred

Synth.Sampler.RenderSample

Description

Low level rendering of Sample.Samples.

Synopsis

Documentation

ratioCloseEnough :: Y -> Bool Source #

More or less a semitone 100 cents 10. Anything narrower than this probably isn't perceptible.

envelopeDuration :: RealTime.RealTime -> Signal.Signal -> Maybe RealTime.RealTime Source #

Get the duration implied by the envelope, or Nothing if the envelope won't shorten the duration.

If the envelope ends on a 0, I can clip the sample short. Not just for performance, but because checkpoints rely on the note durations being accurate.

predictFileDuration :: Double -> Signal.Signal -> FilePath -> IO Frames Source #

Predict how long a sample will be if resampled with the given ratio signal.