Karya, built on 2023-08-29T07:47:28 (patch 7a412d5d6ba4968ca4155ef276a062ccdeb9109a)
Safe HaskellSafe-Inferred

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 Source # 
Instance details

Defined in Synth.Sampler.Sample

Methods

showsPrec :: Int -> Note -> ShowS #

show :: Note -> String #

showList :: [Note] -> ShowS #

Pretty.Pretty Note Source # 
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 Source # 
Instance details

Defined in Synth.Sampler.Sample

Pretty.Pretty Sample Source # 
Instance details

Defined in Synth.Sampler.Sample

Serialize.Serialize Sample Source # 
Instance details

Defined in Synth.Sampler.Sample

data Stretch Source #

Constructors

Stretch 

Instances

Instances details
Show Stretch Source # 
Instance details

Defined in Synth.Sampler.Sample

Pretty.Pretty Stretch Source # 
Instance details

Defined in Synth.Sampler.Sample

Serialize.Serialize Stretch Source # 
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!