Safe Haskell | Safe-Inferred |
---|
Im-specific controls. Generally they are per-instrument, but like Derive.Controls, it's useful to have a standard vocabulary.
Synopsis
- newtype Control = Control Text
- dynamic :: Control
- volume :: Control
- minimumDb :: Double
- dbToVolume :: Double -> Double
- pan :: Control
- pitch :: Control
- gate :: Control
- variation :: Control
- mute :: Control
- sampleStartOffset :: Control
- supportSampleStartOffset :: Supported
- sampleTimeStretch :: Control
- supportSampleTimeStretch :: Supported
- samplePitchShift :: Control
- supportSamplePitchShift :: Supported
- type Supported = Map Control Text
- support :: Control -> Text -> Supported
- supportPitch :: Supported
- supportDyn :: Supported
- supportVariation :: Supported
Documentation
Unlike Control
, pitch is just another control.
This should come from dynamic
. Unlike score-level dyn,
whose meaning is abstract, this should be more or less on a dB scale, where
0 corresponds to minimumDb
.
It can be more closely defined here because im instruments have direct control over the sound they produce, while other backends, like MIDI, are up to the whims of the synthesizer's interpretation.
A dynamic
of 1 maps to 0dB of attenuation, and 0 maps to this level.
Humans maybe have a limit around 120dB, but 96 is a theoretical maximum for
16 bit audio, which is likely what this turns into anyway.
My manual experiment shows that -96 on a normalized sample is just about inaudible.
- 1 means pan left, 1 means pan right. Unlike other controls, the range is
- 1 to 1 instead of 0 to 1. This is so adding signals is the same as adding pan, and a 0 signal has no effect.
Used by some synths to mark note start and end times. This should be used internally, not exposed.
sampleTimeStretch :: Control Source #
Inflict time stretch on the sample.
samplePitchShift :: Control Source #
Inflict pitch shift on the sample. Units are Pitch.NoteNumbers.