class Haematite::PresetRegion

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.cr

Constant Summary

DEFAULT = PresetRegion.new(Preset::DEFAULT, nil, nil, nil)

Class Method Summary

Instance Method Summary

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 [](gt : GeneratorType) : Int16 #

Gets the value of a generator for this preset.


def attackModulationEnvelope : Float64 #

def attackVolumeEnvelope : Float64 #

def chorusEffectsSend : Float64 #

def coarseTune : Int #

def contains?(key : Int, velocity : Int) : Bool #

Returns true of key and velocity are both covered by this region, or false otherwise.


def decayModulationEnvelope : Float64 #

def decayVolumeEnvelope : Float64 #

def delayModulationEnvelope : Float64 #

def delayModulationLfo : Float64 #

def delayVibratoLfo : Float64 #

def delayVolumeEnvelope : Float64 #

def fineTune : Int #

def frequencyModulationLfo : Float64 #

def frequencyVibratoLfo : Float64 #

def holdModulationEnvelope : Float64 #

def holdVolumeEnvelope : Float64 #

def initialAttenuation : Float64 #

def initialFilterCutoffFrequency : Float64 #

def initialFilterQ : Float64 #

def instrument : Instrument | Nil #

The instrument associated with this region.


def instrument? : Instrument | Nil | Nil #

The instrument associated with this region.


def keyNumberToModulationEnvelopeDecay : Int #

def keyNumberToModulationEnvelopeHold : Int #

def keyNumberToVolumeEnvelopeDecay : Int #

def keyNumberToVolumeEnvelopeHold : Int #

def keyRangeEnd : Int #

def keyRangeStart : Int #

def modulationEnvelopeToFilterCutoffFrequency : Int #

def modulationEnvelopeToPitch : Int #

def modulationLfoToFilterCutoffFrequency : Int #

def modulationLfoToPitch : Int #

def modulationLfoToVolume : Float64 #

def pan : Float64 #

def releaseModulationEnvelope : Float64 #

def releaseVolumeEnvelope : Float64 #

def reverbEffectsSend : Float64 #

def scaleTuning : Int #

def setParameter(param : GeneratorType, value : Int16) #

Sets a generator value for this region.


def sustainModulationEnvelope : Float64 #

def sustainVolumeEnvelope : Float64 #

def velocityRangeEnd : Int #

def velocityRangeStart : Int #

def vibratoLfoToPitch : Int #