class Haematite::Voice

Overview

An individual voice that is currently active/being played by the synthesizer.

Defined in:

haematite/voice.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(synth : Synthesizer, filterMode : FilterMode = DEFAULT_VOICE_FILTER, chanFilterMode : FilterMode = DEFAULT_VOICE_FILTER) #

Creates a new Voice instance.


Instance Method Detail

def block : Array(Float64) #

The rendered data for this voice.


def chanFilterMode : FilterMode #

def channel : Int32 #

The channel this voice is playing on.


def filterMode : FilterMode #

Describes what kind of lowpass filter is used for the voice.

Note that the SoundFont standard specifies that the filter should be a 12db (2-pole) filter, but Haematite allows you to use other filters as well.


def finish #

Requests that the voice move into its release cycle.


def key : Int32 #

The note/MIDI key number this voice is playing.


def kill #

Immediately silences the voice.


def process : Bool #

"Runs" the voice.


def start(pair : RegionPair, channel : Int32, key : Int32, velocity : Int32) #

Starts playing the voice.


def velocity : Int32 #

The velocity of the key press of this voice.