Karya, built on 2020-11-26T21:03:17 (patch 23b5be2d53a9e8e7d6136cda5aae2849abe5cded)
Safe HaskellNone

Synth.Sampler.Sample

Contents

Synopsis

Documentation

type SamplePath = FilePath Source #

Path to a sample, relative to the instrument db root.

data Note Source #

Low level representation of a note. This corresponds to a single sample played.

Constructors

Note 

Fields

Instances

Instances details
Show Note # 
Instance details

Defined in Synth.Sampler.Sample

Methods

showsPrec :: Int -> Note -> ShowS #

show :: Note -> String #

showList :: [Note] -> ShowS #

Pretty.Pretty Note # 
Instance details

Defined in Synth.Sampler.Sample

data Sample Source #

The actual sample played by a Note.

Constructors

Sample 

Fields

Instances

Instances details
Show Sample # 
Instance details

Defined in Synth.Sampler.Sample

Pretty.Pretty Sample # 
Instance details

Defined in Synth.Sampler.Sample

Serialize.Serialize Sample # 
Instance details

Defined in Synth.Sampler.Sample

data Stretch Source #

Constructors

Stretch 

Instances

Instances details
Show Stretch # 
Instance details

Defined in Synth.Sampler.Sample

Pretty.Pretty Stretch # 
Instance details

Defined in Synth.Sampler.Sample

Serialize.Serialize Stretch # 
Instance details

Defined in Synth.Sampler.Sample

data StretchMode Source #

This maps to [Rubberband.Option]. It's indirect to avoid a dependency on RubberbandC, and hence the C library.

prettyNote :: Note -> Text Source #

Like Pretty Note, but shorter.

forever :: RealTime Source #

The duration of a note which plays the entire sample. This should be longer than any sample, and will be clipped to sample duration.

util

pitchToRatio :: Pitch.NoteNumber -> Pitch.NoteNumber -> Y Source #

This is the resampling ratio, which is inverse to the pitch ratio, which is pretty confusing. E.g. When I go up *2, I should be skipping every other sample. So srate should be *2. Number of frames is /2. So the resampling ratio for +12nn is 1/2, while the pitch ratio is 2.

ratioToPitch :: Double -> Pitch.NoteNumber Source #

This is pitch ratio, not resample ratio!