Karya, built on 2023-08-29T07:47:28 (patch 7a412d5d6ba4968ca4155ef276a062ccdeb9109a)
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.