class Haematite::PresetRegion
- Haematite::PresetRegion
- Reference
- Object
Overview
Represents a SoundFont preset region. These contain parameters that indicate how an instrument should be modified for a given preset.
Defined in:
haematite/preset.crConstant Summary
-
DEFAULT =
PresetRegion.new(Preset::DEFAULT, nil, nil, nil)
Class Method Summary
-
.create(preset : Preset, zones : Slice(Zone), instruments : Array(Instrument)) : Array(PresetRegion)
Creates an array of
PresetRegion
instances.
Instance Method Summary
-
#[](gt : GeneratorType) : Int16
Gets the value of a generator for this preset.
- #attackModulationEnvelope : Float64
- #attackVolumeEnvelope : Float64
- #chorusEffectsSend : Float64
- #coarseTune : Int
-
#contains?(key : Int, velocity : Int) : Bool
Returns
true
ofkey
andvelocity
are both covered by this region, orfalse
otherwise. - #decayModulationEnvelope : Float64
- #decayVolumeEnvelope : Float64
- #delayModulationEnvelope : Float64
- #delayModulationLfo : Float64
- #delayVibratoLfo : Float64
- #delayVolumeEnvelope : Float64
- #fineTune : Int
- #frequencyModulationLfo : Float64
- #frequencyVibratoLfo : Float64
- #holdModulationEnvelope : Float64
- #holdVolumeEnvelope : Float64
- #initialAttenuation : Float64
- #initialFilterCutoffFrequency : Float64
- #initialFilterQ : Float64
-
#instrument : Instrument | Nil
The instrument associated with this region.
-
#instrument? : Instrument | Nil | Nil
The instrument associated with this region.
- #keyNumberToModulationEnvelopeDecay : Int
- #keyNumberToModulationEnvelopeHold : Int
- #keyNumberToVolumeEnvelopeDecay : Int
- #keyNumberToVolumeEnvelopeHold : Int
- #keyRangeEnd : Int
- #keyRangeStart : Int
- #modulationEnvelopeToFilterCutoffFrequency : Int
- #modulationEnvelopeToPitch : Int
- #modulationLfoToFilterCutoffFrequency : Int
- #modulationLfoToPitch : Int
- #modulationLfoToVolume : Float64
- #pan : Float64
- #releaseModulationEnvelope : Float64
- #releaseVolumeEnvelope : Float64
- #reverbEffectsSend : Float64
- #scaleTuning : Int
-
#setParameter(param : GeneratorType, value : Int16)
Sets a generator value for this region.
- #sustainModulationEnvelope : Float64
- #sustainVolumeEnvelope : Float64
- #velocityRangeEnd : Int
- #velocityRangeStart : Int
- #vibratoLfoToPitch : Int
Class Method Detail
def self.create(preset : Preset, zones : Slice(Zone), instruments : Array(Instrument)) : Array(PresetRegion)
#
Creates an array of PresetRegion
instances.
Instance Method Detail
def contains?(key : Int, velocity : Int) : Bool
#
Returns true
of key
and velocity
are both covered by this region, or
false
otherwise.