class Haematite::AudChannel
- Haematite::AudChannel
- Reference
- Object
Overview
Representation of a MIDI channel.
Defined in:
haematite/audchannel.crConstructors
-
.new(synth : Synthesizer, isPercussionChannel : Bool, filterMode : FilterMode)
Creates a new
AudChannel
instance.
Instance Method Summary
-
#bank=(val : Int32)
Sets the bank number.
-
#bankNumber : Int32
The instrument bank number assigned to this channel.
-
#chorusSend : Float64
Returns the current chorus amount for the channel.
-
#chorusSend=(val : UInt8)
Sets the chorus amount for the channel.
- #cutoff : Float64
-
#cutoff=(val : UInt8)
Sets the cutoff frequency.
-
#dataEntryCoarse(val : Int32)
MIDI Data Entry MSB
-
#dataEntryFine(val : Int32)
MIDI Data Entry LSB
-
#expression : Float64
Returns the current expression amount.
-
#expressionCoarse=(val : Int32)
Sets the coarse expression.
-
#expressionFine=(val : Int32)
Sets the fine expression.
-
#filterMode : FilterMode
Describes what kind of lowpass filter is used when applying MIDI controllers 74 and 71.
-
#holdPedal : Bool
Whether or not the sustain pedal is depressed.
-
#holdPedal=(val : Int)
Sets the sustain pedal state to
true
ifval
is greater than or equal to 64, orfalse
otherwise. -
#holdPedal=(val : Bool)
Sets the sustain pedal state.
-
#isPercussionChannel : Bool
Whether or not this channel is set to be a percussion channel.
-
#modulation : Float64
Returns the current modulation amount.
-
#modulationCoarse=(val : Int32)
Sets the coarse modulation amount.
-
#modulationFine=(val : Int32)
Sets the fine modulation amount.
-
#nrpnCoarse=(val : Int32)
Sets the coarse NRPN value.
-
#nrpnFine=(val : Int32)
Sets the fine NRPN value.
-
#pan : Float64
Returns the current panning.
-
#panCoarse=(val : Int32)
Sets the coarse panning.
-
#panFine=(val : Int32)
Sets the fine panning.
-
#patch=(val : Int32)
Sets the patch number.
-
#patchNumber : Int32
The patch number assigned to this channel.
-
#pitchBend : Float64
Returns the current pitch bend amount for the channel.
-
#pitchBendRange : Float64
Returns the pitch bend range.
-
#reset
Resets the channel back to the initial state.
-
#resetAllControllers
Resets the controllers for the channel (modulation, expression, sustain pedal, rpn, and pitch bend).
- #resonance : Float64
-
#resonance=(val : UInt8)
Sets the resonance of the filter.
-
#reverbSend : Float64
Returns the current reverb amount for the channel.
-
#reverbSend=(val : UInt8)
Sets the reverb amount for the channel.
-
#rpnCoarse=(val : Int32)
Sets the coarse RPN value.
-
#rpnFine=(val : Int32)
Sets the fine RPN value.
-
#setPitchBend(val1 : Int, val2 : Int)
Sets the pitch bend amount.
-
#tune : Float64
Returns the tuning.
-
#volume : Float64
Returns the current volume.
-
#volumeCoarse=(val : Int32)
Sets the coarse volume.
-
#volumeFine=(val : Int32)
Sets the fine volume.
Constructor Detail
Instance Method Detail
Sets the bank number. If #isPercussionChannel
is true
, then this will
automatically add 128 to the bank number.
Describes what kind of lowpass filter is used when applying MIDI controllers 74 and 71.
Sets the sustain pedal state to true
if val
is greater than or equal
to 64, or false
otherwise.
Resets the channel back to the initial state.
- The bank number is set # according to
#isPercussionChannel
- The patch number is set to 0.
- Modulation is set to 0
- Volume is set to 12800 (
100 << 7
) - Pan is set to 8192 (
64 << 7
, center) - Expression is set to 16256 (
127 << 7
) - Pitch bend range is set to 256 (
2 << 7
, two semitones) - Pitch bend is set to 0
- Coarse tune is set to 0
- Fine tune is set to 8192
- The RPN is set to -1
- The NRPN is set to -1
- The RPN/NRPN data is set to 0
- The sustain pedal is not depressed
- Reverb and Chorus are set to
DEFAULT_REVERB_SEND
andDEFAULT_CHORUS_SEND
, respectively.