struct SunVox::Controller

Overview

High-level wrapper around a module controller inside a SunVox::Module.

Defined in:

module.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(mod : Module, index : Int32) #

[View source]

Instance Method Detail

def display_value : Int32 #

Gets the value as displayed in the SunVox UI (CtlScale::Displayed).


[View source]
def group : Int32 #

Gets the group number of this controller.


[View source]
def index : Int32 #

[View source]
def max(scaled : CtlScale = CtlScale::Real) : Int32 #

Gets the maximum value of this controller.


[View source]
def min(scaled : CtlScale = CtlScale::Real) : Int32 #

Gets the minimum value of this controller.


[View source]
def mod : Module #

[View source]
def name : String #

Gets the name of this controller.


[View source]
def offset : Int32 #

Gets the display value offset of this controller.


[View source]
def range(scaled : CtlScale = CtlScale::Real) : Range(Int32, Int32) #

Gets the valid value range (min..max) of this controller.


[View source]
def real_value : Int32 #

Gets the raw internal controller value (CtlScale::Real).


[View source]
def scaled_value : Int32 #

Gets the scaled controller value (0x0000..0x8000 for normal controllers, CtlScale::Scaled).


[View source]
def set_value(val : Int32, scaled : CtlScale = CtlScale::Real) : self #

Sets the controller value with an explicit scaling mode (Real, Scaled, or Displayed).


[View source]
def slot : Slot #

The slot that owns this controller's module.


[View source]
def type : CtlType #

Gets the controller type (CtlType::Normal or CtlType::Selector).


[View source]
def value(scaled : CtlScale = CtlScale::Real) : Int32 #

Gets the controller value according to scaled (Real, Scaled, or Displayed).


[View source]
def value=(val : Int32) : Int32 #

Sets the controller value (using CtlScale::Real by default).


[View source]