High-level wrapper around a synth, effect, or misc module inside a SunVox::Slot.
Instance methods
>>(destination :
Module |
Int32) :
Module Chainable connection operator: gen >> filter >> reverb >> slot.output.
SourceReads a controller value by 0-based index or name.
SourceSets a controller value by 0-based index or name.
Sourcebypass?
Returns true if this module is bypassed.
Sourceclean!(track :
Int32 = 0) : self
Stops this module and clears its internal buffers (NOTECMD_CLEAN_MODULE).
Sourcecolor
Gets the module's color in 0xBBGGRR format.
SourceSets the module's color in 0xBBGGRR format.
Sourceconnect(destination : Module) : Module
Connects this module (source) to destination and returns destination for chaining.
Sourceconnect(destination_id :
Int32) :
Module Connects this module (source) to destination_id and returns the destination Module.
Sourceconnect_to_output
Connects this module directly to the slot's master Output module (module 0).
Sourcecontrollers
Returns all controllers on this module.
Sourcectl(index :
Int32) :
Controller Returns the Controller at index (0-based).
Sourcectl(name :
String) :
Controller Finds a Controller by name (case-insensitive), raising if not found.
Sourcectl?(index :
Int32) :
Controller |
Nil Returns the Controller at index if in range, or nil.
Sourcectl?(name :
String) :
Controller |
Nil Finds a Controller by name (case-insensitive), or nil if not found.
Sourcectl_count
Number of controllers on this module.
SourceReads curve values (Float32) from this module.
Sourcedisconnect(destination :
Module |
Int32) : self
Disconnects this module from destination.
Sourceeffect?
Returns true if this module is an effect (Sound input + Sound output).
Sourceexists?
Returns true if this module exists in the slot.
Sourcefinetune
Gets the module's finetune (-256..256).
SourceSets the module's finetune (-256..256) immediately.
Sourcefinetune_info
Gets both {finetune, relative_note} for this module.
Sourceflags
Raw bitflags for this module (LibSunVox::MODULE_FLAG_*).
Sourcegenerator?
Returns true if this module is a generator (Note input + Sound output).
Sourcemuted?
Returns true if this module is muted.
Sourcenote_off(track :
Int32 = 0) : self
Sends a Note Off command on track for this module.
Sourceoutput_ids
Active output module IDs connected from this module.
Sourceoutput_module?
Returns true if this is the master Output module (ID 0).
Sourceoutputs
Active output modules connected from this module.
Sourceplay_frequency(freq_hz :
Number, track :
Int32 = 0, velocity :
Int32 = 129) : self
Triggers a specific frequency (in Hz) on this module using NOTECMD_SET_PITCH.
SourceTriggers a note on this module.
Sourceraw_outputs
Raw output link slot array (may contain -1 for empty link slots).
Sourcerelative_note
Gets the module's relative note (transposition).
SourceSets the module's relative note (transposition) immediately.
Sourcerelnote
Alias for #relative_note.
SourceAlias for #relative_note=.
Sourceremove!
Removes this module from its slot.
Sourcergb
Gets the module's color unpacked into {r, g, b} bytes (0..255).
SourceLoads a sample file into this Sampler module (sample_slot = -1 replaces the whole sampler).
Sourcesampler_load(data :
Bytes, sample_slot :
Int32 = -1) : self
Loads a sample from memory (Bytes) into this Sampler module.
SourceGets a sample parameter from this Sampler module (sv_sampler_par).
SourceReads oscilloscope samples (Int16) from this module's output.
Sourcesend_event(track :
Int32 = 0, note :
Note |
Int32 =
Note::None, velocity :
Int32 = 0, ctl :
Int32 = 0, effect :
Int32 = 0, ctl_value :
Int32 = 0) : self
Sends an event targeting this module.
SourceWrites curve values (Slice(Float32)) to this module.
SourceWrites curve values (Array(Float32)) to this module.
SourceSets the module's color from RGB components (0..255).
SourceSets a sample parameter on this Sampler module (sv_sampler_par) and returns the previous value.
SourceSets the module's (x, y) coordinates.
Sourcesolo?
Returns true if this module is soloed.
Sourceto_i
Returns the integer module ID.
Sourcetype
Gets the module's type string (e.g., "Generator", "Filter Pro", "Output").
SourceLoads an OGG Vorbis file into this Vorbis Player module.
Sourcevplayer_load(data :
Bytes) : self
Loads an OGG Vorbis stream from memory (Bytes) into this Vorbis Player module.
Sourcex
Gets the module's X coordinate.
SourceSets the module's X coordinate.
Sourcexy
Gets the module's {x, y} coordinates.
Sourcey
Gets the module's Y coordinate.
SourceSets the module's Y coordinate.
Source