class Haematite::InstrumentRegion

Overview

Represents a SoundFont instrument region. Regions contain all the parameters necessary in order to synthesize a note.

Defined in:

haematite/instrument.cr

Constant Summary

DEFAULT = InstrumentRegion.new(Instrument::DEFAULT, nil, nil, nil)

Class Method Summary

Instance Method Summary

Class Method Detail

def self.create(inst : Instrument, zones : Slice(Zone), samples : Array(SampleHeader)) : Array(InstrumentRegion) #

Creates an array of InstrumentRegion instances.


Instance Method Detail

def [](gt : GeneratorType) : Int16 #

Returns a generator parameter.


def attackModulationEnvelope : Float64 #

def attackVolumeEnvelope : Float64 #

def chorusEffectsSend : Float64 #

def coarseTune : Int #

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

Returns true if this region covers the the given key and velocity, or false otherwise.


def decayModulationEnvelope : Float64 #

def decayVolumeEnvelope : Float64 #

def delayModulationEnvelope : Float64 #

def delayModulationLfo : Float64 #

def delayVibratoLfo : Float64 #

def delayVolumeEnvelope : Float64 #

def endAddressOffset : Int32 #

def endLoopAddressOffset : Int32 #

def exclusiveClass : Int #

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 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 rootKey : Int #

def sample : SampleHeader | Nil #

The sample data information associated with this region.


def sample? : SampleHeader | Nil | Nil #

The sample data information associated with this region.


def sampleEnd : Int32 #

def sampleEndLoop : Int32 #

def sampleModes : LoopMode #

def sampleStart : Int32 #

def sampleStartLoop : Int32 #

def scaleTuning : Int #

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

Sets a generator parameter for the region.


def startAddressOffset : Int32 #

def startLoopAddressOffset : Int32 #

def sustainModulationEnvelope : Float64 #

def sustainVolumeEnvelope : Float64 #

def to_s(io : IO) #
Description copied from class Reference

Appends a short String representation of this object which includes its class name and its object address.

class Person
  def initialize(@name : String, @age : Int32)
  end
end

Person.new("John", 32).to_s # => #<Person:0x10a199f20>

def velocityRangeEnd : Int #

def velocityRangeStart : Int #

def vibratoLfoToPitch : Int #