uvi-script
Musical event scripting with Lua
Loading...
Searching...
No Matches
Oscillator Class Reference

The Synthesis primitive. More...

Inheritance diagram for Oscillator:
Element SampleBasedOscillator SampleMappingOscillator SamplePlayer

Public Types

enum  Parameters {
  Pitch ,
  NoteTracking ,
  BaseNote ,
  Gain ,
  CoarseTune ,
  FineTune
}
 Oscillator Parameters. More...
 

Public Member Functions

table getSliceInfo (int sliceId)
 get slice information for the given sliceId.
 
- Public Member Functions inherited from Element
void setParameter (string parameter, Value value)
 Sets an Element parameter.
 
Value getParameter (string parameter)
 Gets an Element parameter.
 
bool hasParameter (string parameter)
 
table getParameterConnections (string parameter)
 Get all SignalConnection for this parameter.
 

Public Attributes

Keygroup keygroup
 parent keygroup for this oscillator
 
bool purged
 purged status for this oscillator (when true sample is not loaded in memory)
 
int numSlices
 number of slices (only valid for Slice oscillator)
 
table looplabInfo
 looplab information.
 
table sampleInfo
 sample information.
 
- Public Attributes inherited from Element
string name
 internal element name
 
string displayName
 name to display on the User Interface, name is used if displayName is not specified.
 
string type
 internal element type
 
string path
 full path of the element in the synthesis tree
 
Elementparent
 element parent
 
table children
 element children using the element name as key
 
table synthChildren
 children of the element in the synthesis hierarchy, as a 1-indexed array.
 
table mods
 all ControlSignalSource for this node as a 1-indexed array (same content as modulations, keyed by index instead of name)
 
int output
 output bus index for the element. Reading returns the index parsed from the current output bus name (1 when the element uses the default bus). Writing is asynchronous: the engine applies the new routing shortly after the assignment, so reading the property back immediately may still return the old value. Assigning on an element that cannot change its output raises an error.
 
int numParams
 number of parameters
 
table parameterDefinitions
 table of parameter definitions.
 

Detailed Description

The Synthesis primitive.

Member Enumeration Documentation

◆ Parameters

Oscillator Parameters.

Enumerator
Pitch 

oscillator pitch

NoteTracking 

keyboard note tracking on/off

BaseNote 

base MIDI note for pitch mapping

Gain 

oscillator output gain

CoarseTune 

coarse tuning in semitones

FineTune 

fine tuning in cents

Member Function Documentation

◆ getSliceInfo()

table Oscillator::getSliceInfo ( int sliceId)

get slice information for the given sliceId.

Returns
returns the following table:
property type unit
start number ms
duration number ms
beatPos number beats
beatDuration number beats

Member Data Documentation

◆ looplabInfo

table Oscillator::looplabInfo

looplab information.

Only valid for Slice oscillator, returns the following table:

property type
numerator number
denominator number
bars number
beats number
synced boolean
numSlices number

◆ sampleInfo

table Oscillator::sampleInfo

sample information.

Only valid for sample based oscillators, returns the following table:

property type unit optional
name string no
type number no
channels number no
duration number ms no
samplerate number Hz no
bits number no
tempo number bpm no
basenote number no
finetune number cents no
start number ms no
end number ms no
looped boolean no
loopStart number ms yes
loopEnd number ms yes

type is the audio file format code: 0 = WAV, 1 = AIFF, 2 = SD2, 3 = CAF, 4 = UVI, 5 = REX, 6 = USF, 7 = FLAC, 8 = multi, 9 = other. basenote is the MIDI root note of the sample (from the file's sampler chunk, 60 when the file does not specify one) and finetune its fine tuning in cents.