Safe Haskell | Safe-Inferred |
---|
Synopsis
- type SamplePath = FilePath
- data Note = Note {
- start :: !Frames
- duration :: !Frames
- effectControls :: Map Control.Control Signal.Signal
- sample :: Sample
- hash :: Note.Hash
- end :: Note -> Frames
- note :: Frames -> Frames -> Map Control.Control Signal.Signal -> Sample -> Note
- makeHash :: Frames -> Frames -> Map Control.Control Signal.Signal -> Sample -> Note.Hash
- data Sample = Sample {
- filename :: !SamplePath
- offset :: !Frames
- envelope :: !Signal.Signal
- pan :: !Signal.Signal
- ratios :: !Signal.Signal
- stretch :: !Stretch
- data Stretch = Stretch {
- stretchMode :: !StretchMode
- timeRatio :: !Y
- pitchRatio :: !Y
- data StretchMode
- make :: SamplePath -> Sample
- modifyFilename :: (SamplePath -> SamplePath) -> Sample -> Sample
- prettyNote :: Note -> Text
- forever :: RealTime
- pitchToRatio :: Pitch.NoteNumber -> Pitch.NoteNumber -> Y
- pitchToRatioSignal :: Pitch.NoteNumber -> Note.Note -> Signal.Signal
- relativePitchToRatio :: Pitch.NoteNumber -> Y
- ratioToPitch :: Double -> Pitch.NoteNumber
- srate :: RealTime
- toThru :: FilePath -> Sample -> Thru.Play
Documentation
type SamplePath = FilePath Source #
Path to a sample, relative to the instrument db root.
Low level representation of a note. This corresponds to a single sample played.
Note | |
|
Instances
note :: Frames -> Frames -> Map Control.Control Signal.Signal -> Sample -> Note Source #
makeHash :: Frames -> Frames -> Map Control.Control Signal.Signal -> Sample -> Note.Hash Source #
The actual sample played by a Note
.
Sample | |
|
Stretch | |
|
data StretchMode Source #
This maps to [Rubberband.Option]. It's indirect to avoid a dependency on RubberbandC, and hence the C library.
Instances
Bounded StretchMode Source # | |
Defined in Synth.Sampler.Sample minBound :: StretchMode # maxBound :: StretchMode # | |
Enum StretchMode Source # | |
Defined in Synth.Sampler.Sample succ :: StretchMode -> StretchMode # pred :: StretchMode -> StretchMode # toEnum :: Int -> StretchMode # fromEnum :: StretchMode -> Int # enumFrom :: StretchMode -> [StretchMode] # enumFromThen :: StretchMode -> StretchMode -> [StretchMode] # enumFromTo :: StretchMode -> StretchMode -> [StretchMode] # enumFromThenTo :: StretchMode -> StretchMode -> StretchMode -> [StretchMode] # | |
Show StretchMode Source # | |
Defined in Synth.Sampler.Sample showsPrec :: Int -> StretchMode -> ShowS # show :: StretchMode -> String # showList :: [StretchMode] -> ShowS # | |
Serialize.Serialize StretchMode Source # | |
Defined in Synth.Sampler.Sample |
make :: SamplePath -> Sample Source #
modifyFilename :: (SamplePath -> SamplePath) -> Sample -> Sample Source #
prettyNote :: Note -> Text Source #
Like Pretty Note, but shorter.
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!