SunVox
Constants
Class methods
Gets the next piece of SunVox audio from the Output module (requires offline: true).
Sends audio to the Input module and receives filtered audio from the Output module (requires offline: true).
Closes a slot. Raises exception if the slot is closed or something goes wrong.
Connect a module src to a module dest.
Disconnect a module src from a module dest.
Find a module in a slot by name (returns -1 if not found).
Finds the pattern in slot by name (returns -1 if not found).
Gets the SunVox version used to create the project in slot.
The current line the playhead is at in fixed-point 27.5 format.
Gets the current output signal level (0..255).
Get the color of a module in 0xBBGGRR format.
Get the group number of a module's controller.
Get the maximum value of a module's controller.
Get the minimum value of a module's controller.
Get the name of a module's controller.
Get the display value offset of a module's controller.
Get the type of a module's controller (CtlType::Normal or CtlType::Selector).
Get the value of a module's controller (scaled can be a Bool, CtlScale, or 0..2).
Get the curve data (Slice(Float32)) from a module.
Get module's {finetune, relative_note} values.
Get the flags set on a module.
A slice of all input link slots a module has (entries may be -1 if unconnected).
The number of module input link slots.
Gets the name of a module.
A slice of all output link slots a module has (entries may be -1 if unconnected).
The number of module output link slots.
Get the raw audio output scope values (Slice(Int16)) for a module.
Gets the type string of a module (e.g. "Generator", "Filter Pro", "Output").
Get the {x, y} position of a module.
Get the number of controllers a module has.
Get the event data, separated by tracks (Array(Array(SunVox::Event))).
Reads a field (column) from the pattern event at (track, line).
Gets the number of lines in a pattern.
Gets the pattern's name.
Gets the number of tracks in a pattern.
Gets the pattern's starting line (X coordinate on timeline).
Gets the pattern's vertical position (Y coordinate on timeline).
Returns the raw mutable pattern buffer (Slice(LibSunVox::Event)).
Gets a sample parameter from a Sampler module.
Get the length of the song in seconds as a Time::Span.
Loads a project file from disk into a slot.
Loads a project from a memory buffer (Bytes) into a slot.
Load a module from a file (sunsynth, xi, wav, aiff, ogg, mp3, flac).
Load a module or sample from a memory block (Bytes).
Loads a file (sunvox, mod, xm, midi) into a MetaModule.
Loads a file from memory (Bytes) into a MetaModule.
Create a new module in slot. Returns the number of the new module.
Creates a new pattern in slot. Returns the pattern number.
Opens a slot (defaults to Slot::Zero) and returns the Slot.
Opens a slot for the duration of the block and ensures it is closed afterwards.
Mute/Unmute the pattern. Returns the previous mute state (true if previously muted).
Queries whether pattern_num is currently muted without changing its state.
Remove the module module_num in slot.
Removes a pattern in slot.
Returns whether or not autostop is set (preserved for backwards compatibility).
Loads a file into a Sampler (xi, wav, aiff, ogg, mp3, flac).
Loads a sample from memory (Bytes) into a Sampler module.
Gets or sets a sample parameter on a Sampler module (sv_sampler_par).
Saves the project in slot to a file on disk.
Saves the project in slot to a newly allocated Bytes slice in memory.
Sends an event to SunVox. Can be used to send notes, change ctl values, or set note effects.
Sends an event to SunVox. Can be used to send notes, change ctl values, or set note effects.
Sends an Event record to SunVox on track_num.
Enables or disables autostop on slot.
Sets the timestamp of events to be sent by send_event.
Set the color of a module in 0xBBGGRR format.
Set the value of a module's controller (sv_set_module_ctl_value).
Set the curve data of a module. Returns the number of items written.
Set the module's finetune (-256..256) immediately.
Sets the name of a module.
Set the module's relative note (transposition) immediately.
Set the (x, y) position of a module.
Writes a pattern event to the cell at (track, line). Negative field values are ignored (left unchanged).
Sets the pattern's name.
Sets the number of tracks and/or lines of a pattern (-1 leaves unchanged).
Sets the pattern's (x, y) coordinates on the timeline.
Sets autostop flag (preserved for backwards compatibility).
Sets a sample parameter on a Sampler module and returns the previous value.
Jumps the current position of the playhead to a line number.
Starts up the SunVox Engine. Hooks at_exit to ensure stop_engine is run on close.
Starts the SunVox Engine for the duration of the block and ensures stop_engine is called afterwards.
Stops the current song from playing. 2 calls will stop all the synths and sounds.
Waits for sync (pattern effect 0x33 on any slot) and resumes the audio stream on slot.
Gets the project time map for len lines starting at start_line.
Sets the output volume of the slot (0..256). Negative values query current volume without changing it.
Loads an OGG file into a Vorbis Player module.