Karya, built on Mon Jul 24 11:39:07 PDT 2017 (patch 33511aca01257b76b88de7c7a2763b7a965c084e)

Safe HaskellNone

Synth.Shared.Signal

Description

Signal implementation.

Synopsis

Documentation

type Signal = Unboxed Source #

A time series signal. It should be sorted by x. There is implicit linear interpolation between each sample, so a discontinuity requires two samples with the same x.

TODO This is different from karya's Signal, which doesn't interpolate. The reason is that I didn't want to have doubled samples for common discontinuities. But I need interpolation here because it's audio-level and otherwise I get clicks, while karya emits MIDI which relies on the synthesizer doing the same interpolation, just with a hardcoded latency. But then there is a problem, how do I turn a karya Signal into a synth signal? Maybe I should switch karya back to interpolation? Or maybe I just have to be careful to make karya emit doubled samples for explicit discontinuities. Or I could emulate MIDI and do a fixed latency interpolation.